diff -r c30c9dcebf8b -r 74a0826c1949 qt/qt.spec --- a/qt/qt.spec Fri Oct 22 23:20:42 2010 +0200 +++ b/qt/qt.spec Sat Oct 23 01:34:51 2010 +0200 @@ -40,10 +40,11 @@ Group: Development License: GPL Version: 4.7.0 -Release: 20101015 +Release: 20101018 # build options %option with_tools yes +%option with_glib no %option with_mysql no %option with_pgsql no %option with_shared no @@ -63,6 +64,10 @@ PreReq: openssl, zlib, libiconv, sqlite, dbus BuildPreReq: fontconfig, freetype PreReq: fontconfig, freetype +%if "%{with_glib}" == "yes" +BuildPreReq: glib2 +PreReq: glib2 +%endif %if "%{with_mysql}" == "yes" BuildPreReq: mysql PreReq: mysql @@ -105,6 +110,7 @@ fontconflibs=`%{l_prefix}/bin/pkg-config --libs-only-l --static fontconfig` lcmslibs=`%{l_prefix}/bin/pkg-config --libs-only-l --static lcms` openssllibs=`%{l_prefix}/bin/pkg-config --libs --static openssl` + mysqllibs=`%{l_prefix}/bin/mysql_config --libs` loclibs='' case "%{l_platform -t}" in @@ -126,17 +132,35 @@ -e 's;\(QMAKE_RPATHDIR +=\) \\"\$QT_INSTALL_LIBS\\";\1 %{l_prefix}/lib/qt/dynamic;' \ configure %{l_shtool} subst \ - -e 's; *QMakeVar set QMAKE_CFLAGS_X11.*QT_CFLAGS_FONTCONFIG.*;;' \ - -e 's; *QMakeVar set QMAKE_LIBS_X11.*QT_LIBS_FONTCONFIG.*;;' \ + -e "s;\(OPENSSL_LIBS *=\) *-lssl -lcrypto;\1 $openssllibs;" \ configure %{l_shtool} subst \ - -e "s;\(OPENSSL_LIBS *=\) *-lssl -lcrypto;\1 $openssllibs;" \ + -e 's; *QMakeVar set QMAKE_CFLAGS_X11.*QT_CFLAGS_FONTCONFIG.*;;' \ + configure + # yes this is needed several times to catch nested occurences of '--libs' + %{l_shtool} subst \ + -e 's;\(QT_LIBS_FONTCONFIG *=.*PKG_CONFIG.*\) --libs ;\1 --libs-only-L ;g' \ + -e 's;\(QT_LIBS_FONTCONFIG *=.*PKG_CONFIG.*\) --libs ;\1 --libs-only-L ;g' \ configure # yes this is needed several times to catch nested occurences of '--cflags' + # QT_CFLAGS_SQLITE + # QT_CFLAGS_DBUS + # QT_CFLAGS_GLIB ***Special case, see following substitution block + # QT_CFLAGS_GSTREAMER + # QT_CFLAGS_ICD + # QT_CFLAGS_QTNETWORK + # QT_CFLAGS_PULSEAUDIO + # QT_CFLAGS_FONTCONFIG + # QT_CFLAGS_QGTKSTYLE + # QT_CFLAGS_DIRECTFB %{l_shtool} subst \ -e 's;\(QT_CFLAGS_[^=][^=]*=.*PKG_CONFIG.*\) --cflags ;\1 --cflags-only-other ;g' \ -e 's;\(QT_CFLAGS_[^=][^=]*=.*PKG_CONFIG.*\) --cflags ;\1 --cflags-only-other ;g' \ configure + # hack to get back the standard '--cflags' of just Qt_CFLAGS_GLIB + %{l_shtool} subst \ + -e 's;\(QT_CFLAGS_GLIB *=.*PKG_CONFIG.*\) --cflags-only-other ;\1 --cflags ;g' \ + configure %{l_shtool} subst \ -e 's;\(TRY_INCLUDEPATHS = \).*\(\$\$INCLUDEPATH\);\1\2;' \ -e 's;/freetype2;/freetype;' \ @@ -166,6 +190,7 @@ uiclibs=`%{l_prefix}/bin/pkg-config --libs-only-l --static fontconfig lcms` %{l_shtool} subst \ -e 's;LIBS .*= -lpq$;LIBS += -lpq -lssl -lcrypto;' \ + -e "s;LIBS .*= \$\$QT_LFLAGS_MYSQL;LIBS += $mysqllibs;" \ src/sql/drivers/drivers.pri %{l_shtool} subst \ -e "s;QMAKE_CXXFLAGS += \$\$QT_CFLAGS_GLIB;INCPATH += `pkg-config --cflags-only-I glib-2.0 gthread-2.0 2>/dev/null | %{l_shtool} subst -e 's;-I;;g'`;g" \ @@ -199,7 +224,6 @@ -e 's;\(DESTDIR *=\) *\$\$JAVASCRIPTCORE_DESTDIR;\1 $$QMAKE_LIBDIR_QT;' \ src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro %{l_shtool} subst \ - -e 's;\(POST_TARGETDEPS *+\?=\) *\$\${pathToJavaScriptCoreOutput};\1 $$QMAKE_LIBDIR_QT;g' \ -e 's;\(pathToJavaScriptCoreOutput *=\) *\$\$ARGS/\$\$JAVASCRIPTCORE_DESTDIR;\1 $$QMAKE_LIBDIR_QT;g' \ src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri %{l_shtool} subst \ @@ -281,6 +305,11 @@ -shared \ -platform $platcomp \ -no-sql-ibase \ +%if "%{with_glib}" == "yes" + -glib \ +%else + -no-glib \ +%endif %if "%{with_mysql}" == "yes" -qt-sql-mysql \ -plugin-sql-mysql \ @@ -299,6 +328,7 @@ -plugin-sql-sqlite \ -no-sql-sqlite2 \ -openssl-linked \ + -optimized-qmake \ -xmlpatterns \ -svg \ -webkit \ @@ -316,8 +346,7 @@ -opengl \ -xrender \ -fontconfig \ - -freetype \ - -no-glib + -freetype # default options are implicitly used, for example... #-no-fast -exceptions -accessibility -stl -qt3support -nis @@ -386,6 +415,11 @@ -static \ -platform $platcomp \ -no-sql-ibase \ +%if "%{with_glib}" == "yes" + -glib \ +%else + -no-glib \ +%endif %if "%{with_mysql}" == "yes" -qt-sql-mysql \ %else @@ -401,6 +435,7 @@ -qt-sql-sqlite \ -no-sql-sqlite2 \ -openssl-linked \ + -optimized-qmake \ -xmlpatterns \ -svg \ -webkit \ @@ -418,8 +453,7 @@ -opengl \ -xrender \ -fontconfig \ - -freetype \ - -no-glib + -freetype # default options are implicitly used, for example... #-no-fast -exceptions -accessibility -stl -qt3support -nis