Update major version and adjust build configuration accordingly.

Fri, 08 Oct 2010 23:24:07 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 08 Oct 2010 23:24:07 +0200
changeset 257
00697b799711
parent 256
438731a46ed1
child 258
85dc84aeb23f

Update major version and adjust build configuration accordingly.

qt/qt.spec file | annotate | diff | comparison | revisions
     1.1 --- a/qt/qt.spec	Thu Oct 07 19:04:06 2010 +0200
     1.2 +++ b/qt/qt.spec	Fri Oct 08 23:24:07 2010 +0200
     1.3 @@ -1,6 +1,6 @@
     1.4  ##
     1.5  ##  qt.spec -- OpenPKG RPM Specification
     1.6 -##  Copyright (c) 2009 Michael Schloh von Bennewitz <michael@schloh.com>
     1.7 +##  Copyright (c) 2010 Michael Schloh von Bennewitz <michael@schloh.com>
     1.8  ##
     1.9  ##  Permission to use, copy, modify, and distribute this software for
    1.10  ##  any purpose with or without fee is hereby granted, provided that
    1.11 @@ -29,9 +29,7 @@
    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: GNU iconv integration is flawed in Qt 4.5.2, and
    1.16 -#   FIXME: MSvB: has been disabled in this build until a new release
    1.17 -#   FIXME: MSvB: corrects the problem.
    1.18 +#   FIXME: MSvB: -no-webkit added to broken static buildconf
    1.19  
    1.20  #   package information
    1.21  Name:         qt
    1.22 @@ -43,8 +41,8 @@
    1.23  Class:        EVAL
    1.24  Group:        Development
    1.25  License:      GPL
    1.26 -Version:      4.5.3
    1.27 -Release:      20091001
    1.28 +Version:      4.7.0
    1.29 +Release:      20101008
    1.30  
    1.31  #   build options
    1.32  %option       with_tools     yes
    1.33 @@ -54,7 +52,7 @@
    1.34  %option       with_examples  no
    1.35  
    1.36  #   list of sources
    1.37 -Source0:      ftp://ftp.qt.nokia.com/qt/source/qt-x11-opensource-src-%{version}.tar.gz
    1.38 +Source0:      ftp://ftp.qt.nokia.com/qt/source/qt-everywhere-opensource-src-%{version}.tar.gz
    1.39  
    1.40  #   build information
    1.41  Prefix:       %{l_prefix}
    1.42 @@ -90,23 +88,24 @@
    1.43      prog qt = {
    1.44          version   = %{version}
    1.45          url       = ftp://ftp.trolltech.com/qt/source/
    1.46 -        regex     = qt-x11-opensource-src-(__VER__)\.tar\.gz
    1.47 +        regex     = qt-everywhere-opensource-src-(__VER__)\.tar\.gz
    1.48      }
    1.49  
    1.50  %prep
    1.51      #   announce exceptional build requirements
    1.52 -    ( echo "This package has exceptional storage requirements:"
    1.53 +    ( echo "This package has exceptional build requirements:"
    1.54        echo "  qt-%{version}-root (2,5 Go)"
    1.55 -      echo "  qt-x11-opensource-src-%{version} (4,5 Go)"
    1.56 +      echo "  qt-everywhere-opensource-src-%{version} (4,5 Go)"
    1.57        echo "  qt-%{version}-<date>.<arch>-<os>-<tag>.rpm (1 Go)"
    1.58        echo "Building with no options takes 0,5 hours on a dual core"
    1.59        echo "2 GHz CPU, or 2 hours with all build options enabled."
    1.60      ) | %{l_rpmtool} msg -b -t notice
    1.61  
    1.62 -    %setup -q -n qt-x11-opensource-src-%{version}
    1.63 +    %setup -q -n qt-everywhere-opensource-src-%{version}
    1.64      x11_incdir=`%{l_rc} --query x11_incdir`
    1.65      x11_libdir=`%{l_rc} --query x11_libdir`
    1.66      fontconflibs=`%{l_prefix}/bin/pkg-config --libs-only-l --static fontconfig`
    1.67 +    lcmslibs=`%{l_prefix}/bin/pkg-config --libs-only-l --static lcms`
    1.68      openssllibs=`%{l_prefix}/bin/pkg-config --libs --static openssl`
    1.69  
    1.70      loclibs=''
    1.71 @@ -125,7 +124,8 @@
    1.72          -e 's;\(-z[\t ][\t ]*\)\([^\t \"][^\t \"]*\);\1"\2";g' \
    1.73          configure
    1.74      %{l_shtool} subst \
    1.75 -        -e "s;\(QMAKE_LIBS_X11.*\)-lfreetype -lfontconfig;\1$fontconflibs;" \
    1.76 +        -e 's; *QMakeVar set QMAKE_CFLAGS_X11.*QT_CFLAGS_FONTCONFIG.*;;' \
    1.77 +        -e 's; *QMakeVar set QMAKE_LIBS_X11.*QT_LIBS_FONTCONFIG.*;;' \
    1.78          configure
    1.79      %{l_shtool} subst \
    1.80          -e "s;\(OPENSSL_LIBS *=\) *-lssl -lcrypto;\1 $openssllibs;" \
    1.81 @@ -135,21 +135,38 @@
    1.82          -e 's;\(RPATH_FLAGS="\)\\"\$QT_INSTALL_LIBS\\" \($RPATH_FLAGS"\);\1\2;' \
    1.83          -e "s;\(echo.*QMAKE_RPATHDIR +=\).*\$QT_INSTALL_LIBS\\\\\"\\\";\1 $x11_libdir\";" \
    1.84          configure
    1.85 +    #   yes this is needed several times to catch nested occurences of '--cflags'
    1.86 +    %{l_shtool} subst \
    1.87 +        -e 's;\(QT_CFLAGS_[^=][^=]*=.*PKG_CONFIG.*\) --cflags ;\1 --cflags-only-other ;g' \
    1.88 +        -e 's;\(QT_CFLAGS_[^=][^=]*=.*PKG_CONFIG.*\) --cflags ;\1 --cflags-only-other ;g' \
    1.89 +        configure
    1.90      %{l_shtool} subst \
    1.91          -e 's;\(TRY_INCLUDEPATHS = \).*\(\$\$INCLUDEPATH\);\1\2;' \
    1.92          -e 's;/freetype2;/freetype;' \
    1.93          config.tests/unix/freetype/freetype.pri
    1.94      %{l_shtool} subst \
    1.95 +        -e "s;\(LIBS.*=.*-lmng\);\1 $lcmslibs;" \
    1.96 +        src/gui/image/qmnghandler.pri
    1.97 +    %{l_shtool} subst \
    1.98          -e "s;^\(LIBS += \)-lfreetype -lfontconfig;\1$fontconflibs;" \
    1.99          config.tests/x11/fontconfig/fontconfig.pro
   1.100      echo 'INCLUDEPATH += /usr/include/wacomcfg' \
   1.101          >>src/gui/kernel/x11.pri
   1.102 +    echo "contains(QT_CONFIG, fontconfig) { LIBS += $fontconflibs }" \
   1.103 +        >>src/gui/kernel/x11.pri
   1.104 +    echo "contains(QT_CONFIG, fontconfig) { LIBS += $fontconflibs }" \
   1.105 +        >>src/gui/text/text.pri
   1.106 +    echo "INCLUDEPATH = `%{l_prefix}/bin/pkg-config --cflags-only-I dbus-1 | %{l_shtool} subst -e 's;\-I;;g'`" \
   1.107 +        >>config.tests/unix/dbus/dbus.pro
   1.108 +    echo "LIBS = `%{l_prefix}/bin/pkg-config --libs-only-l --static dbus-1`" \
   1.109 +        >>config.tests/unix/dbus/dbus.pro
   1.110      %{l_shtool} subst \
   1.111 -        -e "s;\(LIBS += -lpq\);\1 `%{l_prefix}/bin/pg_config --libs` $loclibs;" \
   1.112 +        -e "s;\(LIBS.*= -lpq\);\1 `%{l_prefix}/bin/pg_config --libs` $loclibs;" \
   1.113          config.tests/unix/psql/psql.pro
   1.114      %{l_shtool} subst \
   1.115 -        -e 's;^mac:\(LIBS\);\1;' \
   1.116 +        -e 's;^mac[^:][^:]*:\(LIBS\);\1;' \
   1.117          config.tests/unix/iconv/iconv.pro
   1.118 +    uiclibs=`%{l_prefix}/bin/pkg-config --libs-only-l --static fontconfig lcms`
   1.119      %{l_shtool} subst \
   1.120          -e 's;LIBS .*= -lpq$;LIBS += -lpq -lssl -lcrypto;' \
   1.121          src/sql/drivers/drivers.pri
   1.122 @@ -161,6 +178,8 @@
   1.123          -e "s;QMAKE_CXXFLAGS \*= \$\$QT_CFLAGS_PSQL;INCPATH += `pg_config --includedir 2>/dev/null | %{l_shtool} subst -e 's;-I;;g'`;g" \
   1.124          -e "s;QMAKE_CXXFLAGS \*= \$\$QT_CFLAGS_MYSQL;INCPATH += `mysql_config --include 2>/dev/null | %{l_shtool} subst -e 's;-I;;g'`;g" \
   1.125          -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.126 +        -e 's;!static:\(!isEmpty(QT_LFLAGS_PSQL)\);\1;' \
   1.127 +        -e 's;!static:\(LIBS \*= \$\$QT_LFLAGS_PSQL\);\1;' \
   1.128          src/plugins/sqldrivers/mysql/mysql.pro \
   1.129          src/plugins/sqldrivers/psql/psql.pro \
   1.130          src/plugins/sqldrivers/sqlite/sqlite.pro \
   1.131 @@ -190,7 +209,7 @@
   1.132          src/gui/text/text.pri
   1.133      %{l_shtool} subst \
   1.134          -e 's;\(#include  *"\)\(tiffio.h"\);\1tiff/\2;' \
   1.135 -        src/plugins/imageformats/tiff/qtiffhandler.cpp
   1.136 +        src/gui/image/qtiffhandler.cpp
   1.137      %{l_shtool} subst \
   1.138          -e 's;\(CONFIG[\t ]*+=[\t ]*qt\);\1 x11;' \
   1.139          tools/qtconfig/qtconfig.pro
   1.140 @@ -200,7 +219,7 @@
   1.141  
   1.142  %build
   1.143      #   protect against sloppy code inclusion of all unused subprojects
   1.144 -    rm -rf src/3rdparty/[^cdhmsw]* src/3rdparty/sql* src/3rdparty/win*
   1.145 +    (cd src/3rdparty && rm -rf [^cdehjmswxz]* sql* win* zlib zlib.pri) || exit $?
   1.146  
   1.147      #   detect which platform for which to build
   1.148      case "%{l_platform -t}" in
   1.149 @@ -276,7 +295,7 @@
   1.150          -system-libtiff \
   1.151          -rpath \
   1.152          -no-cups \
   1.153 -        -no-iconv \
   1.154 +        -iconv \
   1.155          -pch \
   1.156          -dbus-linked \
   1.157          -opengl \
   1.158 @@ -293,12 +312,29 @@
   1.159      ( cd src
   1.160        %{l_make} %{l_mflags -O} \
   1.161            sub-moc sub-rcc sub-uic sub-uic3
   1.162 -      %{l_make} %{l_mflags -O} \
   1.163 -          sub-corelib sub-xml sub-network sub-gui sub-sql \
   1.164 -          sub-script sub-testlib sub-qt3support sub-dbus \
   1.165 -          sub-opengl sub-xmlpatterns sub-svg sub-plugins \
   1.166 -          sub-webkit sub-scripttools
   1.167      ) || exit $?
   1.168 +    %{l_make} %{l_mflags -O} \
   1.169 +        sub-corelib-make_default-ordered \
   1.170 +        sub-xml-make_default-ordered \
   1.171 +        sub-network-make_default-ordered \
   1.172 +        sub-sql-make_default-ordered \
   1.173 +        sub-testlib-make_default-ordered \
   1.174 +        sub-dbus-make_default-ordered \
   1.175 +        sub-gui-make_default-ordered \
   1.176 +        sub-qt3support-make_default-ordered \
   1.177 +        sub-opengl-make_default-ordered \
   1.178 +        sub-xmlpatterns-make_default-ordered \
   1.179 +        sub-multimedia-make_default-ordered \
   1.180 +        sub-svg-make_default-ordered \
   1.181 +        sub-script-make_default-ordered \
   1.182 +        sub-declarative-make_default-ordered \
   1.183 +        sub-javascriptcore-make_default-ordered \
   1.184 +        sub-webkit-make_default-ordered \
   1.185 +        sub-scripttools-make_default-ordered \
   1.186 +        sub-plugins-make_default-ordered \
   1.187 +        sub-imports-make_default-ordered \
   1.188 +        sub-webkitdeclarative-make_default-ordered \
   1.189 +        sub-translations-make_default-ordered
   1.190  
   1.191      #   arthur plugin requires libQtDesigner
   1.192      ( cd demos
   1.193 @@ -315,10 +351,7 @@
   1.194      #   would otherwise still contain references to our shared libs build
   1.195      %{l_shtool} mkdir -f -p -m 755 dynamic
   1.196      mv lib/* dynamic/
   1.197 -    ( cd qmake
   1.198 -      %{l_make} %{l_mflags} distclean
   1.199 -    ) || exit $?
   1.200 -    rm -f .qmake.cache
   1.201 +    %{l_make} %{l_mflags} confclean
   1.202  %endif
   1.203  
   1.204      #   mandatory static build (follows optional shared build)
   1.205 @@ -357,7 +390,7 @@
   1.206          -openssl-linked \
   1.207          -xmlpatterns \
   1.208          -svg \
   1.209 -        -webkit \
   1.210 +        -no-webkit \
   1.211          -system-zlib \
   1.212          -qt-gif \
   1.213          -system-libpng \
   1.214 @@ -366,7 +399,7 @@
   1.215          -system-libtiff \
   1.216          -rpath \
   1.217          -no-cups \
   1.218 -        -no-iconv \
   1.219 +        -iconv \
   1.220          -pch \
   1.221          -dbus-linked \
   1.222          -opengl \
   1.223 @@ -380,9 +413,9 @@
   1.224      #-sm -xshape -xinerama -xcursor -xfixes -xrandr -tablet -xkb
   1.225  
   1.226      #   carry out static build procedure
   1.227 -    %{l_make} %{l_mflags -O} sub-src
   1.228 +    %{l_make} %{l_mflags -O} sub-src sub-translations
   1.229  %if "%{with_tools}" == "yes"
   1.230 -    %{l_make} %{l_mflags -O} sub-tools
   1.231 +    %{l_make} %{l_mflags -O} sub-tools-make_default-ordered
   1.232  %endif
   1.233  %if "%{with_examples}" == "yes"
   1.234      %{l_make} %{l_mflags -O} \
   1.235 @@ -401,19 +434,23 @@
   1.236              sub-corelib-install_subtargets-ordered \
   1.237              sub-xml-install_subtargets-ordered \
   1.238              sub-network-install_subtargets-ordered \
   1.239 +            sub-sql-install_subtargets-ordered \
   1.240 +            sub-testlib-install_subtargets-ordered \
   1.241 +            sub-dbus-install_subtargets-ordered \
   1.242              sub-gui-install_subtargets-ordered \
   1.243 -            sub-sql-install_subtargets-ordered \
   1.244 -            sub-script-install_subtargets-ordered \
   1.245 -            sub-testlib-install_subtargets-ordered \
   1.246              sub-qt3support-install_subtargets-ordered \
   1.247 -            sub-dbus-install_subtargets-ordered \
   1.248              sub-uic3-install_subtargets-ordered \
   1.249              sub-opengl-install_subtargets-ordered \
   1.250              sub-xmlpatterns-install_subtargets-ordered \
   1.251 +            sub-multimedia-install_subtargets-ordered \
   1.252              sub-svg-install_subtargets-ordered \
   1.253 -            sub-webkit-install_subtargets-ordered \
   1.254 -            sub-scripttools-install_subtargets-ordered  \
   1.255 -            sub-plugins-install_subtargets-ordered"
   1.256 +            sub-script-install_subtargets-ordered \
   1.257 +            sub-declarative-install_subtargets-ordered \
   1.258 +            sub-scripttools-install_subtargets-ordered \
   1.259 +            sub-plugins-install_subtargets-ordered \
   1.260 +            sub-imports-install_subtargets-ordered \
   1.261 +            sub-translations-install_subtargets-ordered"
   1.262 +
   1.263  %if "%{with_tools}" == "yes"
   1.264      targets="$targets sub-tools-install_subtargets-ordered sub-tools-qdoc3-install_subtargets-ordered"
   1.265  %endif
   1.266 @@ -424,6 +461,9 @@
   1.267      %{l_make} %{l_mflags} $targets INSTALL_ROOT="$RPM_BUILD_ROOT"
   1.268  
   1.269  %if "%{with_shared}" == "yes"
   1.270 +#    #   install components only built against shared libs
   1.271 +#    targets="$targets irgend-was-webkit_subtargets-ordered"
   1.272 +
   1.273      #   install shared libs and symlinks
   1.274      %{l_shtool} mkdir -f -p -m 755 \
   1.275          $RPM_BUILD_ROOT%{l_prefix}/lib/qt
   1.276 @@ -432,7 +472,7 @@
   1.277      #   offer limited support of pkg-config(1) for shared libs
   1.278      #   substitution unfortunately only handles paths with no whitespace
   1.279      %{l_shtool} subst \
   1.280 -        -e "s;[^\t ][^\t ]*qt-x11-opensource-src-%{version};%{l_prefix};g" \
   1.281 +        -e "s;-L[^\t ][^\t ]*qt-everywhere-opensource-src-%{version};-L%{l_prefix};g" \
   1.282          $RPM_BUILD_ROOT%{l_prefix}/lib/qt/dynamic/pkgconfig/*
   1.283  
   1.284      #   explain nonstandard shared library placement
   1.285 @@ -453,8 +493,8 @@
   1.286  
   1.287      #   remove temporary dynamic link paths
   1.288      %{l_shtool} subst \
   1.289 -        -e "s;-L\([\t ]*\)[^\t ][^\t ]*qt-x11-opensource-src-%{version}\(/[^\t ][^\t ]*\);-L\1%{l_prefix}\2;g" \
   1.290 -        -e "s;\([\t ][\t ]*\)[^\t ][^\t ]*\(qt-x11-opensource-src-%{version}.*\);\1/tmp/\2;" \
   1.291 +        -e "s;-L\([\t ]*\)[^\t ][^\t ]*qt-everywhere-opensource-src-%{version}\(/[^\t ][^\t ]*\);-L\1%{l_prefix}\2;g" \
   1.292 +        -e "s;\([\t ][\t ]*\)[^\t ][^\t ]*\(qt-everywhere-opensource-src-%{version}.*\);\1/tmp/\2;" \
   1.293          $RPM_BUILD_ROOT%{l_prefix}/lib/qt/dynamic/*.prl \
   1.294          $RPM_BUILD_ROOT%{l_prefix}/lib/qt/dynamic/*.la
   1.295  %endif

mercurial