qt/qt.spec

changeset 288
74a0826c1949
parent 266
00db87db5e04
child 289
1ff6f25dc4d9
     1.1 --- a/qt/qt.spec	Fri Oct 22 23:20:42 2010 +0200
     1.2 +++ b/qt/qt.spec	Sat Oct 23 01:34:51 2010 +0200
     1.3 @@ -40,10 +40,11 @@
     1.4  Group:        Development
     1.5  License:      GPL
     1.6  Version:      4.7.0
     1.7 -Release:      20101015
     1.8 +Release:      20101018
     1.9  
    1.10  #   build options
    1.11  %option       with_tools     yes
    1.12 +%option       with_glib      no
    1.13  %option       with_mysql     no
    1.14  %option       with_pgsql     no
    1.15  %option       with_shared    no
    1.16 @@ -63,6 +64,10 @@
    1.17  PreReq:       openssl, zlib, libiconv, sqlite, dbus
    1.18  BuildPreReq:  fontconfig, freetype
    1.19  PreReq:       fontconfig, freetype
    1.20 +%if "%{with_glib}" == "yes"
    1.21 +BuildPreReq:  glib2
    1.22 +PreReq:       glib2
    1.23 +%endif
    1.24  %if "%{with_mysql}" == "yes"
    1.25  BuildPreReq:  mysql
    1.26  PreReq:       mysql
    1.27 @@ -105,6 +110,7 @@
    1.28      fontconflibs=`%{l_prefix}/bin/pkg-config --libs-only-l --static fontconfig`
    1.29      lcmslibs=`%{l_prefix}/bin/pkg-config --libs-only-l --static lcms`
    1.30      openssllibs=`%{l_prefix}/bin/pkg-config --libs --static openssl`
    1.31 +    mysqllibs=`%{l_prefix}/bin/mysql_config --libs`
    1.32  
    1.33      loclibs=''
    1.34      case "%{l_platform -t}" in
    1.35 @@ -126,17 +132,35 @@
    1.36          -e 's;\(QMAKE_RPATHDIR +=\) \\"\$QT_INSTALL_LIBS\\";\1 %{l_prefix}/lib/qt/dynamic;' \
    1.37          configure
    1.38      %{l_shtool} subst \
    1.39 -        -e 's; *QMakeVar set QMAKE_CFLAGS_X11.*QT_CFLAGS_FONTCONFIG.*;;' \
    1.40 -        -e 's; *QMakeVar set QMAKE_LIBS_X11.*QT_LIBS_FONTCONFIG.*;;' \
    1.41 +        -e "s;\(OPENSSL_LIBS *=\) *-lssl -lcrypto;\1 $openssllibs;" \
    1.42          configure
    1.43      %{l_shtool} subst \
    1.44 -        -e "s;\(OPENSSL_LIBS *=\) *-lssl -lcrypto;\1 $openssllibs;" \
    1.45 +        -e 's; *QMakeVar set QMAKE_CFLAGS_X11.*QT_CFLAGS_FONTCONFIG.*;;' \
    1.46 +        configure
    1.47 +    #   yes this is needed several times to catch nested occurences of '--libs'
    1.48 +    %{l_shtool} subst \
    1.49 +        -e 's;\(QT_LIBS_FONTCONFIG *=.*PKG_CONFIG.*\) --libs ;\1 --libs-only-L ;g' \
    1.50 +        -e 's;\(QT_LIBS_FONTCONFIG *=.*PKG_CONFIG.*\) --libs ;\1 --libs-only-L ;g' \
    1.51          configure
    1.52      #   yes this is needed several times to catch nested occurences of '--cflags'
    1.53 +    #     QT_CFLAGS_SQLITE
    1.54 +    #     QT_CFLAGS_DBUS
    1.55 +    #     QT_CFLAGS_GLIB ***Special case, see following substitution block
    1.56 +    #     QT_CFLAGS_GSTREAMER
    1.57 +    #     QT_CFLAGS_ICD
    1.58 +    #     QT_CFLAGS_QTNETWORK
    1.59 +    #     QT_CFLAGS_PULSEAUDIO
    1.60 +    #     QT_CFLAGS_FONTCONFIG
    1.61 +    #     QT_CFLAGS_QGTKSTYLE
    1.62 +    #     QT_CFLAGS_DIRECTFB
    1.63      %{l_shtool} subst \
    1.64          -e 's;\(QT_CFLAGS_[^=][^=]*=.*PKG_CONFIG.*\) --cflags ;\1 --cflags-only-other ;g' \
    1.65          -e 's;\(QT_CFLAGS_[^=][^=]*=.*PKG_CONFIG.*\) --cflags ;\1 --cflags-only-other ;g' \
    1.66          configure
    1.67 +    #   hack to get back the standard '--cflags' of just Qt_CFLAGS_GLIB
    1.68 +    %{l_shtool} subst \
    1.69 +        -e 's;\(QT_CFLAGS_GLIB *=.*PKG_CONFIG.*\) --cflags-only-other ;\1 --cflags ;g' \
    1.70 +        configure
    1.71      %{l_shtool} subst \
    1.72          -e 's;\(TRY_INCLUDEPATHS = \).*\(\$\$INCLUDEPATH\);\1\2;' \
    1.73          -e 's;/freetype2;/freetype;' \
    1.74 @@ -166,6 +190,7 @@
    1.75      uiclibs=`%{l_prefix}/bin/pkg-config --libs-only-l --static fontconfig lcms`
    1.76      %{l_shtool} subst \
    1.77          -e 's;LIBS .*= -lpq$;LIBS += -lpq -lssl -lcrypto;' \
    1.78 +        -e "s;LIBS .*= \$\$QT_LFLAGS_MYSQL;LIBS += $mysqllibs;" \
    1.79          src/sql/drivers/drivers.pri
    1.80      %{l_shtool} subst \
    1.81          -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" \
    1.82 @@ -199,7 +224,6 @@
    1.83          -e 's;\(DESTDIR *=\) *\$\$JAVASCRIPTCORE_DESTDIR;\1 $$QMAKE_LIBDIR_QT;' \
    1.84          src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro
    1.85      %{l_shtool} subst \
    1.86 -        -e 's;\(POST_TARGETDEPS *+\?=\) *\$\${pathToJavaScriptCoreOutput};\1 $$QMAKE_LIBDIR_QT;g' \
    1.87          -e 's;\(pathToJavaScriptCoreOutput *=\) *\$\$ARGS/\$\$JAVASCRIPTCORE_DESTDIR;\1 $$QMAKE_LIBDIR_QT;g' \
    1.88          src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri
    1.89      %{l_shtool} subst \
    1.90 @@ -281,6 +305,11 @@
    1.91          -shared \
    1.92          -platform $platcomp \
    1.93          -no-sql-ibase \
    1.94 +%if "%{with_glib}" == "yes"
    1.95 +        -glib \
    1.96 +%else
    1.97 +        -no-glib \
    1.98 +%endif
    1.99  %if "%{with_mysql}" == "yes"
   1.100          -qt-sql-mysql \
   1.101          -plugin-sql-mysql \
   1.102 @@ -299,6 +328,7 @@
   1.103          -plugin-sql-sqlite \
   1.104          -no-sql-sqlite2 \
   1.105          -openssl-linked \
   1.106 +        -optimized-qmake \
   1.107          -xmlpatterns \
   1.108          -svg \
   1.109          -webkit \
   1.110 @@ -316,8 +346,7 @@
   1.111          -opengl \
   1.112          -xrender \
   1.113          -fontconfig \
   1.114 -        -freetype \
   1.115 -        -no-glib
   1.116 +        -freetype
   1.117  
   1.118      #   default options are implicitly used, for example...
   1.119      #-no-fast -exceptions -accessibility -stl -qt3support -nis
   1.120 @@ -386,6 +415,11 @@
   1.121          -static \
   1.122          -platform $platcomp \
   1.123          -no-sql-ibase \
   1.124 +%if "%{with_glib}" == "yes"
   1.125 +        -glib \
   1.126 +%else
   1.127 +        -no-glib \
   1.128 +%endif
   1.129  %if "%{with_mysql}" == "yes"
   1.130          -qt-sql-mysql \
   1.131  %else
   1.132 @@ -401,6 +435,7 @@
   1.133          -qt-sql-sqlite \
   1.134          -no-sql-sqlite2 \
   1.135          -openssl-linked \
   1.136 +        -optimized-qmake \
   1.137          -xmlpatterns \
   1.138          -svg \
   1.139          -webkit \
   1.140 @@ -418,8 +453,7 @@
   1.141          -opengl \
   1.142          -xrender \
   1.143          -fontconfig \
   1.144 -        -freetype \
   1.145 -        -no-glib
   1.146 +        -freetype
   1.147  
   1.148      #   default options are implicitly used, for example...
   1.149      #-no-fast -exceptions -accessibility -stl -qt3support -nis

mercurial