[PyQt4] PyQt4 opengl-types.sip multilib conflict (#509415)
Rex Dieter
rdieter at fedoraproject.org
Thu Jun 21 15:41:42 UTC 2012
commit 568480d1f3eb3027984fe2826b2071566be36ed9
Author: Rex Dieter <rdieter at fedoraproject.org>
Date: Thu Jun 21 10:44:49 2012 -0500
PyQt4 opengl-types.sip multilib conflict (#509415)
PyQt-x11-gpl-4.9.1-opengl_types.patch | 38 +++++++++++++++++++++++++++++++++
PyQt4.spec | 17 +++++++++++++-
2 files changed, 54 insertions(+), 1 deletions(-)
---
diff --git a/PyQt-x11-gpl-4.9.1-opengl_types.patch b/PyQt-x11-gpl-4.9.1-opengl_types.patch
new file mode 100644
index 0000000..67591c0
--- /dev/null
+++ b/PyQt-x11-gpl-4.9.1-opengl_types.patch
@@ -0,0 +1,38 @@
+diff -up PyQt-x11-gpl-4.9.1/configure.py.opengl_types PyQt-x11-gpl-4.9.1/configure.py
+--- PyQt-x11-gpl-4.9.1/configure.py.opengl_types 2012-06-21 09:52:52.916412238 -0500
++++ PyQt-x11-gpl-4.9.1/configure.py 2012-06-21 10:03:09.297706409 -0500
+@@ -1203,22 +1203,30 @@ int main(int, char **)
+
+ QTextStream out(&outf);
+
+- if (sizeof (long) == sizeof (GLint))
++ if (sizeof (int) == sizeof (GLint))
++ out << "typedef int GLint;\\n";
++ else if (sizeof (long) == sizeof (GLint))
+ out << "typedef long GLint;\\n";
+ else
+ out << "typedef int GLint;\\n";
+
+- if (sizeof (unsigned long) == sizeof (GLuint))
++ if (sizeof (unsigned) == sizeof (GLuint))
++ out << "typedef unsigned GLuint;\\n";
++ else if (sizeof (unsigned long) == sizeof (GLuint))
+ out << "typedef unsigned long GLuint;\\n";
+ else
+ out << "typedef unsigned GLuint;\\n";
+
+- if (sizeof (unsigned long) == sizeof (GLenum))
++ if (sizeof (unsigned) == sizeof (GLenum))
++ out << "typedef unsigned GLenum;\\n";
++ else if (sizeof (unsigned long) == sizeof (GLenum))
+ out << "typedef unsigned long GLenum;\\n";
+ else
+ out << "typedef unsigned GLenum;\\n";
+
+- if (sizeof (unsigned long) == sizeof (GLbitfield))
++ if (sizeof (unsigned) == sizeof (GLbitfield))
++ out << "typedef unsigned GLbitfield;\\n";
++ else if (sizeof (unsigned long) == sizeof (GLbitfield))
+ out << "typedef unsigned long GLbitfield;\\n";
+ else
+ out << "typedef unsigned GLbitfield;\\n";
diff --git a/PyQt4.spec b/PyQt4.spec
index 0a27fee..cacc721 100644
--- a/PyQt4.spec
+++ b/PyQt4.spec
@@ -4,7 +4,7 @@
Summary: Python bindings for Qt4
Name: PyQt4
Version: 4.9.1
-Release: 3%{?dist}
+Release: 4%{?dist}
# GPLv2 exceptions(see GPL_EXCEPTIONS*.txt)
License: GPLv3 or GPLv2 with exceptions
@@ -18,6 +18,10 @@ Patch4: PyQt-x11-gpl-4.8.3-pyuic_shbang.patch
## upstreamable patches
# fix multilib conflict because of timestamp
Patch50: PyQt-x11-gpl-4.6.2-timestamp-multilib.patch
+# multilib-safe(r) opengl_types.sip (hopefully)
+# simpler approach may be to not try to change these at buildime (only verify),
+# if /usr/include/GL/gl.h ever changes these types, we have bigger problems
+Patch51: PyQt-x11-gpl-4.9.1-opengl_types.patch
## upstream patches
# fix FTBFS on ARM
@@ -113,6 +117,9 @@ from any of the Qt4 classes (e.g. KDE or your own).
%patch4 -p1
%patch50 -p1 -b .timestamp
+%patch51 -p1 -b .opengl_types
+# save orig for comparison later
+cp -a ./sip/QtOpenGL/opengl_types.sip ./sip/QtOpenGL/opengl_types.sip.orig
%patch60 -p1 -b .arm
%if 0%{?rhel}
%patch300 -p1 -b .webkit
@@ -221,6 +228,11 @@ test -f %{buildroot}%{python3_sitearch}/PyQt4/phonon.so
test -d %{buildroot}%{_datadir}/python3-sip/PyQt4/phonon
%endif # with_python3
+# verify opengl_types.sip sanity
+diff -u ./sip/QtOpenGL/opengl_types.sip.orig \
+ ./sip/QtOpenGL/opengl_types.sip ||:
+
+
%clean
rm -rf %{buildroot}
@@ -273,6 +285,9 @@ rm -rf %{buildroot}
%changelog
+* Thu Jun 21 2012 Rex Dieter <rdieter at fedoraproject.org> 4.9.1-4
+- PyQt4 opengl-types.sip multilib conflict (#509415)
+
* Fri May 04 2012 Than Ngo <than at redhat.com> - 4.9.1-3
- add rhel/fedora condition
More information about the scm-commits
mailing list