qt/qt.spec

Mon, 17 Sep 2012 19:10:10 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 17 Sep 2012 19:10:10 +0200
changeset 689
9fe04d4d4e5a
parent 349
886b6dad933a
permissions
-rw-r--r--

Update to new version of vendor software although Oracle fails to deliver.
More specifically, newer db(3) patch revisions exist but Oracle has
removed them from the canonical download server URI for Berkely DB.

michael@1 1 ##
michael@1 2 ## qt.spec -- OpenPKG RPM Specification
michael@343 3 ## Copyright (c) 2011 Michael Schloh von Bennewitz <michael@schloh.com>
michael@1 4 ##
michael@1 5 ## Permission to use, copy, modify, and distribute this software for
michael@1 6 ## any purpose with or without fee is hereby granted, provided that
michael@1 7 ## the above copyright notice and this permission notice appear in all
michael@1 8 ## copies.
michael@1 9 ##
michael@1 10 ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
michael@1 11 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
michael@1 12 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
michael@1 13 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
michael@1 14 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
michael@1 15 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
michael@1 16 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
michael@1 17 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
michael@1 18 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
michael@1 19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
michael@1 20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
michael@1 21 ## SUCH DAMAGE.
michael@1 22 ##
michael@1 23
michael@86 24 # FIXME: MSvB: It appears that bugs in current versions of binutils
michael@86 25 # FIXME: MSvB: fail to properly link Qt object code, resulting in
michael@86 26 # FIXME: MSvB: 'ld: libQt*.so: pthread_mutex...: invalid version 6
michael@86 27 # FIXME: MSvB: libQt*.so: could not read symbols: Bad value'
michael@86 28 # FIXME: MSvB: The effects of these bugs are platform dependent.
michael@86 29 # FIXME: MSvB: Solaris 11 IA-32 builds fail while Linux 2.6.25.18
michael@86 30 # FIXME: MSvB: AMD64 builds succeed.
michael@1 31
michael@1 32 # package information
michael@1 33 Name: qt
michael@213 34 Summary: Cross Platform Application Framework
michael@1 35 URL: http://www.trolltech.com/products/qt/
michael@1 36 Vendor: Nokia Corporation
michael@1 37 Packager: Michael Schloh von Bennewitz
michael@387 38 Distribution: Europalab Networks Production
michael@1 39 Class: EVAL
michael@1 40 Group: Development
michael@1 41 License: GPL
michael@340 42 Version: 4.7.3
michael@340 43 Release: 20110514
michael@1 44
michael@1 45 # build options
michael@1 46 %option with_tools yes
michael@288 47 %option with_glib no
michael@65 48 %option with_mysql no
michael@65 49 %option with_pgsql no
michael@1 50 %option with_shared no
michael@1 51 %option with_examples no
michael@1 52
michael@1 53 # list of sources
michael@257 54 Source0: ftp://ftp.qt.nokia.com/qt/source/qt-everywhere-opensource-src-%{version}.tar.gz
michael@1 55
michael@1 56 # build information
michael@1 57 Prefix: %{l_prefix}
michael@1 58 BuildRoot: %{l_buildroot}
michael@343 59 BuildPreReq: OpenPKG, openpkg >= 20060823, make, gcc
michael@343 60 PreReq: OpenPKG, openpkg >= 20060823
michael@1 61 BuildPreReq: X11, png, mng, jpeg, tiff, mesa, xrender
michael@1 62 PreReq: X11, png, mng, jpeg, tiff, mesa, xrender
michael@343 63 BuildPreReq: pkgconfig, openssl, zlib, libiconv, sqlite, dbus
michael@343 64 PreReq: pkgconfig, openssl, zlib, libiconv, sqlite, dbus
michael@1 65 BuildPreReq: fontconfig, freetype
michael@1 66 PreReq: fontconfig, freetype
michael@288 67 %if "%{with_glib}" == "yes"
michael@288 68 BuildPreReq: glib2
michael@288 69 PreReq: glib2
michael@288 70 %endif
michael@65 71 %if "%{with_mysql}" == "yes"
michael@65 72 BuildPreReq: mysql
michael@65 73 PreReq: mysql
michael@65 74 %endif
michael@65 75 %if "%{with_pgsql}" == "yes"
michael@65 76 BuildPreReq: postgresql
michael@65 77 PreReq: postgresql
michael@65 78 %endif
michael@1 79 AutoReq: no
michael@1 80 AutoReqProv: no
michael@1 81 Provides: QTSDK
michael@1 82
michael@1 83 %description
michael@3 84 Qt is a comprehensive C++ framework for cross-platform application
michael@341 85 development. It plays the role of a widget toolkit in facilitating
michael@341 86 the development of software with a graphical user interface, however
michael@341 87 Qt is useful for developing command line tools and consoles for
michael@341 88 servers as well.
michael@1 89
michael@1 90 %track
michael@1 91 prog qt = {
michael@1 92 version = %{version}
michael@263 93 url = ftp://ftp.qt.nokia.com/qt/source/
michael@257 94 regex = qt-everywhere-opensource-src-(__VER__)\.tar\.gz
michael@1 95 }
michael@1 96
michael@1 97 %prep
michael@1 98 # announce exceptional build requirements
michael@257 99 ( echo "This package has exceptional build requirements:"
michael@341 100 echo " qt-%{version}-root (5 Go)"
michael@341 101 echo " qt-everywhere-opensource-src-%{version} (6 Go)"
michael@263 102 echo " qt-%{version}-<date>.<arch>-<os>-<tag>.rpm (2 Go)"
michael@341 103 echo "Building with no options takes 3,0 hours on a dual core"
michael@343 104 echo "2 GHz CPU, or 5,0 hours with all build options enabled."
michael@1 105 ) | %{l_rpmtool} msg -b -t notice
michael@1 106
michael@257 107 %setup -q -n qt-everywhere-opensource-src-%{version}
michael@1 108 x11_incdir=`%{l_rc} --query x11_incdir`
michael@1 109 x11_libdir=`%{l_rc} --query x11_libdir`
michael@92 110 fontconflibs=`%{l_prefix}/bin/pkg-config --libs-only-l --static fontconfig`
michael@257 111 lcmslibs=`%{l_prefix}/bin/pkg-config --libs-only-l --static lcms`
michael@92 112 openssllibs=`%{l_prefix}/bin/pkg-config --libs --static openssl`
michael@288 113 mysqllibs=`%{l_prefix}/bin/mysql_config --libs`
michael@92 114
michael@340 115 # MSvB In R/D: loclibs=''
michael@340 116 # MSvB In R/D: case "%{l_platform -t}" in
michael@340 117 # MSvB In R/D: *-sunos* )
michael@340 118 # MSvB In R/D: loclibs='-lsocket -lnsl'
michael@340 119 # MSvB In R/D: ;;
michael@340 120 # MSvB In R/D: esac
michael@1 121 ( cd mkspecs/qws
michael@1 122 for plat in freebsd-generic-g++ macx-generic-g++ solaris-generic-g++;
michael@266 123 do
michael@1 124 ln -s $plat `echo $plat | %{l_shtool} subst -e 's;\(.*\)-generic-\(.*\);\1-x86-\2;'`
michael@1 125 done
michael@1 126 ) || exit $?
michael@342 127 # Trolltech Bug:
michael@342 128 # yes was specified for OpenVG but cannot be enabled due to functionality tests!
michael@342 129 %{l_shtool} subst \
michael@342 130 -e 's;lower_case_includes;lower_case_bug;g' \
michael@342 131 configure
michael@1 132 %{l_shtool} subst \
michael@92 133 -e 's;\(-z[\t ][\t ]*\)\([^\t \"][^\t \"]*\);\1"\2";g' \
michael@1 134 configure
michael@1 135 %{l_shtool} subst \
michael@263 136 -e 's;\(RPATH_FLAGS\)=.*\$QT_INSTALL_LIBS.*\(\$RPATH_FLAGS\)";\1="%{l_prefix}/lib/qt/dynamic \2";' \
michael@264 137 -e 's;\(QMAKE_RPATHDIR +=\) \\"\$QT_INSTALL_LIBS\\";\1 %{l_prefix}/lib/qt/dynamic;' \
michael@263 138 configure
michael@263 139 %{l_shtool} subst \
michael@288 140 -e "s;\(OPENSSL_LIBS *=\) *-lssl -lcrypto;\1 $openssllibs;" \
michael@92 141 configure
michael@92 142 %{l_shtool} subst \
michael@288 143 -e 's; *QMakeVar set QMAKE_CFLAGS_X11.*QT_CFLAGS_FONTCONFIG.*;;' \
michael@288 144 configure
michael@288 145 # yes this is needed several times to catch nested occurences of '--libs'
michael@288 146 %{l_shtool} subst \
michael@288 147 -e 's;\(QT_LIBS_FONTCONFIG *=.*PKG_CONFIG.*\) --libs ;\1 --libs-only-L ;g' \
michael@288 148 -e 's;\(QT_LIBS_FONTCONFIG *=.*PKG_CONFIG.*\) --libs ;\1 --libs-only-L ;g' \
michael@1 149 configure
michael@257 150 # yes this is needed several times to catch nested occurences of '--cflags'
michael@257 151 %{l_shtool} subst \
michael@257 152 -e 's;\(QT_CFLAGS_[^=][^=]*=.*PKG_CONFIG.*\) --cflags ;\1 --cflags-only-other ;g' \
michael@257 153 -e 's;\(QT_CFLAGS_[^=][^=]*=.*PKG_CONFIG.*\) --cflags ;\1 --cflags-only-other ;g' \
michael@257 154 configure
michael@340 155 # Trolltech Bug:
michael@340 156 # Glib support cannot be enabled due to functionality tests!
michael@340 157 # Turn on verbose messaging (-v) to ./configure to see the final report.
michael@340 158 # Trolltech Bug:
michael@340 159 # In file included from ../../include/QtGui/private/qgtkstyle_p.h:1,
michael@340 160 # from kernel/qguiplatformplugin.cpp:63:
michael@340 161 # ....../qgtkstyle_p.h:69:21: error: gtk/gtk.h: No such file or directory
michael@340 162 # Workaround resolution:
michael@288 163 # hack to get back the standard '--cflags' of just Qt_CFLAGS_GLIB
michael@340 164 # Question: Is this needed? QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
michael@288 165 %{l_shtool} subst \
michael@288 166 -e 's;\(QT_CFLAGS_GLIB *=.*PKG_CONFIG.*\) --cflags-only-other ;\1 --cflags ;g' \
michael@340 167 -e 's;\(QT_CFLAGS_QGTKSTYLE *=.*PKG_CONFIG.*\) --cflags-only-other ;\1 --cflags ;g' \
michael@288 168 configure
michael@349 169 %{l_shtool} subst \
michael@349 170 -e 's;\(TRY_INCLUDEPATHS = \).*\(\$\$INCLUDEPATH\);\1\2;' \
michael@349 171 -e 's;/freetype2;/freetype;' \
michael@349 172 config.tests/unix/freetype/freetype.pri
michael@340 173 # Trolltech Bug:
michael@340 174 # /opdv/lib/libmng.a(libmng_cms.o): In function `mnglcms_initlibrary':
michael@340 175 # libmng_cms.c:(.text+0xa): undefined reference to `cmsErrorAction'
michael@1 176 %{l_shtool} subst \
michael@257 177 -e "s;\(LIBS.*=.*-lmng\);\1 $lcmslibs;" \
michael@257 178 src/gui/image/qmnghandler.pri
michael@340 179 # Trolltech Bug:
michael@340 180 # lib/libQtGui.a(qapplication_x11.o): In function
michael@340 181 # `qt_init(QApplicationPrivate*, int, _XDisplay*, unsigned long, unsigned long)':
michael@340 182 # qapplication_x11.cpp:(.text+0xec8d): undefined reference to `FcInit'
michael@257 183 %{l_shtool} subst \
michael@92 184 -e "s;^\(LIBS += \)-lfreetype -lfontconfig;\1$fontconflibs;" \
michael@1 185 config.tests/x11/fontconfig/fontconfig.pro
michael@340 186 echo "LIBS += `%{l_prefix}/bin/pkg-config --libs-only-L fontconfig`" \
michael@340 187 >>tools/linguist/linguist/linguist.pro
michael@213 188 echo 'INCLUDEPATH += /usr/include/wacomcfg' \
michael@213 189 >>src/gui/kernel/x11.pri
michael@257 190 echo "contains(QT_CONFIG, fontconfig) { LIBS += $fontconflibs }" \
michael@257 191 >>src/gui/kernel/x11.pri
michael@257 192 echo "contains(QT_CONFIG, fontconfig) { LIBS += $fontconflibs }" \
michael@257 193 >>src/gui/text/text.pri
michael@340 194 # Trolltech Bug:
michael@340 195 # The QtDBus module cannot be enabled because libdbus-1 version 0.93 was not found.
michael@340 196 # Turn on verbose messaging (-v) to ./configure to see the final report.
michael@257 197 echo "INCLUDEPATH = `%{l_prefix}/bin/pkg-config --cflags-only-I dbus-1 | %{l_shtool} subst -e 's;\-I;;g'`" \
michael@257 198 >>config.tests/unix/dbus/dbus.pro
michael@257 199 echo "LIBS = `%{l_prefix}/bin/pkg-config --libs-only-l --static dbus-1`" \
michael@257 200 >>config.tests/unix/dbus/dbus.pro
michael@340 201 # Trolltech Bug:
michael@340 202 # PostgreSQL support cannot be enabled due to functionality tests!
michael@340 203 # Turn on verbose messaging (-v) to ./configure to see the final report.
michael@342 204 pgldflags=`%{l_prefix}/bin/pg_config --ldflags`
michael@342 205 pglibs=`%{l_prefix}/bin/pg_config --libs`
michael@1 206 %{l_shtool} subst \
michael@342 207 -e "s;\(LIBS.*= -lpq\);\1 $pgldflags $pglibs $loclibs -pthread;" \
michael@1 208 config.tests/unix/psql/psql.pro
michael@340 209 # Trolltech Bug:
michael@342 210 # make: *** [sub-examples-make_default-ordered] Error 2
michael@342 211 # QMAKE_PRL_LIBS in libQtSql.prl is generated defective.
michael@342 212 %{l_shtool} subst \
michael@342 213 -e "s;\$\$*QT_LFLAGS_PSQL;$pgldflags;" \
michael@342 214 -e "s;-lpq;-lpq $pglibs $loclibs -pthread;" \
michael@342 215 src/sql/drivers/psql/qsql_psql.pri
michael@342 216 # Trolltech Bug:
michael@340 217 # Iconv support cannot be enabled due to functionality tests!
michael@340 218 # Turn on verbose messaging (-v) to ./configure to see the final report.
michael@1 219 %{l_shtool} subst \
michael@257 220 -e 's;^mac[^:][^:]*:\(LIBS\);\1;' \
michael@1 221 config.tests/unix/iconv/iconv.pro
michael@341 222 # Trolltech Bug:
michael@341 223 # Missing libmng test! Parts (src/gui/image/qmnghandler.cpp) use
michael@341 224 # such libmng methods as mng_create(3), mng_putchunk_term(3)...
michael@341 225 # These are only optional parts of typical MNG implementations.
michael@341 226 # Questions surround whether the MNG standard [1] requires these
michael@341 227 # API methods in their expected form, or if this alone is excuse
michael@341 228 # enough for neglecting such build time configuration.
michael@341 229 # [1] http://www.libpng.org/pub/mng/spec/
michael@341 230 # A work around is to force integration of Qt 3rdparty embedded
michael@341 231 # MNG logic, thus weakening the loosely coupled nature of Qt
michael@341 232 # components and potentially affecting security.
michael@340 233 # MSvB In R/D: uiclibs=`%{l_prefix}/bin/pkg-config --libs-only-l --static fontconfig lcms`
michael@340 234 # MSvB In R/D: %{l_shtool} subst \
michael@340 235 # MSvB In R/D: -e 's;LIBS .*= -lpq$;LIBS += -lpq -lssl -lcrypto;' \
michael@340 236 # MSvB In R/D: -e "s;LIBS .*= \$\$QT_LFLAGS_MYSQL;LIBS += $mysqllibs;" \
michael@340 237 # MSvB In R/D: src/sql/drivers/drivers.pri
michael@340 238 # MSvB In R/D: %{l_shtool} subst \
michael@340 239 # 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" \
michael@340 240 # MSvB In R/D: src/corelib/kernel/kernel.pri \
michael@340 241 # MSvB In R/D: src/gui/kernel/kernel.pri
michael@340 242 # MSvB In R/D: %{l_shtool} subst \
michael@340 243 # 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" \
michael@340 244 # 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" \
michael@340 245 # 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" \
michael@340 246 # MSvB In R/D: -e 's;!static:\(!isEmpty(QT_LFLAGS_PSQL)\);\1;' \
michael@340 247 # MSvB In R/D: -e 's;!static:\(LIBS \*= \$\$QT_LFLAGS_PSQL\);\1;' \
michael@340 248 # MSvB In R/D: src/plugins/sqldrivers/mysql/mysql.pro \
michael@340 249 # MSvB In R/D: src/plugins/sqldrivers/psql/psql.pro \
michael@340 250 # MSvB In R/D: src/plugins/sqldrivers/sqlite/sqlite.pro \
michael@340 251 # MSvB In R/D: src/sql/drivers/drivers.pri
michael@340 252 # Trolltech Bug:
michael@340 253 # In file included from qdbusconnectioninterface.cpp:52:0:
michael@340 254 # qdbus_symbols_p.h:58:23: fatal error: dbus/dbus.h: No such file or directoryIn
michael@340 255 # file included from qdbusconnection_p.h:70:0, from qdbusconnection.cpp:51:
michael@86 256 %{l_shtool} subst \
michael@86 257 -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" \
michael@86 258 src/dbus/dbus.pro
michael@340 259 # Trolltech Bug:
michael@340 260 # All the OpenGL functionality tests failed!
michael@340 261 # You might need to modify the include and library search paths by
michael@340 262 # editing QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in
michael@340 263 # /home/mschloh/opwrk/tmp/qt-everywhere-opensource-src-4.7.3/mkspecs/linux-g++-64.
michael@86 264 %{l_shtool} subst \
michael@1 265 -e 's;^\(QMAKE_INCDIR[^a-zA-Z0-9=]*=\).*;\1 %{l_prefix}/include;' \
michael@342 266 -e 's;^\(QMAKE_LIBDIR[^a-zA-Z0-9=]*=\).*;\1 %{l_prefix}/lib;' \
michael@342 267 -e "s;^\(QMAKE_INCDIR_OPENGL[^=]*=\).*;\1 $x11_incdir;" \
michael@342 268 -e "s;^\(QMAKE_LIBDIR_OPENGL[^=]*=\).*;\1 $x11_libdir;" \
michael@342 269 -e "s;^\(QMAKE_INCDIR_OPENVG[^=]*=\).*;\1 $x11_incdir;" \
michael@342 270 -e "s;^\(QMAKE_LIBDIR_OPENVG[^=]*=\).*;\1 $x11_libdir;" \
michael@1 271 -e 's;^\(QMAKE_LFLAGS_RELEASE.*\);\1 -s;' \
michael@1 272 mkspecs/qws/*/qmake.conf \
michael@1 273 mkspecs/*/*.conf
michael@342 274 # Trolltech Bug:
michael@342 275 # yes was specified for OpenVG but cannot be enabled due to functionality tests!
michael@342 276 %{l_shtool} subst \
michael@342 277 -e 's;\(\$\$*\)\(QMAKE_LIBS_OPENVG\);\1\2 \1QMAKE_LIBS_THREAD;' \
michael@342 278 config.tests/unix/openvg/openvg.pro
michael@349 279 echo 'QMAKE_LIBS_OPENVG = -lOpenVG' \
michael@349 280 >>mkspecs/common/unix.conf
michael@342 281 %{l_shtool} subst \
michael@342 282 -e "s;^\(QMAKE_INCDIR_X11[^=]*=\).*;\1 $x11_incdir;" \
michael@342 283 -e "s;^\(QMAKE_LIBDIR_X11[^=]*=\).*;\1 $x11_libdir;" \
michael@342 284 mkspecs/qws/*/qmake.conf \
michael@342 285 mkspecs/*/qmake.conf
michael@349 286 %{l_shtool} subst \
michael@349 287 -e 's;^\(QMAKE_LIBS +=.*\);\1 -liconv;' \
michael@349 288 src/corelib/corelib.pro
michael@340 289 # Trolltech Bug:
michael@340 290 # In file included from ../JavaScriptCore/runtime/RegExp.h:29:0,
michael@340 291 # ../JavaScriptCore/yarr/RegexJIT.h: In destructor 'JSC::Yarr::RegexCodeBlock::~RegexCodeBlock()':
michael@340 292 # ../JavaScriptCore/yarr/RegexJIT.h:63:36: error: 'jsRegExpFree' was not declared in this scope
michael@3 293 %{l_shtool} subst \
michael@266 294 -e 's;\(DESTDIR *=\) *\$\$JAVASCRIPTCORE_DESTDIR;\1 $$QMAKE_LIBDIR_QT;' \
michael@266 295 src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro
michael@340 296 # Trolltech Bug:
michael@340 297 # In file included from ../JavaScriptCore/runtime/RegExp.h:29:0,
michael@340 298 # ../JavaScriptCore/yarr/RegexJIT.h: In destructor 'JSC::Yarr::RegexCodeBlock::~RegexCodeBlock()':
michael@340 299 # ../JavaScriptCore/yarr/RegexJIT.h:63:36: error: 'jsRegExpFree' was not declared in this scope
michael@266 300 %{l_shtool} subst \
michael@266 301 -e 's;\(pathToJavaScriptCoreOutput *=\) *\$\$ARGS/\$\$JAVASCRIPTCORE_DESTDIR;\1 $$QMAKE_LIBDIR_QT;g' \
michael@266 302 src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri
michael@340 303 # MSvB In R/D: echo "QMAKE_LIBDIR += %{l_prefix}/lib/qt/dynamic" \
michael@340 304 # MSvB In R/D: >>mkspecs/features/shared.prf
michael@340 305 # MSvB In R/D: %{l_shtool} subst \
michael@340 306 # MSvB In R/D: -e 's; *\.\./3rdparty/freetype/.*;;g' \
michael@340 307 # MSvB In R/D: -e 's;^\( *contains(QT_CONFIG, freetype) {\);\1 LIBS += -lfreetype;' \
michael@340 308 # MSvB In R/D: src/gui/text/text.pri
michael@340 309 # Trolltech Bug:
michael@340 310 # image/qtiffhandler.cpp:48:20: fatal error: tiffio.h: No such file or directory
michael@340 311 # compilation terminated.
michael@340 312 # make[1]: *** [.obj/release-static/qtiffhandler.o] Error 1
michael@1 313 %{l_shtool} subst \
michael@1 314 -e 's;\(#include *"\)\(tiffio.h"\);\1tiff/\2;' \
michael@257 315 src/gui/image/qtiffhandler.cpp
michael@342 316 # Trolltech Bug:
michael@342 317 # In file included from ../../../gui/image/qjpeghandler.cpp:42:0:
michael@342 318 # ../../../gui/image/qjpeghandler_p.h:45:35: fatal error:
michael@342 319 # QtGui/qimageiohandler.h: No such file or directory
michael@342 320 %{l_shtool} subst \
michael@342 321 -e 's;\(INCLUDEPATH *\*=\)\( *\);\1 $RPM_BUILD_DIR/qt-everywhere-opensource-src-%{version}/include\2;' \
michael@342 322 src/gui/image/qjpeghandler.pri
michael@340 323 # MSvB In R/D: %{l_shtool} subst \
michael@340 324 # MSvB In R/D: -e 's;\(CONFIG[\t ]*+=[\t ]*qt\);\1 x11;' \
michael@340 325 # MSvB In R/D: tools/qtconfig/qtconfig.pro
michael@340 326 # MSvB In R/D: %{l_shtool} subst \
michael@340 327 # MSvB In R/D: -e 's;webkit;web-broken-kit;g' \
michael@340 328 # MSvB In R/D: tools/assistant/tools/assistant/assistant.pro
michael@340 329 # MSvB In R/D: echo "DEFINES += QT_NO_WEBKIT" \
michael@340 330 # MSvB In R/D: >>tools/assistant/tools/assistant/assistant.pro
michael@340 331 # MSvB In R/D: %{l_shtool} subst \
michael@341 332 # MSvB In R/D: -e 's;Qt.s Classes;All Classes;' \
michael@340 333 # MSvB In R/D: tools/assistant/tools/assistant/doc/assistant.qdoc \
michael@340 334 # MSvB In R/D: tools/qdoc3/doc/qdoc-manual.qdoc \
michael@340 335 # MSvB In R/D: tools/qdoc3/doc/files/qt.qdocconf \
michael@340 336 # MSvB In R/D: tools/qdoc3/test/qt-build-docs.qdocconf \
michael@340 337 # MSvB In R/D: tools/qdoc3/test/qt.qdocconf
michael@342 338 # Trolltech Bug:
michael@342 339 # In file included from qpaintengine_vg.cpp:42:0:
michael@342 340 # qpaintengine_vg_p.h:66:39: error: expected initializer before ':' token
michael@342 341 # make[1]: *** [.obj/release-static/qpaintengine_vg.o] Error 1
michael@342 342 # make: *** [sub-openvg-sub_src_target_ordered] Error 2
michael@342 343 %{l_shtool} subst \
michael@342 344 -e 's;Q_OPENVG_EXPORT;Q_DECL_EXPORT;g' \
michael@342 345 src/openvg/*
michael@1 346
michael@1 347 %build
michael@1 348 # protect against sloppy code inclusion of all unused subprojects
michael@340 349 # MSvB In R/D: ce-compat clucene des easing harfbuzz javascriptcore md4 md5 s60 sha1 webkit xorg zlib_dependency.pri
michael@257 350 (cd src/3rdparty && rm -rf [^cdehjmswxz]* sql* win* zlib zlib.pri) || exit $?
michael@1 351
michael@92 352 # detect which platform for which to build
michael@1 353 case "%{l_platform -t}" in
michael@86 354 sun4[uv]-sunos* | amd64-sunos* ) platcomp="solaris-g++-64" ;;
michael@86 355 i?86-sunos* ) platcomp="solaris-g++" ;;
michael@86 356 amd64-linux* ) platcomp="linux-g++-64" ;;
michael@86 357 i?86-linux* ) platcomp="linux-g++" ;;
michael@86 358 amd64-freebsd* | i?86-freebsd* ) platcomp="freebsd-g++" ;;
michael@86 359 *-aix* ) platcomp="aix-g++" ;;
michael@86 360 *-darwin* ) platcomp="macx-g++" ;;
michael@86 361 *-hpux* ) platcomp="hpux-g++" ;;
michael@86 362 *-irix* ) platcomp="irix-g++" ;;
michael@86 363 * ) echo "Platform '%{l_platform -t}' is not supported." 2>&1; exit 1 ;;
michael@1 364 esac
michael@1 365
michael@92 366 # detect which architecture extensions are available
michael@92 367 archflags=''
michael@92 368 case "%{l_platform -t}" in
michael@92 369 amd64-* )
michael@92 370 break
michael@92 371 ;;
michael@92 372 * )
michael@92 373 archflags='-no-sse2 -no-3dnow'
michael@92 374 ;;
michael@92 375 esac
michael@92 376
michael@1 377 %if "%{with_shared}" == "yes"
michael@1 378 # optional shared build (precedes mandatory static build)
michael@1 379 echo 'yes' | ./configure \
michael@92 380 $archflags \
michael@205 381 -opensource \
michael@1 382 -prefix %{l_prefix} \
michael@1 383 -bindir %{l_prefix}/bin \
michael@263 384 -libdir %{l_prefix}/lib/qt/dynamic \
michael@1 385 -docdir %{l_prefix}/share/qt/doc \
michael@1 386 -headerdir %{l_prefix}/include \
michael@86 387 -plugindir %{l_prefix}/lib/qt/plugins \
michael@1 388 -datadir %{l_prefix}/share/qt \
michael@1 389 -translationdir %{l_prefix}/share/qt/translations \
michael@1 390 -sysconfdir %{l_prefix}/etc/qt \
michael@1 391 -examplesdir %{l_prefix}/share/qt/examples \
michael@1 392 -demosdir %{l_prefix}/share/qt/demos \
michael@340 393 %if 0
michael@340 394 # Build time Qt definitions should predominate,
michael@340 395 # otherwise foreign definitions cause errors like:
michael@340 396 #
michael@340 397 # g++ -c -I/foreign/include [...] animation/qguivariantanimation.cpp
michael@340 398 # .moc/release-shared/moc_qnamespace.cpp:426:16: error: 'WA_LockPortraitOrientation' is not a member of 'Qt'
michael@340 399 # .moc/release-shared/moc_qnamespace.cpp:427:16: error: 'WA_LockLandscapeOrientation' is not a member of 'Qt'
michael@340 400 # .moc/release-shared/moc_qnamespace.cpp:428:16: error: 'WA_AutoOrientation' is not a member of 'Qt'
michael@340 401 # .moc/release-shared/moc_qnamespace.cpp:440:16: error: 'AA_S60DisablePartialScreenInputMode' is not a member of 'Qt'
michael@340 402 #
michael@340 403 # Other problems include flawed definitions polluting (C|CXX)FLAGS
michael@340 404 # and overriding the correct definitions in CPPFLAGS. Variables
michael@340 405 # like QMAKE_(C|CXX)FLAGS exhibit this problem as well.
michael@340 406 #
michael@340 407 # The work around is to force a Qt dist include path in (C|CXX)FLAGS.
michael@340 408 %endif
michael@340 409 -I$RPM_BUILD_DIR/qt-everywhere-opensource-src-%{version}/include \
michael@1 410 -release \
michael@1 411 -shared \
michael@1 412 -platform $platcomp \
michael@340 413 -s60 \
michael@340 414 -qt-style-s60 \
michael@1 415 -no-sql-ibase \
michael@288 416 %if "%{with_glib}" == "yes"
michael@288 417 -glib \
michael@288 418 %else
michael@288 419 -no-glib \
michael@288 420 %endif
michael@65 421 %if "%{with_mysql}" == "yes"
michael@3 422 -qt-sql-mysql \
michael@86 423 -plugin-sql-mysql \
michael@65 424 %else
michael@65 425 -no-sql-mysql \
michael@65 426 %endif
michael@65 427 %if "%{with_pgsql}" == "yes"
michael@65 428 -qt-sql-psql \
michael@86 429 -plugin-sql-psql \
michael@65 430 %else
michael@65 431 -no-sql-psql \
michael@65 432 %endif
michael@1 433 -no-sql-odbc \
michael@65 434 -system-sqlite \
michael@65 435 -qt-sql-sqlite \
michael@86 436 -plugin-sql-sqlite \
michael@1 437 -no-sql-sqlite2 \
michael@3 438 -openssl-linked \
michael@288 439 -optimized-qmake \
michael@1 440 -xmlpatterns \
michael@1 441 -svg \
michael@215 442 -webkit \
michael@1 443 -system-zlib \
michael@1 444 -qt-gif \
michael@1 445 -system-libpng \
michael@1 446 -system-libmng \
michael@1 447 -system-libjpeg \
michael@1 448 -system-libtiff \
michael@1 449 -rpath \
michael@1 450 -no-cups \
michael@257 451 -iconv \
michael@1 452 -pch \
michael@1 453 -dbus-linked \
michael@1 454 -opengl \
michael@342 455 -openvg \
michael@1 456 -xrender \
michael@1 457 -fontconfig \
michael@288 458 -freetype
michael@1 459
michael@86 460 # default options are implicitly used, for example...
michael@1 461 #-no-fast -exceptions -accessibility -stl -qt3support -nis
michael@1 462 #-sm -xshape -xinerama -xcursor -xfixes -xrandr -tablet -xkb
michael@1 463
michael@1 464 # carry out shared build procedure
michael@349 465 # Trolltech Bug:
michael@349 466 # Problem with dependency order, causes compiling of source files
michael@349 467 # with unconfigured dependencies to other files to fail when
michael@349 468 # building the sources in parallel. The implemented work around
michael@349 469 # is disabling parallel make, causing a nearly 100% build deceleration.
michael@349 470 # itemviews/qlistview.cpp: In member function 'void QListModeViewBase::dragMoveEvent(QDragMoveEvent*)':
michael@349 471 # itemviews/qlistview.cpp:3134:1: internal compiler error: Segmentation fault
michael@1 472 ( cd src
michael@349 473 %{l_make} %{l_mflags} \
michael@215 474 sub-moc sub-rcc sub-uic sub-uic3
michael@1 475 ) || exit $?
michael@349 476 # Trolltech Bug:
michael@349 477 # Problem with dependency order, causes compiling of source files
michael@349 478 # with unconfigured dependencies to other files to fail when
michael@349 479 # building the sources in parallel. The implemented work around
michael@349 480 # is disabling parallel make, causing a nearly 100% build deceleration.
michael@349 481 %{l_make} %{l_mflags} \
michael@257 482 sub-corelib-make_default-ordered \
michael@257 483 sub-xml-make_default-ordered \
michael@257 484 sub-network-make_default-ordered \
michael@257 485 sub-sql-make_default-ordered \
michael@257 486 sub-testlib-make_default-ordered \
michael@257 487 sub-dbus-make_default-ordered \
michael@257 488 sub-gui-make_default-ordered \
michael@257 489 sub-qt3support-make_default-ordered \
michael@257 490 sub-opengl-make_default-ordered \
michael@257 491 sub-xmlpatterns-make_default-ordered \
michael@257 492 sub-multimedia-make_default-ordered \
michael@257 493 sub-svg-make_default-ordered \
michael@257 494 sub-script-make_default-ordered \
michael@257 495 sub-declarative-make_default-ordered \
michael@257 496 sub-javascriptcore-make_default-ordered \
michael@257 497 sub-webkit-make_default-ordered \
michael@257 498 sub-scripttools-make_default-ordered \
michael@257 499 sub-plugins-make_default-ordered \
michael@257 500 sub-imports-make_default-ordered \
michael@257 501 sub-webkitdeclarative-make_default-ordered \
michael@257 502 sub-translations-make_default-ordered
michael@205 503
michael@205 504 # arthur plugin requires libQtDesigner
michael@92 505 ( cd demos
michael@205 506 ( cd ../tools/designer/src/lib
michael@263 507 %{l_make} %{l_mflags -O}
michael@205 508 ) || exit $?
michael@92 509 %{l_make} %{l_mflags -O} sub-arthurplugin
michael@92 510 ) || exit $?
michael@1 511
michael@1 512 # cache shared libs and initialize the build configuration, which
michael@1 513 # would otherwise still contain references to our shared libs build
michael@263 514 %{l_shtool} mkdir -f -p -m 755 sharbuild/dynamic
michael@263 515 mv lib/* sharbuild/dynamic/
michael@263 516 mv plugins sharbuild/
michael@257 517 %{l_make} %{l_mflags} confclean
michael@1 518 %endif
michael@1 519
michael@1 520 # mandatory static build (follows optional shared build)
michael@1 521 echo 'yes' | ./configure \
michael@92 522 $archflags \
michael@205 523 -opensource \
michael@1 524 -prefix %{l_prefix} \
michael@1 525 -bindir %{l_prefix}/bin \
michael@1 526 -libdir %{l_prefix}/lib \
michael@1 527 -docdir %{l_prefix}/share/qt/doc \
michael@1 528 -headerdir %{l_prefix}/include \
michael@86 529 -plugindir %{l_prefix}/lib/qt/plugins \
michael@1 530 -datadir %{l_prefix}/share/qt \
michael@1 531 -translationdir %{l_prefix}/share/qt/translations \
michael@1 532 -sysconfdir %{l_prefix}/etc/qt \
michael@1 533 -examplesdir %{l_prefix}/share/qt/examples \
michael@1 534 -demosdir %{l_prefix}/share/qt/demos \
michael@340 535 %if 0
michael@340 536 # Build time Qt definitions should predominate,
michael@340 537 # otherwise foreign definitions cause errors like:
michael@340 538 #
michael@340 539 # g++ -c -I/foreign/include [...] animation/qguivariantanimation.cpp
michael@340 540 # .moc/release-shared/moc_qnamespace.cpp:426:16: error: 'WA_LockPortraitOrientation' is not a member of 'Qt'
michael@340 541 # .moc/release-shared/moc_qnamespace.cpp:427:16: error: 'WA_LockLandscapeOrientation' is not a member of 'Qt'
michael@340 542 # .moc/release-shared/moc_qnamespace.cpp:428:16: error: 'WA_AutoOrientation' is not a member of 'Qt'
michael@340 543 # .moc/release-shared/moc_qnamespace.cpp:440:16: error: 'AA_S60DisablePartialScreenInputMode' is not a member of 'Qt'
michael@340 544 #
michael@340 545 # Other problems include flawed definitions polluting (C|CXX)FLAGS
michael@340 546 # and overriding the correct definitions in CPPFLAGS. Variables
michael@340 547 # like QMAKE_(C|CXX)FLAGS exhibit this problem as well.
michael@340 548 #
michael@340 549 # The work around is to force a Qt dist include path in (C|CXX)FLAGS.
michael@340 550 %endif
michael@340 551 -I$RPM_BUILD_DIR/qt-everywhere-opensource-src-%{version}/include \
michael@1 552 -release \
michael@1 553 -static \
michael@1 554 -platform $platcomp \
michael@340 555 -s60 \
michael@340 556 -qt-style-s60 \
michael@1 557 -no-sql-ibase \
michael@288 558 %if "%{with_glib}" == "yes"
michael@288 559 -glib \
michael@288 560 %else
michael@288 561 -no-glib \
michael@288 562 %endif
michael@65 563 %if "%{with_mysql}" == "yes"
michael@3 564 -qt-sql-mysql \
michael@65 565 %else
michael@65 566 -no-sql-mysql \
michael@65 567 %endif
michael@65 568 %if "%{with_pgsql}" == "yes"
michael@65 569 -qt-sql-psql \
michael@65 570 %else
michael@65 571 -no-sql-psql \
michael@65 572 %endif
michael@1 573 -no-sql-odbc \
michael@65 574 -system-sqlite \
michael@65 575 -qt-sql-sqlite \
michael@1 576 -no-sql-sqlite2 \
michael@3 577 -openssl-linked \
michael@288 578 -optimized-qmake \
michael@1 579 -xmlpatterns \
michael@1 580 -svg \
michael@265 581 -webkit \
michael@1 582 -system-zlib \
michael@1 583 -qt-gif \
michael@1 584 -system-libpng \
michael@1 585 -system-libmng \
michael@1 586 -system-libjpeg \
michael@1 587 -system-libtiff \
michael@1 588 -rpath \
michael@1 589 -no-cups \
michael@257 590 -iconv \
michael@1 591 -pch \
michael@1 592 -dbus-linked \
michael@1 593 -opengl \
michael@342 594 -openvg \
michael@1 595 -xrender \
michael@1 596 -fontconfig \
michael@288 597 -freetype
michael@1 598
michael@86 599 # default options are implicitly used, for example...
michael@1 600 #-no-fast -exceptions -accessibility -stl -qt3support -nis
michael@1 601 #-sm -xshape -xinerama -xcursor -xfixes -xrandr -tablet -xkb
michael@1 602
michael@1 603 # carry out static build procedure
michael@341 604 # Trolltech Bug:
michael@341 605 # Problem with dependency order, causes compiling of qtreeview.cpp
michael@341 606 # with dependency to moc_qtreeview.cpp before moc(1) has finished.
michael@341 607 # The implemented work around is disabling parallel make, causing
michael@341 608 # a nearly 100% build deceleration but allowing the build to procede.
michael@341 609 # In file included from itemviews/qtreeview.cpp:3761:0:
michael@341 610 # .moc/release-static/moc_qtreeview.cpp: In member function 'QPixmap QTreeViewPrivate::renderTreeToPixmapForAnimation(const QRect&) const':
michael@341 611 # .moc/release-static/moc_qtreeview.cpp:209:1: internal compiler error: Segmentation fault
michael@341 612 %{l_make} %{l_mflags} sub-src
michael@1 613 %if "%{with_tools}" == "yes"
michael@258 614 %{l_make} %{l_mflags -O} \
michael@258 615 sub-tools-make_default-ordered sub-translations-make_default-ordered
michael@1 616 %endif
michael@1 617 %if "%{with_examples}" == "yes"
michael@349 618 # Trolltech Bug:
michael@349 619 # Another problem with dependency order with the same work around,
michael@349 620 # disabling parallel make and causing a nearly 100% build deceleration.
michael@349 621 # In file included from main.cpp:136:0:
michael@349 622 # .moc/release-static/main.moc:84:1: internal compiler error: Segmentation fault
michael@349 623 # Please submit a full bug report,
michael@349 624 # with preprocessed source if appropriate.
michael@349 625 # See <http://openpkg.org/> for instructions.
michael@349 626 # make[3]: *** [.obj/release-static/main.o] Error 1
michael@349 627 # make[2]: *** [sub-validators-make_default] Error 2
michael@349 628 %{l_make} %{l_mflags} \
michael@1 629 sub-demos-make_default-ordered \
michael@1 630 sub-examples-make_default-ordered
michael@1 631 %endif
michael@258 632 %if "%{with_tools}" == "yes"
michael@258 633 %{l_make} %{l_mflags -O} docs
michael@258 634 %else
michael@258 635 %if "%{with_examples}" == "yes"
michael@258 636 %{l_make} %{l_mflags -O} docs
michael@258 637 %endif
michael@258 638 %endif
michael@1 639
michael@1 640 %install
michael@1 641 rm -rf $RPM_BUILD_ROOT
michael@1 642
michael@1 643 # carry out installation procedure
michael@215 644 targets="sub-tools-bootstrap-install_subtargets-ordered \
michael@215 645 sub-moc-install_subtargets-ordered \
michael@1 646 sub-rcc-install_subtargets-ordered \
michael@1 647 sub-uic-install_subtargets-ordered \
michael@1 648 sub-corelib-install_subtargets-ordered \
michael@1 649 sub-xml-install_subtargets-ordered \
michael@1 650 sub-network-install_subtargets-ordered \
michael@257 651 sub-sql-install_subtargets-ordered \
michael@257 652 sub-testlib-install_subtargets-ordered \
michael@257 653 sub-dbus-install_subtargets-ordered \
michael@1 654 sub-gui-install_subtargets-ordered \
michael@1 655 sub-qt3support-install_subtargets-ordered \
michael@1 656 sub-uic3-install_subtargets-ordered \
michael@1 657 sub-opengl-install_subtargets-ordered \
michael@1 658 sub-xmlpatterns-install_subtargets-ordered \
michael@257 659 sub-multimedia-install_subtargets-ordered \
michael@1 660 sub-svg-install_subtargets-ordered \
michael@257 661 sub-script-install_subtargets-ordered \
michael@257 662 sub-declarative-install_subtargets-ordered \
michael@257 663 sub-scripttools-install_subtargets-ordered \
michael@257 664 sub-imports-install_subtargets-ordered \
michael@257 665 sub-translations-install_subtargets-ordered"
michael@257 666
michael@1 667 %if "%{with_tools}" == "yes"
michael@258 668 targets="$targets sub-tools-install_subtargets-ordered install_htmldocs install_qchdocs install_docimages"
michael@1 669 %endif
michael@1 670 %if "%{with_examples}" == "yes"
michael@258 671 targets="$targets sub-demos-install_subtargets-ordered sub-examples-install_subtargets-ordered install_htmldocs install_qchdocs install_docimages"
michael@1 672 %endif
michael@258 673 targets="$targets install_qmake install_mkspecs"
michael@1 674 %{l_make} %{l_mflags} $targets INSTALL_ROOT="$RPM_BUILD_ROOT"
michael@266 675 %{l_shtool} install -c -m 644 \
michael@266 676 lib/libjscore.a lib/libjscore.prl \
michael@266 677 $RPM_BUILD_ROOT%{l_prefix}/lib/
michael@1 678
michael@266 679 # correct paths in pkg-config(1) configuration files
michael@266 680 %{l_shtool} subst \
michael@341 681 -e 's;-L[\t ]*[^\t ]*qt-everywhere-opensource-src-%{version};-L%{l_prefix};' \
michael@341 682 -e 's;=\([\t ]*\)[^\t ]*qt-everywhere-opensource-src-%{version};=\1%{l_prefix};g' \
michael@341 683 $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig/*
michael@341 684 # keep library paths clean by removing redundant paths
michael@341 685 %{l_shtool} subst \
michael@341 686 -e 's;-L[\t ]*[^\t ]*qt-everywhere-opensource-src-%{version}[^\t ]*[\t ]*;;g' \
michael@266 687 $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig/*
michael@266 688
michael@266 689 # install static or shared plugins according to user choice
michael@263 690 %if "%{with_shared}" != "yes"
michael@263 691 %{l_make} %{l_mflags} sub-plugins-install_subtargets-ordered INSTALL_ROOT="$RPM_BUILD_ROOT"
michael@263 692 %else
michael@264 693 %{l_tar} cf - -C sharbuild plugins | %{l_tar} xf - -C $RPM_BUILD_ROOT%{l_prefix}/lib/qt
michael@263 694 %endif
michael@266 695
michael@1 696 %if "%{with_shared}" == "yes"
michael@1 697 # install shared libs and symlinks
michael@1 698 %{l_shtool} mkdir -f -p -m 755 \
michael@1 699 $RPM_BUILD_ROOT%{l_prefix}/lib/qt
michael@264 700 %{l_tar} cf - -C sharbuild dynamic | %{l_tar} xf - -C $RPM_BUILD_ROOT%{l_prefix}/lib/qt
michael@1 701
michael@86 702 # offer limited support of pkg-config(1) for shared libs
michael@87 703 # substitution unfortunately only handles paths with no whitespace
michael@86 704 %{l_shtool} subst \
michael@341 705 -e 's;-L[\t ]*[^\t ]*qt-everywhere-opensource-src-%{version}/lib;-L%{l_prefix}/lib/qt/dynamic;' \
michael@341 706 -e 's;=\([\t ]*\)[^\t ]*qt-everywhere-opensource-src-%{version};=\1%{l_prefix};g' \
michael@341 707 $RPM_BUILD_ROOT%{l_prefix}/lib/qt/dynamic/pkgconfig/*
michael@341 708 # keep library paths clean by removing redundant paths
michael@341 709 %{l_shtool} subst \
michael@341 710 -e 's;-L[\t ]*[^\t ]*qt-everywhere-opensource-src-%{version}[^\t ]*[\t ]*;;g' \
michael@87 711 $RPM_BUILD_ROOT%{l_prefix}/lib/qt/dynamic/pkgconfig/*
michael@86 712
michael@1 713 # explain nonstandard shared library placement
michael@86 714 ( echo "This OpenPKG Qt build is using the with_shared option."
michael@86 715 echo ""
michael@263 716 echo "The directory %{l_prefix}/lib/qt/dynamic contains the"
michael@263 717 echo "requested shared libraries. Although shared libraries"
michael@263 718 echo "have been optionally built (see the build time"
michael@263 719 echo "'with_shared yes' option), static libraries were"
michael@263 720 echo "built by default as usual, and installed in the"
michael@86 721 echo "standard library directory %{l_prefix}/lib."
michael@86 722 echo ""
michael@86 723 echo "To build applications using shared libraries instead,"
michael@262 724 echo "please direct pkg-config(1) to use the proper definitions"
michael@86 725 echo "by setting the environment variable PKG_CONFIG_PATH to "
michael@86 726 echo "%{l_prefix}/lib/qt/dynamic/pkgconfig."
michael@263 727 echo ""
michael@263 728 echo "Note: If building via qmake(1), please append"
michael@263 729 echo " either 'static' or 'shared' to the line"
michael@263 730 echo " 'CONFIG +=' in the project file (name.pro)."
michael@263 731 echo " Then execute %{l_prefix}/bin/qmake on this file."
michael@1 732 ) >$RPM_BUILD_ROOT%{l_prefix}/lib/qt/README
michael@263 733 %endif
michael@1 734
michael@263 735 # correct temporary runtime link paths (static libs)
michael@1 736 %{l_shtool} subst \
michael@341 737 -e 's;/./;/;g' \
michael@341 738 -e 's;\(QMAKE_PRL_BUILD_DIR[\t ]*=\).*\(qt-everywhere-opensource-src-%{version}.*\);\1 /.../\2;' \
michael@341 739 -e 's;-L[\t ]*[^\t ]*qt-everywhere-opensource-src-%{version};-L%{l_prefix};' \
michael@341 740 $RPM_BUILD_ROOT%{l_prefix}/lib/qt/plugins/*/*.prl \
michael@341 741 $RPM_BUILD_ROOT%{l_prefix}/lib/*.prl \
michael@341 742 $RPM_BUILD_ROOT%{l_prefix}/lib/*.la
michael@343 743 # clean install by removing redundant paths (static libs)
michael@341 744 %{l_shtool} subst \
michael@341 745 -e 's;-L[\t ]*[^\t ]*qt-everywhere-opensource-src-%{version}[^\t ]*[\t ]*;;g' \
michael@263 746 $RPM_BUILD_ROOT%{l_prefix}/lib/*.prl \
michael@263 747 $RPM_BUILD_ROOT%{l_prefix}/lib/*.la
michael@263 748 %if "%{with_shared}" == "yes"
michael@263 749 # correct temporary runtime link paths (dynamic libs)
michael@263 750 %{l_shtool} subst \
michael@342 751 -e 's;/\./;/;g' \
michael@341 752 -e 's;\(QMAKE_PRL_BUILD_DIR[\t ]*=\).*\(qt-everywhere-opensource-src-%{version}.*\);\1 /.../\2;' \
michael@341 753 -e 's;-L[\t ]*[^\t ]*qt-everywhere-opensource-src-%{version}/lib;-L%{l_prefix}/lib/qt/dynamic;' \
michael@92 754 $RPM_BUILD_ROOT%{l_prefix}/lib/qt/dynamic/*.prl \
michael@92 755 $RPM_BUILD_ROOT%{l_prefix}/lib/qt/dynamic/*.la
michael@343 756 # clean install by removing redundant paths (dynamic libs)
michael@341 757 %{l_shtool} subst \
michael@341 758 -e 's;-L[\t ]*[^\t ]*qt-everywhere-opensource-src-%{version}[^\t ]*[\t ]*;;g' \
michael@342 759 $RPM_BUILD_ROOT%{l_prefix}/lib/qt/dynamic/*.prl \
michael@342 760 $RPM_BUILD_ROOT%{l_prefix}/lib/qt/dynamic/*.la
michael@1 761 %endif
michael@1 762
michael@259 763 ## Doesn't work as expected, because RPM reads the --[in|ex]cludedocs
michael@259 764 ## argument only when installing binary packages, rather than building.
michael@259 765 #%define _excludedocs 0
michael@259 766 #%define _includedocs 1
michael@259 767 # echo %{_excludedocs}
michael@259 768 # echo %{_includedocs}
michael@259 769 #
michael@259 770 ## Doesn't work as expected, because it seems that OpenPKG too mercilessly
michael@340 771 ## removes RPM reading of the %docdir keyword in rpm.patch.feature.
michael@259 772 # %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
michael@259 773 # %{l_files_std} \
michael@259 774 # '%docdir %{l_prefix}/share/pkg/doc'
michael@259 775 #
michael@259 776 ## Doesn't work as expected, because the rpmtool(1) marks
michael@259 777 ## only einzeln files as documents, skipping directories
michael@259 778 # %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
michael@259 779 # %{l_files_std} \
michael@259 780 # '%doc %{l_prefix}/share/pkg/doc/doc.txt'
michael@259 781 #
michael@1 782 # determine internal file listing
michael@1 783 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
michael@1 784 %{l_files_std} \
michael@1 785 '%not %dir %{l_prefix}/lib/pkgconfig'
michael@1 786
michael@1 787 %files -f files
michael@1 788
michael@1 789 %clean
michael@1 790 rm -rf $RPM_BUILD_ROOT
michael@1 791

mercurial