qt/qt.spec

changeset 342
90f1326e8f73
parent 341
24888fe4de94
child 343
1bee42cde1f7
equal deleted inserted replaced
26:ef644fee8269 27:14cb58ee66dd
99 ( echo "This package has exceptional build requirements:" 99 ( echo "This package has exceptional build requirements:"
100 echo " qt-%{version}-root (5 Go)" 100 echo " qt-%{version}-root (5 Go)"
101 echo " qt-everywhere-opensource-src-%{version} (6 Go)" 101 echo " qt-everywhere-opensource-src-%{version} (6 Go)"
102 echo " qt-%{version}-<date>.<arch>-<os>-<tag>.rpm (2 Go)" 102 echo " qt-%{version}-<date>.<arch>-<os>-<tag>.rpm (2 Go)"
103 echo "Building with no options takes 3,0 hours on a dual core" 103 echo "Building with no options takes 3,0 hours on a dual core"
104 echo "2 GHz CPU, or 7 hours with all build options enabled." 104 echo "2 GHz CPU, or 7,0 hours with all build options enabled."
105 ) | %{l_rpmtool} msg -b -t notice 105 ) | %{l_rpmtool} msg -b -t notice
106 106
107 %setup -q -n qt-everywhere-opensource-src-%{version} 107 %setup -q -n qt-everywhere-opensource-src-%{version}
108 x11_incdir=`%{l_rc} --query x11_incdir` 108 x11_incdir=`%{l_rc} --query x11_incdir`
109 x11_libdir=`%{l_rc} --query x11_libdir` 109 x11_libdir=`%{l_rc} --query x11_libdir`
122 for plat in freebsd-generic-g++ macx-generic-g++ solaris-generic-g++; 122 for plat in freebsd-generic-g++ macx-generic-g++ solaris-generic-g++;
123 do 123 do
124 ln -s $plat `echo $plat | %{l_shtool} subst -e 's;\(.*\)-generic-\(.*\);\1-x86-\2;'` 124 ln -s $plat `echo $plat | %{l_shtool} subst -e 's;\(.*\)-generic-\(.*\);\1-x86-\2;'`
125 done 125 done
126 ) || exit $? 126 ) || exit $?
127 # Trolltech Bug:
128 # yes was specified for OpenVG but cannot be enabled due to functionality tests!
129 %{l_shtool} subst \
130 -e 's;lower_case_includes;lower_case_bug;g' \
131 configure
127 %{l_shtool} subst \ 132 %{l_shtool} subst \
128 -e 's;\(-z[\t ][\t ]*\)\([^\t \"][^\t \"]*\);\1"\2";g' \ 133 -e 's;\(-z[\t ][\t ]*\)\([^\t \"][^\t \"]*\);\1"\2";g' \
129 configure 134 configure
130 %{l_shtool} subst \ 135 %{l_shtool} subst \
131 -e 's;\(RPATH_FLAGS\)=.*\$QT_INSTALL_LIBS.*\(\$RPATH_FLAGS\)";\1="%{l_prefix}/lib/qt/dynamic \2";' \ 136 -e 's;\(RPATH_FLAGS\)=.*\$QT_INSTALL_LIBS.*\(\$RPATH_FLAGS\)";\1="%{l_prefix}/lib/qt/dynamic \2";' \
194 echo "LIBS = `%{l_prefix}/bin/pkg-config --libs-only-l --static dbus-1`" \ 199 echo "LIBS = `%{l_prefix}/bin/pkg-config --libs-only-l --static dbus-1`" \
195 >>config.tests/unix/dbus/dbus.pro 200 >>config.tests/unix/dbus/dbus.pro
196 # Trolltech Bug: 201 # Trolltech Bug:
197 # PostgreSQL support cannot be enabled due to functionality tests! 202 # PostgreSQL support cannot be enabled due to functionality tests!
198 # Turn on verbose messaging (-v) to ./configure to see the final report. 203 # Turn on verbose messaging (-v) to ./configure to see the final report.
199 %{l_shtool} subst \ 204 pgldflags=`%{l_prefix}/bin/pg_config --ldflags`
200 -e "s;\(LIBS.*= -lpq\);\1 `%{l_prefix}/bin/pg_config --libs` $loclibs;" \ 205 pglibs=`%{l_prefix}/bin/pg_config --libs`
206 %{l_shtool} subst \
207 -e "s;\(LIBS.*= -lpq\);\1 $pgldflags $pglibs $loclibs -pthread;" \
201 config.tests/unix/psql/psql.pro 208 config.tests/unix/psql/psql.pro
209 # Trolltech Bug:
210 # make: *** [sub-examples-make_default-ordered] Error 2
211 # QMAKE_PRL_LIBS in libQtSql.prl is generated defective.
212 %{l_shtool} subst \
213 -e "s;\$\$*QT_LFLAGS_PSQL;$pgldflags;" \
214 -e "s;-lpq;-lpq $pglibs $loclibs -pthread;" \
215 src/sql/drivers/psql/qsql_psql.pri
202 # Trolltech Bug: 216 # Trolltech Bug:
203 # Iconv support cannot be enabled due to functionality tests! 217 # Iconv support cannot be enabled due to functionality tests!
204 # Turn on verbose messaging (-v) to ./configure to see the final report. 218 # Turn on verbose messaging (-v) to ./configure to see the final report.
205 %{l_shtool} subst \ 219 %{l_shtool} subst \
206 -e 's;^mac[^:][^:]*:\(LIBS\);\1;' \ 220 -e 's;^mac[^:][^:]*:\(LIBS\);\1;' \
247 # You might need to modify the include and library search paths by 261 # You might need to modify the include and library search paths by
248 # editing QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in 262 # editing QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in
249 # /home/mschloh/opwrk/tmp/qt-everywhere-opensource-src-4.7.3/mkspecs/linux-g++-64. 263 # /home/mschloh/opwrk/tmp/qt-everywhere-opensource-src-4.7.3/mkspecs/linux-g++-64.
250 %{l_shtool} subst \ 264 %{l_shtool} subst \
251 -e 's;^\(QMAKE_INCDIR[^a-zA-Z0-9=]*=\).*;\1 %{l_prefix}/include;' \ 265 -e 's;^\(QMAKE_INCDIR[^a-zA-Z0-9=]*=\).*;\1 %{l_prefix}/include;' \
252 -e 's;^\(QMAKE_LIBDIR[^a-zA-Z0-9=]*=\).*;\1;' \ 266 -e 's;^\(QMAKE_LIBDIR[^a-zA-Z0-9=]*=\).*;\1 %{l_prefix}/lib;' \
253 -e 's;^\(QMAKE_INCDIR_OPENGL[^=]*=\) *\(.*\);\1 %{l_prefix}/include \2;' \ 267 -e "s;^\(QMAKE_INCDIR_OPENGL[^=]*=\).*;\1 $x11_incdir;" \
254 -e 's;^\(QMAKE_LIBDIR_OPENGL[^=]*=\) *\(.*\);\1 %{l_prefix}/lib \2;' \ 268 -e "s;^\(QMAKE_LIBDIR_OPENGL[^=]*=\).*;\1 $x11_libdir;" \
269 -e "s;^\(QMAKE_INCDIR_OPENVG[^=]*=\).*;\1 $x11_incdir;" \
270 -e "s;^\(QMAKE_LIBDIR_OPENVG[^=]*=\).*;\1 $x11_libdir;" \
255 -e 's;^\(QMAKE_LFLAGS_RELEASE.*\);\1 -s;' \ 271 -e 's;^\(QMAKE_LFLAGS_RELEASE.*\);\1 -s;' \
256 mkspecs/qws/*/qmake.conf \ 272 mkspecs/qws/*/qmake.conf \
257 mkspecs/*/*.conf 273 mkspecs/*/*.conf
274 # Trolltech Bug:
275 # yes was specified for OpenVG but cannot be enabled due to functionality tests!
276 %{l_shtool} subst \
277 -e 's;\(\$\$*\)\(QMAKE_LIBS_OPENVG\);\1\2 \1QMAKE_LIBS_THREAD;' \
278 config.tests/unix/openvg/openvg.pro
279 %{l_shtool} subst \
280 -e "s;^\(QMAKE_INCDIR_X11[^=]*=\).*;\1 $x11_incdir;" \
281 -e "s;^\(QMAKE_LIBDIR_X11[^=]*=\).*;\1 $x11_libdir;" \
282 mkspecs/qws/*/qmake.conf \
283 mkspecs/*/qmake.conf
258 # MSvB In R/D: %{l_shtool} subst \ 284 # MSvB In R/D: %{l_shtool} subst \
259 # MSvB In R/D: -e 's;^\(QMAKE_LIBS +=.*\);\1 -liconv;' \ 285 # MSvB In R/D: -e 's;^\(QMAKE_LIBS +=.*\);\1 -liconv;' \
260 # MSvB In R/D: src/corelib/corelib.pro 286 # MSvB In R/D: src/corelib/corelib.pro
261 # Trolltech Bug: 287 # Trolltech Bug:
262 # In file included from ../JavaScriptCore/runtime/RegExp.h:29:0, 288 # In file included from ../JavaScriptCore/runtime/RegExp.h:29:0,
270 # ../JavaScriptCore/yarr/RegexJIT.h: In destructor 'JSC::Yarr::RegexCodeBlock::~RegexCodeBlock()': 296 # ../JavaScriptCore/yarr/RegexJIT.h: In destructor 'JSC::Yarr::RegexCodeBlock::~RegexCodeBlock()':
271 # ../JavaScriptCore/yarr/RegexJIT.h:63:36: error: 'jsRegExpFree' was not declared in this scope 297 # ../JavaScriptCore/yarr/RegexJIT.h:63:36: error: 'jsRegExpFree' was not declared in this scope
272 %{l_shtool} subst \ 298 %{l_shtool} subst \
273 -e 's;\(pathToJavaScriptCoreOutput *=\) *\$\$ARGS/\$\$JAVASCRIPTCORE_DESTDIR;\1 $$QMAKE_LIBDIR_QT;g' \ 299 -e 's;\(pathToJavaScriptCoreOutput *=\) *\$\$ARGS/\$\$JAVASCRIPTCORE_DESTDIR;\1 $$QMAKE_LIBDIR_QT;g' \
274 src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri 300 src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri
275 # MSvB In R/D: %{l_shtool} subst \
276 # MSvB In R/D: -e "s;^\(QMAKE_INCDIR_X11[^=]*=\).*;\1 %{l_prefix}/include $x11_incdir;" \
277 # MSvB In R/D: -e "s;^\(QMAKE_LIBDIR_X11[^=]*=\).*;\1 %{l_prefix}/lib $x11_libdir;" \
278 # MSvB In R/D: mkspecs/qws/solaris*/qmake.conf \
279 # MSvB In R/D: mkspecs/solaris*/qmake.conf
280 # MSvB In R/D: echo "QMAKE_LIBDIR += %{l_prefix}/lib/qt/dynamic" \ 301 # MSvB In R/D: echo "QMAKE_LIBDIR += %{l_prefix}/lib/qt/dynamic" \
281 # MSvB In R/D: >>mkspecs/features/shared.prf 302 # MSvB In R/D: >>mkspecs/features/shared.prf
282 # MSvB In R/D: %{l_shtool} subst \ 303 # MSvB In R/D: %{l_shtool} subst \
283 # MSvB In R/D: -e 's; *\.\./3rdparty/freetype/.*;;g' \ 304 # MSvB In R/D: -e 's; *\.\./3rdparty/freetype/.*;;g' \
284 # MSvB In R/D: -e 's;^\( *contains(QT_CONFIG, freetype) {\);\1 LIBS += -lfreetype;' \ 305 # MSvB In R/D: -e 's;^\( *contains(QT_CONFIG, freetype) {\);\1 LIBS += -lfreetype;' \
288 # compilation terminated. 309 # compilation terminated.
289 # make[1]: *** [.obj/release-static/qtiffhandler.o] Error 1 310 # make[1]: *** [.obj/release-static/qtiffhandler.o] Error 1
290 %{l_shtool} subst \ 311 %{l_shtool} subst \
291 -e 's;\(#include *"\)\(tiffio.h"\);\1tiff/\2;' \ 312 -e 's;\(#include *"\)\(tiffio.h"\);\1tiff/\2;' \
292 src/gui/image/qtiffhandler.cpp 313 src/gui/image/qtiffhandler.cpp
314 # Trolltech Bug:
315 # In file included from ../../../gui/image/qjpeghandler.cpp:42:0:
316 # ../../../gui/image/qjpeghandler_p.h:45:35: fatal error:
317 # QtGui/qimageiohandler.h: No such file or directory
318 %{l_shtool} subst \
319 -e 's;\(INCLUDEPATH *\*=\)\( *\);\1 $RPM_BUILD_DIR/qt-everywhere-opensource-src-%{version}/include\2;' \
320 src/gui/image/qjpeghandler.pri
293 # MSvB In R/D: %{l_shtool} subst \ 321 # MSvB In R/D: %{l_shtool} subst \
294 # MSvB In R/D: -e 's;\(CONFIG[\t ]*+=[\t ]*qt\);\1 x11;' \ 322 # MSvB In R/D: -e 's;\(CONFIG[\t ]*+=[\t ]*qt\);\1 x11;' \
295 # MSvB In R/D: tools/qtconfig/qtconfig.pro 323 # MSvB In R/D: tools/qtconfig/qtconfig.pro
296 # MSvB In R/D: %{l_shtool} subst \ 324 # MSvB In R/D: %{l_shtool} subst \
297 # MSvB In R/D: -e 's;webkit;web-broken-kit;g' \ 325 # MSvB In R/D: -e 's;webkit;web-broken-kit;g' \
303 # MSvB In R/D: tools/assistant/tools/assistant/doc/assistant.qdoc \ 331 # MSvB In R/D: tools/assistant/tools/assistant/doc/assistant.qdoc \
304 # MSvB In R/D: tools/qdoc3/doc/qdoc-manual.qdoc \ 332 # MSvB In R/D: tools/qdoc3/doc/qdoc-manual.qdoc \
305 # MSvB In R/D: tools/qdoc3/doc/files/qt.qdocconf \ 333 # MSvB In R/D: tools/qdoc3/doc/files/qt.qdocconf \
306 # MSvB In R/D: tools/qdoc3/test/qt-build-docs.qdocconf \ 334 # MSvB In R/D: tools/qdoc3/test/qt-build-docs.qdocconf \
307 # MSvB In R/D: tools/qdoc3/test/qt.qdocconf 335 # MSvB In R/D: tools/qdoc3/test/qt.qdocconf
336 # Trolltech Bug:
337 # In file included from qpaintengine_vg.cpp:42:0:
338 # qpaintengine_vg_p.h:66:39: error: expected initializer before ':' token
339 # make[1]: *** [.obj/release-static/qpaintengine_vg.o] Error 1
340 # make: *** [sub-openvg-sub_src_target_ordered] Error 2
341 %{l_shtool} subst \
342 -e 's;Q_OPENVG_EXPORT;Q_DECL_EXPORT;g' \
343 src/openvg/*
308 344
309 %build 345 %build
310 # protect against sloppy code inclusion of all unused subprojects 346 # protect against sloppy code inclusion of all unused subprojects
311 # MSvB In R/D: ce-compat clucene des easing harfbuzz javascriptcore md4 md5 s60 sha1 webkit xorg zlib_dependency.pri 347 # MSvB In R/D: ce-compat clucene des easing harfbuzz javascriptcore md4 md5 s60 sha1 webkit xorg zlib_dependency.pri
312 (cd src/3rdparty && rm -rf [^cdehjmswxz]* sql* win* zlib zlib.pri) || exit $? 348 (cd src/3rdparty && rm -rf [^cdehjmswxz]* sql* win* zlib zlib.pri) || exit $?
412 -no-cups \ 448 -no-cups \
413 -iconv \ 449 -iconv \
414 -pch \ 450 -pch \
415 -dbus-linked \ 451 -dbus-linked \
416 -opengl \ 452 -opengl \
453 -openvg \
417 -xrender \ 454 -xrender \
418 -fontconfig \ 455 -fontconfig \
419 -freetype 456 -freetype
420 457
421 # default options are implicitly used, for example... 458 # default options are implicitly used, for example...
538 -no-cups \ 575 -no-cups \
539 -iconv \ 576 -iconv \
540 -pch \ 577 -pch \
541 -dbus-linked \ 578 -dbus-linked \
542 -opengl \ 579 -opengl \
580 -openvg \
543 -xrender \ 581 -xrender \
544 -fontconfig \ 582 -fontconfig \
545 -freetype 583 -freetype
546 584
547 # default options are implicitly used, for example... 585 # default options are implicitly used, for example...
684 $RPM_BUILD_ROOT%{l_prefix}/lib/*.prl \ 722 $RPM_BUILD_ROOT%{l_prefix}/lib/*.prl \
685 $RPM_BUILD_ROOT%{l_prefix}/lib/*.la 723 $RPM_BUILD_ROOT%{l_prefix}/lib/*.la
686 %if "%{with_shared}" == "yes" 724 %if "%{with_shared}" == "yes"
687 # correct temporary runtime link paths (dynamic libs) 725 # correct temporary runtime link paths (dynamic libs)
688 %{l_shtool} subst \ 726 %{l_shtool} subst \
689 -e 's;/./;/;g' \ 727 -e 's;/\./;/;g' \
690 -e 's;\(QMAKE_PRL_BUILD_DIR[\t ]*=\).*\(qt-everywhere-opensource-src-%{version}.*\);\1 /.../\2;' \ 728 -e 's;\(QMAKE_PRL_BUILD_DIR[\t ]*=\).*\(qt-everywhere-opensource-src-%{version}.*\);\1 /.../\2;' \
691 -e 's;-L[\t ]*[^\t ]*qt-everywhere-opensource-src-%{version}/lib;-L%{l_prefix}/lib/qt/dynamic;' \ 729 -e 's;-L[\t ]*[^\t ]*qt-everywhere-opensource-src-%{version}/lib;-L%{l_prefix}/lib/qt/dynamic;' \
692 $RPM_BUILD_ROOT%{l_prefix}/lib/qt/dynamic/*.prl \ 730 $RPM_BUILD_ROOT%{l_prefix}/lib/qt/dynamic/*.prl \
693 $RPM_BUILD_ROOT%{l_prefix}/lib/qt/dynamic/*.la 731 $RPM_BUILD_ROOT%{l_prefix}/lib/qt/dynamic/*.la
694 # keep library paths clean by removing redundant paths 732 # keep library paths clean by removing redundant paths
695 %{l_shtool} subst \ 733 %{l_shtool} subst \
696 -e 's;-L[\t ]*[^\t ]*qt-everywhere-opensource-src-%{version}[^\t ]*[\t ]*;;g' \ 734 -e 's;-L[\t ]*[^\t ]*qt-everywhere-opensource-src-%{version}[^\t ]*[\t ]*;;g' \
697 $RPM_BUILD_ROOT%{l_prefix}/lib/*.prl \ 735 $RPM_BUILD_ROOT%{l_prefix}/lib/qt/dynamic/*.prl \
698 $RPM_BUILD_ROOT%{l_prefix}/lib/*.la 736 $RPM_BUILD_ROOT%{l_prefix}/lib/qt/dynamic/*.la
699 %endif 737 %endif
700 738
701 ## Doesn't work as expected, because RPM reads the --[in|ex]cludedocs 739 ## Doesn't work as expected, because RPM reads the --[in|ex]cludedocs
702 ## argument only when installing binary packages, rather than building. 740 ## argument only when installing binary packages, rather than building.
703 #%define _excludedocs 0 741 #%define _excludedocs 0

mercurial