Sat, 21 May 2011 22:05:42 +0200
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.
michael@1 | 1 | ## |
michael@1 | 2 | ## qt.spec -- OpenPKG RPM Specification |
michael@257 | 3 | ## Copyright (c) 2010 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@4 | 59 | BuildPreReq: OpenPKG, openpkg >= 20050726, make, gcc, pkgconfig |
michael@1 | 60 | PreReq: OpenPKG, openpkg >= 20050726 |
michael@1 | 61 | BuildPreReq: X11, png, mng, jpeg, tiff, mesa, xrender |
michael@1 | 62 | PreReq: X11, png, mng, jpeg, tiff, mesa, xrender |
michael@3 | 63 | BuildPreReq: openssl, zlib, libiconv, sqlite, dbus |
michael@3 | 64 | PreReq: 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@3 | 85 | development. Using Qt, you can develop applications and user |
michael@3 | 86 | interfaces once, and deploy them across many desktop and embedded |
michael@86 | 87 | operating systems without rewriting the source code. This package |
michael@86 | 88 | distribution builds all modules of the Qt/X11 Open Source Edition. |
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@264 | 100 | echo " qt-%{version}-root (4,5 Go)" |
michael@263 | 101 | echo " qt-everywhere-opensource-src-%{version} (5,5 Go)" |
michael@263 | 102 | echo " qt-%{version}-<date>.<arch>-<os>-<tag>.rpm (2 Go)" |
michael@263 | 103 | echo "Building with no options takes 2,0 hours on a dual core" |
michael@264 | 104 | echo "2 GHz CPU, or 5 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@1 | 127 | %{l_shtool} subst \ |
michael@92 | 128 | -e 's;\(-z[\t ][\t ]*\)\([^\t \"][^\t \"]*\);\1"\2";g' \ |
michael@1 | 129 | configure |
michael@1 | 130 | %{l_shtool} subst \ |
michael@263 | 131 | -e 's;\(RPATH_FLAGS\)=.*\$QT_INSTALL_LIBS.*\(\$RPATH_FLAGS\)";\1="%{l_prefix}/lib/qt/dynamic \2";' \ |
michael@264 | 132 | -e 's;\(QMAKE_RPATHDIR +=\) \\"\$QT_INSTALL_LIBS\\";\1 %{l_prefix}/lib/qt/dynamic;' \ |
michael@263 | 133 | configure |
michael@263 | 134 | %{l_shtool} subst \ |
michael@288 | 135 | -e "s;\(OPENSSL_LIBS *=\) *-lssl -lcrypto;\1 $openssllibs;" \ |
michael@92 | 136 | configure |
michael@92 | 137 | %{l_shtool} subst \ |
michael@288 | 138 | -e 's; *QMakeVar set QMAKE_CFLAGS_X11.*QT_CFLAGS_FONTCONFIG.*;;' \ |
michael@288 | 139 | configure |
michael@288 | 140 | # yes this is needed several times to catch nested occurences of '--libs' |
michael@288 | 141 | %{l_shtool} subst \ |
michael@288 | 142 | -e 's;\(QT_LIBS_FONTCONFIG *=.*PKG_CONFIG.*\) --libs ;\1 --libs-only-L ;g' \ |
michael@288 | 143 | -e 's;\(QT_LIBS_FONTCONFIG *=.*PKG_CONFIG.*\) --libs ;\1 --libs-only-L ;g' \ |
michael@1 | 144 | configure |
michael@257 | 145 | # yes this is needed several times to catch nested occurences of '--cflags' |
michael@257 | 146 | %{l_shtool} subst \ |
michael@257 | 147 | -e 's;\(QT_CFLAGS_[^=][^=]*=.*PKG_CONFIG.*\) --cflags ;\1 --cflags-only-other ;g' \ |
michael@257 | 148 | -e 's;\(QT_CFLAGS_[^=][^=]*=.*PKG_CONFIG.*\) --cflags ;\1 --cflags-only-other ;g' \ |
michael@257 | 149 | configure |
michael@340 | 150 | # Trolltech Bug: |
michael@340 | 151 | # Glib support cannot be enabled due to functionality tests! |
michael@340 | 152 | # Turn on verbose messaging (-v) to ./configure to see the final report. |
michael@340 | 153 | # Trolltech Bug: |
michael@340 | 154 | # In file included from ../../include/QtGui/private/qgtkstyle_p.h:1, |
michael@340 | 155 | # from kernel/qguiplatformplugin.cpp:63: |
michael@340 | 156 | # ....../qgtkstyle_p.h:69:21: error: gtk/gtk.h: No such file or directory |
michael@340 | 157 | # Workaround resolution: |
michael@288 | 158 | # hack to get back the standard '--cflags' of just Qt_CFLAGS_GLIB |
michael@340 | 159 | # Question: Is this needed? QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null` |
michael@288 | 160 | %{l_shtool} subst \ |
michael@288 | 161 | -e 's;\(QT_CFLAGS_GLIB *=.*PKG_CONFIG.*\) --cflags-only-other ;\1 --cflags ;g' \ |
michael@340 | 162 | -e 's;\(QT_CFLAGS_QGTKSTYLE *=.*PKG_CONFIG.*\) --cflags-only-other ;\1 --cflags ;g' \ |
michael@288 | 163 | configure |
michael@340 | 164 | # MSvB In R/D: %{l_shtool} subst \ |
michael@340 | 165 | # MSvB In R/D: -e 's;\(TRY_INCLUDEPATHS = \).*\(\$\$INCLUDEPATH\);\1\2;' \ |
michael@340 | 166 | # MSvB In R/D: -e 's;/freetype2;/freetype;' \ |
michael@340 | 167 | # MSvB In R/D: config.tests/unix/freetype/freetype.pri |
michael@340 | 168 | # Trolltech Bug: |
michael@340 | 169 | # /opdv/lib/libmng.a(libmng_cms.o): In function `mnglcms_initlibrary': |
michael@340 | 170 | # libmng_cms.c:(.text+0xa): undefined reference to `cmsErrorAction' |
michael@1 | 171 | %{l_shtool} subst \ |
michael@257 | 172 | -e "s;\(LIBS.*=.*-lmng\);\1 $lcmslibs;" \ |
michael@257 | 173 | src/gui/image/qmnghandler.pri |
michael@340 | 174 | # Trolltech Bug: |
michael@340 | 175 | # lib/libQtGui.a(qapplication_x11.o): In function |
michael@340 | 176 | # `qt_init(QApplicationPrivate*, int, _XDisplay*, unsigned long, unsigned long)': |
michael@340 | 177 | # qapplication_x11.cpp:(.text+0xec8d): undefined reference to `FcInit' |
michael@257 | 178 | %{l_shtool} subst \ |
michael@92 | 179 | -e "s;^\(LIBS += \)-lfreetype -lfontconfig;\1$fontconflibs;" \ |
michael@1 | 180 | config.tests/x11/fontconfig/fontconfig.pro |
michael@340 | 181 | echo "LIBS += `%{l_prefix}/bin/pkg-config --libs-only-L fontconfig`" \ |
michael@340 | 182 | >>tools/linguist/linguist/linguist.pro |
michael@213 | 183 | echo 'INCLUDEPATH += /usr/include/wacomcfg' \ |
michael@213 | 184 | >>src/gui/kernel/x11.pri |
michael@257 | 185 | echo "contains(QT_CONFIG, fontconfig) { LIBS += $fontconflibs }" \ |
michael@257 | 186 | >>src/gui/kernel/x11.pri |
michael@257 | 187 | echo "contains(QT_CONFIG, fontconfig) { LIBS += $fontconflibs }" \ |
michael@257 | 188 | >>src/gui/text/text.pri |
michael@340 | 189 | # Trolltech Bug: |
michael@340 | 190 | # The QtDBus module cannot be enabled because libdbus-1 version 0.93 was not found. |
michael@340 | 191 | # Turn on verbose messaging (-v) to ./configure to see the final report. |
michael@257 | 192 | echo "INCLUDEPATH = `%{l_prefix}/bin/pkg-config --cflags-only-I dbus-1 | %{l_shtool} subst -e 's;\-I;;g'`" \ |
michael@257 | 193 | >>config.tests/unix/dbus/dbus.pro |
michael@257 | 194 | echo "LIBS = `%{l_prefix}/bin/pkg-config --libs-only-l --static dbus-1`" \ |
michael@257 | 195 | >>config.tests/unix/dbus/dbus.pro |
michael@340 | 196 | # Trolltech Bug: |
michael@340 | 197 | # PostgreSQL support cannot be enabled due to functionality tests! |
michael@340 | 198 | # Turn on verbose messaging (-v) to ./configure to see the final report. |
michael@1 | 199 | %{l_shtool} subst \ |
michael@257 | 200 | -e "s;\(LIBS.*= -lpq\);\1 `%{l_prefix}/bin/pg_config --libs` $loclibs;" \ |
michael@1 | 201 | config.tests/unix/psql/psql.pro |
michael@340 | 202 | # Trolltech Bug: |
michael@340 | 203 | # Iconv support cannot be enabled due to functionality tests! |
michael@340 | 204 | # Turn on verbose messaging (-v) to ./configure to see the final report. |
michael@1 | 205 | %{l_shtool} subst \ |
michael@257 | 206 | -e 's;^mac[^:][^:]*:\(LIBS\);\1;' \ |
michael@1 | 207 | config.tests/unix/iconv/iconv.pro |
michael@340 | 208 | # MSvB Aktualisierung: The uiclibs line is probably an error, remove... |
michael@340 | 209 | # MSvB In R/D: uiclibs=`%{l_prefix}/bin/pkg-config --libs-only-l --static fontconfig lcms` |
michael@340 | 210 | # MSvB In R/D: %{l_shtool} subst \ |
michael@340 | 211 | # MSvB In R/D: -e 's;LIBS .*= -lpq$;LIBS += -lpq -lssl -lcrypto;' \ |
michael@340 | 212 | # MSvB In R/D: -e "s;LIBS .*= \$\$QT_LFLAGS_MYSQL;LIBS += $mysqllibs;" \ |
michael@340 | 213 | # MSvB In R/D: src/sql/drivers/drivers.pri |
michael@340 | 214 | # MSvB In R/D: %{l_shtool} subst \ |
michael@340 | 215 | # 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 | 216 | # MSvB In R/D: src/corelib/kernel/kernel.pri \ |
michael@340 | 217 | # MSvB In R/D: src/gui/kernel/kernel.pri |
michael@340 | 218 | # MSvB In R/D: %{l_shtool} subst \ |
michael@340 | 219 | # 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 | 220 | # 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 | 221 | # 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 | 222 | # MSvB In R/D: -e 's;!static:\(!isEmpty(QT_LFLAGS_PSQL)\);\1;' \ |
michael@340 | 223 | # MSvB In R/D: -e 's;!static:\(LIBS \*= \$\$QT_LFLAGS_PSQL\);\1;' \ |
michael@340 | 224 | # MSvB In R/D: src/plugins/sqldrivers/mysql/mysql.pro \ |
michael@340 | 225 | # MSvB In R/D: src/plugins/sqldrivers/psql/psql.pro \ |
michael@340 | 226 | # MSvB In R/D: src/plugins/sqldrivers/sqlite/sqlite.pro \ |
michael@340 | 227 | # MSvB In R/D: src/sql/drivers/drivers.pri |
michael@340 | 228 | # Trolltech Bug: |
michael@340 | 229 | # In file included from qdbusconnectioninterface.cpp:52:0: |
michael@340 | 230 | # qdbus_symbols_p.h:58:23: fatal error: dbus/dbus.h: No such file or directoryIn |
michael@340 | 231 | # file included from qdbusconnection_p.h:70:0, from qdbusconnection.cpp:51: |
michael@86 | 232 | %{l_shtool} subst \ |
michael@86 | 233 | -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 | 234 | src/dbus/dbus.pro |
michael@340 | 235 | # Trolltech Bug: |
michael@340 | 236 | # All the OpenGL functionality tests failed! |
michael@340 | 237 | # You might need to modify the include and library search paths by |
michael@340 | 238 | # editing QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in |
michael@340 | 239 | # /home/mschloh/opwrk/tmp/qt-everywhere-opensource-src-4.7.3/mkspecs/linux-g++-64. |
michael@86 | 240 | %{l_shtool} subst \ |
michael@1 | 241 | -e 's;^\(QMAKE_INCDIR[^a-zA-Z0-9=]*=\).*;\1 %{l_prefix}/include;' \ |
michael@263 | 242 | -e 's;^\(QMAKE_LIBDIR[^a-zA-Z0-9=]*=\).*;\1;' \ |
michael@340 | 243 | -e 's;^\(QMAKE_INCDIR_OPENGL[^=]*=\) *\(.*\);\1 %{l_prefix}/include \2;' \ |
michael@340 | 244 | -e 's;^\(QMAKE_LIBDIR_OPENGL[^=]*=\) *\(.*\);\1 %{l_prefix}/lib \2;' \ |
michael@1 | 245 | -e 's;^\(QMAKE_LFLAGS_RELEASE.*\);\1 -s;' \ |
michael@1 | 246 | mkspecs/qws/*/qmake.conf \ |
michael@1 | 247 | mkspecs/*/*.conf |
michael@340 | 248 | # MSvB In R/D: %{l_shtool} subst \ |
michael@340 | 249 | # MSvB In R/D: -e 's;^\(QMAKE_LIBS +=.*\);\1 -liconv;' \ |
michael@340 | 250 | # MSvB In R/D: src/corelib/corelib.pro |
michael@340 | 251 | # Trolltech Bug: |
michael@340 | 252 | # In file included from ../JavaScriptCore/runtime/RegExp.h:29:0, |
michael@340 | 253 | # ../JavaScriptCore/yarr/RegexJIT.h: In destructor 'JSC::Yarr::RegexCodeBlock::~RegexCodeBlock()': |
michael@340 | 254 | # ../JavaScriptCore/yarr/RegexJIT.h:63:36: error: 'jsRegExpFree' was not declared in this scope |
michael@3 | 255 | %{l_shtool} subst \ |
michael@266 | 256 | -e 's;\(DESTDIR *=\) *\$\$JAVASCRIPTCORE_DESTDIR;\1 $$QMAKE_LIBDIR_QT;' \ |
michael@266 | 257 | src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro |
michael@340 | 258 | # Trolltech Bug: |
michael@340 | 259 | # In file included from ../JavaScriptCore/runtime/RegExp.h:29:0, |
michael@340 | 260 | # ../JavaScriptCore/yarr/RegexJIT.h: In destructor 'JSC::Yarr::RegexCodeBlock::~RegexCodeBlock()': |
michael@340 | 261 | # ../JavaScriptCore/yarr/RegexJIT.h:63:36: error: 'jsRegExpFree' was not declared in this scope |
michael@266 | 262 | %{l_shtool} subst \ |
michael@266 | 263 | -e 's;\(pathToJavaScriptCoreOutput *=\) *\$\$ARGS/\$\$JAVASCRIPTCORE_DESTDIR;\1 $$QMAKE_LIBDIR_QT;g' \ |
michael@266 | 264 | src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri |
michael@340 | 265 | # MSvB In R/D: %{l_shtool} subst \ |
michael@340 | 266 | # MSvB In R/D: -e "s;^\(QMAKE_INCDIR_X11[^=]*=\).*;\1 %{l_prefix}/include $x11_incdir;" \ |
michael@340 | 267 | # MSvB In R/D: -e "s;^\(QMAKE_LIBDIR_X11[^=]*=\).*;\1 %{l_prefix}/lib $x11_libdir;" \ |
michael@340 | 268 | # MSvB In R/D: mkspecs/qws/solaris*/qmake.conf \ |
michael@340 | 269 | # MSvB In R/D: mkspecs/solaris*/qmake.conf |
michael@340 | 270 | # MSvB In R/D: echo "QMAKE_LIBDIR += %{l_prefix}/lib/qt/dynamic" \ |
michael@340 | 271 | # MSvB In R/D: >>mkspecs/features/shared.prf |
michael@340 | 272 | # MSvB In R/D: %{l_shtool} subst \ |
michael@340 | 273 | # MSvB In R/D: -e 's; *\.\./3rdparty/freetype/.*;;g' \ |
michael@340 | 274 | # MSvB In R/D: -e 's;^\( *contains(QT_CONFIG, freetype) {\);\1 LIBS += -lfreetype;' \ |
michael@340 | 275 | # MSvB In R/D: src/gui/text/text.pri |
michael@340 | 276 | # Trolltech Bug: |
michael@340 | 277 | # image/qtiffhandler.cpp:48:20: fatal error: tiffio.h: No such file or directory |
michael@340 | 278 | # compilation terminated. |
michael@340 | 279 | # make[1]: *** [.obj/release-static/qtiffhandler.o] Error 1 |
michael@1 | 280 | %{l_shtool} subst \ |
michael@1 | 281 | -e 's;\(#include *"\)\(tiffio.h"\);\1tiff/\2;' \ |
michael@257 | 282 | src/gui/image/qtiffhandler.cpp |
michael@340 | 283 | # MSvB In R/D: %{l_shtool} subst \ |
michael@340 | 284 | # MSvB In R/D: -e 's;\(CONFIG[\t ]*+=[\t ]*qt\);\1 x11;' \ |
michael@340 | 285 | # MSvB In R/D: tools/qtconfig/qtconfig.pro |
michael@340 | 286 | # MSvB In R/D: %{l_shtool} subst \ |
michael@340 | 287 | # MSvB In R/D: -e 's;webkit;web-broken-kit;g' \ |
michael@340 | 288 | # MSvB In R/D: tools/assistant/tools/assistant/assistant.pro |
michael@340 | 289 | # MSvB In R/D: echo "DEFINES += QT_NO_WEBKIT" \ |
michael@340 | 290 | # MSvB In R/D: >>tools/assistant/tools/assistant/assistant.pro |
michael@340 | 291 | # MSvB In R/D: %{l_shtool} subst \ |
michael@340 | 292 | # MSvB In R/D: -e "s;Qt.s Classes;All Classes;" \ |
michael@340 | 293 | # MSvB In R/D: tools/assistant/tools/assistant/doc/assistant.qdoc \ |
michael@340 | 294 | # MSvB In R/D: tools/qdoc3/doc/qdoc-manual.qdoc \ |
michael@340 | 295 | # MSvB In R/D: tools/qdoc3/doc/files/qt.qdocconf \ |
michael@340 | 296 | # MSvB In R/D: tools/qdoc3/test/qt-build-docs.qdocconf \ |
michael@340 | 297 | # MSvB In R/D: tools/qdoc3/test/qt.qdocconf |
michael@1 | 298 | |
michael@1 | 299 | %build |
michael@1 | 300 | # protect against sloppy code inclusion of all unused subprojects |
michael@340 | 301 | # MSvB In R/D: ce-compat clucene des easing harfbuzz javascriptcore md4 md5 s60 sha1 webkit xorg zlib_dependency.pri |
michael@257 | 302 | (cd src/3rdparty && rm -rf [^cdehjmswxz]* sql* win* zlib zlib.pri) || exit $? |
michael@1 | 303 | |
michael@92 | 304 | # detect which platform for which to build |
michael@1 | 305 | case "%{l_platform -t}" in |
michael@86 | 306 | sun4[uv]-sunos* | amd64-sunos* ) platcomp="solaris-g++-64" ;; |
michael@86 | 307 | i?86-sunos* ) platcomp="solaris-g++" ;; |
michael@86 | 308 | amd64-linux* ) platcomp="linux-g++-64" ;; |
michael@86 | 309 | i?86-linux* ) platcomp="linux-g++" ;; |
michael@86 | 310 | amd64-freebsd* | i?86-freebsd* ) platcomp="freebsd-g++" ;; |
michael@86 | 311 | *-aix* ) platcomp="aix-g++" ;; |
michael@86 | 312 | *-darwin* ) platcomp="macx-g++" ;; |
michael@86 | 313 | *-hpux* ) platcomp="hpux-g++" ;; |
michael@86 | 314 | *-irix* ) platcomp="irix-g++" ;; |
michael@86 | 315 | * ) echo "Platform '%{l_platform -t}' is not supported." 2>&1; exit 1 ;; |
michael@1 | 316 | esac |
michael@1 | 317 | |
michael@92 | 318 | # detect which architecture extensions are available |
michael@92 | 319 | archflags='' |
michael@92 | 320 | case "%{l_platform -t}" in |
michael@92 | 321 | amd64-* ) |
michael@92 | 322 | break |
michael@92 | 323 | ;; |
michael@92 | 324 | * ) |
michael@92 | 325 | archflags='-no-sse2 -no-3dnow' |
michael@92 | 326 | ;; |
michael@92 | 327 | esac |
michael@92 | 328 | |
michael@1 | 329 | %if "%{with_shared}" == "yes" |
michael@1 | 330 | # optional shared build (precedes mandatory static build) |
michael@1 | 331 | echo 'yes' | ./configure \ |
michael@92 | 332 | $archflags \ |
michael@205 | 333 | -opensource \ |
michael@1 | 334 | -prefix %{l_prefix} \ |
michael@1 | 335 | -bindir %{l_prefix}/bin \ |
michael@263 | 336 | -libdir %{l_prefix}/lib/qt/dynamic \ |
michael@1 | 337 | -docdir %{l_prefix}/share/qt/doc \ |
michael@1 | 338 | -headerdir %{l_prefix}/include \ |
michael@86 | 339 | -plugindir %{l_prefix}/lib/qt/plugins \ |
michael@1 | 340 | -datadir %{l_prefix}/share/qt \ |
michael@1 | 341 | -translationdir %{l_prefix}/share/qt/translations \ |
michael@1 | 342 | -sysconfdir %{l_prefix}/etc/qt \ |
michael@1 | 343 | -examplesdir %{l_prefix}/share/qt/examples \ |
michael@1 | 344 | -demosdir %{l_prefix}/share/qt/demos \ |
michael@340 | 345 | %if 0 |
michael@340 | 346 | # Build time Qt definitions should predominate, |
michael@340 | 347 | # otherwise foreign definitions cause errors like: |
michael@340 | 348 | # |
michael@340 | 349 | # g++ -c -I/foreign/include [...] animation/qguivariantanimation.cpp |
michael@340 | 350 | # .moc/release-shared/moc_qnamespace.cpp:426:16: error: 'WA_LockPortraitOrientation' is not a member of 'Qt' |
michael@340 | 351 | # .moc/release-shared/moc_qnamespace.cpp:427:16: error: 'WA_LockLandscapeOrientation' is not a member of 'Qt' |
michael@340 | 352 | # .moc/release-shared/moc_qnamespace.cpp:428:16: error: 'WA_AutoOrientation' is not a member of 'Qt' |
michael@340 | 353 | # .moc/release-shared/moc_qnamespace.cpp:440:16: error: 'AA_S60DisablePartialScreenInputMode' is not a member of 'Qt' |
michael@340 | 354 | # |
michael@340 | 355 | # Other problems include flawed definitions polluting (C|CXX)FLAGS |
michael@340 | 356 | # and overriding the correct definitions in CPPFLAGS. Variables |
michael@340 | 357 | # like QMAKE_(C|CXX)FLAGS exhibit this problem as well. |
michael@340 | 358 | # |
michael@340 | 359 | # The work around is to force a Qt dist include path in (C|CXX)FLAGS. |
michael@340 | 360 | %endif |
michael@340 | 361 | -I$RPM_BUILD_DIR/qt-everywhere-opensource-src-%{version}/include \ |
michael@1 | 362 | -release \ |
michael@1 | 363 | -shared \ |
michael@1 | 364 | -platform $platcomp \ |
michael@340 | 365 | -s60 \ |
michael@340 | 366 | -qt-style-s60 \ |
michael@1 | 367 | -no-sql-ibase \ |
michael@288 | 368 | %if "%{with_glib}" == "yes" |
michael@288 | 369 | -glib \ |
michael@288 | 370 | %else |
michael@288 | 371 | -no-glib \ |
michael@288 | 372 | %endif |
michael@65 | 373 | %if "%{with_mysql}" == "yes" |
michael@3 | 374 | -qt-sql-mysql \ |
michael@86 | 375 | -plugin-sql-mysql \ |
michael@65 | 376 | %else |
michael@65 | 377 | -no-sql-mysql \ |
michael@65 | 378 | %endif |
michael@65 | 379 | %if "%{with_pgsql}" == "yes" |
michael@65 | 380 | -qt-sql-psql \ |
michael@86 | 381 | -plugin-sql-psql \ |
michael@65 | 382 | %else |
michael@65 | 383 | -no-sql-psql \ |
michael@65 | 384 | %endif |
michael@1 | 385 | -no-sql-odbc \ |
michael@65 | 386 | -system-sqlite \ |
michael@65 | 387 | -qt-sql-sqlite \ |
michael@86 | 388 | -plugin-sql-sqlite \ |
michael@1 | 389 | -no-sql-sqlite2 \ |
michael@3 | 390 | -openssl-linked \ |
michael@288 | 391 | -optimized-qmake \ |
michael@1 | 392 | -xmlpatterns \ |
michael@1 | 393 | -svg \ |
michael@215 | 394 | -webkit \ |
michael@1 | 395 | -system-zlib \ |
michael@1 | 396 | -qt-gif \ |
michael@1 | 397 | -system-libpng \ |
michael@1 | 398 | -system-libmng \ |
michael@1 | 399 | -system-libjpeg \ |
michael@1 | 400 | -system-libtiff \ |
michael@1 | 401 | -rpath \ |
michael@1 | 402 | -no-cups \ |
michael@257 | 403 | -iconv \ |
michael@1 | 404 | -pch \ |
michael@1 | 405 | -dbus-linked \ |
michael@1 | 406 | -opengl \ |
michael@1 | 407 | -xrender \ |
michael@1 | 408 | -fontconfig \ |
michael@288 | 409 | -freetype |
michael@1 | 410 | |
michael@86 | 411 | # default options are implicitly used, for example... |
michael@1 | 412 | #-no-fast -exceptions -accessibility -stl -qt3support -nis |
michael@1 | 413 | #-sm -xshape -xinerama -xcursor -xfixes -xrandr -tablet -xkb |
michael@1 | 414 | |
michael@1 | 415 | # carry out shared build procedure |
michael@1 | 416 | ( cd src |
michael@1 | 417 | %{l_make} %{l_mflags -O} \ |
michael@215 | 418 | sub-moc sub-rcc sub-uic sub-uic3 |
michael@1 | 419 | ) || exit $? |
michael@257 | 420 | %{l_make} %{l_mflags -O} \ |
michael@257 | 421 | sub-corelib-make_default-ordered \ |
michael@257 | 422 | sub-xml-make_default-ordered \ |
michael@257 | 423 | sub-network-make_default-ordered \ |
michael@257 | 424 | sub-sql-make_default-ordered \ |
michael@257 | 425 | sub-testlib-make_default-ordered \ |
michael@257 | 426 | sub-dbus-make_default-ordered \ |
michael@257 | 427 | sub-gui-make_default-ordered \ |
michael@257 | 428 | sub-qt3support-make_default-ordered \ |
michael@257 | 429 | sub-opengl-make_default-ordered \ |
michael@257 | 430 | sub-xmlpatterns-make_default-ordered \ |
michael@257 | 431 | sub-multimedia-make_default-ordered \ |
michael@257 | 432 | sub-svg-make_default-ordered \ |
michael@257 | 433 | sub-script-make_default-ordered \ |
michael@257 | 434 | sub-declarative-make_default-ordered \ |
michael@257 | 435 | sub-javascriptcore-make_default-ordered \ |
michael@257 | 436 | sub-webkit-make_default-ordered \ |
michael@257 | 437 | sub-scripttools-make_default-ordered \ |
michael@257 | 438 | sub-plugins-make_default-ordered \ |
michael@257 | 439 | sub-imports-make_default-ordered \ |
michael@257 | 440 | sub-webkitdeclarative-make_default-ordered \ |
michael@257 | 441 | sub-translations-make_default-ordered |
michael@205 | 442 | |
michael@205 | 443 | # arthur plugin requires libQtDesigner |
michael@92 | 444 | ( cd demos |
michael@205 | 445 | ( cd ../tools/designer/src/lib |
michael@263 | 446 | %{l_make} %{l_mflags -O} |
michael@205 | 447 | ) || exit $? |
michael@92 | 448 | %{l_make} %{l_mflags -O} sub-arthurplugin |
michael@92 | 449 | ) || exit $? |
michael@1 | 450 | |
michael@1 | 451 | # cache shared libs and initialize the build configuration, which |
michael@1 | 452 | # would otherwise still contain references to our shared libs build |
michael@263 | 453 | %{l_shtool} mkdir -f -p -m 755 sharbuild/dynamic |
michael@263 | 454 | mv lib/* sharbuild/dynamic/ |
michael@263 | 455 | mv plugins sharbuild/ |
michael@257 | 456 | %{l_make} %{l_mflags} confclean |
michael@1 | 457 | %endif |
michael@1 | 458 | |
michael@1 | 459 | # mandatory static build (follows optional shared build) |
michael@1 | 460 | echo 'yes' | ./configure \ |
michael@92 | 461 | $archflags \ |
michael@205 | 462 | -opensource \ |
michael@1 | 463 | -prefix %{l_prefix} \ |
michael@1 | 464 | -bindir %{l_prefix}/bin \ |
michael@1 | 465 | -libdir %{l_prefix}/lib \ |
michael@1 | 466 | -docdir %{l_prefix}/share/qt/doc \ |
michael@1 | 467 | -headerdir %{l_prefix}/include \ |
michael@86 | 468 | -plugindir %{l_prefix}/lib/qt/plugins \ |
michael@1 | 469 | -datadir %{l_prefix}/share/qt \ |
michael@1 | 470 | -translationdir %{l_prefix}/share/qt/translations \ |
michael@1 | 471 | -sysconfdir %{l_prefix}/etc/qt \ |
michael@1 | 472 | -examplesdir %{l_prefix}/share/qt/examples \ |
michael@1 | 473 | -demosdir %{l_prefix}/share/qt/demos \ |
michael@340 | 474 | %if 0 |
michael@340 | 475 | # Build time Qt definitions should predominate, |
michael@340 | 476 | # otherwise foreign definitions cause errors like: |
michael@340 | 477 | # |
michael@340 | 478 | # g++ -c -I/foreign/include [...] animation/qguivariantanimation.cpp |
michael@340 | 479 | # .moc/release-shared/moc_qnamespace.cpp:426:16: error: 'WA_LockPortraitOrientation' is not a member of 'Qt' |
michael@340 | 480 | # .moc/release-shared/moc_qnamespace.cpp:427:16: error: 'WA_LockLandscapeOrientation' is not a member of 'Qt' |
michael@340 | 481 | # .moc/release-shared/moc_qnamespace.cpp:428:16: error: 'WA_AutoOrientation' is not a member of 'Qt' |
michael@340 | 482 | # .moc/release-shared/moc_qnamespace.cpp:440:16: error: 'AA_S60DisablePartialScreenInputMode' is not a member of 'Qt' |
michael@340 | 483 | # |
michael@340 | 484 | # Other problems include flawed definitions polluting (C|CXX)FLAGS |
michael@340 | 485 | # and overriding the correct definitions in CPPFLAGS. Variables |
michael@340 | 486 | # like QMAKE_(C|CXX)FLAGS exhibit this problem as well. |
michael@340 | 487 | # |
michael@340 | 488 | # The work around is to force a Qt dist include path in (C|CXX)FLAGS. |
michael@340 | 489 | %endif |
michael@340 | 490 | -I$RPM_BUILD_DIR/qt-everywhere-opensource-src-%{version}/include \ |
michael@1 | 491 | -release \ |
michael@1 | 492 | -static \ |
michael@1 | 493 | -platform $platcomp \ |
michael@340 | 494 | -s60 \ |
michael@340 | 495 | -qt-style-s60 \ |
michael@1 | 496 | -no-sql-ibase \ |
michael@288 | 497 | %if "%{with_glib}" == "yes" |
michael@288 | 498 | -glib \ |
michael@288 | 499 | %else |
michael@288 | 500 | -no-glib \ |
michael@288 | 501 | %endif |
michael@65 | 502 | %if "%{with_mysql}" == "yes" |
michael@3 | 503 | -qt-sql-mysql \ |
michael@65 | 504 | %else |
michael@65 | 505 | -no-sql-mysql \ |
michael@65 | 506 | %endif |
michael@65 | 507 | %if "%{with_pgsql}" == "yes" |
michael@65 | 508 | -qt-sql-psql \ |
michael@65 | 509 | %else |
michael@65 | 510 | -no-sql-psql \ |
michael@65 | 511 | %endif |
michael@1 | 512 | -no-sql-odbc \ |
michael@65 | 513 | -system-sqlite \ |
michael@65 | 514 | -qt-sql-sqlite \ |
michael@1 | 515 | -no-sql-sqlite2 \ |
michael@3 | 516 | -openssl-linked \ |
michael@288 | 517 | -optimized-qmake \ |
michael@1 | 518 | -xmlpatterns \ |
michael@1 | 519 | -svg \ |
michael@265 | 520 | -webkit \ |
michael@1 | 521 | -system-zlib \ |
michael@1 | 522 | -qt-gif \ |
michael@1 | 523 | -system-libpng \ |
michael@1 | 524 | -system-libmng \ |
michael@1 | 525 | -system-libjpeg \ |
michael@1 | 526 | -system-libtiff \ |
michael@1 | 527 | -rpath \ |
michael@1 | 528 | -no-cups \ |
michael@257 | 529 | -iconv \ |
michael@1 | 530 | -pch \ |
michael@1 | 531 | -dbus-linked \ |
michael@1 | 532 | -opengl \ |
michael@1 | 533 | -xrender \ |
michael@1 | 534 | -fontconfig \ |
michael@288 | 535 | -freetype |
michael@1 | 536 | |
michael@86 | 537 | # default options are implicitly used, for example... |
michael@1 | 538 | #-no-fast -exceptions -accessibility -stl -qt3support -nis |
michael@1 | 539 | #-sm -xshape -xinerama -xcursor -xfixes -xrandr -tablet -xkb |
michael@1 | 540 | |
michael@1 | 541 | # carry out static build procedure |
michael@258 | 542 | %{l_make} %{l_mflags -O} sub-src |
michael@1 | 543 | %if "%{with_tools}" == "yes" |
michael@258 | 544 | %{l_make} %{l_mflags -O} \ |
michael@258 | 545 | sub-tools-make_default-ordered sub-translations-make_default-ordered |
michael@1 | 546 | %endif |
michael@1 | 547 | %if "%{with_examples}" == "yes" |
michael@1 | 548 | %{l_make} %{l_mflags -O} \ |
michael@1 | 549 | sub-demos-make_default-ordered \ |
michael@1 | 550 | sub-examples-make_default-ordered |
michael@1 | 551 | %endif |
michael@258 | 552 | %if "%{with_tools}" == "yes" |
michael@258 | 553 | %{l_make} %{l_mflags -O} docs |
michael@258 | 554 | %else |
michael@258 | 555 | %if "%{with_examples}" == "yes" |
michael@258 | 556 | %{l_make} %{l_mflags -O} docs |
michael@258 | 557 | %endif |
michael@258 | 558 | %endif |
michael@1 | 559 | |
michael@1 | 560 | %install |
michael@1 | 561 | rm -rf $RPM_BUILD_ROOT |
michael@1 | 562 | |
michael@1 | 563 | # carry out installation procedure |
michael@215 | 564 | targets="sub-tools-bootstrap-install_subtargets-ordered \ |
michael@215 | 565 | sub-moc-install_subtargets-ordered \ |
michael@1 | 566 | sub-rcc-install_subtargets-ordered \ |
michael@1 | 567 | sub-uic-install_subtargets-ordered \ |
michael@1 | 568 | sub-corelib-install_subtargets-ordered \ |
michael@1 | 569 | sub-xml-install_subtargets-ordered \ |
michael@1 | 570 | sub-network-install_subtargets-ordered \ |
michael@257 | 571 | sub-sql-install_subtargets-ordered \ |
michael@257 | 572 | sub-testlib-install_subtargets-ordered \ |
michael@257 | 573 | sub-dbus-install_subtargets-ordered \ |
michael@1 | 574 | sub-gui-install_subtargets-ordered \ |
michael@1 | 575 | sub-qt3support-install_subtargets-ordered \ |
michael@1 | 576 | sub-uic3-install_subtargets-ordered \ |
michael@1 | 577 | sub-opengl-install_subtargets-ordered \ |
michael@1 | 578 | sub-xmlpatterns-install_subtargets-ordered \ |
michael@257 | 579 | sub-multimedia-install_subtargets-ordered \ |
michael@1 | 580 | sub-svg-install_subtargets-ordered \ |
michael@257 | 581 | sub-script-install_subtargets-ordered \ |
michael@257 | 582 | sub-declarative-install_subtargets-ordered \ |
michael@257 | 583 | sub-scripttools-install_subtargets-ordered \ |
michael@257 | 584 | sub-imports-install_subtargets-ordered \ |
michael@257 | 585 | sub-translations-install_subtargets-ordered" |
michael@257 | 586 | |
michael@1 | 587 | %if "%{with_tools}" == "yes" |
michael@258 | 588 | targets="$targets sub-tools-install_subtargets-ordered install_htmldocs install_qchdocs install_docimages" |
michael@1 | 589 | %endif |
michael@1 | 590 | %if "%{with_examples}" == "yes" |
michael@258 | 591 | targets="$targets sub-demos-install_subtargets-ordered sub-examples-install_subtargets-ordered install_htmldocs install_qchdocs install_docimages" |
michael@1 | 592 | %endif |
michael@258 | 593 | targets="$targets install_qmake install_mkspecs" |
michael@1 | 594 | %{l_make} %{l_mflags} $targets INSTALL_ROOT="$RPM_BUILD_ROOT" |
michael@266 | 595 | %{l_shtool} install -c -m 644 \ |
michael@266 | 596 | lib/libjscore.a lib/libjscore.prl \ |
michael@266 | 597 | $RPM_BUILD_ROOT%{l_prefix}/lib/ |
michael@1 | 598 | |
michael@266 | 599 | # correct paths in pkg-config(1) configuration files |
michael@266 | 600 | %{l_shtool} subst \ |
michael@266 | 601 | -e "s;-L[^\t ][^\t ]*qt-everywhere-opensource-src-%{version};-L%{l_prefix};g" \ |
michael@266 | 602 | $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig/* |
michael@266 | 603 | |
michael@266 | 604 | # install static or shared plugins according to user choice |
michael@263 | 605 | %if "%{with_shared}" != "yes" |
michael@263 | 606 | %{l_make} %{l_mflags} sub-plugins-install_subtargets-ordered INSTALL_ROOT="$RPM_BUILD_ROOT" |
michael@263 | 607 | %else |
michael@264 | 608 | %{l_tar} cf - -C sharbuild plugins | %{l_tar} xf - -C $RPM_BUILD_ROOT%{l_prefix}/lib/qt |
michael@263 | 609 | %endif |
michael@266 | 610 | |
michael@1 | 611 | %if "%{with_shared}" == "yes" |
michael@1 | 612 | # install shared libs and symlinks |
michael@1 | 613 | %{l_shtool} mkdir -f -p -m 755 \ |
michael@1 | 614 | $RPM_BUILD_ROOT%{l_prefix}/lib/qt |
michael@264 | 615 | %{l_tar} cf - -C sharbuild dynamic | %{l_tar} xf - -C $RPM_BUILD_ROOT%{l_prefix}/lib/qt |
michael@1 | 616 | |
michael@86 | 617 | # offer limited support of pkg-config(1) for shared libs |
michael@87 | 618 | # substitution unfortunately only handles paths with no whitespace |
michael@86 | 619 | %{l_shtool} subst \ |
michael@266 | 620 | -e "s;-L[^\t ][^\t ]*qt-everywhere-opensource-src-%{version}/lib;-L%{l_prefix}/lib/qt/dynamic;g" \ |
michael@257 | 621 | -e "s;-L[^\t ][^\t ]*qt-everywhere-opensource-src-%{version};-L%{l_prefix};g" \ |
michael@87 | 622 | $RPM_BUILD_ROOT%{l_prefix}/lib/qt/dynamic/pkgconfig/* |
michael@86 | 623 | |
michael@1 | 624 | # explain nonstandard shared library placement |
michael@86 | 625 | ( echo "This OpenPKG Qt build is using the with_shared option." |
michael@86 | 626 | echo "" |
michael@263 | 627 | echo "The directory %{l_prefix}/lib/qt/dynamic contains the" |
michael@263 | 628 | echo "requested shared libraries. Although shared libraries" |
michael@263 | 629 | echo "have been optionally built (see the build time" |
michael@263 | 630 | echo "'with_shared yes' option), static libraries were" |
michael@263 | 631 | echo "built by default as usual, and installed in the" |
michael@86 | 632 | echo "standard library directory %{l_prefix}/lib." |
michael@86 | 633 | echo "" |
michael@86 | 634 | echo "To build applications using shared libraries instead," |
michael@262 | 635 | echo "please direct pkg-config(1) to use the proper definitions" |
michael@86 | 636 | echo "by setting the environment variable PKG_CONFIG_PATH to " |
michael@86 | 637 | echo "%{l_prefix}/lib/qt/dynamic/pkgconfig." |
michael@263 | 638 | echo "" |
michael@263 | 639 | echo "Note: If building via qmake(1), please append" |
michael@263 | 640 | echo " either 'static' or 'shared' to the line" |
michael@263 | 641 | echo " 'CONFIG +=' in the project file (name.pro)." |
michael@263 | 642 | echo " Then execute %{l_prefix}/bin/qmake on this file." |
michael@1 | 643 | ) >$RPM_BUILD_ROOT%{l_prefix}/lib/qt/README |
michael@263 | 644 | %endif |
michael@1 | 645 | |
michael@263 | 646 | # correct temporary runtime link paths (static libs) |
michael@1 | 647 | %{l_shtool} subst \ |
michael@263 | 648 | -e "s;\(QMAKE_PRL_BUILD_DIR[\t ][\t ]*=\).*;\1 /.../qt-everywhere-opensource-src-%{version};" \ |
michael@257 | 649 | -e "s;-L\([\t ]*\)[^\t ][^\t ]*qt-everywhere-opensource-src-%{version}\(/[^\t ][^\t ]*\);-L\1%{l_prefix}\2;g" \ |
michael@263 | 650 | $RPM_BUILD_ROOT%{l_prefix}/lib/*.prl \ |
michael@263 | 651 | $RPM_BUILD_ROOT%{l_prefix}/lib/*.la |
michael@263 | 652 | %if "%{with_shared}" == "yes" |
michael@263 | 653 | # correct temporary runtime link paths (dynamic libs) |
michael@263 | 654 | %{l_shtool} subst \ |
michael@263 | 655 | -e "s;\(QMAKE_PRL_BUILD_DIR[\t ][\t ]*=\).*;\1 /.../qt-everywhere-opensource-src-%{version};" \ |
michael@263 | 656 | -e "s;-L\([\t ]*\)[^\t ][^\t ]*qt-everywhere-opensource-src-%{version}/lib;-L\1%{l_prefix}/lib/qt/dynamic;g" \ |
michael@92 | 657 | $RPM_BUILD_ROOT%{l_prefix}/lib/qt/dynamic/*.prl \ |
michael@92 | 658 | $RPM_BUILD_ROOT%{l_prefix}/lib/qt/dynamic/*.la |
michael@1 | 659 | %endif |
michael@1 | 660 | |
michael@259 | 661 | ## Doesn't work as expected, because RPM reads the --[in|ex]cludedocs |
michael@259 | 662 | ## argument only when installing binary packages, rather than building. |
michael@259 | 663 | #%define _excludedocs 0 |
michael@259 | 664 | #%define _includedocs 1 |
michael@259 | 665 | # echo %{_excludedocs} |
michael@259 | 666 | # echo %{_includedocs} |
michael@259 | 667 | # |
michael@259 | 668 | ## Doesn't work as expected, because it seems that OpenPKG too mercilessly |
michael@340 | 669 | ## removes RPM reading of the %docdir keyword in rpm.patch.feature. |
michael@259 | 670 | # %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |
michael@259 | 671 | # %{l_files_std} \ |
michael@259 | 672 | # '%docdir %{l_prefix}/share/pkg/doc' |
michael@259 | 673 | # |
michael@259 | 674 | ## Doesn't work as expected, because the rpmtool(1) marks |
michael@259 | 675 | ## only einzeln files as documents, skipping directories |
michael@259 | 676 | # %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |
michael@259 | 677 | # %{l_files_std} \ |
michael@259 | 678 | # '%doc %{l_prefix}/share/pkg/doc/doc.txt' |
michael@259 | 679 | # |
michael@1 | 680 | # determine internal file listing |
michael@1 | 681 | %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |
michael@1 | 682 | %{l_files_std} \ |
michael@1 | 683 | '%not %dir %{l_prefix}/lib/pkgconfig' |
michael@1 | 684 | |
michael@1 | 685 | %files -f files |
michael@1 | 686 | |
michael@1 | 687 | %clean |
michael@1 | 688 | rm -rf $RPM_BUILD_ROOT |
michael@1 | 689 |