[PyQt4] - backport patch to fix kdebindings/pykde ftbfs - drop sip-devel min version a bit to match reality

Rex Dieter rdieter at fedoraproject.org
Sat Oct 2 15:41:42 UTC 2010


commit df36737e22cb0e6e9f5721937adb85e74eab5f9a
Author: Rex Dieter <rdieter at fedoraproject.org>
Date:   Sat Oct 2 10:47:23 2010 -0500

    - backport patch to fix kdebindings/pykde ftbfs
    - drop sip-devel min version a bit to match reality

 PyQt4-4.7.7-fix-scpk-and-flags.patch |   40 ++++++++++++++++++++++++++++++++++
 PyQt4.spec                           |   12 +++++++--
 2 files changed, 49 insertions(+), 3 deletions(-)
---
diff --git a/PyQt4-4.7.7-fix-scpk-and-flags.patch b/PyQt4-4.7.7-fix-scpk-and-flags.patch
new file mode 100644
index 0000000..38083e7
--- /dev/null
+++ b/PyQt4-4.7.7-fix-scpk-and-flags.patch
@@ -0,0 +1,40 @@
+Index: PyQt-x11-gpl-4.7.7/pyuic/uic/Loader/loader.py
+===================================================================
+--- PyQt-x11-gpl-4.7.7.orig/pyuic/uic/Loader/loader.py
++++ PyQt-x11-gpl-4.7.7/pyuic/uic/Loader/loader.py
+@@ -1,3 +1,5 @@
++import os.path
++
+ from PyQt4 import QtGui, QtCore
+ from PyQt4.uic.uiparser import UIParser
+ from PyQt4.uic.Loader.qobjectcreator import LoaderCreatorPolicy
+@@ -19,6 +21,7 @@ class DynamicUILoader(UIParser):
+     def loadUi(self, filename, toplevelInst=None):
+         self.toplevelInst = toplevelInst
+ 
+-        # By using QFileInfo.path() rather than os.path.dirname() we allow
+-        # QString file names.
+-        return self.parse(filename, QtCore.QFileInfo(filename).path())
++        # Allow the filename to be a QString.
++        filename = str(filename)
++
++        return self.parse(filename, os.path.dirname(filename))
+Index: PyQt-x11-gpl-4.7.7/sip/QtCore/qglobal.sip
+===================================================================
+--- PyQt-x11-gpl-4.7.7.orig/sip/QtCore/qglobal.sip
++++ PyQt-x11-gpl-4.7.7/sip/QtCore/qglobal.sip
+@@ -312,12 +312,12 @@ public:
+     // Qt.Alignment class.
+     QFlags operator|(int f);
+ %MethodCode
+-        sipRes = new QFlags(*a0 | (ENUM(a1)));
++        sipRes = new QFlags(*a0 | a1);
+ %End
+ 
+     QFlags operator^(int f);
+ %MethodCode
+-        sipRes = new QFlags(*a0 ^ (ENUM(a1)));
++        sipRes = new QFlags(*a0 ^ a1);
+ %End
+ 
+     // These are necessary to prevent Python comparing object IDs.
diff --git a/PyQt4.spec b/PyQt4.spec
index 0c5788d..43021db 100644
--- a/PyQt4.spec
+++ b/PyQt4.spec
@@ -8,7 +8,7 @@
 Summary: Python bindings for Qt4
 Name: 	 PyQt4
 Version: 4.7.7
-Release: 2%{?dist}
+Release: 3%{?dist}
 
 # GPLv2 exceptions(see GPL_EXCEPTIONS*.txt)
 License: GPLv3 or GPLv2 with exceptions
@@ -27,6 +27,7 @@ Patch5:  PyQt-x11-gpl-4.6.2-timestamp-multilib.patch
 Patch6:  PyQt-x11-gpl-4.7.2-fix-implicit-linking.patch
 
 ## upstream patches
+Patch100: PyQt4-4.7.7-fix-scpk-and-flags.patch
 
 BuildRequires: chrpath
 BuildRequires: dbus-devel dbus-python-devel
@@ -44,11 +45,11 @@ BuildRequires: python-devel
 %global python_sitelib  %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
 %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")
 
-BuildRequires: sip-devel >= 4.11.1
+BuildRequires: sip-devel >= 4.10.3
 
 %if 0%{?with_python3}
 BuildRequires: python3-devel
-BuildRequires: python3-sip-devel >= 4.11.1
+BuildRequires: python3-sip-devel >= 4.10.3
 %endif # with_python3
 
 Requires: dbus-python
@@ -98,6 +99,7 @@ from any of the Qt4 classes (e.g. KDE or your own).
 %patch4 -p1 
 %patch5 -p1 -b .timestamp
 %patch6 -p1 -b .fix-implicit-linking
+%patch100 -p1 -b .fix-scpk-and-flags
 
 ## permissions
 # mark examples non-executable
@@ -245,6 +247,10 @@ rm -rf %{buildroot}
 
 
 %changelog
+* Sat Oct 02 2010 Rex Dieter <rdieter at fedoraproject.org> - 4.7.7-3
+- backport patch to fix kdebindings/pykde ftbfs
+- drop sip-devel min version a bit to match reality
+
 * Wed Sep 29 2010 jkeating - 4.7.7-2
 - Rebuilt for gcc bug 634757
 


More information about the scm-commits mailing list