qt/qt.spec

changeset 288
74a0826c1949
parent 266
00db87db5e04
child 289
1ff6f25dc4d9
equal deleted inserted replaced
22:8800ad9b7727 23:90ce72e84793
38 Distribution: MSvB Recherche Production 38 Distribution: MSvB Recherche Production
39 Class: EVAL 39 Class: EVAL
40 Group: Development 40 Group: Development
41 License: GPL 41 License: GPL
42 Version: 4.7.0 42 Version: 4.7.0
43 Release: 20101015 43 Release: 20101018
44 44
45 # build options 45 # build options
46 %option with_tools yes 46 %option with_tools yes
47 %option with_glib no
47 %option with_mysql no 48 %option with_mysql no
48 %option with_pgsql no 49 %option with_pgsql no
49 %option with_shared no 50 %option with_shared no
50 %option with_examples no 51 %option with_examples no
51 52
61 PreReq: X11, png, mng, jpeg, tiff, mesa, xrender 62 PreReq: X11, png, mng, jpeg, tiff, mesa, xrender
62 BuildPreReq: openssl, zlib, libiconv, sqlite, dbus 63 BuildPreReq: openssl, zlib, libiconv, sqlite, dbus
63 PreReq: openssl, zlib, libiconv, sqlite, dbus 64 PreReq: openssl, zlib, libiconv, sqlite, dbus
64 BuildPreReq: fontconfig, freetype 65 BuildPreReq: fontconfig, freetype
65 PreReq: fontconfig, freetype 66 PreReq: fontconfig, freetype
67 %if "%{with_glib}" == "yes"
68 BuildPreReq: glib2
69 PreReq: glib2
70 %endif
66 %if "%{with_mysql}" == "yes" 71 %if "%{with_mysql}" == "yes"
67 BuildPreReq: mysql 72 BuildPreReq: mysql
68 PreReq: mysql 73 PreReq: mysql
69 %endif 74 %endif
70 %if "%{with_pgsql}" == "yes" 75 %if "%{with_pgsql}" == "yes"
103 x11_incdir=`%{l_rc} --query x11_incdir` 108 x11_incdir=`%{l_rc} --query x11_incdir`
104 x11_libdir=`%{l_rc} --query x11_libdir` 109 x11_libdir=`%{l_rc} --query x11_libdir`
105 fontconflibs=`%{l_prefix}/bin/pkg-config --libs-only-l --static fontconfig` 110 fontconflibs=`%{l_prefix}/bin/pkg-config --libs-only-l --static fontconfig`
106 lcmslibs=`%{l_prefix}/bin/pkg-config --libs-only-l --static lcms` 111 lcmslibs=`%{l_prefix}/bin/pkg-config --libs-only-l --static lcms`
107 openssllibs=`%{l_prefix}/bin/pkg-config --libs --static openssl` 112 openssllibs=`%{l_prefix}/bin/pkg-config --libs --static openssl`
113 mysqllibs=`%{l_prefix}/bin/mysql_config --libs`
108 114
109 loclibs='' 115 loclibs=''
110 case "%{l_platform -t}" in 116 case "%{l_platform -t}" in
111 *-sunos* ) 117 *-sunos* )
112 loclibs='-lsocket -lnsl' 118 loclibs='-lsocket -lnsl'
124 %{l_shtool} subst \ 130 %{l_shtool} subst \
125 -e 's;\(RPATH_FLAGS\)=.*\$QT_INSTALL_LIBS.*\(\$RPATH_FLAGS\)";\1="%{l_prefix}/lib/qt/dynamic \2";' \ 131 -e 's;\(RPATH_FLAGS\)=.*\$QT_INSTALL_LIBS.*\(\$RPATH_FLAGS\)";\1="%{l_prefix}/lib/qt/dynamic \2";' \
126 -e 's;\(QMAKE_RPATHDIR +=\) \\"\$QT_INSTALL_LIBS\\";\1 %{l_prefix}/lib/qt/dynamic;' \ 132 -e 's;\(QMAKE_RPATHDIR +=\) \\"\$QT_INSTALL_LIBS\\";\1 %{l_prefix}/lib/qt/dynamic;' \
127 configure 133 configure
128 %{l_shtool} subst \ 134 %{l_shtool} subst \
129 -e 's; *QMakeVar set QMAKE_CFLAGS_X11.*QT_CFLAGS_FONTCONFIG.*;;' \
130 -e 's; *QMakeVar set QMAKE_LIBS_X11.*QT_LIBS_FONTCONFIG.*;;' \
131 configure
132 %{l_shtool} subst \
133 -e "s;\(OPENSSL_LIBS *=\) *-lssl -lcrypto;\1 $openssllibs;" \ 135 -e "s;\(OPENSSL_LIBS *=\) *-lssl -lcrypto;\1 $openssllibs;" \
134 configure 136 configure
137 %{l_shtool} subst \
138 -e 's; *QMakeVar set QMAKE_CFLAGS_X11.*QT_CFLAGS_FONTCONFIG.*;;' \
139 configure
140 # yes this is needed several times to catch nested occurences of '--libs'
141 %{l_shtool} subst \
142 -e 's;\(QT_LIBS_FONTCONFIG *=.*PKG_CONFIG.*\) --libs ;\1 --libs-only-L ;g' \
143 -e 's;\(QT_LIBS_FONTCONFIG *=.*PKG_CONFIG.*\) --libs ;\1 --libs-only-L ;g' \
144 configure
135 # yes this is needed several times to catch nested occurences of '--cflags' 145 # yes this is needed several times to catch nested occurences of '--cflags'
146 # QT_CFLAGS_SQLITE
147 # QT_CFLAGS_DBUS
148 # QT_CFLAGS_GLIB ***Special case, see following substitution block
149 # QT_CFLAGS_GSTREAMER
150 # QT_CFLAGS_ICD
151 # QT_CFLAGS_QTNETWORK
152 # QT_CFLAGS_PULSEAUDIO
153 # QT_CFLAGS_FONTCONFIG
154 # QT_CFLAGS_QGTKSTYLE
155 # QT_CFLAGS_DIRECTFB
136 %{l_shtool} subst \ 156 %{l_shtool} subst \
137 -e 's;\(QT_CFLAGS_[^=][^=]*=.*PKG_CONFIG.*\) --cflags ;\1 --cflags-only-other ;g' \ 157 -e 's;\(QT_CFLAGS_[^=][^=]*=.*PKG_CONFIG.*\) --cflags ;\1 --cflags-only-other ;g' \
138 -e 's;\(QT_CFLAGS_[^=][^=]*=.*PKG_CONFIG.*\) --cflags ;\1 --cflags-only-other ;g' \ 158 -e 's;\(QT_CFLAGS_[^=][^=]*=.*PKG_CONFIG.*\) --cflags ;\1 --cflags-only-other ;g' \
159 configure
160 # hack to get back the standard '--cflags' of just Qt_CFLAGS_GLIB
161 %{l_shtool} subst \
162 -e 's;\(QT_CFLAGS_GLIB *=.*PKG_CONFIG.*\) --cflags-only-other ;\1 --cflags ;g' \
139 configure 163 configure
140 %{l_shtool} subst \ 164 %{l_shtool} subst \
141 -e 's;\(TRY_INCLUDEPATHS = \).*\(\$\$INCLUDEPATH\);\1\2;' \ 165 -e 's;\(TRY_INCLUDEPATHS = \).*\(\$\$INCLUDEPATH\);\1\2;' \
142 -e 's;/freetype2;/freetype;' \ 166 -e 's;/freetype2;/freetype;' \
143 config.tests/unix/freetype/freetype.pri 167 config.tests/unix/freetype/freetype.pri
164 -e 's;^mac[^:][^:]*:\(LIBS\);\1;' \ 188 -e 's;^mac[^:][^:]*:\(LIBS\);\1;' \
165 config.tests/unix/iconv/iconv.pro 189 config.tests/unix/iconv/iconv.pro
166 uiclibs=`%{l_prefix}/bin/pkg-config --libs-only-l --static fontconfig lcms` 190 uiclibs=`%{l_prefix}/bin/pkg-config --libs-only-l --static fontconfig lcms`
167 %{l_shtool} subst \ 191 %{l_shtool} subst \
168 -e 's;LIBS .*= -lpq$;LIBS += -lpq -lssl -lcrypto;' \ 192 -e 's;LIBS .*= -lpq$;LIBS += -lpq -lssl -lcrypto;' \
193 -e "s;LIBS .*= \$\$QT_LFLAGS_MYSQL;LIBS += $mysqllibs;" \
169 src/sql/drivers/drivers.pri 194 src/sql/drivers/drivers.pri
170 %{l_shtool} subst \ 195 %{l_shtool} subst \
171 -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" \ 196 -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" \
172 src/corelib/kernel/kernel.pri \ 197 src/corelib/kernel/kernel.pri \
173 src/gui/kernel/kernel.pri 198 src/gui/kernel/kernel.pri
197 src/corelib/corelib.pro 222 src/corelib/corelib.pro
198 %{l_shtool} subst \ 223 %{l_shtool} subst \
199 -e 's;\(DESTDIR *=\) *\$\$JAVASCRIPTCORE_DESTDIR;\1 $$QMAKE_LIBDIR_QT;' \ 224 -e 's;\(DESTDIR *=\) *\$\$JAVASCRIPTCORE_DESTDIR;\1 $$QMAKE_LIBDIR_QT;' \
200 src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro 225 src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro
201 %{l_shtool} subst \ 226 %{l_shtool} subst \
202 -e 's;\(POST_TARGETDEPS *+\?=\) *\$\${pathToJavaScriptCoreOutput};\1 $$QMAKE_LIBDIR_QT;g' \
203 -e 's;\(pathToJavaScriptCoreOutput *=\) *\$\$ARGS/\$\$JAVASCRIPTCORE_DESTDIR;\1 $$QMAKE_LIBDIR_QT;g' \ 227 -e 's;\(pathToJavaScriptCoreOutput *=\) *\$\$ARGS/\$\$JAVASCRIPTCORE_DESTDIR;\1 $$QMAKE_LIBDIR_QT;g' \
204 src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri 228 src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri
205 %{l_shtool} subst \ 229 %{l_shtool} subst \
206 -e "s;^\(QMAKE_INCDIR_X11[^=]*=\).*;\1 %{l_prefix}/include $x11_incdir;" \ 230 -e "s;^\(QMAKE_INCDIR_X11[^=]*=\).*;\1 %{l_prefix}/include $x11_incdir;" \
207 -e "s;^\(QMAKE_LIBDIR_X11[^=]*=\).*;\1 %{l_prefix}/lib $x11_libdir;" \ 231 -e "s;^\(QMAKE_LIBDIR_X11[^=]*=\).*;\1 %{l_prefix}/lib $x11_libdir;" \
279 -demosdir %{l_prefix}/share/qt/demos \ 303 -demosdir %{l_prefix}/share/qt/demos \
280 -release \ 304 -release \
281 -shared \ 305 -shared \
282 -platform $platcomp \ 306 -platform $platcomp \
283 -no-sql-ibase \ 307 -no-sql-ibase \
308 %if "%{with_glib}" == "yes"
309 -glib \
310 %else
311 -no-glib \
312 %endif
284 %if "%{with_mysql}" == "yes" 313 %if "%{with_mysql}" == "yes"
285 -qt-sql-mysql \ 314 -qt-sql-mysql \
286 -plugin-sql-mysql \ 315 -plugin-sql-mysql \
287 %else 316 %else
288 -no-sql-mysql \ 317 -no-sql-mysql \
297 -system-sqlite \ 326 -system-sqlite \
298 -qt-sql-sqlite \ 327 -qt-sql-sqlite \
299 -plugin-sql-sqlite \ 328 -plugin-sql-sqlite \
300 -no-sql-sqlite2 \ 329 -no-sql-sqlite2 \
301 -openssl-linked \ 330 -openssl-linked \
331 -optimized-qmake \
302 -xmlpatterns \ 332 -xmlpatterns \
303 -svg \ 333 -svg \
304 -webkit \ 334 -webkit \
305 -system-zlib \ 335 -system-zlib \
306 -qt-gif \ 336 -qt-gif \
314 -pch \ 344 -pch \
315 -dbus-linked \ 345 -dbus-linked \
316 -opengl \ 346 -opengl \
317 -xrender \ 347 -xrender \
318 -fontconfig \ 348 -fontconfig \
319 -freetype \ 349 -freetype
320 -no-glib
321 350
322 # default options are implicitly used, for example... 351 # default options are implicitly used, for example...
323 #-no-fast -exceptions -accessibility -stl -qt3support -nis 352 #-no-fast -exceptions -accessibility -stl -qt3support -nis
324 #-sm -xshape -xinerama -xcursor -xfixes -xrandr -tablet -xkb 353 #-sm -xshape -xinerama -xcursor -xfixes -xrandr -tablet -xkb
325 354
384 -demosdir %{l_prefix}/share/qt/demos \ 413 -demosdir %{l_prefix}/share/qt/demos \
385 -release \ 414 -release \
386 -static \ 415 -static \
387 -platform $platcomp \ 416 -platform $platcomp \
388 -no-sql-ibase \ 417 -no-sql-ibase \
418 %if "%{with_glib}" == "yes"
419 -glib \
420 %else
421 -no-glib \
422 %endif
389 %if "%{with_mysql}" == "yes" 423 %if "%{with_mysql}" == "yes"
390 -qt-sql-mysql \ 424 -qt-sql-mysql \
391 %else 425 %else
392 -no-sql-mysql \ 426 -no-sql-mysql \
393 %endif 427 %endif
399 -no-sql-odbc \ 433 -no-sql-odbc \
400 -system-sqlite \ 434 -system-sqlite \
401 -qt-sql-sqlite \ 435 -qt-sql-sqlite \
402 -no-sql-sqlite2 \ 436 -no-sql-sqlite2 \
403 -openssl-linked \ 437 -openssl-linked \
438 -optimized-qmake \
404 -xmlpatterns \ 439 -xmlpatterns \
405 -svg \ 440 -svg \
406 -webkit \ 441 -webkit \
407 -system-zlib \ 442 -system-zlib \
408 -qt-gif \ 443 -qt-gif \
416 -pch \ 451 -pch \
417 -dbus-linked \ 452 -dbus-linked \
418 -opengl \ 453 -opengl \
419 -xrender \ 454 -xrender \
420 -fontconfig \ 455 -fontconfig \
421 -freetype \ 456 -freetype
422 -no-glib
423 457
424 # default options are implicitly used, for example... 458 # default options are implicitly used, for example...
425 #-no-fast -exceptions -accessibility -stl -qt3support -nis 459 #-no-fast -exceptions -accessibility -stl -qt3support -nis
426 #-sm -xshape -xinerama -xcursor -xfixes -xrandr -tablet -xkb 460 #-sm -xshape -xinerama -xcursor -xfixes -xrandr -tablet -xkb
427 461

mercurial