Fri, 08 Oct 2010 23:24:07 +0200
Update major version and adjust build configuration accordingly.
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@206 | 31 | # FIXME: MSvB: |
michael@257 | 32 | # FIXME: MSvB: -no-webkit added to broken static buildconf |
michael@1 | 33 | |
michael@1 | 34 | # package information |
michael@1 | 35 | Name: qt |
michael@213 | 36 | Summary: Cross Platform Application Framework |
michael@1 | 37 | URL: http://www.trolltech.com/products/qt/ |
michael@1 | 38 | Vendor: Nokia Corporation |
michael@1 | 39 | Packager: Michael Schloh von Bennewitz |
michael@1 | 40 | Distribution: MSvB Recherche Production |
michael@1 | 41 | Class: EVAL |
michael@1 | 42 | Group: Development |
michael@1 | 43 | License: GPL |
michael@257 | 44 | Version: 4.7.0 |
michael@257 | 45 | Release: 20101008 |
michael@1 | 46 | |
michael@1 | 47 | # build options |
michael@1 | 48 | %option with_tools yes |
michael@65 | 49 | %option with_mysql no |
michael@65 | 50 | %option with_pgsql no |
michael@1 | 51 | %option with_shared no |
michael@1 | 52 | %option with_examples no |
michael@1 | 53 | |
michael@1 | 54 | # list of sources |
michael@257 | 55 | Source0: ftp://ftp.qt.nokia.com/qt/source/qt-everywhere-opensource-src-%{version}.tar.gz |
michael@1 | 56 | |
michael@1 | 57 | # build information |
michael@1 | 58 | Prefix: %{l_prefix} |
michael@1 | 59 | BuildRoot: %{l_buildroot} |
michael@4 | 60 | BuildPreReq: OpenPKG, openpkg >= 20050726, make, gcc, pkgconfig |
michael@1 | 61 | PreReq: OpenPKG, openpkg >= 20050726 |
michael@1 | 62 | BuildPreReq: X11, png, mng, jpeg, tiff, mesa, xrender |
michael@1 | 63 | PreReq: X11, png, mng, jpeg, tiff, mesa, xrender |
michael@3 | 64 | BuildPreReq: openssl, zlib, libiconv, sqlite, dbus |
michael@3 | 65 | PreReq: openssl, zlib, libiconv, sqlite, dbus |
michael@1 | 66 | BuildPreReq: fontconfig, freetype |
michael@1 | 67 | PreReq: fontconfig, freetype |
michael@65 | 68 | %if "%{with_mysql}" == "yes" |
michael@65 | 69 | BuildPreReq: mysql |
michael@65 | 70 | PreReq: mysql |
michael@65 | 71 | %endif |
michael@65 | 72 | %if "%{with_pgsql}" == "yes" |
michael@65 | 73 | BuildPreReq: postgresql |
michael@65 | 74 | PreReq: postgresql |
michael@65 | 75 | %endif |
michael@1 | 76 | AutoReq: no |
michael@1 | 77 | AutoReqProv: no |
michael@1 | 78 | Provides: QTSDK |
michael@1 | 79 | |
michael@1 | 80 | %description |
michael@3 | 81 | Qt is a comprehensive C++ framework for cross-platform application |
michael@3 | 82 | development. Using Qt, you can develop applications and user |
michael@3 | 83 | interfaces once, and deploy them across many desktop and embedded |
michael@86 | 84 | operating systems without rewriting the source code. This package |
michael@86 | 85 | distribution builds all modules of the Qt/X11 Open Source Edition. |
michael@1 | 86 | |
michael@1 | 87 | %track |
michael@1 | 88 | prog qt = { |
michael@1 | 89 | version = %{version} |
michael@1 | 90 | url = ftp://ftp.trolltech.com/qt/source/ |
michael@257 | 91 | regex = qt-everywhere-opensource-src-(__VER__)\.tar\.gz |
michael@1 | 92 | } |
michael@1 | 93 | |
michael@1 | 94 | %prep |
michael@1 | 95 | # announce exceptional build requirements |
michael@257 | 96 | ( echo "This package has exceptional build requirements:" |
michael@1 | 97 | echo " qt-%{version}-root (2,5 Go)" |
michael@257 | 98 | echo " qt-everywhere-opensource-src-%{version} (4,5 Go)" |
michael@1 | 99 | echo " qt-%{version}-<date>.<arch>-<os>-<tag>.rpm (1 Go)" |
michael@1 | 100 | echo "Building with no options takes 0,5 hours on a dual core" |
michael@3 | 101 | echo "2 GHz CPU, or 2 hours with all build options enabled." |
michael@1 | 102 | ) | %{l_rpmtool} msg -b -t notice |
michael@1 | 103 | |
michael@257 | 104 | %setup -q -n qt-everywhere-opensource-src-%{version} |
michael@1 | 105 | x11_incdir=`%{l_rc} --query x11_incdir` |
michael@1 | 106 | x11_libdir=`%{l_rc} --query x11_libdir` |
michael@92 | 107 | fontconflibs=`%{l_prefix}/bin/pkg-config --libs-only-l --static fontconfig` |
michael@257 | 108 | lcmslibs=`%{l_prefix}/bin/pkg-config --libs-only-l --static lcms` |
michael@92 | 109 | openssllibs=`%{l_prefix}/bin/pkg-config --libs --static openssl` |
michael@92 | 110 | |
michael@1 | 111 | loclibs='' |
michael@1 | 112 | case "%{l_platform -t}" in |
michael@1 | 113 | *-sunos* ) |
michael@1 | 114 | loclibs='-lsocket -lnsl' |
michael@1 | 115 | ;; |
michael@1 | 116 | esac |
michael@1 | 117 | ( cd mkspecs/qws |
michael@1 | 118 | for plat in freebsd-generic-g++ macx-generic-g++ solaris-generic-g++; |
michael@1 | 119 | do |
michael@1 | 120 | ln -s $plat `echo $plat | %{l_shtool} subst -e 's;\(.*\)-generic-\(.*\);\1-x86-\2;'` |
michael@1 | 121 | done |
michael@1 | 122 | ) || exit $? |
michael@1 | 123 | %{l_shtool} subst \ |
michael@92 | 124 | -e 's;\(-z[\t ][\t ]*\)\([^\t \"][^\t \"]*\);\1"\2";g' \ |
michael@1 | 125 | configure |
michael@1 | 126 | %{l_shtool} subst \ |
michael@257 | 127 | -e 's; *QMakeVar set QMAKE_CFLAGS_X11.*QT_CFLAGS_FONTCONFIG.*;;' \ |
michael@257 | 128 | -e 's; *QMakeVar set QMAKE_LIBS_X11.*QT_LIBS_FONTCONFIG.*;;' \ |
michael@92 | 129 | configure |
michael@92 | 130 | %{l_shtool} subst \ |
michael@92 | 131 | -e "s;\(OPENSSL_LIBS *=\) *-lssl -lcrypto;\1 $openssllibs;" \ |
michael@1 | 132 | configure |
michael@1 | 133 | %{l_shtool} subst \ |
michael@1 | 134 | -e 's;-silent|;-rpath|-silent|;' \ |
michael@1 | 135 | -e 's;\(RPATH_FLAGS="\)\\"\$QT_INSTALL_LIBS\\" \($RPATH_FLAGS"\);\1\2;' \ |
michael@1 | 136 | -e "s;\(echo.*QMAKE_RPATHDIR +=\).*\$QT_INSTALL_LIBS\\\\\"\\\";\1 $x11_libdir\";" \ |
michael@1 | 137 | configure |
michael@257 | 138 | # yes this is needed several times to catch nested occurences of '--cflags' |
michael@257 | 139 | %{l_shtool} subst \ |
michael@257 | 140 | -e 's;\(QT_CFLAGS_[^=][^=]*=.*PKG_CONFIG.*\) --cflags ;\1 --cflags-only-other ;g' \ |
michael@257 | 141 | -e 's;\(QT_CFLAGS_[^=][^=]*=.*PKG_CONFIG.*\) --cflags ;\1 --cflags-only-other ;g' \ |
michael@257 | 142 | configure |
michael@1 | 143 | %{l_shtool} subst \ |
michael@1 | 144 | -e 's;\(TRY_INCLUDEPATHS = \).*\(\$\$INCLUDEPATH\);\1\2;' \ |
michael@1 | 145 | -e 's;/freetype2;/freetype;' \ |
michael@1 | 146 | config.tests/unix/freetype/freetype.pri |
michael@1 | 147 | %{l_shtool} subst \ |
michael@257 | 148 | -e "s;\(LIBS.*=.*-lmng\);\1 $lcmslibs;" \ |
michael@257 | 149 | src/gui/image/qmnghandler.pri |
michael@257 | 150 | %{l_shtool} subst \ |
michael@92 | 151 | -e "s;^\(LIBS += \)-lfreetype -lfontconfig;\1$fontconflibs;" \ |
michael@1 | 152 | config.tests/x11/fontconfig/fontconfig.pro |
michael@213 | 153 | echo 'INCLUDEPATH += /usr/include/wacomcfg' \ |
michael@213 | 154 | >>src/gui/kernel/x11.pri |
michael@257 | 155 | echo "contains(QT_CONFIG, fontconfig) { LIBS += $fontconflibs }" \ |
michael@257 | 156 | >>src/gui/kernel/x11.pri |
michael@257 | 157 | echo "contains(QT_CONFIG, fontconfig) { LIBS += $fontconflibs }" \ |
michael@257 | 158 | >>src/gui/text/text.pri |
michael@257 | 159 | echo "INCLUDEPATH = `%{l_prefix}/bin/pkg-config --cflags-only-I dbus-1 | %{l_shtool} subst -e 's;\-I;;g'`" \ |
michael@257 | 160 | >>config.tests/unix/dbus/dbus.pro |
michael@257 | 161 | echo "LIBS = `%{l_prefix}/bin/pkg-config --libs-only-l --static dbus-1`" \ |
michael@257 | 162 | >>config.tests/unix/dbus/dbus.pro |
michael@1 | 163 | %{l_shtool} subst \ |
michael@257 | 164 | -e "s;\(LIBS.*= -lpq\);\1 `%{l_prefix}/bin/pg_config --libs` $loclibs;" \ |
michael@1 | 165 | config.tests/unix/psql/psql.pro |
michael@1 | 166 | %{l_shtool} subst \ |
michael@257 | 167 | -e 's;^mac[^:][^:]*:\(LIBS\);\1;' \ |
michael@1 | 168 | config.tests/unix/iconv/iconv.pro |
michael@257 | 169 | uiclibs=`%{l_prefix}/bin/pkg-config --libs-only-l --static fontconfig lcms` |
michael@1 | 170 | %{l_shtool} subst \ |
michael@65 | 171 | -e 's;LIBS .*= -lpq$;LIBS += -lpq -lssl -lcrypto;' \ |
michael@65 | 172 | src/sql/drivers/drivers.pri |
michael@65 | 173 | %{l_shtool} subst \ |
michael@86 | 174 | -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@86 | 175 | src/corelib/kernel/kernel.pri \ |
michael@86 | 176 | src/gui/kernel/kernel.pri |
michael@86 | 177 | %{l_shtool} subst \ |
michael@86 | 178 | -e "s;QMAKE_CXXFLAGS \*= \$\$QT_CFLAGS_PSQL;INCPATH += `pg_config --includedir 2>/dev/null | %{l_shtool} subst -e 's;-I;;g'`;g" \ |
michael@86 | 179 | -e "s;QMAKE_CXXFLAGS \*= \$\$QT_CFLAGS_MYSQL;INCPATH += `mysql_config --include 2>/dev/null | %{l_shtool} subst -e 's;-I;;g'`;g" \ |
michael@86 | 180 | -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@257 | 181 | -e 's;!static:\(!isEmpty(QT_LFLAGS_PSQL)\);\1;' \ |
michael@257 | 182 | -e 's;!static:\(LIBS \*= \$\$QT_LFLAGS_PSQL\);\1;' \ |
michael@92 | 183 | src/plugins/sqldrivers/mysql/mysql.pro \ |
michael@92 | 184 | src/plugins/sqldrivers/psql/psql.pro \ |
michael@92 | 185 | src/plugins/sqldrivers/sqlite/sqlite.pro \ |
michael@86 | 186 | src/sql/drivers/drivers.pri |
michael@86 | 187 | %{l_shtool} subst \ |
michael@86 | 188 | -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 | 189 | src/dbus/dbus.pro |
michael@86 | 190 | %{l_shtool} subst \ |
michael@1 | 191 | -e 's;^\(QMAKE_INCDIR[^a-zA-Z0-9=]*=\).*;\1 %{l_prefix}/include;' \ |
michael@1 | 192 | -e 's;^\(QMAKE_LIBDIR[^a-zA-Z0-9=]*=\).*;\1 %{l_prefix}/lib;' \ |
michael@1 | 193 | -e "s;^\(QMAKE_INCDIR_OPENGL[^=]*=\) *\(.*\);\1 %{l_prefix}/include \2;" \ |
michael@86 | 194 | -e "s;^\(QMAKE_LIBDIR_OPENGL[^=]*=\) *\(.*\);\1 %{l_prefix}/lib \2;" \ |
michael@1 | 195 | -e 's;^\(QMAKE_LFLAGS_RELEASE.*\);\1 -s;' \ |
michael@1 | 196 | mkspecs/qws/*/qmake.conf \ |
michael@1 | 197 | mkspecs/*/*.conf |
michael@1 | 198 | %{l_shtool} subst \ |
michael@3 | 199 | -e 's;^\(QMAKE_LIBS +=.*\);\1 -liconv;' \ |
michael@3 | 200 | src/corelib/corelib.pro |
michael@3 | 201 | %{l_shtool} subst \ |
michael@86 | 202 | -e "s;^\(QMAKE_INCDIR_X11[^=]*=\).*;\1 %{l_prefix}/include $x11_incdir;" \ |
michael@86 | 203 | -e "s;^\(QMAKE_LIBDIR_X11[^=]*=\).*;\1 %{l_prefix}/lib $x11_libdir;" \ |
michael@1 | 204 | mkspecs/qws/solaris*/qmake.conf \ |
michael@1 | 205 | mkspecs/solaris*/qmake.conf |
michael@1 | 206 | %{l_shtool} subst \ |
michael@1 | 207 | -e 's; *\.\./3rdparty/freetype/.*;;g' \ |
michael@1 | 208 | -e 's;^\( *contains(QT_CONFIG, freetype) {\);\1 LIBS += -lfreetype;' \ |
michael@1 | 209 | src/gui/text/text.pri |
michael@1 | 210 | %{l_shtool} subst \ |
michael@1 | 211 | -e 's;\(#include *"\)\(tiffio.h"\);\1tiff/\2;' \ |
michael@257 | 212 | src/gui/image/qtiffhandler.cpp |
michael@92 | 213 | %{l_shtool} subst \ |
michael@92 | 214 | -e 's;\(CONFIG[\t ]*+=[\t ]*qt\);\1 x11;' \ |
michael@92 | 215 | tools/qtconfig/qtconfig.pro |
michael@1 | 216 | # for projfile in `find examples/ -name '*.pro' -print`; do |
michael@1 | 217 | # echo 'CONFIG += release' >>$projfile |
michael@1 | 218 | # done |
michael@1 | 219 | |
michael@1 | 220 | %build |
michael@1 | 221 | # protect against sloppy code inclusion of all unused subprojects |
michael@257 | 222 | (cd src/3rdparty && rm -rf [^cdehjmswxz]* sql* win* zlib zlib.pri) || exit $? |
michael@1 | 223 | |
michael@92 | 224 | # detect which platform for which to build |
michael@1 | 225 | case "%{l_platform -t}" in |
michael@86 | 226 | sun4[uv]-sunos* | amd64-sunos* ) platcomp="solaris-g++-64" ;; |
michael@86 | 227 | i?86-sunos* ) platcomp="solaris-g++" ;; |
michael@86 | 228 | amd64-linux* ) platcomp="linux-g++-64" ;; |
michael@86 | 229 | i?86-linux* ) platcomp="linux-g++" ;; |
michael@86 | 230 | amd64-freebsd* | i?86-freebsd* ) platcomp="freebsd-g++" ;; |
michael@86 | 231 | *-aix* ) platcomp="aix-g++" ;; |
michael@86 | 232 | *-darwin* ) platcomp="macx-g++" ;; |
michael@86 | 233 | *-hpux* ) platcomp="hpux-g++" ;; |
michael@86 | 234 | *-irix* ) platcomp="irix-g++" ;; |
michael@86 | 235 | * ) echo "Platform '%{l_platform -t}' is not supported." 2>&1; exit 1 ;; |
michael@1 | 236 | esac |
michael@1 | 237 | |
michael@92 | 238 | # detect which architecture extensions are available |
michael@92 | 239 | archflags='' |
michael@92 | 240 | case "%{l_platform -t}" in |
michael@92 | 241 | amd64-* ) |
michael@92 | 242 | break |
michael@92 | 243 | ;; |
michael@92 | 244 | * ) |
michael@92 | 245 | archflags='-no-sse2 -no-3dnow' |
michael@92 | 246 | ;; |
michael@92 | 247 | esac |
michael@92 | 248 | |
michael@1 | 249 | %if "%{with_shared}" == "yes" |
michael@1 | 250 | # optional shared build (precedes mandatory static build) |
michael@1 | 251 | echo 'yes' | ./configure \ |
michael@92 | 252 | $archflags \ |
michael@205 | 253 | -opensource \ |
michael@1 | 254 | -prefix %{l_prefix} \ |
michael@1 | 255 | -bindir %{l_prefix}/bin \ |
michael@1 | 256 | -libdir %{l_prefix}/lib/qt \ |
michael@1 | 257 | -docdir %{l_prefix}/share/qt/doc \ |
michael@1 | 258 | -headerdir %{l_prefix}/include \ |
michael@86 | 259 | -plugindir %{l_prefix}/lib/qt/plugins \ |
michael@1 | 260 | -datadir %{l_prefix}/share/qt \ |
michael@1 | 261 | -translationdir %{l_prefix}/share/qt/translations \ |
michael@1 | 262 | -sysconfdir %{l_prefix}/etc/qt \ |
michael@1 | 263 | -examplesdir %{l_prefix}/share/qt/examples \ |
michael@1 | 264 | -demosdir %{l_prefix}/share/qt/demos \ |
michael@1 | 265 | -release \ |
michael@1 | 266 | -shared \ |
michael@1 | 267 | -platform $platcomp \ |
michael@1 | 268 | -no-sql-ibase \ |
michael@65 | 269 | %if "%{with_mysql}" == "yes" |
michael@3 | 270 | -qt-sql-mysql \ |
michael@86 | 271 | -plugin-sql-mysql \ |
michael@65 | 272 | %else |
michael@65 | 273 | -no-sql-mysql \ |
michael@65 | 274 | %endif |
michael@65 | 275 | %if "%{with_pgsql}" == "yes" |
michael@65 | 276 | -qt-sql-psql \ |
michael@86 | 277 | -plugin-sql-psql \ |
michael@65 | 278 | %else |
michael@65 | 279 | -no-sql-psql \ |
michael@65 | 280 | %endif |
michael@1 | 281 | -no-sql-odbc \ |
michael@65 | 282 | -system-sqlite \ |
michael@65 | 283 | -qt-sql-sqlite \ |
michael@86 | 284 | -plugin-sql-sqlite \ |
michael@1 | 285 | -no-sql-sqlite2 \ |
michael@3 | 286 | -openssl-linked \ |
michael@1 | 287 | -xmlpatterns \ |
michael@1 | 288 | -svg \ |
michael@215 | 289 | -webkit \ |
michael@1 | 290 | -system-zlib \ |
michael@1 | 291 | -qt-gif \ |
michael@1 | 292 | -system-libpng \ |
michael@1 | 293 | -system-libmng \ |
michael@1 | 294 | -system-libjpeg \ |
michael@1 | 295 | -system-libtiff \ |
michael@1 | 296 | -rpath \ |
michael@1 | 297 | -no-cups \ |
michael@257 | 298 | -iconv \ |
michael@1 | 299 | -pch \ |
michael@1 | 300 | -dbus-linked \ |
michael@1 | 301 | -opengl \ |
michael@1 | 302 | -xrender \ |
michael@1 | 303 | -fontconfig \ |
michael@1 | 304 | -freetype \ |
michael@3 | 305 | -no-glib |
michael@1 | 306 | |
michael@86 | 307 | # default options are implicitly used, for example... |
michael@1 | 308 | #-no-fast -exceptions -accessibility -stl -qt3support -nis |
michael@1 | 309 | #-sm -xshape -xinerama -xcursor -xfixes -xrandr -tablet -xkb |
michael@1 | 310 | |
michael@1 | 311 | # carry out shared build procedure |
michael@1 | 312 | ( cd src |
michael@1 | 313 | %{l_make} %{l_mflags -O} \ |
michael@215 | 314 | sub-moc sub-rcc sub-uic sub-uic3 |
michael@1 | 315 | ) || exit $? |
michael@257 | 316 | %{l_make} %{l_mflags -O} \ |
michael@257 | 317 | sub-corelib-make_default-ordered \ |
michael@257 | 318 | sub-xml-make_default-ordered \ |
michael@257 | 319 | sub-network-make_default-ordered \ |
michael@257 | 320 | sub-sql-make_default-ordered \ |
michael@257 | 321 | sub-testlib-make_default-ordered \ |
michael@257 | 322 | sub-dbus-make_default-ordered \ |
michael@257 | 323 | sub-gui-make_default-ordered \ |
michael@257 | 324 | sub-qt3support-make_default-ordered \ |
michael@257 | 325 | sub-opengl-make_default-ordered \ |
michael@257 | 326 | sub-xmlpatterns-make_default-ordered \ |
michael@257 | 327 | sub-multimedia-make_default-ordered \ |
michael@257 | 328 | sub-svg-make_default-ordered \ |
michael@257 | 329 | sub-script-make_default-ordered \ |
michael@257 | 330 | sub-declarative-make_default-ordered \ |
michael@257 | 331 | sub-javascriptcore-make_default-ordered \ |
michael@257 | 332 | sub-webkit-make_default-ordered \ |
michael@257 | 333 | sub-scripttools-make_default-ordered \ |
michael@257 | 334 | sub-plugins-make_default-ordered \ |
michael@257 | 335 | sub-imports-make_default-ordered \ |
michael@257 | 336 | sub-webkitdeclarative-make_default-ordered \ |
michael@257 | 337 | sub-translations-make_default-ordered |
michael@205 | 338 | |
michael@205 | 339 | # arthur plugin requires libQtDesigner |
michael@92 | 340 | ( cd demos |
michael@205 | 341 | ( cd ../tools/designer/src/lib |
michael@205 | 342 | %{l_make} %{l_mflags -O} staticlib |
michael@205 | 343 | ) || exit $? |
michael@92 | 344 | %{l_make} %{l_mflags -O} sub-arthurplugin |
michael@205 | 345 | ( cd ../tools/designer/src/lib |
michael@205 | 346 | %{l_make} %{l_mflags -O} distclean |
michael@205 | 347 | ) || exit $? |
michael@92 | 348 | ) || exit $? |
michael@1 | 349 | |
michael@1 | 350 | # cache shared libs and initialize the build configuration, which |
michael@1 | 351 | # would otherwise still contain references to our shared libs build |
michael@1 | 352 | %{l_shtool} mkdir -f -p -m 755 dynamic |
michael@1 | 353 | mv lib/* dynamic/ |
michael@257 | 354 | %{l_make} %{l_mflags} confclean |
michael@1 | 355 | %endif |
michael@1 | 356 | |
michael@1 | 357 | # mandatory static build (follows optional shared build) |
michael@1 | 358 | echo 'yes' | ./configure \ |
michael@92 | 359 | $archflags \ |
michael@205 | 360 | -opensource \ |
michael@1 | 361 | -prefix %{l_prefix} \ |
michael@1 | 362 | -bindir %{l_prefix}/bin \ |
michael@1 | 363 | -libdir %{l_prefix}/lib \ |
michael@1 | 364 | -docdir %{l_prefix}/share/qt/doc \ |
michael@1 | 365 | -headerdir %{l_prefix}/include \ |
michael@86 | 366 | -plugindir %{l_prefix}/lib/qt/plugins \ |
michael@1 | 367 | -datadir %{l_prefix}/share/qt \ |
michael@1 | 368 | -translationdir %{l_prefix}/share/qt/translations \ |
michael@1 | 369 | -sysconfdir %{l_prefix}/etc/qt \ |
michael@1 | 370 | -examplesdir %{l_prefix}/share/qt/examples \ |
michael@1 | 371 | -demosdir %{l_prefix}/share/qt/demos \ |
michael@1 | 372 | -release \ |
michael@1 | 373 | -static \ |
michael@1 | 374 | -platform $platcomp \ |
michael@1 | 375 | -no-sql-ibase \ |
michael@65 | 376 | %if "%{with_mysql}" == "yes" |
michael@3 | 377 | -qt-sql-mysql \ |
michael@65 | 378 | %else |
michael@65 | 379 | -no-sql-mysql \ |
michael@65 | 380 | %endif |
michael@65 | 381 | %if "%{with_pgsql}" == "yes" |
michael@65 | 382 | -qt-sql-psql \ |
michael@65 | 383 | %else |
michael@65 | 384 | -no-sql-psql \ |
michael@65 | 385 | %endif |
michael@1 | 386 | -no-sql-odbc \ |
michael@65 | 387 | -system-sqlite \ |
michael@65 | 388 | -qt-sql-sqlite \ |
michael@1 | 389 | -no-sql-sqlite2 \ |
michael@3 | 390 | -openssl-linked \ |
michael@1 | 391 | -xmlpatterns \ |
michael@1 | 392 | -svg \ |
michael@257 | 393 | -no-webkit \ |
michael@1 | 394 | -system-zlib \ |
michael@1 | 395 | -qt-gif \ |
michael@1 | 396 | -system-libpng \ |
michael@1 | 397 | -system-libmng \ |
michael@1 | 398 | -system-libjpeg \ |
michael@1 | 399 | -system-libtiff \ |
michael@1 | 400 | -rpath \ |
michael@1 | 401 | -no-cups \ |
michael@257 | 402 | -iconv \ |
michael@1 | 403 | -pch \ |
michael@1 | 404 | -dbus-linked \ |
michael@1 | 405 | -opengl \ |
michael@1 | 406 | -xrender \ |
michael@1 | 407 | -fontconfig \ |
michael@1 | 408 | -freetype \ |
michael@3 | 409 | -no-glib |
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 static build procedure |
michael@257 | 416 | %{l_make} %{l_mflags -O} sub-src sub-translations |
michael@1 | 417 | %if "%{with_tools}" == "yes" |
michael@257 | 418 | %{l_make} %{l_mflags -O} sub-tools-make_default-ordered |
michael@1 | 419 | %endif |
michael@1 | 420 | %if "%{with_examples}" == "yes" |
michael@1 | 421 | %{l_make} %{l_mflags -O} \ |
michael@1 | 422 | sub-demos-make_default-ordered \ |
michael@1 | 423 | sub-examples-make_default-ordered |
michael@1 | 424 | %endif |
michael@1 | 425 | |
michael@1 | 426 | %install |
michael@1 | 427 | rm -rf $RPM_BUILD_ROOT |
michael@1 | 428 | |
michael@1 | 429 | # carry out installation procedure |
michael@215 | 430 | targets="sub-tools-bootstrap-install_subtargets-ordered \ |
michael@215 | 431 | sub-moc-install_subtargets-ordered \ |
michael@1 | 432 | sub-rcc-install_subtargets-ordered \ |
michael@1 | 433 | sub-uic-install_subtargets-ordered \ |
michael@1 | 434 | sub-corelib-install_subtargets-ordered \ |
michael@1 | 435 | sub-xml-install_subtargets-ordered \ |
michael@1 | 436 | sub-network-install_subtargets-ordered \ |
michael@257 | 437 | sub-sql-install_subtargets-ordered \ |
michael@257 | 438 | sub-testlib-install_subtargets-ordered \ |
michael@257 | 439 | sub-dbus-install_subtargets-ordered \ |
michael@1 | 440 | sub-gui-install_subtargets-ordered \ |
michael@1 | 441 | sub-qt3support-install_subtargets-ordered \ |
michael@1 | 442 | sub-uic3-install_subtargets-ordered \ |
michael@1 | 443 | sub-opengl-install_subtargets-ordered \ |
michael@1 | 444 | sub-xmlpatterns-install_subtargets-ordered \ |
michael@257 | 445 | sub-multimedia-install_subtargets-ordered \ |
michael@1 | 446 | sub-svg-install_subtargets-ordered \ |
michael@257 | 447 | sub-script-install_subtargets-ordered \ |
michael@257 | 448 | sub-declarative-install_subtargets-ordered \ |
michael@257 | 449 | sub-scripttools-install_subtargets-ordered \ |
michael@257 | 450 | sub-plugins-install_subtargets-ordered \ |
michael@257 | 451 | sub-imports-install_subtargets-ordered \ |
michael@257 | 452 | sub-translations-install_subtargets-ordered" |
michael@257 | 453 | |
michael@1 | 454 | %if "%{with_tools}" == "yes" |
michael@215 | 455 | targets="$targets sub-tools-install_subtargets-ordered sub-tools-qdoc3-install_subtargets-ordered" |
michael@1 | 456 | %endif |
michael@1 | 457 | %if "%{with_examples}" == "yes" |
michael@1 | 458 | targets="$targets sub-demos-install_subtargets-ordered sub-examples-install_subtargets-ordered" |
michael@1 | 459 | %endif |
michael@215 | 460 | targets="$targets install_htmldocs install_qchdocs install_docimages install_qmake install_mkspecs" |
michael@1 | 461 | %{l_make} %{l_mflags} $targets INSTALL_ROOT="$RPM_BUILD_ROOT" |
michael@1 | 462 | |
michael@1 | 463 | %if "%{with_shared}" == "yes" |
michael@257 | 464 | # # install components only built against shared libs |
michael@257 | 465 | # targets="$targets irgend-was-webkit_subtargets-ordered" |
michael@257 | 466 | |
michael@1 | 467 | # install shared libs and symlinks |
michael@1 | 468 | %{l_shtool} mkdir -f -p -m 755 \ |
michael@1 | 469 | $RPM_BUILD_ROOT%{l_prefix}/lib/qt |
michael@1 | 470 | %{l_tar} cf - dynamic | %{l_tar} xf - -C $RPM_BUILD_ROOT%{l_prefix}/lib/qt |
michael@1 | 471 | |
michael@86 | 472 | # offer limited support of pkg-config(1) for shared libs |
michael@87 | 473 | # substitution unfortunately only handles paths with no whitespace |
michael@86 | 474 | %{l_shtool} subst \ |
michael@257 | 475 | -e "s;-L[^\t ][^\t ]*qt-everywhere-opensource-src-%{version};-L%{l_prefix};g" \ |
michael@87 | 476 | $RPM_BUILD_ROOT%{l_prefix}/lib/qt/dynamic/pkgconfig/* |
michael@86 | 477 | |
michael@1 | 478 | # explain nonstandard shared library placement |
michael@86 | 479 | ( echo "This OpenPKG Qt build is using the with_shared option." |
michael@86 | 480 | echo "" |
michael@86 | 481 | echo "This directory contains optional shared libraries as" |
michael@1 | 482 | echo "defined by the OpenPKG build specification. Although" |
michael@86 | 483 | echo "shared libraries have been optionally built (see the" |
michael@1 | 484 | echo "build time 'with_shared yes' option), static libraries" |
michael@86 | 485 | echo "were built by default as usual, and installed in the" |
michael@86 | 486 | echo "standard library directory %{l_prefix}/lib." |
michael@86 | 487 | echo "" |
michael@86 | 488 | echo "To build applications using shared libraries instead," |
michael@86 | 489 | echo "please direct pkg-config(1) to use the properdefinitions" |
michael@86 | 490 | echo "by setting the environment variable PKG_CONFIG_PATH to " |
michael@86 | 491 | echo "%{l_prefix}/lib/qt/dynamic/pkgconfig." |
michael@1 | 492 | ) >$RPM_BUILD_ROOT%{l_prefix}/lib/qt/README |
michael@1 | 493 | |
michael@1 | 494 | # remove temporary dynamic link paths |
michael@1 | 495 | %{l_shtool} subst \ |
michael@257 | 496 | -e "s;-L\([\t ]*\)[^\t ][^\t ]*qt-everywhere-opensource-src-%{version}\(/[^\t ][^\t ]*\);-L\1%{l_prefix}\2;g" \ |
michael@257 | 497 | -e "s;\([\t ][\t ]*\)[^\t ][^\t ]*\(qt-everywhere-opensource-src-%{version}.*\);\1/tmp/\2;" \ |
michael@92 | 498 | $RPM_BUILD_ROOT%{l_prefix}/lib/qt/dynamic/*.prl \ |
michael@92 | 499 | $RPM_BUILD_ROOT%{l_prefix}/lib/qt/dynamic/*.la |
michael@1 | 500 | %endif |
michael@1 | 501 | |
michael@1 | 502 | # determine internal file listing |
michael@1 | 503 | %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |
michael@1 | 504 | %{l_files_std} \ |
michael@86 | 505 | '%doc %{l_prefix}/share/qt/doc/*/*' \ |
michael@1 | 506 | '%not %dir %{l_prefix}/lib/pkgconfig' |
michael@1 | 507 | |
michael@1 | 508 | %files -f files |
michael@1 | 509 | |
michael@1 | 510 | %clean |
michael@1 | 511 | rm -rf $RPM_BUILD_ROOT |
michael@1 | 512 |