[pykde4] upstream fix for PyQt-4.11 ftbfs

Rex Dieter rdieter at fedoraproject.org
Mon Jun 30 22:40:15 UTC 2014


commit 021385264079c5a68b853378df1757de56381d70
Author: Rex Dieter <rdieter at math.unl.edu>
Date:   Mon Jun 30 17:40:19 2014 -0500

    upstream fix for PyQt-4.11 ftbfs

 .gitignore                             |    1 -
 0001-Fix-building-with-PyQt-4.11.patch |   73 ++++++++++++++++++++++++++++++++
 pykde4.spec                            |   10 +++--
 3 files changed, 79 insertions(+), 5 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 64a7409..7cae621 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1 @@
-/pykde4-4.13.1.tar.xz
 /pykde4-4.13.2.tar.xz
diff --git a/0001-Fix-building-with-PyQt-4.11.patch b/0001-Fix-building-with-PyQt-4.11.patch
new file mode 100644
index 0000000..788fd02
--- /dev/null
+++ b/0001-Fix-building-with-PyQt-4.11.patch
@@ -0,0 +1,73 @@
+From 1e9817f99b405a66199fe9f62de31d3870e3ad12 Mon Sep 17 00:00:00 2001
+From: Luca Beltrame <lbeltrame at kde.org>
+Date: Fri, 20 Jun 2014 11:08:31 +0200
+Subject: [PATCH] Fix building with PyQt >= 4.11
+
+PyQt 4.11 adds new typedefs for GLuint, and these clash with the ones
+defined in PyKDE4. Using a conditional in the sip file, the old
+definitions are only kept if PyQt's version is lower than 4.11.
+
+Checks have been added also for the Python 3 definitions.
+
+CCMAIL: kde-packager at kde.org
+---
+ CMakeLists.txt          | 18 +++++++++++++++---
+ sip/plasma/glapplet.sip |  5 +++++
+ 2 files changed, 20 insertions(+), 3 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index cf133d7..5233da8 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -113,15 +113,27 @@ set(SIP_DISABLE_FEATURES VendorID PyQt_NoPrintRangeBug)
+ # Use an extra option when compiling on Python 3.
+ if (PYTHON_VERSION_MAJOR GREATER 2)
+     if(PYQT4_VERSION STRGREATER "040904")
+-	    # Disable for newer PyQt
+-	    set(SIP_EXTRA_OPTIONS -P -g -x PyKDE_QVector)
++	    # Disable for features in newer Qt
++        if (PYQT4_VERSION STRGREATER "040a04")
++            # GLuint + QVector (PyQt > 4.11)
++            set(SIP_EXTRA_OPTIONS -P -g -x PyKDE_QVector -x PyKDE_GLuint)
++        else ()
++            # QVector (PyQt < 4.11)
++            set(SIP_EXTRA_OPTIONS -P -g -x PyKDE_QVector)
++        endif ()
+     else ()
+ 	    set(SIP_EXTRA_OPTIONS -g)
+     endif()
+ else (PYTHON_VERSION_MAJOR GREATER 2)
+     if(PYQT4_VERSION STRGREATER "040904")
+ 	# Disable for newer PyQt
+-    	set(SIP_EXTRA_OPTIONS -P -g -x PyKDE_QVector -x Py_v3)
++        if (PYQT4_VERSION STRGREATER "040a04")
++            # GLuint + QVector (PyQt > 4.11)
++            set(SIP_EXTRA_OPTIONS -P -g -x PyKDE_QVector -x Py_v3 -x PyKDE_GLuint)
++        else ()
++            # QVector (PyQt < 4.11)
++            set(SIP_EXTRA_OPTIONS -P -g -x PyKDE_QVector -x Py_v3)
++        endif ()
+     else ()
+ 	    set(SIP_EXTRA_OPTIONS -g -x Py_v3)
+     endif()
+diff --git a/sip/plasma/glapplet.sip b/sip/plasma/glapplet.sip
+index ab35ccb..15dbd47 100644
+--- a/sip/plasma/glapplet.sip
++++ b/sip/plasma/glapplet.sip
+@@ -18,8 +18,13 @@
+ // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ 
+ //force
++
++%Feature PyKDE_GLuint
++
++%If (PyKDE_GLuint)
+ typedef unsigned int GLuint;
+ typedef unsigned int GLenum;
++%End
+ 
+ namespace Plasma
+ {
+-- 
+1.9.3
+
diff --git a/pykde4.spec b/pykde4.spec
index b3e8414..c1b50d7 100644
--- a/pykde4.spec
+++ b/pykde4.spec
@@ -15,7 +15,7 @@
 
 Name:    pykde4 
 Version: 4.13.2
-Release: 1%{?dist}
+Release: 2%{?dist}
 Summary: Python bindings for KDE4 
 
 # http://techbase.kde.org/Policies/Licensing_Policy
@@ -41,10 +41,9 @@ Patch50: pykde4-4.12.3-python_library_realpath.patch
 %define sip_version_min 4.15.5
 %endif
 Patch51: pykde4-4.12.3-sip_4_15_5.patch
-# FTBFS against sip-4.16 (GLuint, GLenum already defined)
-Patch52: pykde4-4.13.1-sip416.patch
 
 ## upstream patches
+Patch101: 0001-Fix-building-with-PyQt-4.11.patch
 
 # debian patches
 Patch201: add_qt_kde_definitions.diff
@@ -159,7 +158,7 @@ Provides:  python3-PyKDE4-devel%{?_isa} = %{version}-%{release}
 %if "%{?sip_version_min}" == "4.15.5"
 %patch51 -p1 -b .sip_4_15_5
 %endif
-%patch52 -p1 -b .sip416
+%patch101 -p1 -b .0001
 
 %patch201 -p1 -b .201
 %patch202 -p1 -b .202
@@ -299,6 +298,9 @@ mv %{buildroot}%{_kde4_appsdir}/pykde4/examples/ %{buildroot}%{_docdir}/pykde4/
 
 
 %changelog
+* Mon Jun 30 2014 Rex Dieter <rdieter at fedoraproject.org> 4.13.2-2
+- upstream fix for PyQt-4.11 ftbfs
+
 * Mon Jun 09 2014 Rex Dieter <rdieter at fedoraproject.org> - 4.13.2-1
 - 4.13.2
 


More information about the scm-commits mailing list