Correct diverse buildconf of upstream release and reconcile packaging somewhat.

Sat, 21 May 2011 22:05:42 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 21 May 2011 22:05:42 +0200
changeset 340
870131689a5c
parent 339
c9103fdfdf0d
child 341
24888fe4de94

Correct diverse buildconf of upstream release and reconcile packaging somewhat.
These changes stem from the obvious changes in the latest vendor release, but
from discussions with trolls Daniel and Oswald as well regarding build config.

This commital follows conclusion of buildconf adjustments to allow the new
vendor version to build on Linux AMD64, but is incomplete as many packaging
comments show. The next series of changes focus on Solaris IA32 and reduction
of buildconf adjustments testing old problems comprehensively in anticipation
of discussion at the upcoming Nokia Contributor Summit in Berlin.

qt/qt.spec file | annotate | diff | comparison | revisions
     1.1 --- a/qt/qt.spec	Mon Apr 04 20:34:12 2011 +0200
     1.2 +++ b/qt/qt.spec	Sat May 21 22:05:42 2011 +0200
     1.3 @@ -39,8 +39,8 @@
     1.4  Class:        EVAL
     1.5  Group:        Development
     1.6  License:      GPL
     1.7 -Version:      4.7.0
     1.8 -Release:      20101018
     1.9 +Version:      4.7.3
    1.10 +Release:      20110514
    1.11  
    1.12  #   build options
    1.13  %option       with_tools     yes
    1.14 @@ -112,12 +112,12 @@
    1.15      openssllibs=`%{l_prefix}/bin/pkg-config --libs --static openssl`
    1.16      mysqllibs=`%{l_prefix}/bin/mysql_config --libs`
    1.17  
    1.18 -    loclibs=''
    1.19 -    case "%{l_platform -t}" in
    1.20 -        *-sunos* )
    1.21 -            loclibs='-lsocket -lnsl'
    1.22 -            ;;
    1.23 -    esac
    1.24 +# MSvB In R/D:    loclibs=''
    1.25 +# MSvB In R/D:    case "%{l_platform -t}" in
    1.26 +# MSvB In R/D:        *-sunos* )
    1.27 +# MSvB In R/D:            loclibs='-lsocket -lnsl'
    1.28 +# MSvB In R/D:            ;;
    1.29 +# MSvB In R/D:    esac
    1.30      ( cd mkspecs/qws
    1.31        for plat in freebsd-generic-g++ macx-generic-g++ solaris-generic-g++;
    1.32        do
    1.33 @@ -147,107 +147,158 @@
    1.34          -e 's;\(QT_CFLAGS_[^=][^=]*=.*PKG_CONFIG.*\) --cflags ;\1 --cflags-only-other ;g' \
    1.35          -e 's;\(QT_CFLAGS_[^=][^=]*=.*PKG_CONFIG.*\) --cflags ;\1 --cflags-only-other ;g' \
    1.36          configure
    1.37 +    #   Trolltech Bug:
    1.38 +    #   Glib support cannot be enabled due to functionality tests!
    1.39 +    #   Turn on verbose messaging (-v) to ./configure to see the final report.
    1.40 +    #   Trolltech Bug:
    1.41 +    #   In file included from ../../include/QtGui/private/qgtkstyle_p.h:1,
    1.42 +    #                    from kernel/qguiplatformplugin.cpp:63:
    1.43 +    #   ....../qgtkstyle_p.h:69:21: error: gtk/gtk.h: No such file or directory
    1.44 +    #   Workaround resolution:
    1.45      #   hack to get back the standard '--cflags' of just Qt_CFLAGS_GLIB
    1.46 +    #   Question: Is this needed? QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
    1.47      %{l_shtool} subst \
    1.48          -e 's;\(QT_CFLAGS_GLIB *=.*PKG_CONFIG.*\) --cflags-only-other ;\1 --cflags ;g' \
    1.49 +        -e 's;\(QT_CFLAGS_QGTKSTYLE *=.*PKG_CONFIG.*\) --cflags-only-other ;\1 --cflags ;g' \
    1.50          configure
    1.51 -    %{l_shtool} subst \
    1.52 -        -e 's;\(TRY_INCLUDEPATHS = \).*\(\$\$INCLUDEPATH\);\1\2;' \
    1.53 -        -e 's;/freetype2;/freetype;' \
    1.54 -        config.tests/unix/freetype/freetype.pri
    1.55 +# MSvB In R/D:    %{l_shtool} subst \
    1.56 +# MSvB In R/D:        -e 's;\(TRY_INCLUDEPATHS = \).*\(\$\$INCLUDEPATH\);\1\2;' \
    1.57 +# MSvB In R/D:        -e 's;/freetype2;/freetype;' \
    1.58 +# MSvB In R/D:        config.tests/unix/freetype/freetype.pri
    1.59 +    #   Trolltech Bug:
    1.60 +    #   /opdv/lib/libmng.a(libmng_cms.o): In function `mnglcms_initlibrary':
    1.61 +    #   libmng_cms.c:(.text+0xa): undefined reference to `cmsErrorAction'
    1.62      %{l_shtool} subst \
    1.63          -e "s;\(LIBS.*=.*-lmng\);\1 $lcmslibs;" \
    1.64          src/gui/image/qmnghandler.pri
    1.65 +    #   Trolltech Bug:
    1.66 +    #   lib/libQtGui.a(qapplication_x11.o): In function
    1.67 +    #   `qt_init(QApplicationPrivate*, int, _XDisplay*, unsigned long, unsigned long)':
    1.68 +    #   qapplication_x11.cpp:(.text+0xec8d): undefined reference to `FcInit'
    1.69      %{l_shtool} subst \
    1.70          -e "s;^\(LIBS += \)-lfreetype -lfontconfig;\1$fontconflibs;" \
    1.71          config.tests/x11/fontconfig/fontconfig.pro
    1.72 +    echo "LIBS += `%{l_prefix}/bin/pkg-config --libs-only-L fontconfig`" \
    1.73 +        >>tools/linguist/linguist/linguist.pro
    1.74      echo 'INCLUDEPATH += /usr/include/wacomcfg' \
    1.75          >>src/gui/kernel/x11.pri
    1.76      echo "contains(QT_CONFIG, fontconfig) { LIBS += $fontconflibs }" \
    1.77          >>src/gui/kernel/x11.pri
    1.78      echo "contains(QT_CONFIG, fontconfig) { LIBS += $fontconflibs }" \
    1.79          >>src/gui/text/text.pri
    1.80 +    #   Trolltech Bug:
    1.81 +    #   The QtDBus module cannot be enabled because libdbus-1 version 0.93 was not found.
    1.82 +    #   Turn on verbose messaging (-v) to ./configure to see the final report.
    1.83      echo "INCLUDEPATH = `%{l_prefix}/bin/pkg-config --cflags-only-I dbus-1 | %{l_shtool} subst -e 's;\-I;;g'`" \
    1.84          >>config.tests/unix/dbus/dbus.pro
    1.85      echo "LIBS = `%{l_prefix}/bin/pkg-config --libs-only-l --static dbus-1`" \
    1.86          >>config.tests/unix/dbus/dbus.pro
    1.87 +    #   Trolltech Bug:
    1.88 +    #   PostgreSQL support cannot be enabled due to functionality tests!
    1.89 +    #   Turn on verbose messaging (-v) to ./configure to see the final report.
    1.90      %{l_shtool} subst \
    1.91          -e "s;\(LIBS.*= -lpq\);\1 `%{l_prefix}/bin/pg_config --libs` $loclibs;" \
    1.92          config.tests/unix/psql/psql.pro
    1.93 +    #   Trolltech Bug:
    1.94 +    #   Iconv support cannot be enabled due to functionality tests!
    1.95 +    #   Turn on verbose messaging (-v) to ./configure to see the final report.
    1.96      %{l_shtool} subst \
    1.97          -e 's;^mac[^:][^:]*:\(LIBS\);\1;' \
    1.98          config.tests/unix/iconv/iconv.pro
    1.99 -    uiclibs=`%{l_prefix}/bin/pkg-config --libs-only-l --static fontconfig lcms`
   1.100 -    %{l_shtool} subst \
   1.101 -        -e 's;LIBS .*= -lpq$;LIBS += -lpq -lssl -lcrypto;' \
   1.102 -        -e "s;LIBS .*= \$\$QT_LFLAGS_MYSQL;LIBS += $mysqllibs;" \
   1.103 -        src/sql/drivers/drivers.pri
   1.104 -    %{l_shtool} subst \
   1.105 -        -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.106 -        src/corelib/kernel/kernel.pri \
   1.107 -        src/gui/kernel/kernel.pri
   1.108 -    %{l_shtool} subst \
   1.109 -        -e "s;QMAKE_CXXFLAGS \*= \$\$QT_CFLAGS_PSQL;INCPATH += `pg_config --includedir 2>/dev/null | %{l_shtool} subst -e 's;-I;;g'`;g" \
   1.110 -        -e "s;QMAKE_CXXFLAGS \*= \$\$QT_CFLAGS_MYSQL;INCPATH += `mysql_config --include 2>/dev/null | %{l_shtool} subst -e 's;-I;;g'`;g" \
   1.111 -        -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.112 -        -e 's;!static:\(!isEmpty(QT_LFLAGS_PSQL)\);\1;' \
   1.113 -        -e 's;!static:\(LIBS \*= \$\$QT_LFLAGS_PSQL\);\1;' \
   1.114 -        src/plugins/sqldrivers/mysql/mysql.pro \
   1.115 -        src/plugins/sqldrivers/psql/psql.pro \
   1.116 -        src/plugins/sqldrivers/sqlite/sqlite.pro \
   1.117 -        src/sql/drivers/drivers.pri
   1.118 +# MSvB Aktualisierung: The uiclibs line is probably an error, remove... 
   1.119 +# MSvB In R/D:    uiclibs=`%{l_prefix}/bin/pkg-config --libs-only-l --static fontconfig lcms`
   1.120 +# MSvB In R/D:    %{l_shtool} subst \
   1.121 +# MSvB In R/D:        -e 's;LIBS .*= -lpq$;LIBS += -lpq -lssl -lcrypto;' \
   1.122 +# MSvB In R/D:        -e "s;LIBS .*= \$\$QT_LFLAGS_MYSQL;LIBS += $mysqllibs;" \
   1.123 +# MSvB In R/D:        src/sql/drivers/drivers.pri
   1.124 +# MSvB In R/D:    %{l_shtool} subst \
   1.125 +# MSvB In R/D:        -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.126 +# MSvB In R/D:        src/corelib/kernel/kernel.pri \
   1.127 +# MSvB In R/D:        src/gui/kernel/kernel.pri
   1.128 +# MSvB In R/D:    %{l_shtool} subst \
   1.129 +# MSvB In R/D:        -e "s;QMAKE_CXXFLAGS \*= \$\$QT_CFLAGS_PSQL;INCPATH += `pg_config --includedir 2>/dev/null | %{l_shtool} subst -e 's;-I;;g'`;g" \
   1.130 +# MSvB In R/D:        -e "s;QMAKE_CXXFLAGS \*= \$\$QT_CFLAGS_MYSQL;INCPATH += `mysql_config --include 2>/dev/null | %{l_shtool} subst -e 's;-I;;g'`;g" \
   1.131 +# MSvB In R/D:        -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.132 +# MSvB In R/D:        -e 's;!static:\(!isEmpty(QT_LFLAGS_PSQL)\);\1;' \
   1.133 +# MSvB In R/D:        -e 's;!static:\(LIBS \*= \$\$QT_LFLAGS_PSQL\);\1;' \
   1.134 +# MSvB In R/D:        src/plugins/sqldrivers/mysql/mysql.pro \
   1.135 +# MSvB In R/D:        src/plugins/sqldrivers/psql/psql.pro \
   1.136 +# MSvB In R/D:        src/plugins/sqldrivers/sqlite/sqlite.pro \
   1.137 +# MSvB In R/D:        src/sql/drivers/drivers.pri
   1.138 +    #   Trolltech Bug:
   1.139 +    #   In file included from qdbusconnectioninterface.cpp:52:0:
   1.140 +    #   qdbus_symbols_p.h:58:23: fatal error: dbus/dbus.h: No such file or directoryIn
   1.141 +    #       file included from qdbusconnection_p.h:70:0, from qdbusconnection.cpp:51:
   1.142      %{l_shtool} subst \
   1.143          -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.144          src/dbus/dbus.pro
   1.145 +    #   Trolltech Bug:
   1.146 +    #   All the OpenGL functionality tests failed!
   1.147 +    #   You might need to modify the include and library search paths by
   1.148 +    #   editing QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in
   1.149 +    #   /home/mschloh/opwrk/tmp/qt-everywhere-opensource-src-4.7.3/mkspecs/linux-g++-64.
   1.150      %{l_shtool} subst \
   1.151          -e 's;^\(QMAKE_INCDIR[^a-zA-Z0-9=]*=\).*;\1 %{l_prefix}/include;' \
   1.152          -e 's;^\(QMAKE_LIBDIR[^a-zA-Z0-9=]*=\).*;\1;' \
   1.153 -        -e "s;^\(QMAKE_INCDIR_OPENGL[^=]*=\) *\(.*\);\1 %{l_prefix}/include \2;" \
   1.154 -        -e "s;^\(QMAKE_LIBDIR_OPENGL[^=]*=\) *\(.*\);\1 %{l_prefix}/lib \2;" \
   1.155 +        -e 's;^\(QMAKE_INCDIR_OPENGL[^=]*=\) *\(.*\);\1 %{l_prefix}/include \2;' \
   1.156 +        -e 's;^\(QMAKE_LIBDIR_OPENGL[^=]*=\) *\(.*\);\1 %{l_prefix}/lib \2;' \
   1.157          -e 's;^\(QMAKE_LFLAGS_RELEASE.*\);\1 -s;' \
   1.158          mkspecs/qws/*/qmake.conf \
   1.159          mkspecs/*/*.conf
   1.160 -    %{l_shtool} subst \
   1.161 -        -e 's;^\(QMAKE_LIBS +=.*\);\1 -liconv;' \
   1.162 -        src/corelib/corelib.pro
   1.163 +# MSvB In R/D:    %{l_shtool} subst \
   1.164 +# MSvB In R/D:        -e 's;^\(QMAKE_LIBS +=.*\);\1 -liconv;' \
   1.165 +# MSvB In R/D:        src/corelib/corelib.pro
   1.166 +    #   Trolltech Bug:
   1.167 +    #   In file included from ../JavaScriptCore/runtime/RegExp.h:29:0,
   1.168 +    #   ../JavaScriptCore/yarr/RegexJIT.h: In destructor 'JSC::Yarr::RegexCodeBlock::~RegexCodeBlock()':
   1.169 +    #   ../JavaScriptCore/yarr/RegexJIT.h:63:36: error: 'jsRegExpFree' was not declared in this scope
   1.170      %{l_shtool} subst \
   1.171          -e 's;\(DESTDIR *=\) *\$\$JAVASCRIPTCORE_DESTDIR;\1 $$QMAKE_LIBDIR_QT;' \
   1.172          src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro
   1.173 +    #   Trolltech Bug:
   1.174 +    #   In file included from ../JavaScriptCore/runtime/RegExp.h:29:0,
   1.175 +    #   ../JavaScriptCore/yarr/RegexJIT.h: In destructor 'JSC::Yarr::RegexCodeBlock::~RegexCodeBlock()':
   1.176 +    #   ../JavaScriptCore/yarr/RegexJIT.h:63:36: error: 'jsRegExpFree' was not declared in this scope
   1.177      %{l_shtool} subst \
   1.178          -e 's;\(pathToJavaScriptCoreOutput *=\) *\$\$ARGS/\$\$JAVASCRIPTCORE_DESTDIR;\1 $$QMAKE_LIBDIR_QT;g' \
   1.179          src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri
   1.180 -    %{l_shtool} subst \
   1.181 -        -e "s;^\(QMAKE_INCDIR_X11[^=]*=\).*;\1 %{l_prefix}/include $x11_incdir;" \
   1.182 -        -e "s;^\(QMAKE_LIBDIR_X11[^=]*=\).*;\1 %{l_prefix}/lib $x11_libdir;" \
   1.183 -        mkspecs/qws/solaris*/qmake.conf \
   1.184 -        mkspecs/solaris*/qmake.conf
   1.185 -    echo "QMAKE_LIBDIR += %{l_prefix}/lib/qt/dynamic" \
   1.186 -        >>mkspecs/features/shared.prf
   1.187 -    %{l_shtool} subst \
   1.188 -        -e 's; *\.\./3rdparty/freetype/.*;;g' \
   1.189 -        -e 's;^\( *contains(QT_CONFIG, freetype) {\);\1 LIBS += -lfreetype;' \
   1.190 -        src/gui/text/text.pri
   1.191 +# MSvB In R/D:    %{l_shtool} subst \
   1.192 +# MSvB In R/D:        -e "s;^\(QMAKE_INCDIR_X11[^=]*=\).*;\1 %{l_prefix}/include $x11_incdir;" \
   1.193 +# MSvB In R/D:        -e "s;^\(QMAKE_LIBDIR_X11[^=]*=\).*;\1 %{l_prefix}/lib $x11_libdir;" \
   1.194 +# MSvB In R/D:        mkspecs/qws/solaris*/qmake.conf \
   1.195 +# MSvB In R/D:        mkspecs/solaris*/qmake.conf
   1.196 +# MSvB In R/D:    echo "QMAKE_LIBDIR += %{l_prefix}/lib/qt/dynamic" \
   1.197 +# MSvB In R/D:        >>mkspecs/features/shared.prf
   1.198 +# MSvB In R/D:    %{l_shtool} subst \
   1.199 +# MSvB In R/D:        -e 's; *\.\./3rdparty/freetype/.*;;g' \
   1.200 +# MSvB In R/D:        -e 's;^\( *contains(QT_CONFIG, freetype) {\);\1 LIBS += -lfreetype;' \
   1.201 +# MSvB In R/D:        src/gui/text/text.pri
   1.202 +    #   Trolltech Bug:
   1.203 +    #   image/qtiffhandler.cpp:48:20: fatal error: tiffio.h: No such file or directory
   1.204 +    #   compilation terminated.
   1.205 +    #   make[1]: *** [.obj/release-static/qtiffhandler.o] Error 1
   1.206      %{l_shtool} subst \
   1.207          -e 's;\(#include  *"\)\(tiffio.h"\);\1tiff/\2;' \
   1.208          src/gui/image/qtiffhandler.cpp
   1.209 -    %{l_shtool} subst \
   1.210 -        -e 's;\(CONFIG[\t ]*+=[\t ]*qt\);\1 x11;' \
   1.211 -        tools/qtconfig/qtconfig.pro
   1.212 -    %{l_shtool} subst \
   1.213 -        -e 's;webkit;web-broken-kit;g' \
   1.214 -        tools/assistant/tools/assistant/assistant.pro
   1.215 -    echo "DEFINES += QT_NO_WEBKIT" \
   1.216 -        >>tools/assistant/tools/assistant/assistant.pro
   1.217 -    %{l_shtool} subst \
   1.218 -        -e "s;Qt.s Classes;All Classes;" \
   1.219 -        tools/assistant/tools/assistant/doc/assistant.qdoc \
   1.220 -        tools/qdoc3/doc/qdoc-manual.qdoc \
   1.221 -        tools/qdoc3/doc/files/qt.qdocconf \
   1.222 -        tools/qdoc3/test/qt-build-docs.qdocconf \
   1.223 -        tools/qdoc3/test/qt.qdocconf
   1.224 +# MSvB In R/D:    %{l_shtool} subst \
   1.225 +# MSvB In R/D:        -e 's;\(CONFIG[\t ]*+=[\t ]*qt\);\1 x11;' \
   1.226 +# MSvB In R/D:        tools/qtconfig/qtconfig.pro
   1.227 +# MSvB In R/D:    %{l_shtool} subst \
   1.228 +# MSvB In R/D:        -e 's;webkit;web-broken-kit;g' \
   1.229 +# MSvB In R/D:        tools/assistant/tools/assistant/assistant.pro
   1.230 +# MSvB In R/D:    echo "DEFINES += QT_NO_WEBKIT" \
   1.231 +# MSvB In R/D:        >>tools/assistant/tools/assistant/assistant.pro
   1.232 +# MSvB In R/D:    %{l_shtool} subst \
   1.233 +# MSvB In R/D:        -e "s;Qt.s Classes;All Classes;" \
   1.234 +# MSvB In R/D:        tools/assistant/tools/assistant/doc/assistant.qdoc \
   1.235 +# MSvB In R/D:        tools/qdoc3/doc/qdoc-manual.qdoc \
   1.236 +# MSvB In R/D:        tools/qdoc3/doc/files/qt.qdocconf \
   1.237 +# MSvB In R/D:        tools/qdoc3/test/qt-build-docs.qdocconf \
   1.238 +# MSvB In R/D:        tools/qdoc3/test/qt.qdocconf
   1.239  
   1.240  %build
   1.241      #   protect against sloppy code inclusion of all unused subprojects
   1.242 +# MSvB In R/D: ce-compat  clucene  des  easing  harfbuzz  javascriptcore md4   md5  s60  sha1  webkit  xorg  zlib_dependency.pri
   1.243      (cd src/3rdparty && rm -rf [^cdehjmswxz]* sql* win* zlib zlib.pri) || exit $?
   1.244  
   1.245      #   detect which platform for which to build
   1.246 @@ -291,9 +342,28 @@
   1.247          -sysconfdir %{l_prefix}/etc/qt \
   1.248          -examplesdir %{l_prefix}/share/qt/examples \
   1.249          -demosdir %{l_prefix}/share/qt/demos \
   1.250 +%if 0
   1.251 +    #   Build time Qt definitions should predominate,
   1.252 +    #   otherwise foreign definitions cause errors like:
   1.253 +    #
   1.254 +    #   g++ -c -I/foreign/include [...] animation/qguivariantanimation.cpp
   1.255 +    #   .moc/release-shared/moc_qnamespace.cpp:426:16: error: 'WA_LockPortraitOrientation' is not a member of 'Qt'
   1.256 +    #   .moc/release-shared/moc_qnamespace.cpp:427:16: error: 'WA_LockLandscapeOrientation' is not a member of 'Qt'
   1.257 +    #   .moc/release-shared/moc_qnamespace.cpp:428:16: error: 'WA_AutoOrientation' is not a member of 'Qt'
   1.258 +    #   .moc/release-shared/moc_qnamespace.cpp:440:16: error: 'AA_S60DisablePartialScreenInputMode' is not a member of 'Qt'
   1.259 +    #
   1.260 +    #   Other problems include flawed definitions polluting (C|CXX)FLAGS
   1.261 +    #   and overriding the correct definitions in CPPFLAGS. Variables
   1.262 +    #   like QMAKE_(C|CXX)FLAGS exhibit this problem as well.
   1.263 +    #
   1.264 +    #   The work around is to force a Qt dist include path in (C|CXX)FLAGS.
   1.265 +%endif
   1.266 +        -I$RPM_BUILD_DIR/qt-everywhere-opensource-src-%{version}/include \
   1.267          -release \
   1.268          -shared \
   1.269          -platform $platcomp \
   1.270 +        -s60 \
   1.271 +        -qt-style-s60 \
   1.272          -no-sql-ibase \
   1.273  %if "%{with_glib}" == "yes"
   1.274          -glib \
   1.275 @@ -401,9 +471,28 @@
   1.276          -sysconfdir %{l_prefix}/etc/qt \
   1.277          -examplesdir %{l_prefix}/share/qt/examples \
   1.278          -demosdir %{l_prefix}/share/qt/demos \
   1.279 +%if 0
   1.280 +    #   Build time Qt definitions should predominate,
   1.281 +    #   otherwise foreign definitions cause errors like:
   1.282 +    #
   1.283 +    #   g++ -c -I/foreign/include [...] animation/qguivariantanimation.cpp
   1.284 +    #   .moc/release-shared/moc_qnamespace.cpp:426:16: error: 'WA_LockPortraitOrientation' is not a member of 'Qt'
   1.285 +    #   .moc/release-shared/moc_qnamespace.cpp:427:16: error: 'WA_LockLandscapeOrientation' is not a member of 'Qt'
   1.286 +    #   .moc/release-shared/moc_qnamespace.cpp:428:16: error: 'WA_AutoOrientation' is not a member of 'Qt'
   1.287 +    #   .moc/release-shared/moc_qnamespace.cpp:440:16: error: 'AA_S60DisablePartialScreenInputMode' is not a member of 'Qt'
   1.288 +    #
   1.289 +    #   Other problems include flawed definitions polluting (C|CXX)FLAGS
   1.290 +    #   and overriding the correct definitions in CPPFLAGS. Variables
   1.291 +    #   like QMAKE_(C|CXX)FLAGS exhibit this problem as well.
   1.292 +    #
   1.293 +    #   The work around is to force a Qt dist include path in (C|CXX)FLAGS.
   1.294 +%endif
   1.295 +        -I$RPM_BUILD_DIR/qt-everywhere-opensource-src-%{version}/include \
   1.296          -release \
   1.297          -static \
   1.298          -platform $platcomp \
   1.299 +        -s60 \
   1.300 +        -qt-style-s60 \
   1.301          -no-sql-ibase \
   1.302  %if "%{with_glib}" == "yes"
   1.303          -glib \
   1.304 @@ -577,7 +666,7 @@
   1.305  #    echo %{_includedocs}
   1.306  #
   1.307  ## Doesn't work as expected, because it seems that OpenPKG too mercilessly
   1.308 -## removes RPM readi1ng of the %docdir keyword in rpm.patch.feature.
   1.309 +## removes RPM reading of the %docdir keyword in rpm.patch.feature.
   1.310  #    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
   1.311  #        %{l_files_std} \
   1.312  #        '%docdir %{l_prefix}/share/pkg/doc'

mercurial