qt/qt.spec

Sun, 29 May 2011 16:29:06 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sun, 29 May 2011 16:29:06 +0200
changeset 344
e33c1efbd60f
parent 342
90f1326e8f73
child 349
886b6dad933a
permissions
-rw-r--r--

Update, correct, improve build configuration and packaging logic.
Update to new version of vendor software, bump copyright date, remove implicit
gcc dependency, add comments for Trolltech bug tracking, correct enforced
dynamic library linkage, and install mysterious process stub binary.

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@1 38 Distribution: MSvB Recherche 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@340 169 # MSvB In R/D: %{l_shtool} subst \
michael@340 170 # MSvB In R/D: -e 's;\(TRY_INCLUDEPATHS = \).*\(\$\$INCLUDEPATH\);\1\2;' \
michael@340 171 # MSvB In R/D: -e 's;/freetype2;/freetype;' \
michael@340 172 # MSvB In R/D: 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@342 279 %{l_shtool} subst \
michael@342 280 -e "s;^\(QMAKE_INCDIR_X11[^=]*=\).*;\1 $x11_incdir;" \
michael@342 281 -e "s;^\(QMAKE_LIBDIR_X11[^=]*=\).*;\1 $x11_libdir;" \
michael@342 282 mkspecs/qws/*/qmake.conf \
michael@342 283 mkspecs/*/qmake.conf
michael@340 284 # MSvB In R/D: %{l_shtool} subst \
michael@340 285 # MSvB In R/D: -e 's;^\(QMAKE_LIBS +=.*\);\1 -liconv;' \
michael@340 286 # MSvB In R/D: src/corelib/corelib.pro
michael@340 287 # Trolltech Bug:
michael@340 288 # In file included from ../JavaScriptCore/runtime/RegExp.h:29:0,
michael@340 289 # ../JavaScriptCore/yarr/RegexJIT.h: In destructor 'JSC::Yarr::RegexCodeBlock::~RegexCodeBlock()':
michael@340 290 # ../JavaScriptCore/yarr/RegexJIT.h:63:36: error: 'jsRegExpFree' was not declared in this scope
michael@3 291 %{l_shtool} subst \
michael@266 292 -e 's;\(DESTDIR *=\) *\$\$JAVASCRIPTCORE_DESTDIR;\1 $$QMAKE_LIBDIR_QT;' \
michael@266 293 src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro
michael@340 294 # Trolltech Bug:
michael@340 295 # In file included from ../JavaScriptCore/runtime/RegExp.h:29:0,
michael@340 296 # ../JavaScriptCore/yarr/RegexJIT.h: In destructor 'JSC::Yarr::RegexCodeBlock::~RegexCodeBlock()':
michael@340 297 # ../JavaScriptCore/yarr/RegexJIT.h:63:36: error: 'jsRegExpFree' was not declared in this scope
michael@266 298 %{l_shtool} subst \
michael@266 299 -e 's;\(pathToJavaScriptCoreOutput *=\) *\$\$ARGS/\$\$JAVASCRIPTCORE_DESTDIR;\1 $$QMAKE_LIBDIR_QT;g' \
michael@266 300 src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri
michael@340 301 # MSvB In R/D: echo "QMAKE_LIBDIR += %{l_prefix}/lib/qt/dynamic" \
michael@340 302 # MSvB In R/D: >>mkspecs/features/shared.prf
michael@340 303 # MSvB In R/D: %{l_shtool} subst \
michael@340 304 # MSvB In R/D: -e 's; *\.\./3rdparty/freetype/.*;;g' \
michael@340 305 # MSvB In R/D: -e 's;^\( *contains(QT_CONFIG, freetype) {\);\1 LIBS += -lfreetype;' \
michael@340 306 # MSvB In R/D: src/gui/text/text.pri
michael@340 307 # Trolltech Bug:
michael@340 308 # image/qtiffhandler.cpp:48:20: fatal error: tiffio.h: No such file or directory
michael@340 309 # compilation terminated.
michael@340 310 # make[1]: *** [.obj/release-static/qtiffhandler.o] Error 1
michael@1 311 %{l_shtool} subst \
michael@1 312 -e 's;\(#include *"\)\(tiffio.h"\);\1tiff/\2;' \
michael@257 313 src/gui/image/qtiffhandler.cpp
michael@342 314 # Trolltech Bug:
michael@342 315 # In file included from ../../../gui/image/qjpeghandler.cpp:42:0:
michael@342 316 # ../../../gui/image/qjpeghandler_p.h:45:35: fatal error:
michael@342 317 # QtGui/qimageiohandler.h: No such file or directory
michael@342 318 %{l_shtool} subst \
michael@342 319 -e 's;\(INCLUDEPATH *\*=\)\( *\);\1 $RPM_BUILD_DIR/qt-everywhere-opensource-src-%{version}/include\2;' \
michael@342 320 src/gui/image/qjpeghandler.pri
michael@340 321 # MSvB In R/D: %{l_shtool} subst \
michael@340 322 # MSvB In R/D: -e 's;\(CONFIG[\t ]*+=[\t ]*qt\);\1 x11;' \
michael@340 323 # MSvB In R/D: tools/qtconfig/qtconfig.pro
michael@340 324 # MSvB In R/D: %{l_shtool} subst \
michael@340 325 # MSvB In R/D: -e 's;webkit;web-broken-kit;g' \
michael@340 326 # MSvB In R/D: tools/assistant/tools/assistant/assistant.pro
michael@340 327 # MSvB In R/D: echo "DEFINES += QT_NO_WEBKIT" \
michael@340 328 # MSvB In R/D: >>tools/assistant/tools/assistant/assistant.pro
michael@340 329 # MSvB In R/D: %{l_shtool} subst \
michael@341 330 # MSvB In R/D: -e 's;Qt.s Classes;All Classes;' \
michael@340 331 # MSvB In R/D: tools/assistant/tools/assistant/doc/assistant.qdoc \
michael@340 332 # MSvB In R/D: tools/qdoc3/doc/qdoc-manual.qdoc \
michael@340 333 # MSvB In R/D: tools/qdoc3/doc/files/qt.qdocconf \
michael@340 334 # MSvB In R/D: tools/qdoc3/test/qt-build-docs.qdocconf \
michael@340 335 # MSvB In R/D: tools/qdoc3/test/qt.qdocconf
michael@342 336 # Trolltech Bug:
michael@342 337 # In file included from qpaintengine_vg.cpp:42:0:
michael@342 338 # qpaintengine_vg_p.h:66:39: error: expected initializer before ':' token
michael@342 339 # make[1]: *** [.obj/release-static/qpaintengine_vg.o] Error 1
michael@342 340 # make: *** [sub-openvg-sub_src_target_ordered] Error 2
michael@342 341 %{l_shtool} subst \
michael@342 342 -e 's;Q_OPENVG_EXPORT;Q_DECL_EXPORT;g' \
michael@342 343 src/openvg/*
michael@1 344
michael@1 345 %build
michael@1 346 # protect against sloppy code inclusion of all unused subprojects
michael@340 347 # MSvB In R/D: ce-compat clucene des easing harfbuzz javascriptcore md4 md5 s60 sha1 webkit xorg zlib_dependency.pri
michael@257 348 (cd src/3rdparty && rm -rf [^cdehjmswxz]* sql* win* zlib zlib.pri) || exit $?
michael@1 349
michael@92 350 # detect which platform for which to build
michael@1 351 case "%{l_platform -t}" in
michael@86 352 sun4[uv]-sunos* | amd64-sunos* ) platcomp="solaris-g++-64" ;;
michael@86 353 i?86-sunos* ) platcomp="solaris-g++" ;;
michael@86 354 amd64-linux* ) platcomp="linux-g++-64" ;;
michael@86 355 i?86-linux* ) platcomp="linux-g++" ;;
michael@86 356 amd64-freebsd* | i?86-freebsd* ) platcomp="freebsd-g++" ;;
michael@86 357 *-aix* ) platcomp="aix-g++" ;;
michael@86 358 *-darwin* ) platcomp="macx-g++" ;;
michael@86 359 *-hpux* ) platcomp="hpux-g++" ;;
michael@86 360 *-irix* ) platcomp="irix-g++" ;;
michael@86 361 * ) echo "Platform '%{l_platform -t}' is not supported." 2>&1; exit 1 ;;
michael@1 362 esac
michael@1 363
michael@92 364 # detect which architecture extensions are available
michael@92 365 archflags=''
michael@92 366 case "%{l_platform -t}" in
michael@92 367 amd64-* )
michael@92 368 break
michael@92 369 ;;
michael@92 370 * )
michael@92 371 archflags='-no-sse2 -no-3dnow'
michael@92 372 ;;
michael@92 373 esac
michael@92 374
michael@1 375 %if "%{with_shared}" == "yes"
michael@1 376 # optional shared build (precedes mandatory static build)
michael@1 377 echo 'yes' | ./configure \
michael@92 378 $archflags \
michael@205 379 -opensource \
michael@1 380 -prefix %{l_prefix} \
michael@1 381 -bindir %{l_prefix}/bin \
michael@263 382 -libdir %{l_prefix}/lib/qt/dynamic \
michael@1 383 -docdir %{l_prefix}/share/qt/doc \
michael@1 384 -headerdir %{l_prefix}/include \
michael@86 385 -plugindir %{l_prefix}/lib/qt/plugins \
michael@1 386 -datadir %{l_prefix}/share/qt \
michael@1 387 -translationdir %{l_prefix}/share/qt/translations \
michael@1 388 -sysconfdir %{l_prefix}/etc/qt \
michael@1 389 -examplesdir %{l_prefix}/share/qt/examples \
michael@1 390 -demosdir %{l_prefix}/share/qt/demos \
michael@340 391 %if 0
michael@340 392 # Build time Qt definitions should predominate,
michael@340 393 # otherwise foreign definitions cause errors like:
michael@340 394 #
michael@340 395 # g++ -c -I/foreign/include [...] animation/qguivariantanimation.cpp
michael@340 396 # .moc/release-shared/moc_qnamespace.cpp:426:16: error: 'WA_LockPortraitOrientation' is not a member of 'Qt'
michael@340 397 # .moc/release-shared/moc_qnamespace.cpp:427:16: error: 'WA_LockLandscapeOrientation' is not a member of 'Qt'
michael@340 398 # .moc/release-shared/moc_qnamespace.cpp:428:16: error: 'WA_AutoOrientation' is not a member of 'Qt'
michael@340 399 # .moc/release-shared/moc_qnamespace.cpp:440:16: error: 'AA_S60DisablePartialScreenInputMode' is not a member of 'Qt'
michael@340 400 #
michael@340 401 # Other problems include flawed definitions polluting (C|CXX)FLAGS
michael@340 402 # and overriding the correct definitions in CPPFLAGS. Variables
michael@340 403 # like QMAKE_(C|CXX)FLAGS exhibit this problem as well.
michael@340 404 #
michael@340 405 # The work around is to force a Qt dist include path in (C|CXX)FLAGS.
michael@340 406 %endif
michael@340 407 -I$RPM_BUILD_DIR/qt-everywhere-opensource-src-%{version}/include \
michael@1 408 -release \
michael@1 409 -shared \
michael@1 410 -platform $platcomp \
michael@340 411 -s60 \
michael@340 412 -qt-style-s60 \
michael@1 413 -no-sql-ibase \
michael@288 414 %if "%{with_glib}" == "yes"
michael@288 415 -glib \
michael@288 416 %else
michael@288 417 -no-glib \
michael@288 418 %endif
michael@65 419 %if "%{with_mysql}" == "yes"
michael@3 420 -qt-sql-mysql \
michael@86 421 -plugin-sql-mysql \
michael@65 422 %else
michael@65 423 -no-sql-mysql \
michael@65 424 %endif
michael@65 425 %if "%{with_pgsql}" == "yes"
michael@65 426 -qt-sql-psql \
michael@86 427 -plugin-sql-psql \
michael@65 428 %else
michael@65 429 -no-sql-psql \
michael@65 430 %endif
michael@1 431 -no-sql-odbc \
michael@65 432 -system-sqlite \
michael@65 433 -qt-sql-sqlite \
michael@86 434 -plugin-sql-sqlite \
michael@1 435 -no-sql-sqlite2 \
michael@3 436 -openssl-linked \
michael@288 437 -optimized-qmake \
michael@1 438 -xmlpatterns \
michael@1 439 -svg \
michael@215 440 -webkit \
michael@1 441 -system-zlib \
michael@1 442 -qt-gif \
michael@1 443 -system-libpng \
michael@1 444 -system-libmng \
michael@1 445 -system-libjpeg \
michael@1 446 -system-libtiff \
michael@1 447 -rpath \
michael@1 448 -no-cups \
michael@257 449 -iconv \
michael@1 450 -pch \
michael@1 451 -dbus-linked \
michael@1 452 -opengl \
michael@342 453 -openvg \
michael@1 454 -xrender \
michael@1 455 -fontconfig \
michael@288 456 -freetype
michael@1 457
michael@86 458 # default options are implicitly used, for example...
michael@1 459 #-no-fast -exceptions -accessibility -stl -qt3support -nis
michael@1 460 #-sm -xshape -xinerama -xcursor -xfixes -xrandr -tablet -xkb
michael@1 461
michael@1 462 # carry out shared build procedure
michael@1 463 ( cd src
michael@1 464 %{l_make} %{l_mflags -O} \
michael@215 465 sub-moc sub-rcc sub-uic sub-uic3
michael@1 466 ) || exit $?
michael@257 467 %{l_make} %{l_mflags -O} \
michael@257 468 sub-corelib-make_default-ordered \
michael@257 469 sub-xml-make_default-ordered \
michael@257 470 sub-network-make_default-ordered \
michael@257 471 sub-sql-make_default-ordered \
michael@257 472 sub-testlib-make_default-ordered \
michael@257 473 sub-dbus-make_default-ordered \
michael@257 474 sub-gui-make_default-ordered \
michael@257 475 sub-qt3support-make_default-ordered \
michael@257 476 sub-opengl-make_default-ordered \
michael@257 477 sub-xmlpatterns-make_default-ordered \
michael@257 478 sub-multimedia-make_default-ordered \
michael@257 479 sub-svg-make_default-ordered \
michael@257 480 sub-script-make_default-ordered \
michael@257 481 sub-declarative-make_default-ordered \
michael@257 482 sub-javascriptcore-make_default-ordered \
michael@257 483 sub-webkit-make_default-ordered \
michael@257 484 sub-scripttools-make_default-ordered \
michael@257 485 sub-plugins-make_default-ordered \
michael@257 486 sub-imports-make_default-ordered \
michael@257 487 sub-webkitdeclarative-make_default-ordered \
michael@257 488 sub-translations-make_default-ordered
michael@205 489
michael@205 490 # arthur plugin requires libQtDesigner
michael@92 491 ( cd demos
michael@205 492 ( cd ../tools/designer/src/lib
michael@263 493 %{l_make} %{l_mflags -O}
michael@205 494 ) || exit $?
michael@92 495 %{l_make} %{l_mflags -O} sub-arthurplugin
michael@92 496 ) || exit $?
michael@1 497
michael@1 498 # cache shared libs and initialize the build configuration, which
michael@1 499 # would otherwise still contain references to our shared libs build
michael@263 500 %{l_shtool} mkdir -f -p -m 755 sharbuild/dynamic
michael@263 501 mv lib/* sharbuild/dynamic/
michael@263 502 mv plugins sharbuild/
michael@257 503 %{l_make} %{l_mflags} confclean
michael@1 504 %endif
michael@1 505
michael@1 506 # mandatory static build (follows optional shared build)
michael@1 507 echo 'yes' | ./configure \
michael@92 508 $archflags \
michael@205 509 -opensource \
michael@1 510 -prefix %{l_prefix} \
michael@1 511 -bindir %{l_prefix}/bin \
michael@1 512 -libdir %{l_prefix}/lib \
michael@1 513 -docdir %{l_prefix}/share/qt/doc \
michael@1 514 -headerdir %{l_prefix}/include \
michael@86 515 -plugindir %{l_prefix}/lib/qt/plugins \
michael@1 516 -datadir %{l_prefix}/share/qt \
michael@1 517 -translationdir %{l_prefix}/share/qt/translations \
michael@1 518 -sysconfdir %{l_prefix}/etc/qt \
michael@1 519 -examplesdir %{l_prefix}/share/qt/examples \
michael@1 520 -demosdir %{l_prefix}/share/qt/demos \
michael@340 521 %if 0
michael@340 522 # Build time Qt definitions should predominate,
michael@340 523 # otherwise foreign definitions cause errors like:
michael@340 524 #
michael@340 525 # g++ -c -I/foreign/include [...] animation/qguivariantanimation.cpp
michael@340 526 # .moc/release-shared/moc_qnamespace.cpp:426:16: error: 'WA_LockPortraitOrientation' is not a member of 'Qt'
michael@340 527 # .moc/release-shared/moc_qnamespace.cpp:427:16: error: 'WA_LockLandscapeOrientation' is not a member of 'Qt'
michael@340 528 # .moc/release-shared/moc_qnamespace.cpp:428:16: error: 'WA_AutoOrientation' is not a member of 'Qt'
michael@340 529 # .moc/release-shared/moc_qnamespace.cpp:440:16: error: 'AA_S60DisablePartialScreenInputMode' is not a member of 'Qt'
michael@340 530 #
michael@340 531 # Other problems include flawed definitions polluting (C|CXX)FLAGS
michael@340 532 # and overriding the correct definitions in CPPFLAGS. Variables
michael@340 533 # like QMAKE_(C|CXX)FLAGS exhibit this problem as well.
michael@340 534 #
michael@340 535 # The work around is to force a Qt dist include path in (C|CXX)FLAGS.
michael@340 536 %endif
michael@340 537 -I$RPM_BUILD_DIR/qt-everywhere-opensource-src-%{version}/include \
michael@1 538 -release \
michael@1 539 -static \
michael@1 540 -platform $platcomp \
michael@340 541 -s60 \
michael@340 542 -qt-style-s60 \
michael@1 543 -no-sql-ibase \
michael@288 544 %if "%{with_glib}" == "yes"
michael@288 545 -glib \
michael@288 546 %else
michael@288 547 -no-glib \
michael@288 548 %endif
michael@65 549 %if "%{with_mysql}" == "yes"
michael@3 550 -qt-sql-mysql \
michael@65 551 %else
michael@65 552 -no-sql-mysql \
michael@65 553 %endif
michael@65 554 %if "%{with_pgsql}" == "yes"
michael@65 555 -qt-sql-psql \
michael@65 556 %else
michael@65 557 -no-sql-psql \
michael@65 558 %endif
michael@1 559 -no-sql-odbc \
michael@65 560 -system-sqlite \
michael@65 561 -qt-sql-sqlite \
michael@1 562 -no-sql-sqlite2 \
michael@3 563 -openssl-linked \
michael@288 564 -optimized-qmake \
michael@1 565 -xmlpatterns \
michael@1 566 -svg \
michael@265 567 -webkit \
michael@1 568 -system-zlib \
michael@1 569 -qt-gif \
michael@1 570 -system-libpng \
michael@1 571 -system-libmng \
michael@1 572 -system-libjpeg \
michael@1 573 -system-libtiff \
michael@1 574 -rpath \
michael@1 575 -no-cups \
michael@257 576 -iconv \
michael@1 577 -pch \
michael@1 578 -dbus-linked \
michael@1 579 -opengl \
michael@342 580 -openvg \
michael@1 581 -xrender \
michael@1 582 -fontconfig \
michael@288 583 -freetype
michael@1 584
michael@86 585 # default options are implicitly used, for example...
michael@1 586 #-no-fast -exceptions -accessibility -stl -qt3support -nis
michael@1 587 #-sm -xshape -xinerama -xcursor -xfixes -xrandr -tablet -xkb
michael@1 588
michael@1 589 # carry out static build procedure
michael@341 590 # Trolltech Bug:
michael@341 591 # Problem with dependency order, causes compiling of qtreeview.cpp
michael@341 592 # with dependency to moc_qtreeview.cpp before moc(1) has finished.
michael@341 593 # The implemented work around is disabling parallel make, causing
michael@341 594 # a nearly 100% build deceleration but allowing the build to procede.
michael@341 595 # In file included from itemviews/qtreeview.cpp:3761:0:
michael@341 596 # .moc/release-static/moc_qtreeview.cpp: In member function 'QPixmap QTreeViewPrivate::renderTreeToPixmapForAnimation(const QRect&) const':
michael@341 597 # .moc/release-static/moc_qtreeview.cpp:209:1: internal compiler error: Segmentation fault
michael@341 598 %{l_make} %{l_mflags} sub-src
michael@1 599 %if "%{with_tools}" == "yes"
michael@258 600 %{l_make} %{l_mflags -O} \
michael@258 601 sub-tools-make_default-ordered sub-translations-make_default-ordered
michael@1 602 %endif
michael@1 603 %if "%{with_examples}" == "yes"
michael@1 604 %{l_make} %{l_mflags -O} \
michael@1 605 sub-demos-make_default-ordered \
michael@1 606 sub-examples-make_default-ordered
michael@1 607 %endif
michael@258 608 %if "%{with_tools}" == "yes"
michael@258 609 %{l_make} %{l_mflags -O} docs
michael@258 610 %else
michael@258 611 %if "%{with_examples}" == "yes"
michael@258 612 %{l_make} %{l_mflags -O} docs
michael@258 613 %endif
michael@258 614 %endif
michael@1 615
michael@1 616 %install
michael@1 617 rm -rf $RPM_BUILD_ROOT
michael@1 618
michael@1 619 # carry out installation procedure
michael@215 620 targets="sub-tools-bootstrap-install_subtargets-ordered \
michael@215 621 sub-moc-install_subtargets-ordered \
michael@1 622 sub-rcc-install_subtargets-ordered \
michael@1 623 sub-uic-install_subtargets-ordered \
michael@1 624 sub-corelib-install_subtargets-ordered \
michael@1 625 sub-xml-install_subtargets-ordered \
michael@1 626 sub-network-install_subtargets-ordered \
michael@257 627 sub-sql-install_subtargets-ordered \
michael@257 628 sub-testlib-install_subtargets-ordered \
michael@257 629 sub-dbus-install_subtargets-ordered \
michael@1 630 sub-gui-install_subtargets-ordered \
michael@1 631 sub-qt3support-install_subtargets-ordered \
michael@1 632 sub-uic3-install_subtargets-ordered \
michael@1 633 sub-opengl-install_subtargets-ordered \
michael@1 634 sub-xmlpatterns-install_subtargets-ordered \
michael@257 635 sub-multimedia-install_subtargets-ordered \
michael@1 636 sub-svg-install_subtargets-ordered \
michael@257 637 sub-script-install_subtargets-ordered \
michael@257 638 sub-declarative-install_subtargets-ordered \
michael@257 639 sub-scripttools-install_subtargets-ordered \
michael@257 640 sub-imports-install_subtargets-ordered \
michael@257 641 sub-translations-install_subtargets-ordered"
michael@257 642
michael@1 643 %if "%{with_tools}" == "yes"
michael@258 644 targets="$targets sub-tools-install_subtargets-ordered install_htmldocs install_qchdocs install_docimages"
michael@1 645 %endif
michael@1 646 %if "%{with_examples}" == "yes"
michael@258 647 targets="$targets sub-demos-install_subtargets-ordered sub-examples-install_subtargets-ordered install_htmldocs install_qchdocs install_docimages"
michael@1 648 %endif
michael@258 649 targets="$targets install_qmake install_mkspecs"
michael@1 650 %{l_make} %{l_mflags} $targets INSTALL_ROOT="$RPM_BUILD_ROOT"
michael@266 651 %{l_shtool} install -c -m 644 \
michael@266 652 lib/libjscore.a lib/libjscore.prl \
michael@266 653 $RPM_BUILD_ROOT%{l_prefix}/lib/
michael@1 654
michael@266 655 # correct paths in pkg-config(1) configuration files
michael@266 656 %{l_shtool} subst \
michael@341 657 -e 's;-L[\t ]*[^\t ]*qt-everywhere-opensource-src-%{version};-L%{l_prefix};' \
michael@341 658 -e 's;=\([\t ]*\)[^\t ]*qt-everywhere-opensource-src-%{version};=\1%{l_prefix};g' \
michael@341 659 $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig/*
michael@341 660 # keep library paths clean by removing redundant paths
michael@341 661 %{l_shtool} subst \
michael@341 662 -e 's;-L[\t ]*[^\t ]*qt-everywhere-opensource-src-%{version}[^\t ]*[\t ]*;;g' \
michael@266 663 $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig/*
michael@266 664
michael@266 665 # install static or shared plugins according to user choice
michael@263 666 %if "%{with_shared}" != "yes"
michael@263 667 %{l_make} %{l_mflags} sub-plugins-install_subtargets-ordered INSTALL_ROOT="$RPM_BUILD_ROOT"
michael@263 668 %else
michael@264 669 %{l_tar} cf - -C sharbuild plugins | %{l_tar} xf - -C $RPM_BUILD_ROOT%{l_prefix}/lib/qt
michael@263 670 %endif
michael@266 671
michael@1 672 %if "%{with_shared}" == "yes"
michael@1 673 # install shared libs and symlinks
michael@1 674 %{l_shtool} mkdir -f -p -m 755 \
michael@1 675 $RPM_BUILD_ROOT%{l_prefix}/lib/qt
michael@264 676 %{l_tar} cf - -C sharbuild dynamic | %{l_tar} xf - -C $RPM_BUILD_ROOT%{l_prefix}/lib/qt
michael@1 677
michael@86 678 # offer limited support of pkg-config(1) for shared libs
michael@87 679 # substitution unfortunately only handles paths with no whitespace
michael@86 680 %{l_shtool} subst \
michael@341 681 -e 's;-L[\t ]*[^\t ]*qt-everywhere-opensource-src-%{version}/lib;-L%{l_prefix}/lib/qt/dynamic;' \
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/qt/dynamic/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@87 687 $RPM_BUILD_ROOT%{l_prefix}/lib/qt/dynamic/pkgconfig/*
michael@86 688
michael@1 689 # explain nonstandard shared library placement
michael@86 690 ( echo "This OpenPKG Qt build is using the with_shared option."
michael@86 691 echo ""
michael@263 692 echo "The directory %{l_prefix}/lib/qt/dynamic contains the"
michael@263 693 echo "requested shared libraries. Although shared libraries"
michael@263 694 echo "have been optionally built (see the build time"
michael@263 695 echo "'with_shared yes' option), static libraries were"
michael@263 696 echo "built by default as usual, and installed in the"
michael@86 697 echo "standard library directory %{l_prefix}/lib."
michael@86 698 echo ""
michael@86 699 echo "To build applications using shared libraries instead,"
michael@262 700 echo "please direct pkg-config(1) to use the proper definitions"
michael@86 701 echo "by setting the environment variable PKG_CONFIG_PATH to "
michael@86 702 echo "%{l_prefix}/lib/qt/dynamic/pkgconfig."
michael@263 703 echo ""
michael@263 704 echo "Note: If building via qmake(1), please append"
michael@263 705 echo " either 'static' or 'shared' to the line"
michael@263 706 echo " 'CONFIG +=' in the project file (name.pro)."
michael@263 707 echo " Then execute %{l_prefix}/bin/qmake on this file."
michael@1 708 ) >$RPM_BUILD_ROOT%{l_prefix}/lib/qt/README
michael@263 709 %endif
michael@1 710
michael@263 711 # correct temporary runtime link paths (static libs)
michael@1 712 %{l_shtool} subst \
michael@341 713 -e 's;/./;/;g' \
michael@341 714 -e 's;\(QMAKE_PRL_BUILD_DIR[\t ]*=\).*\(qt-everywhere-opensource-src-%{version}.*\);\1 /.../\2;' \
michael@341 715 -e 's;-L[\t ]*[^\t ]*qt-everywhere-opensource-src-%{version};-L%{l_prefix};' \
michael@341 716 $RPM_BUILD_ROOT%{l_prefix}/lib/qt/plugins/*/*.prl \
michael@341 717 $RPM_BUILD_ROOT%{l_prefix}/lib/*.prl \
michael@341 718 $RPM_BUILD_ROOT%{l_prefix}/lib/*.la
michael@343 719 # clean install by removing redundant paths (static libs)
michael@341 720 %{l_shtool} subst \
michael@341 721 -e 's;-L[\t ]*[^\t ]*qt-everywhere-opensource-src-%{version}[^\t ]*[\t ]*;;g' \
michael@263 722 $RPM_BUILD_ROOT%{l_prefix}/lib/*.prl \
michael@263 723 $RPM_BUILD_ROOT%{l_prefix}/lib/*.la
michael@263 724 %if "%{with_shared}" == "yes"
michael@263 725 # correct temporary runtime link paths (dynamic libs)
michael@263 726 %{l_shtool} subst \
michael@342 727 -e 's;/\./;/;g' \
michael@341 728 -e 's;\(QMAKE_PRL_BUILD_DIR[\t ]*=\).*\(qt-everywhere-opensource-src-%{version}.*\);\1 /.../\2;' \
michael@341 729 -e 's;-L[\t ]*[^\t ]*qt-everywhere-opensource-src-%{version}/lib;-L%{l_prefix}/lib/qt/dynamic;' \
michael@92 730 $RPM_BUILD_ROOT%{l_prefix}/lib/qt/dynamic/*.prl \
michael@92 731 $RPM_BUILD_ROOT%{l_prefix}/lib/qt/dynamic/*.la
michael@343 732 # clean install by removing redundant paths (dynamic libs)
michael@341 733 %{l_shtool} subst \
michael@341 734 -e 's;-L[\t ]*[^\t ]*qt-everywhere-opensource-src-%{version}[^\t ]*[\t ]*;;g' \
michael@342 735 $RPM_BUILD_ROOT%{l_prefix}/lib/qt/dynamic/*.prl \
michael@342 736 $RPM_BUILD_ROOT%{l_prefix}/lib/qt/dynamic/*.la
michael@1 737 %endif
michael@1 738
michael@259 739 ## Doesn't work as expected, because RPM reads the --[in|ex]cludedocs
michael@259 740 ## argument only when installing binary packages, rather than building.
michael@259 741 #%define _excludedocs 0
michael@259 742 #%define _includedocs 1
michael@259 743 # echo %{_excludedocs}
michael@259 744 # echo %{_includedocs}
michael@259 745 #
michael@259 746 ## Doesn't work as expected, because it seems that OpenPKG too mercilessly
michael@340 747 ## removes RPM reading of the %docdir keyword in rpm.patch.feature.
michael@259 748 # %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
michael@259 749 # %{l_files_std} \
michael@259 750 # '%docdir %{l_prefix}/share/pkg/doc'
michael@259 751 #
michael@259 752 ## Doesn't work as expected, because the rpmtool(1) marks
michael@259 753 ## only einzeln files as documents, skipping directories
michael@259 754 # %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
michael@259 755 # %{l_files_std} \
michael@259 756 # '%doc %{l_prefix}/share/pkg/doc/doc.txt'
michael@259 757 #
michael@1 758 # determine internal file listing
michael@1 759 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
michael@1 760 %{l_files_std} \
michael@1 761 '%not %dir %{l_prefix}/lib/pkgconfig'
michael@1 762
michael@1 763 %files -f files
michael@1 764
michael@1 765 %clean
michael@1 766 rm -rf $RPM_BUILD_ROOT
michael@1 767

mercurial