rpms/qt4/devel qconfig.h, NONE, 1.1 qt-x11-opensource-src-4.2.2-multilib.patch, NONE, 1.1 qt4.spec, 1.29, 1.30

Rex Dieter (rdieter) fedora-extras-commits at redhat.com
Tue Feb 27 19:14:12 UTC 2007


Author: rdieter

Update of /cvs/extras/rpms/qt4/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12762

Modified Files:
	qt4.spec 
Added Files:
	qconfig.h qt-x11-opensource-src-4.2.2-multilib.patch 
Log Message:
* Tue Feb 27 2007 Rex Dieter <rdieter[AT]fedoraproject.org> 4.2.2-3
- drop ./configure -no-reduce-exports (ie, support visibility) 
- multilib issues (#223663)



--- NEW FILE qconfig.h ---
/* qconfig.h */
/* hack for multilib'ing, see */

#if defined(__x86_64__)
#include<qconfig-x86_64.h>
#elif defined(__i386__)
#include<qconfig-i386.h>
#elif defined(__ppc64__)
#include<qconfig-ppc64.h>
#elif defined(__ppc__)
#include<qconfig-ppc.h>
#elif defined(__sparc__)
#include<qconfig-sparc.h>
#else
#error arch unsupported, see http://bugzilla.redhat.com/223663
#endif

qt-x11-opensource-src-4.2.2-multilib.patch:

--- NEW FILE qt-x11-opensource-src-4.2.2-multilib.patch ---
--- qt-x11-opensource-src-4.2.2/mkspecs/linux-g++-64/qmake.conf.multilib	2006-11-27 11:26:42.000000000 -0600
+++ qt-x11-opensource-src-4.2.2/mkspecs/linux-g++-64/qmake.conf	2007-02-26 15:01:02.000000000 -0600
@@ -14,6 +14,8 @@
 QMAKE_CFLAGS		= -m64
 QMAKE_LFLAGS		= -m64
 
+QMAKE_CFLAGS_RELEASE	+= -O2
+
 include(../common/g++.conf)
 include(../common/linux.conf)
 
--- qt-x11-opensource-src-4.2.2/mkspecs/linux-g++-32/qmake.conf.multilib	2006-11-27 11:26:42.000000000 -0600
+++ qt-x11-opensource-src-4.2.2/mkspecs/linux-g++-32/qmake.conf	2007-02-26 15:01:34.000000000 -0600
@@ -11,6 +11,8 @@
 QMAKE_CFLAGS		= -m32
 QMAKE_LFLAGS		= -m32
 
+QMAKE_CFLAGS_RELEASE	+= -O2
+
 include(../common/g++.conf)
 include(../common/linux.conf)
 load(qt_config)
--- qt-x11-opensource-src-4.2.2/mkspecs/linux-g++/qmake.conf.multilib	2006-11-27 11:26:42.000000000 -0600
+++ qt-x11-opensource-src-4.2.2/mkspecs/linux-g++/qmake.conf	2007-02-26 15:01:26.000000000 -0600
@@ -8,6 +8,8 @@
 QT			+= core gui
 QMAKE_INCREMENTAL_STYLE = sublib
 
+QMAKE_CFLAGS_RELEASE	+= -O2
+
 include(../common/g++.conf)
 include(../common/linux.conf)
 load(qt_config)
--- qt-x11-opensource-src-4.2.2/qmake/project.cpp.QMAKEPATH	2006-11-27 11:26:03.000000000 -0600
+++ qt-x11-opensource-src-4.2.2/qmake/project.cpp	2007-02-26 13:45:39.000000000 -0600
@@ -498,6 +498,7 @@
             ret << ((*it) + concat);
     }
     ret << QLibraryInfo::location(QLibraryInfo::DataPath) + concat;
+    ret << QLibraryInfo::location(QLibraryInfo::PrefixPath) + concat;
 
     return ret;
 }


Index: qt4.spec
===================================================================
RCS file: /cvs/extras/rpms/qt4/devel/qt4.spec,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- qt4.spec	6 Dec 2006 17:22:25 -0000	1.29
+++ qt4.spec	27 Feb 2007 19:13:39 -0000	1.30
@@ -13,7 +13,7 @@
 Summary: Qt toolkit
 Name:	 qt4
 Version: 4.2.2
-Release: 2%{?dist}
+Release: 3%{?dist}
 
 License: GPL/QPL
 Group: 	 System Environment/Libraries
@@ -25,8 +25,14 @@
 %endif
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
+# See http://bugzilla.redhat.com/223663
+ExclusiveArch: %{ix86} x86_64 ppc
+Source5: qconfig.h
+
 # search for assistant-qt4 instead of (qt3's) assistant in $PATH 
 Patch1: qt-x11-opensource-src-4.1.2-assistant4.patch
+# look in PrefixPath/mkspecs too
+Patch2: qt-x11-opensource-src-4.2.2-multilib.patch
 
 Source10: qt4-wrapper.sh
 
@@ -39,7 +45,7 @@
 ## optional plugin bits
 # set to -no-sql-<driver> to disable
 # set to -qt-sql-<driver> to enable *in* qt library
-#if "%{?fedora}" > "3" || "%{?rhel}" > "3"
+#if 0%{?fedora} > 3 || 0%{?rhel} > 3
 %define mysql  -plugin-sql-mysql
 #endif
 %define odbc   -plugin-sql-odbc 
@@ -48,8 +54,7 @@
 
 # undefine to disable these
 %define nas     -system-nas-sound
-# watch http://bugzilla.redhat.com/207923 so we may be able to include this on FC-5 someday
-%if "%{?fedora}" > "5"
+%if 0%{?fedora} > 4 || 0%{?rhel} > 4
 %define qdbus	-qdbus
 BuildRequires: dbus-devel >= 0.62
 %endif
@@ -88,7 +93,7 @@
 #define x_deps libGL-devel libGLU-devel
 ## but, "xorg-x11-devel: missing dep on libGL/libGLU" - http://bugzilla.redhat.com/211898 
 %define x_deps xorg-x11-devel xorg-x11-Mesa-libGL xorg-x11-Mesa-libGLU
-%if "%{?fedora}" > "4" || "%{?rhel}" > "4"
+%if 0%{?fedora} > 4 || 0%{?rhel} > 4
 %define x_deps libICE-devel libSM-devel libXcursor-devel libXext-devel libXfixes-devel libXft-devel libXi-devel libXinerama-devel libXrandr-devel libXrender-devel libXt-devel libX11-devel xorg-x11-proto-devel libGL-devel libGLU-devel
 %endif
 BuildRequires: %{x_deps} %{?x_deps_GL_hack}
@@ -119,7 +124,7 @@
 #BuildRequires: sqlite-devel
 %endif
 
-BuildConflicts: qt4-devel
+#BuildConflicts: qt4-devel
 
 Obsoletes: %{name}-config < %{version}-%{release}
 Provides:  %{name}-config = %{version}-%{release}
@@ -208,28 +213,33 @@
 %setup -q -n qt-x11%{?preview}-opensource-src-%{version}%{?beta:-%{beta}}
 
 %patch1 -p1 -b .assistant4
+# don't use -b on mkspec files, else they get installed too.
+%patch2 -p1 
 
 # drop -fexceptions from $RPM_OPT_FLAGS
 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's|-fexceptions||g'`
 
-## Looks like we don't need this anymore -- Rex
-# add -fno-strict-aliasing, for now (fc6+)
-#if "%{?fedora}" > "5"
-#RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
-#endif
-
-# use $RPM_OPT_FLAGS for our platform
+## customize our platform
 %if "%{_lib}" == "lib64"
 %define platform linux-g++-64
 %else
 %define platform linux-g++
 %endif
+#grep -- '-O2' mkspecs/common/g++.conf | sed -e "s|-O2|$RPM_OPT_FLAGS|g" >> mkspecs/common/g++-optflags.conf
 sed -i -e "s|-O2|$RPM_OPT_FLAGS|g" mkspecs/%{platform}/qmake.conf
-sed -i -e "s|-O2|$RPM_OPT_FLAGS|g" mkspecs/common/*.conf ||:
+## FIXME(?)
+# On the surface, looks like a good idea to strip -I/usr/include, -L/usr/lib, 
+# but it turns out qmake-consuming apps expect/use INCDIR/LIBDIR directly 
+# (e.g. PyQt4, texmaker), and don't cope with null values
+#if "%{qt_headerdir}" == "%{_includedir}"
+#sed -i -e "s|^QMAKE_INCDIR_QT.*=.*|QMAKE_INCDIR_QT       =|" mkspecs/common/linux.conf
+#endif
+#if "%{qt_libdir}" == "%{_libdir}"
+#sed -i -e "s|^QMAKE_LIBDIR_QT.*=.*|QMAKE_LIBDIR_QT       =|" mkspecs/common/linux.conf
+#endif
 
 # undefine QMAKE_STRIP, so we get useful -debuginfo pkgs
-sed -i -e "s|^QMAKE_STRIP.*=.*|QMAKE_STRIP             =|" mkspecs/linux-g++*/qmake.conf
-sed -i -e "s|^QMAKE_STRIP.*=.*|QMAKE_STRIP             =|" mkspecs/common/*.conf ||:
+sed -i -e "s|^QMAKE_STRIP.*=.*|QMAKE_STRIP             =|" mkspecs/common/linux.conf 
 
 # set correct lib path
 if [ "%{_lib}" == "lib64" ] ; then
@@ -262,7 +272,6 @@
   -fontconfig \
   -largefile \
   -qt-gif \
-  -no-reduce-exports \
   -no-rpath \
   -no-separate-debug-info \
   -sm \
@@ -299,7 +308,6 @@
 desktop-file-install \
   --dir %{buildroot}%{_datadir}/applications \
   --vendor="%{name}" \
-  --add-category="X-Fedora" \
   %{SOURCE20} %{SOURCE21} %{SOURCE22} %{SOURCE23} %{SOURCE24}
 
 ## pkg-config
@@ -311,9 +319,8 @@
   sed -i -e "s|$dep ||g" %{buildroot}%{qt_libdir}/*.pc
   sed -i -e "s|$dep ||g" %{buildroot}%{qt_libdir}/*.prl
 done
-# not-so-safe, but we can try -- Rex
-# -L/usr/X11R6/%{_lib}
-for dep in -lXrender -lXrandr -lXcursor -lXinerama -lXi -lXft -lfontconfig -lXext -lX11 -lSM -lICE -ldl -lpthread ; do
+# riskier
+for dep in -lXrender -lXrandr -lXcursor -lXfixes -lXinerama -lXi -lXft -lXt -lfontconfig -lXext -lX11 -lSM -lICE -ldl -lpthread ; do
   sed -i -e "s|$dep ||g" %{buildroot}%{qt_libdir}/lib*.la ||:
   sed -i -e "s|$dep ||g" %{buildroot}%{qt_libdir}/*.pc
   sed -i -e "s|$dep ||g" %{buildroot}%{qt_libdir}/*.prl
@@ -321,7 +328,7 @@
 sed -i -e "/^QMAKE_PRL_BUILD_DIR/d" %{buildroot}%{qt_libdir}/*.prl
 
 mkdir -p %{buildroot}%{_libdir}/pkgconfig/
-mv %{buildroot}/%{qt_libdir}/*.pc %{buildroot}%{_libdir}/pkgconfig/
+mv %{buildroot}%{qt_libdir}/*.pc %{buildroot}%{_libdir}/pkgconfig/
 
 # -doc make symbolic link to qt_docdir
 rm -rf %{buildroot}%{qtdir}/doc
@@ -360,6 +367,23 @@
 # .la files, die, die, die.
 rm -f %{buildroot}%{qt_libdir}/lib*.la
 
+## multilib: qconfig
+mv %{buildroot}%{qt_headerdir}/Qt/qconfig.h %{buildroot}%{qt_headerdir}/Qt/qconfig-%{_arch}.h
+install -p -m644 -D %{SOURCE5} %{buildroot}%{qt_headerdir}/Qt/qconfig.h
+mv %{buildroot}%{qt_headerdir}/QtCore/qconfig.h %{buildroot}%{qt_headerdir}/QtCore/qconfig-%{_arch}.h
+install -p -m644 -D %{SOURCE5} %{buildroot}%{qt_headerdir}/QtCore/qconfig.h
+## mkspecs/default
+rm -f %{buildroot}%{qt_datadir}/mkspecs/default
+mkdir %{buildroot}%{qtdir}/mkspecs
+ln -s %{qt_datadir}/mkspecs/%{platform} %{buildroot}%{qtdir}/mkspecs/default
+# omit non-platform linux-g++*
+pushd %{buildroot}%{qt_datadir}/mkspecs
+for specdir in linux-g++* ; do
+  if [ "$specdir" != "%{platform}"]; then rm -rf "$specdir"; fi
+done
+popd
+
+
 %if "%{qt_libdir}" != "%{_libdir}"
 mkdir -p %{buildroot}/etc/ld.so.conf.d
 echo "%{qt_libdir}" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf
@@ -447,6 +471,7 @@
 %endif
 %{qt_headerdir}/*
 %{qt_datadir}/mkspecs/
+%{qtdir}/mkspecs/
 %{qt_datadir}/phrasebooks/
 %{qt_datadir}/q3porting.xml
 %{qt_libdir}/libQt*.so
@@ -507,8 +532,12 @@
 
 
 %changelog
+* Tue Feb 27 2007 Rex Dieter <rdieter[AT]fedoraproject.org> 4.2.2-3
+- drop ./configure -no-reduce-exports (ie, support visibility) 
+- multilib issues (#223663)
+
 * Wed Dec 06 2006 Rex Dieter <rexdieter[AT]users.sf.net. 4.2.2-2
-- respin for postgresql 
+- respin for postgresql
 
 * Fri Dec 01 2006 Rex Dieter <rexdieter[AT]users.sf.net> 4.2.2-1
 - qt-4.2.2 (#218575)




More information about the scm-commits mailing list