qt/qt.spec

changeset 86
78e7deb1d6ab
parent 65
caa04e02b103
child 87
7cedea33cc19
     1.1 --- a/qt/qt.spec	Wed Jan 14 15:09:44 2009 +0100
     1.2 +++ b/qt/qt.spec	Wed Jan 14 15:59:12 2009 +0100
     1.3 @@ -21,6 +21,16 @@
     1.4  ##  SUCH DAMAGE.
     1.5  ##
     1.6  
     1.7 +#   FIXME: MSvB: It appears that bugs in current versions of binutils
     1.8 +#   FIXME: MSvB: fail to properly link Qt object code, resulting in
     1.9 +#   FIXME: MSvB: 'ld: libQt*.so: pthread_mutex...: invalid version 6
    1.10 +#   FIXME: MSvB: libQt*.so: could not read symbols: Bad value'
    1.11 +#   FIXME: MSvB: The effects of these bugs are platform dependent.
    1.12 +#   FIXME: MSvB: Solaris 11 IA-32 builds fail while Linux 2.6.25.18
    1.13 +#   FIXME: MSvB: AMD64 builds succeed.
    1.14 +#   FIXME: MSvB:
    1.15 +#   FIXME: MSvB: The webkit is flawed in Qt 4.4.3, and has been disabled
    1.16 +#   FIXME: MSvB: in this build until a new release corrects the problem.
    1.17  
    1.18  #   package information
    1.19  Name:         qt
    1.20 @@ -72,7 +82,8 @@
    1.21      Qt is a comprehensive C++ framework for cross-platform application
    1.22      development. Using Qt, you can develop applications and user
    1.23      interfaces once, and deploy them across many desktop and embedded
    1.24 -    operating systems without rewriting the source code.
    1.25 +    operating systems without rewriting the source code. This package
    1.26 +    distribution builds all modules of the Qt/X11 Open Source Edition.
    1.27  
    1.28  %track
    1.29      prog qt = {
    1.30 @@ -96,11 +107,9 @@
    1.31      x11_libdir=`%{l_rc} --query x11_libdir`
    1.32      fontconf=`%{l_prefix}/bin/pkg-config --libs-only-l --static fontconfig`
    1.33      loclibs=''
    1.34 -    x11_supdir=''
    1.35      case "%{l_platform -t}" in
    1.36          *-sunos* )
    1.37              loclibs='-lsocket -lnsl'
    1.38 -            [ -d /usr/X/sfw/lib ] && x11_supdir=/usr/X/sfw/lib
    1.39              ;;
    1.40      esac
    1.41      ( cd mkspecs/qws
    1.42 @@ -120,11 +129,6 @@
    1.43          -e 's;\(RPATH_FLAGS="\)\\"\$QT_INSTALL_LIBS\\" \($RPATH_FLAGS"\);\1\2;' \
    1.44          -e "s;\(echo.*QMAKE_RPATHDIR +=\).*\$QT_INSTALL_LIBS\\\\\"\\\";\1 $x11_libdir\";" \
    1.45          configure
    1.46 -    if [ ".$x11_supdir" != . -a -d "$x11_supdir" ]; then
    1.47 -        %{l_shtool} subst \
    1.48 -            -e "s;\(echo.*QMAKE_RPATHDIR += \)\($x11_libdir\\\"\)\( >> \\\"\$QTCONFIG\.tmp\\\"\);\1\2\3 \&\& \1$x11_supdir\"\3;" \
    1.49 -            configure
    1.50 -    fi
    1.51      %{l_shtool} subst \
    1.52          -e 's;\(TRY_INCLUDEPATHS = \).*\(\$\$INCLUDEPATH\);\1\2;' \
    1.53          -e 's;/freetype2;/freetype;' \
    1.54 @@ -142,10 +146,22 @@
    1.55          -e 's;LIBS .*= -lpq$;LIBS += -lpq -lssl -lcrypto;' \
    1.56          src/sql/drivers/drivers.pri
    1.57      %{l_shtool} subst \
    1.58 +        -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.59 +        src/corelib/kernel/kernel.pri \
    1.60 +        src/gui/kernel/kernel.pri
    1.61 +    %{l_shtool} subst \
    1.62 +        -e "s;QMAKE_CXXFLAGS \*= \$\$QT_CFLAGS_PSQL;INCPATH += `pg_config --includedir 2>/dev/null | %{l_shtool} subst -e 's;-I;;g'`;g" \
    1.63 +        -e "s;QMAKE_CXXFLAGS \*= \$\$QT_CFLAGS_MYSQL;INCPATH += `mysql_config --include 2>/dev/null | %{l_shtool} subst -e 's;-I;;g'`;g" \
    1.64 +        -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" \
    1.65 +        src/sql/drivers/drivers.pri
    1.66 +    %{l_shtool} subst \
    1.67 +        -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" \
    1.68 +        src/dbus/dbus.pro
    1.69 +    %{l_shtool} subst \
    1.70          -e 's;^\(QMAKE_INCDIR[^a-zA-Z0-9=]*=\).*;\1 %{l_prefix}/include;' \
    1.71          -e 's;^\(QMAKE_LIBDIR[^a-zA-Z0-9=]*=\).*;\1 %{l_prefix}/lib;' \
    1.72          -e "s;^\(QMAKE_INCDIR_OPENGL[^=]*=\) *\(.*\);\1 %{l_prefix}/include \2;" \
    1.73 -        -e "s;^\(QMAKE_LIBDIR_OPENGL[^=]*=\) *\(.*\);\1 %{l_prefix}/lib \2 $x11_supdir;" \
    1.74 +        -e "s;^\(QMAKE_LIBDIR_OPENGL[^=]*=\) *\(.*\);\1 %{l_prefix}/lib \2;" \
    1.75          -e 's;^\(QMAKE_LFLAGS_RELEASE.*\);\1 -s;' \
    1.76          mkspecs/qws/*/qmake.conf \
    1.77          mkspecs/*/*.conf
    1.78 @@ -153,8 +169,8 @@
    1.79          -e 's;^\(QMAKE_LIBS +=.*\);\1 -liconv;' \
    1.80          src/corelib/corelib.pro
    1.81      %{l_shtool} subst \
    1.82 -        -e "s;^\(QMAKE_INCDIR_X11[^=]*=\) *\(.*\);\1 %{l_prefix}/include \2;" \
    1.83 -        -e "s;^\(QMAKE_LIBDIR_X11[^=]*=\) *\(.*\);\1 %{l_prefix}/lib \2 $x11_supdir;" \
    1.84 +        -e "s;^\(QMAKE_INCDIR_X11[^=]*=\).*;\1 %{l_prefix}/include $x11_incdir;" \
    1.85 +        -e "s;^\(QMAKE_LIBDIR_X11[^=]*=\).*;\1 %{l_prefix}/lib $x11_libdir;" \
    1.86          mkspecs/qws/solaris*/qmake.conf \
    1.87          mkspecs/solaris*/qmake.conf
    1.88      %{l_shtool} subst \
    1.89 @@ -173,15 +189,16 @@
    1.90      rm -rf src/3rdparty/[^cdhmsw]* src/3rdparty/sql* src/3rdparty/win*
    1.91  
    1.92      case "%{l_platform -t}" in
    1.93 -        *-aix*     ) platcomp="aix-g++"      ;;
    1.94 -        *-freebsd* ) platcomp="freebsd-g++"  ;;
    1.95 -        *-hpux*    ) platcomp="hpux-g++"     ;;
    1.96 -        *-irix*    ) platcomp="irix-g++"     ;;
    1.97 -        *64-linux* ) platcomp="linux-g++-64" ;;
    1.98 -        *-linux*   ) platcomp="linux-g++"    ;;
    1.99 -        *-darwin*  ) platcomp="macx-g++"     ;;
   1.100 -        *-sunos*   ) platcomp="solaris-g++"  ;;
   1.101 -        *          ) echo "Platform '%{l_platform -t}' is not supported." 2>&1; exit 1 ;;
   1.102 +        sun4[uv]-sunos* | amd64-sunos*  ) platcomp="solaris-g++-64" ;;
   1.103 +        i?86-sunos*                     ) platcomp="solaris-g++"    ;;
   1.104 +        amd64-linux*                    ) platcomp="linux-g++-64"   ;;
   1.105 +        i?86-linux*                     ) platcomp="linux-g++"      ;;
   1.106 +        amd64-freebsd* | i?86-freebsd*  ) platcomp="freebsd-g++"    ;;
   1.107 +        *-aix*                          ) platcomp="aix-g++"        ;;
   1.108 +        *-darwin*                       ) platcomp="macx-g++"       ;;
   1.109 +        *-hpux*                         ) platcomp="hpux-g++"       ;;
   1.110 +        *-irix*                         ) platcomp="irix-g++"       ;;
   1.111 +        *                               ) echo "Platform '%{l_platform -t}' is not supported." 2>&1; exit 1 ;;
   1.112      esac
   1.113  
   1.114  %if "%{with_shared}" == "yes"
   1.115 @@ -192,7 +209,7 @@
   1.116          -libdir %{l_prefix}/lib/qt \
   1.117          -docdir %{l_prefix}/share/qt/doc \
   1.118          -headerdir %{l_prefix}/include \
   1.119 -        -plugindir %{l_prefix}/share/qt/plugins \
   1.120 +        -plugindir %{l_prefix}/lib/qt/plugins \
   1.121          -datadir %{l_prefix}/share/qt \
   1.122          -translationdir %{l_prefix}/share/qt/translations \
   1.123          -sysconfdir %{l_prefix}/etc/qt \
   1.124 @@ -204,17 +221,20 @@
   1.125          -no-sql-ibase \
   1.126  %if "%{with_mysql}" == "yes"
   1.127          -qt-sql-mysql \
   1.128 +        -plugin-sql-mysql \
   1.129  %else
   1.130          -no-sql-mysql \
   1.131  %endif
   1.132  %if "%{with_pgsql}" == "yes"
   1.133          -qt-sql-psql \
   1.134 +        -plugin-sql-psql \
   1.135  %else
   1.136          -no-sql-psql \
   1.137  %endif
   1.138          -no-sql-odbc \
   1.139          -system-sqlite \
   1.140          -qt-sql-sqlite \
   1.141 +        -plugin-sql-sqlite \
   1.142          -no-sql-sqlite2 \
   1.143          -openssl-linked \
   1.144          -xmlpatterns \
   1.145 @@ -237,8 +257,7 @@
   1.146          -freetype \
   1.147          -no-glib
   1.148  
   1.149 -    #   sadly, the webkit is broken in Qt 4.4.3.
   1.150 -    #   default options are implicitly used, und zwar...
   1.151 +    #   default options are implicitly used, for example...
   1.152      #-no-fast -exceptions -accessibility -stl -qt3support -nis
   1.153      #-sm -xshape -xinerama -xcursor -xfixes -xrandr -tablet -xkb
   1.154  
   1.155 @@ -269,7 +288,7 @@
   1.156          -libdir %{l_prefix}/lib \
   1.157          -docdir %{l_prefix}/share/qt/doc \
   1.158          -headerdir %{l_prefix}/include \
   1.159 -        -plugindir %{l_prefix}/share/qt/plugins \
   1.160 +        -plugindir %{l_prefix}/lib/qt/plugins \
   1.161          -datadir %{l_prefix}/share/qt \
   1.162          -translationdir %{l_prefix}/share/qt/translations \
   1.163          -sysconfdir %{l_prefix}/etc/qt \
   1.164 @@ -314,7 +333,7 @@
   1.165          -freetype \
   1.166          -no-glib
   1.167  
   1.168 -    #   default options are implicitly used, und zwar...
   1.169 +    #   default options are implicitly used, for example...
   1.170      #-no-fast -exceptions -accessibility -stl -qt3support -nis
   1.171      #-sm -xshape -xinerama -xcursor -xfixes -xrandr -tablet -xkb
   1.172  
   1.173 @@ -365,27 +384,38 @@
   1.174          $RPM_BUILD_ROOT%{l_prefix}/lib/qt
   1.175      %{l_tar} cf - dynamic | %{l_tar} xf - -C $RPM_BUILD_ROOT%{l_prefix}/lib/qt
   1.176  
   1.177 +    #   offer limited support of pkg-config(1) for shared libs
   1.178 +    %{l_shtool} subst \
   1.179 +        -e "s;\(moc_location[^=]*=\).*;\1%{l_prefix}/bin/moc;" \
   1.180 +        -e "s;\(uic_location[^=]*=\).*;\1%{l_prefix}/bin/uic;" \
   1.181 +        $RPM_BUILD_ROOT%{l_prefix}/lib/qt/dynamic/pkgconfig
   1.182 +
   1.183      #   explain nonstandard shared library placement
   1.184 -    ( echo "This directory contains optional shared libraries as"
   1.185 +    ( echo "This OpenPKG Qt build is using the with_shared option."
   1.186 +      echo ""
   1.187 +      echo "This directory contains optional shared libraries as"
   1.188        echo "defined by the OpenPKG build specification. Although"
   1.189 -      echo "shared libraries are only optionally built (see the"
   1.190 +      echo "shared libraries have been optionally built (see the"
   1.191        echo "build time 'with_shared yes' option), static libraries"
   1.192 -      echo "are built and installed in the parent 'lib' directory."
   1.193 +      echo "were built by default as usual, and installed in the"
   1.194 +      echo "standard library directory %{l_prefix}/lib."
   1.195 +      echo ""
   1.196 +      echo "To build applications using shared libraries instead,"
   1.197 +      echo "please direct pkg-config(1) to use the properdefinitions"
   1.198 +      echo "by setting the environment variable PKG_CONFIG_PATH to "
   1.199 +      echo "%{l_prefix}/lib/qt/dynamic/pkgconfig."
   1.200      ) >$RPM_BUILD_ROOT%{l_prefix}/lib/qt/README
   1.201  
   1.202 -    #   do not support pkg-config(1) with shared libs
   1.203 -    rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/qt/pkgconfig
   1.204 -
   1.205      #   remove temporary dynamic link paths
   1.206      %{l_shtool} subst \
   1.207 -        -e 's;\(QMAKE_PRL_BUILD_DIR[^=][^=]*=\).*\(qt-x11-opensource-src.*\);\1 /tmp/\2;' \
   1.208 +        -e 's;\(QMAKE_PRL_BUILD_DIR[^=]*=\).*\(qt-x11-opensource-src.*\);\1 /tmp/\2;' \
   1.209          $RPM_BUILD_ROOT%{l_prefix}/lib/*.prl
   1.210  %endif
   1.211  
   1.212      #   determine internal file listing
   1.213      %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
   1.214          %{l_files_std} \
   1.215 -        '%doc %{l_prefix}/share/qt/doc/*' \
   1.216 +        '%doc %{l_prefix}/share/qt/doc/*/*' \
   1.217          '%not %dir %{l_prefix}/lib/pkgconfig'
   1.218  
   1.219  %files -f files

mercurial