# HG changeset patch # User Michael Schloh von Bennewitz # Date 1231945152 -3600 # Node ID 78e7deb1d6abfe4c7315fc84bca8b11cf9548b17 # Parent e6a1cd7ed6bade1f286ad12aad75f12f9d864961 Correct and improve many buildconf and code logic blocks. In particular: 1. Document potential problems building with current binutils releases. 2. Document the flawed webkit and explain its temporary exclusion. 3. Document the edition of Qt which is built and installed. 4. Remove the Solaris x11_supdir logic as it is no longer found. 5. Correct several .pr[io] files including QMAKE_CXXFLAGS and INCPATH, which previously caused preexisting Qt installations to deliver erroneous old include and library logic instead of relying on that of the currently building package. -I/opkg/include is now placed at the end of the compile statements. 6. Don't trust the QMAKE_[INC|LIB]DIR_X11 identifiers in qmake.conf. 7. Allow more 64-bit builds and more properly identify the platform. 8. Place plugins (which are shared objects) in lib instead of share. 9. Build components as plugins when possible if with_shared is enabled. 10. Translate German text to English to be more consistent. 11. Instead of removing the pkgconfig directory of with_shared builds, place it in a child directory useful for shared building. 12. Document the nonstandard shared build directory structure, including using the hidden pkgconfig directory (PKG_CONFIG_PATH.) 13. Change %doc to specify files rather than directories in the RPM DB. diff -r e6a1cd7ed6ba -r 78e7deb1d6ab qt/qt.spec --- a/qt/qt.spec Wed Jan 14 15:09:44 2009 +0100 +++ b/qt/qt.spec Wed Jan 14 15:59:12 2009 +0100 @@ -21,6 +21,16 @@ ## SUCH DAMAGE. ## +# FIXME: MSvB: It appears that bugs in current versions of binutils +# FIXME: MSvB: fail to properly link Qt object code, resulting in +# FIXME: MSvB: 'ld: libQt*.so: pthread_mutex...: invalid version 6 +# FIXME: MSvB: libQt*.so: could not read symbols: Bad value' +# FIXME: MSvB: The effects of these bugs are platform dependent. +# FIXME: MSvB: Solaris 11 IA-32 builds fail while Linux 2.6.25.18 +# FIXME: MSvB: AMD64 builds succeed. +# FIXME: MSvB: +# FIXME: MSvB: The webkit is flawed in Qt 4.4.3, and has been disabled +# FIXME: MSvB: in this build until a new release corrects the problem. # package information Name: qt @@ -72,7 +82,8 @@ Qt is a comprehensive C++ framework for cross-platform application development. Using Qt, you can develop applications and user interfaces once, and deploy them across many desktop and embedded - operating systems without rewriting the source code. + operating systems without rewriting the source code. This package + distribution builds all modules of the Qt/X11 Open Source Edition. %track prog qt = { @@ -96,11 +107,9 @@ x11_libdir=`%{l_rc} --query x11_libdir` fontconf=`%{l_prefix}/bin/pkg-config --libs-only-l --static fontconfig` loclibs='' - x11_supdir='' case "%{l_platform -t}" in *-sunos* ) loclibs='-lsocket -lnsl' - [ -d /usr/X/sfw/lib ] && x11_supdir=/usr/X/sfw/lib ;; esac ( cd mkspecs/qws @@ -120,11 +129,6 @@ -e 's;\(RPATH_FLAGS="\)\\"\$QT_INSTALL_LIBS\\" \($RPATH_FLAGS"\);\1\2;' \ -e "s;\(echo.*QMAKE_RPATHDIR +=\).*\$QT_INSTALL_LIBS\\\\\"\\\";\1 $x11_libdir\";" \ configure - if [ ".$x11_supdir" != . -a -d "$x11_supdir" ]; then - %{l_shtool} subst \ - -e "s;\(echo.*QMAKE_RPATHDIR += \)\($x11_libdir\\\"\)\( >> \\\"\$QTCONFIG\.tmp\\\"\);\1\2\3 \&\& \1$x11_supdir\"\3;" \ - configure - fi %{l_shtool} subst \ -e 's;\(TRY_INCLUDEPATHS = \).*\(\$\$INCLUDEPATH\);\1\2;' \ -e 's;/freetype2;/freetype;' \ @@ -142,10 +146,22 @@ -e 's;LIBS .*= -lpq$;LIBS += -lpq -lssl -lcrypto;' \ 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" \ + src/corelib/kernel/kernel.pri \ + src/gui/kernel/kernel.pri + %{l_shtool} subst \ + -e "s;QMAKE_CXXFLAGS \*= \$\$QT_CFLAGS_PSQL;INCPATH += `pg_config --includedir 2>/dev/null | %{l_shtool} subst -e 's;-I;;g'`;g" \ + -e "s;QMAKE_CXXFLAGS \*= \$\$QT_CFLAGS_MYSQL;INCPATH += `mysql_config --include 2>/dev/null | %{l_shtool} subst -e 's;-I;;g'`;g" \ + -e "s;QMAKE_CXXFLAGS \*= \$\$QT_CFLAGS_SQLITE;INCPATH += `pkg-config --cflags-only-I sqlite3 2>/dev/null | %{l_shtool} subst -e 's;-I;;g'`;g" \ + src/sql/drivers/drivers.pri + %{l_shtool} subst \ + -e "s;QMAKE_CXXFLAGS += \$\$QT_CFLAGS_DBUS;INCPATH += `pkg-config --cflags-only-I dbus-1 2>/dev/null | %{l_shtool} subst -e 's;-I;;g'`;g" \ + src/dbus/dbus.pro + %{l_shtool} subst \ -e 's;^\(QMAKE_INCDIR[^a-zA-Z0-9=]*=\).*;\1 %{l_prefix}/include;' \ -e 's;^\(QMAKE_LIBDIR[^a-zA-Z0-9=]*=\).*;\1 %{l_prefix}/lib;' \ -e "s;^\(QMAKE_INCDIR_OPENGL[^=]*=\) *\(.*\);\1 %{l_prefix}/include \2;" \ - -e "s;^\(QMAKE_LIBDIR_OPENGL[^=]*=\) *\(.*\);\1 %{l_prefix}/lib \2 $x11_supdir;" \ + -e "s;^\(QMAKE_LIBDIR_OPENGL[^=]*=\) *\(.*\);\1 %{l_prefix}/lib \2;" \ -e 's;^\(QMAKE_LFLAGS_RELEASE.*\);\1 -s;' \ mkspecs/qws/*/qmake.conf \ mkspecs/*/*.conf @@ -153,8 +169,8 @@ -e 's;^\(QMAKE_LIBS +=.*\);\1 -liconv;' \ src/corelib/corelib.pro %{l_shtool} subst \ - -e "s;^\(QMAKE_INCDIR_X11[^=]*=\) *\(.*\);\1 %{l_prefix}/include \2;" \ - -e "s;^\(QMAKE_LIBDIR_X11[^=]*=\) *\(.*\);\1 %{l_prefix}/lib \2 $x11_supdir;" \ + -e "s;^\(QMAKE_INCDIR_X11[^=]*=\).*;\1 %{l_prefix}/include $x11_incdir;" \ + -e "s;^\(QMAKE_LIBDIR_X11[^=]*=\).*;\1 %{l_prefix}/lib $x11_libdir;" \ mkspecs/qws/solaris*/qmake.conf \ mkspecs/solaris*/qmake.conf %{l_shtool} subst \ @@ -173,15 +189,16 @@ rm -rf src/3rdparty/[^cdhmsw]* src/3rdparty/sql* src/3rdparty/win* case "%{l_platform -t}" in - *-aix* ) platcomp="aix-g++" ;; - *-freebsd* ) platcomp="freebsd-g++" ;; - *-hpux* ) platcomp="hpux-g++" ;; - *-irix* ) platcomp="irix-g++" ;; - *64-linux* ) platcomp="linux-g++-64" ;; - *-linux* ) platcomp="linux-g++" ;; - *-darwin* ) platcomp="macx-g++" ;; - *-sunos* ) platcomp="solaris-g++" ;; - * ) echo "Platform '%{l_platform -t}' is not supported." 2>&1; exit 1 ;; + sun4[uv]-sunos* | amd64-sunos* ) platcomp="solaris-g++-64" ;; + i?86-sunos* ) platcomp="solaris-g++" ;; + amd64-linux* ) platcomp="linux-g++-64" ;; + i?86-linux* ) platcomp="linux-g++" ;; + amd64-freebsd* | i?86-freebsd* ) platcomp="freebsd-g++" ;; + *-aix* ) platcomp="aix-g++" ;; + *-darwin* ) platcomp="macx-g++" ;; + *-hpux* ) platcomp="hpux-g++" ;; + *-irix* ) platcomp="irix-g++" ;; + * ) echo "Platform '%{l_platform -t}' is not supported." 2>&1; exit 1 ;; esac %if "%{with_shared}" == "yes" @@ -192,7 +209,7 @@ -libdir %{l_prefix}/lib/qt \ -docdir %{l_prefix}/share/qt/doc \ -headerdir %{l_prefix}/include \ - -plugindir %{l_prefix}/share/qt/plugins \ + -plugindir %{l_prefix}/lib/qt/plugins \ -datadir %{l_prefix}/share/qt \ -translationdir %{l_prefix}/share/qt/translations \ -sysconfdir %{l_prefix}/etc/qt \ @@ -204,17 +221,20 @@ -no-sql-ibase \ %if "%{with_mysql}" == "yes" -qt-sql-mysql \ + -plugin-sql-mysql \ %else -no-sql-mysql \ %endif %if "%{with_pgsql}" == "yes" -qt-sql-psql \ + -plugin-sql-psql \ %else -no-sql-psql \ %endif -no-sql-odbc \ -system-sqlite \ -qt-sql-sqlite \ + -plugin-sql-sqlite \ -no-sql-sqlite2 \ -openssl-linked \ -xmlpatterns \ @@ -237,8 +257,7 @@ -freetype \ -no-glib - # sadly, the webkit is broken in Qt 4.4.3. - # default options are implicitly used, und zwar... + # default options are implicitly used, for example... #-no-fast -exceptions -accessibility -stl -qt3support -nis #-sm -xshape -xinerama -xcursor -xfixes -xrandr -tablet -xkb @@ -269,7 +288,7 @@ -libdir %{l_prefix}/lib \ -docdir %{l_prefix}/share/qt/doc \ -headerdir %{l_prefix}/include \ - -plugindir %{l_prefix}/share/qt/plugins \ + -plugindir %{l_prefix}/lib/qt/plugins \ -datadir %{l_prefix}/share/qt \ -translationdir %{l_prefix}/share/qt/translations \ -sysconfdir %{l_prefix}/etc/qt \ @@ -314,7 +333,7 @@ -freetype \ -no-glib - # default options are implicitly used, und zwar... + # default options are implicitly used, for example... #-no-fast -exceptions -accessibility -stl -qt3support -nis #-sm -xshape -xinerama -xcursor -xfixes -xrandr -tablet -xkb @@ -365,27 +384,38 @@ $RPM_BUILD_ROOT%{l_prefix}/lib/qt %{l_tar} cf - dynamic | %{l_tar} xf - -C $RPM_BUILD_ROOT%{l_prefix}/lib/qt + # offer limited support of pkg-config(1) for shared libs + %{l_shtool} subst \ + -e "s;\(moc_location[^=]*=\).*;\1%{l_prefix}/bin/moc;" \ + -e "s;\(uic_location[^=]*=\).*;\1%{l_prefix}/bin/uic;" \ + $RPM_BUILD_ROOT%{l_prefix}/lib/qt/dynamic/pkgconfig + # explain nonstandard shared library placement - ( echo "This directory contains optional shared libraries as" + ( echo "This OpenPKG Qt build is using the with_shared option." + echo "" + echo "This directory contains optional shared libraries as" echo "defined by the OpenPKG build specification. Although" - echo "shared libraries are only optionally built (see the" + echo "shared libraries have been optionally built (see the" echo "build time 'with_shared yes' option), static libraries" - echo "are built and installed in the parent 'lib' directory." + echo "were built by default as usual, and installed in the" + echo "standard library directory %{l_prefix}/lib." + echo "" + echo "To build applications using shared libraries instead," + echo "please direct pkg-config(1) to use the properdefinitions" + echo "by setting the environment variable PKG_CONFIG_PATH to " + echo "%{l_prefix}/lib/qt/dynamic/pkgconfig." ) >$RPM_BUILD_ROOT%{l_prefix}/lib/qt/README - # do not support pkg-config(1) with shared libs - rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/qt/pkgconfig - # remove temporary dynamic link paths %{l_shtool} subst \ - -e 's;\(QMAKE_PRL_BUILD_DIR[^=][^=]*=\).*\(qt-x11-opensource-src.*\);\1 /tmp/\2;' \ + -e 's;\(QMAKE_PRL_BUILD_DIR[^=]*=\).*\(qt-x11-opensource-src.*\);\1 /tmp/\2;' \ $RPM_BUILD_ROOT%{l_prefix}/lib/*.prl %endif # determine internal file listing %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ %{l_files_std} \ - '%doc %{l_prefix}/share/qt/doc/*' \ + '%doc %{l_prefix}/share/qt/doc/*/*' \ '%not %dir %{l_prefix}/lib/pkgconfig' %files -f files