Wed, 14 Jan 2009 15:59:12 +0100
Correct and improve many buildconf and code logic blocks. In particular:
1. Document potential problems building with current binutils releases.
2. Document the flawed webkit and explain its temporary exclusion.
3. Document the edition of Qt which is built and installed.
4. Remove the Solaris x11_supdir logic as it is no longer found.
5. Correct several .pr[io] files including QMAKE_CXXFLAGS and INCPATH,
which previously caused preexisting Qt installations to deliver
erroneous old include and library logic instead of relying on
that of the currently building package. -I/opkg/include is now
placed at the end of the compile statements.
6. Don't trust the QMAKE_[INC|LIB]DIR_X11 identifiers in qmake.conf.
7. Allow more 64-bit builds and more properly identify the platform.
8. Place plugins (which are shared objects) in lib instead of share.
9. Build components as plugins when possible if with_shared is enabled.
10. Translate German text to English to be more consistent.
11. Instead of removing the pkgconfig directory of with_shared builds,
place it in a child directory useful for shared building.
12. Document the nonstandard shared build directory structure,
including using the hidden pkgconfig directory (PKG_CONFIG_PATH.)
13. Change %doc to specify files rather than directories in the RPM DB.
michael@1 | 1 | ## |
michael@1 | 2 | ## qt.spec -- OpenPKG RPM Specification |
michael@29 | 3 | ## Copyright (c) 2009 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@86 | 31 | # FIXME: MSvB: |
michael@86 | 32 | # FIXME: MSvB: The webkit is flawed in Qt 4.4.3, and has been disabled |
michael@86 | 33 | # FIXME: MSvB: in this build until a new release corrects the problem. |
michael@1 | 34 | |
michael@1 | 35 | # package information |
michael@1 | 36 | Name: qt |
michael@1 | 37 | Summary: Cross-platform Application Framework |
michael@1 | 38 | URL: http://www.trolltech.com/products/qt/ |
michael@1 | 39 | Vendor: Nokia Corporation |
michael@1 | 40 | Packager: Michael Schloh von Bennewitz |
michael@1 | 41 | Distribution: MSvB Recherche Production |
michael@1 | 42 | Class: EVAL |
michael@1 | 43 | Group: Development |
michael@1 | 44 | License: GPL |
michael@1 | 45 | Version: 4.4.3 |
michael@65 | 46 | Release: 20090106 |
michael@1 | 47 | |
michael@1 | 48 | # build options |
michael@1 | 49 | %option with_tools yes |
michael@65 | 50 | %option with_mysql no |
michael@65 | 51 | %option with_pgsql no |
michael@1 | 52 | %option with_shared no |
michael@1 | 53 | %option with_examples no |
michael@1 | 54 | |
michael@1 | 55 | # list of sources |
michael@1 | 56 | Source0: ftp://ftp.trolltech.com/qt/source/qt-x11-opensource-src-%{version}.tar.gz |
michael@1 | 57 | |
michael@1 | 58 | # build information |
michael@1 | 59 | Prefix: %{l_prefix} |
michael@1 | 60 | BuildRoot: %{l_buildroot} |
michael@4 | 61 | BuildPreReq: OpenPKG, openpkg >= 20050726, make, gcc, pkgconfig |
michael@1 | 62 | PreReq: OpenPKG, openpkg >= 20050726 |
michael@1 | 63 | BuildPreReq: X11, png, mng, jpeg, tiff, mesa, xrender |
michael@1 | 64 | PreReq: X11, png, mng, jpeg, tiff, mesa, xrender |
michael@3 | 65 | BuildPreReq: openssl, zlib, libiconv, sqlite, dbus |
michael@3 | 66 | PreReq: openssl, zlib, libiconv, sqlite, dbus |
michael@1 | 67 | BuildPreReq: fontconfig, freetype |
michael@1 | 68 | PreReq: fontconfig, freetype |
michael@65 | 69 | %if "%{with_mysql}" == "yes" |
michael@65 | 70 | BuildPreReq: mysql |
michael@65 | 71 | PreReq: mysql |
michael@65 | 72 | %endif |
michael@65 | 73 | %if "%{with_pgsql}" == "yes" |
michael@65 | 74 | BuildPreReq: postgresql |
michael@65 | 75 | PreReq: postgresql |
michael@65 | 76 | %endif |
michael@1 | 77 | AutoReq: no |
michael@1 | 78 | AutoReqProv: no |
michael@1 | 79 | Provides: QTSDK |
michael@1 | 80 | |
michael@1 | 81 | %description |
michael@3 | 82 | Qt is a comprehensive C++ framework for cross-platform application |
michael@3 | 83 | development. Using Qt, you can develop applications and user |
michael@3 | 84 | interfaces once, and deploy them across many desktop and embedded |
michael@86 | 85 | operating systems without rewriting the source code. This package |
michael@86 | 86 | distribution builds all modules of the Qt/X11 Open Source Edition. |
michael@1 | 87 | |
michael@1 | 88 | %track |
michael@1 | 89 | prog qt = { |
michael@1 | 90 | version = %{version} |
michael@1 | 91 | url = ftp://ftp.trolltech.com/qt/source/ |
michael@1 | 92 | regex = qt-x11-opensource-src-(__VER__)\.tar\.gz |
michael@1 | 93 | } |
michael@1 | 94 | |
michael@1 | 95 | %prep |
michael@1 | 96 | # announce exceptional build requirements |
michael@1 | 97 | ( echo "This package has exceptional storage requirements:" |
michael@1 | 98 | echo " qt-%{version}-root (2,5 Go)" |
michael@1 | 99 | echo " qt-x11-opensource-src-%{version} (4,5 Go)" |
michael@1 | 100 | echo " qt-%{version}-<date>.<arch>-<os>-<tag>.rpm (1 Go)" |
michael@1 | 101 | echo "Building with no options takes 0,5 hours on a dual core" |
michael@3 | 102 | echo "2 GHz CPU, or 2 hours with all build options enabled." |
michael@1 | 103 | ) | %{l_rpmtool} msg -b -t notice |
michael@1 | 104 | |
michael@1 | 105 | %setup -q -n qt-x11-opensource-src-%{version} |
michael@1 | 106 | x11_incdir=`%{l_rc} --query x11_incdir` |
michael@1 | 107 | x11_libdir=`%{l_rc} --query x11_libdir` |
michael@1 | 108 | fontconf=`%{l_prefix}/bin/pkg-config --libs-only-l --static fontconfig` |
michael@1 | 109 | loclibs='' |
michael@1 | 110 | case "%{l_platform -t}" in |
michael@1 | 111 | *-sunos* ) |
michael@1 | 112 | loclibs='-lsocket -lnsl' |
michael@1 | 113 | ;; |
michael@1 | 114 | esac |
michael@1 | 115 | ( cd mkspecs/qws |
michael@1 | 116 | for plat in freebsd-generic-g++ macx-generic-g++ solaris-generic-g++; |
michael@1 | 117 | do |
michael@1 | 118 | ln -s $plat `echo $plat | %{l_shtool} subst -e 's;\(.*\)-generic-\(.*\);\1-x86-\2;'` |
michael@1 | 119 | done |
michael@1 | 120 | ) || exit $? |
michael@1 | 121 | %{l_shtool} subst \ |
michael@1 | 122 | -e 's;\(-z[ \t][ \t]*\)\([^ \t\"][^ \t\"]*\);\1"\2";g' \ |
michael@1 | 123 | configure |
michael@1 | 124 | %{l_shtool} subst \ |
michael@1 | 125 | -e "s;\(QMAKE_LIBS_X11.*\)-lfreetype -lfontconfig;\1$fontconf;" \ |
michael@1 | 126 | configure |
michael@1 | 127 | %{l_shtool} subst \ |
michael@1 | 128 | -e 's;-silent|;-rpath|-silent|;' \ |
michael@1 | 129 | -e 's;\(RPATH_FLAGS="\)\\"\$QT_INSTALL_LIBS\\" \($RPATH_FLAGS"\);\1\2;' \ |
michael@1 | 130 | -e "s;\(echo.*QMAKE_RPATHDIR +=\).*\$QT_INSTALL_LIBS\\\\\"\\\";\1 $x11_libdir\";" \ |
michael@1 | 131 | configure |
michael@1 | 132 | %{l_shtool} subst \ |
michael@1 | 133 | -e 's;\(TRY_INCLUDEPATHS = \).*\(\$\$INCLUDEPATH\);\1\2;' \ |
michael@1 | 134 | -e 's;/freetype2;/freetype;' \ |
michael@1 | 135 | config.tests/unix/freetype/freetype.pri |
michael@1 | 136 | %{l_shtool} subst \ |
michael@1 | 137 | -e "s;^\(LIBS += \)-lfreetype -lfontconfig;\1$fontconf;" \ |
michael@1 | 138 | config.tests/x11/fontconfig/fontconfig.pro |
michael@1 | 139 | %{l_shtool} subst \ |
michael@1 | 140 | -e "s;\(LIBS += -lpq\);\1 -lssl -lcrypto $loclibs;" \ |
michael@1 | 141 | config.tests/unix/psql/psql.pro |
michael@1 | 142 | %{l_shtool} subst \ |
michael@1 | 143 | -e 's;^mac:\(LIBS\);\1;' \ |
michael@1 | 144 | config.tests/unix/iconv/iconv.pro |
michael@1 | 145 | %{l_shtool} subst \ |
michael@65 | 146 | -e 's;LIBS .*= -lpq$;LIBS += -lpq -lssl -lcrypto;' \ |
michael@65 | 147 | src/sql/drivers/drivers.pri |
michael@65 | 148 | %{l_shtool} subst \ |
michael@86 | 149 | -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 | 150 | src/corelib/kernel/kernel.pri \ |
michael@86 | 151 | src/gui/kernel/kernel.pri |
michael@86 | 152 | %{l_shtool} subst \ |
michael@86 | 153 | -e "s;QMAKE_CXXFLAGS \*= \$\$QT_CFLAGS_PSQL;INCPATH += `pg_config --includedir 2>/dev/null | %{l_shtool} subst -e 's;-I;;g'`;g" \ |
michael@86 | 154 | -e "s;QMAKE_CXXFLAGS \*= \$\$QT_CFLAGS_MYSQL;INCPATH += `mysql_config --include 2>/dev/null | %{l_shtool} subst -e 's;-I;;g'`;g" \ |
michael@86 | 155 | -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@86 | 156 | src/sql/drivers/drivers.pri |
michael@86 | 157 | %{l_shtool} subst \ |
michael@86 | 158 | -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 | 159 | src/dbus/dbus.pro |
michael@86 | 160 | %{l_shtool} subst \ |
michael@1 | 161 | -e 's;^\(QMAKE_INCDIR[^a-zA-Z0-9=]*=\).*;\1 %{l_prefix}/include;' \ |
michael@1 | 162 | -e 's;^\(QMAKE_LIBDIR[^a-zA-Z0-9=]*=\).*;\1 %{l_prefix}/lib;' \ |
michael@1 | 163 | -e "s;^\(QMAKE_INCDIR_OPENGL[^=]*=\) *\(.*\);\1 %{l_prefix}/include \2;" \ |
michael@86 | 164 | -e "s;^\(QMAKE_LIBDIR_OPENGL[^=]*=\) *\(.*\);\1 %{l_prefix}/lib \2;" \ |
michael@1 | 165 | -e 's;^\(QMAKE_LFLAGS_RELEASE.*\);\1 -s;' \ |
michael@1 | 166 | mkspecs/qws/*/qmake.conf \ |
michael@1 | 167 | mkspecs/*/*.conf |
michael@1 | 168 | %{l_shtool} subst \ |
michael@3 | 169 | -e 's;^\(QMAKE_LIBS +=.*\);\1 -liconv;' \ |
michael@3 | 170 | src/corelib/corelib.pro |
michael@3 | 171 | %{l_shtool} subst \ |
michael@86 | 172 | -e "s;^\(QMAKE_INCDIR_X11[^=]*=\).*;\1 %{l_prefix}/include $x11_incdir;" \ |
michael@86 | 173 | -e "s;^\(QMAKE_LIBDIR_X11[^=]*=\).*;\1 %{l_prefix}/lib $x11_libdir;" \ |
michael@1 | 174 | mkspecs/qws/solaris*/qmake.conf \ |
michael@1 | 175 | mkspecs/solaris*/qmake.conf |
michael@1 | 176 | %{l_shtool} subst \ |
michael@1 | 177 | -e 's; *\.\./3rdparty/freetype/.*;;g' \ |
michael@1 | 178 | -e 's;^\( *contains(QT_CONFIG, freetype) {\);\1 LIBS += -lfreetype;' \ |
michael@1 | 179 | src/gui/text/text.pri |
michael@1 | 180 | %{l_shtool} subst \ |
michael@1 | 181 | -e 's;\(#include *"\)\(tiffio.h"\);\1tiff/\2;' \ |
michael@1 | 182 | src/plugins/imageformats/tiff/qtiffhandler.cpp |
michael@1 | 183 | # for projfile in `find examples/ -name '*.pro' -print`; do |
michael@1 | 184 | # echo 'CONFIG += release' >>$projfile |
michael@1 | 185 | # done |
michael@1 | 186 | |
michael@1 | 187 | %build |
michael@1 | 188 | # protect against sloppy code inclusion of all unused subprojects |
michael@1 | 189 | rm -rf src/3rdparty/[^cdhmsw]* src/3rdparty/sql* src/3rdparty/win* |
michael@1 | 190 | |
michael@1 | 191 | case "%{l_platform -t}" in |
michael@86 | 192 | sun4[uv]-sunos* | amd64-sunos* ) platcomp="solaris-g++-64" ;; |
michael@86 | 193 | i?86-sunos* ) platcomp="solaris-g++" ;; |
michael@86 | 194 | amd64-linux* ) platcomp="linux-g++-64" ;; |
michael@86 | 195 | i?86-linux* ) platcomp="linux-g++" ;; |
michael@86 | 196 | amd64-freebsd* | i?86-freebsd* ) platcomp="freebsd-g++" ;; |
michael@86 | 197 | *-aix* ) platcomp="aix-g++" ;; |
michael@86 | 198 | *-darwin* ) platcomp="macx-g++" ;; |
michael@86 | 199 | *-hpux* ) platcomp="hpux-g++" ;; |
michael@86 | 200 | *-irix* ) platcomp="irix-g++" ;; |
michael@86 | 201 | * ) echo "Platform '%{l_platform -t}' is not supported." 2>&1; exit 1 ;; |
michael@1 | 202 | esac |
michael@1 | 203 | |
michael@1 | 204 | %if "%{with_shared}" == "yes" |
michael@1 | 205 | # optional shared build (precedes mandatory static build) |
michael@1 | 206 | echo 'yes' | ./configure \ |
michael@1 | 207 | -prefix %{l_prefix} \ |
michael@1 | 208 | -bindir %{l_prefix}/bin \ |
michael@1 | 209 | -libdir %{l_prefix}/lib/qt \ |
michael@1 | 210 | -docdir %{l_prefix}/share/qt/doc \ |
michael@1 | 211 | -headerdir %{l_prefix}/include \ |
michael@86 | 212 | -plugindir %{l_prefix}/lib/qt/plugins \ |
michael@1 | 213 | -datadir %{l_prefix}/share/qt \ |
michael@1 | 214 | -translationdir %{l_prefix}/share/qt/translations \ |
michael@1 | 215 | -sysconfdir %{l_prefix}/etc/qt \ |
michael@1 | 216 | -examplesdir %{l_prefix}/share/qt/examples \ |
michael@1 | 217 | -demosdir %{l_prefix}/share/qt/demos \ |
michael@1 | 218 | -release \ |
michael@1 | 219 | -shared \ |
michael@1 | 220 | -platform $platcomp \ |
michael@1 | 221 | -no-sql-ibase \ |
michael@65 | 222 | %if "%{with_mysql}" == "yes" |
michael@3 | 223 | -qt-sql-mysql \ |
michael@86 | 224 | -plugin-sql-mysql \ |
michael@65 | 225 | %else |
michael@65 | 226 | -no-sql-mysql \ |
michael@65 | 227 | %endif |
michael@65 | 228 | %if "%{with_pgsql}" == "yes" |
michael@65 | 229 | -qt-sql-psql \ |
michael@86 | 230 | -plugin-sql-psql \ |
michael@65 | 231 | %else |
michael@65 | 232 | -no-sql-psql \ |
michael@65 | 233 | %endif |
michael@1 | 234 | -no-sql-odbc \ |
michael@65 | 235 | -system-sqlite \ |
michael@65 | 236 | -qt-sql-sqlite \ |
michael@86 | 237 | -plugin-sql-sqlite \ |
michael@1 | 238 | -no-sql-sqlite2 \ |
michael@3 | 239 | -openssl-linked \ |
michael@1 | 240 | -xmlpatterns \ |
michael@1 | 241 | -svg \ |
michael@1 | 242 | -no-webkit \ |
michael@1 | 243 | -system-zlib \ |
michael@1 | 244 | -qt-gif \ |
michael@1 | 245 | -system-libpng \ |
michael@1 | 246 | -system-libmng \ |
michael@1 | 247 | -system-libjpeg \ |
michael@1 | 248 | -system-libtiff \ |
michael@1 | 249 | -rpath \ |
michael@1 | 250 | -no-cups \ |
michael@1 | 251 | -iconv \ |
michael@1 | 252 | -pch \ |
michael@1 | 253 | -dbus-linked \ |
michael@1 | 254 | -opengl \ |
michael@1 | 255 | -xrender \ |
michael@1 | 256 | -fontconfig \ |
michael@1 | 257 | -freetype \ |
michael@3 | 258 | -no-glib |
michael@1 | 259 | |
michael@86 | 260 | # default options are implicitly used, for example... |
michael@1 | 261 | #-no-fast -exceptions -accessibility -stl -qt3support -nis |
michael@1 | 262 | #-sm -xshape -xinerama -xcursor -xfixes -xrandr -tablet -xkb |
michael@1 | 263 | |
michael@1 | 264 | # carry out shared build procedure |
michael@1 | 265 | ( cd src |
michael@1 | 266 | %{l_make} %{l_mflags -O} \ |
michael@1 | 267 | sub-moc sub-rcc sub-uic |
michael@1 | 268 | %{l_make} %{l_mflags -O} \ |
michael@1 | 269 | sub-corelib sub-xml sub-network sub-gui sub-sql \ |
michael@1 | 270 | sub-script sub-testlib sub-qt3support sub-dbus \ |
michael@1 | 271 | sub-opengl sub-xmlpatterns sub-svg sub-plugins |
michael@1 | 272 | ) || exit $? |
michael@1 | 273 | |
michael@1 | 274 | # cache shared libs and initialize the build configuration, which |
michael@1 | 275 | # would otherwise still contain references to our shared libs build |
michael@1 | 276 | %{l_shtool} mkdir -f -p -m 755 dynamic |
michael@1 | 277 | mv lib/* dynamic/ |
michael@1 | 278 | ( cd qmake |
michael@1 | 279 | %{l_make} %{l_mflags} distclean |
michael@1 | 280 | ) || exit $? |
michael@1 | 281 | rm -f .qmake.cache |
michael@1 | 282 | %endif |
michael@1 | 283 | |
michael@1 | 284 | # mandatory static build (follows optional shared build) |
michael@1 | 285 | echo 'yes' | ./configure \ |
michael@1 | 286 | -prefix %{l_prefix} \ |
michael@1 | 287 | -bindir %{l_prefix}/bin \ |
michael@1 | 288 | -libdir %{l_prefix}/lib \ |
michael@1 | 289 | -docdir %{l_prefix}/share/qt/doc \ |
michael@1 | 290 | -headerdir %{l_prefix}/include \ |
michael@86 | 291 | -plugindir %{l_prefix}/lib/qt/plugins \ |
michael@1 | 292 | -datadir %{l_prefix}/share/qt \ |
michael@1 | 293 | -translationdir %{l_prefix}/share/qt/translations \ |
michael@1 | 294 | -sysconfdir %{l_prefix}/etc/qt \ |
michael@1 | 295 | -examplesdir %{l_prefix}/share/qt/examples \ |
michael@1 | 296 | -demosdir %{l_prefix}/share/qt/demos \ |
michael@1 | 297 | -release \ |
michael@1 | 298 | -static \ |
michael@1 | 299 | -platform $platcomp \ |
michael@1 | 300 | -no-sql-ibase \ |
michael@65 | 301 | %if "%{with_mysql}" == "yes" |
michael@3 | 302 | -qt-sql-mysql \ |
michael@65 | 303 | %else |
michael@65 | 304 | -no-sql-mysql \ |
michael@65 | 305 | %endif |
michael@65 | 306 | %if "%{with_pgsql}" == "yes" |
michael@65 | 307 | -qt-sql-psql \ |
michael@65 | 308 | %else |
michael@65 | 309 | -no-sql-psql \ |
michael@65 | 310 | %endif |
michael@1 | 311 | -no-sql-odbc \ |
michael@65 | 312 | -system-sqlite \ |
michael@65 | 313 | -qt-sql-sqlite \ |
michael@1 | 314 | -no-sql-sqlite2 \ |
michael@3 | 315 | -openssl-linked \ |
michael@1 | 316 | -xmlpatterns \ |
michael@1 | 317 | -svg \ |
michael@1 | 318 | -no-webkit \ |
michael@1 | 319 | -system-zlib \ |
michael@1 | 320 | -qt-gif \ |
michael@1 | 321 | -system-libpng \ |
michael@1 | 322 | -system-libmng \ |
michael@1 | 323 | -system-libjpeg \ |
michael@1 | 324 | -system-libtiff \ |
michael@1 | 325 | -rpath \ |
michael@1 | 326 | -no-cups \ |
michael@1 | 327 | -iconv \ |
michael@1 | 328 | -pch \ |
michael@1 | 329 | -dbus-linked \ |
michael@1 | 330 | -opengl \ |
michael@1 | 331 | -xrender \ |
michael@1 | 332 | -fontconfig \ |
michael@1 | 333 | -freetype \ |
michael@3 | 334 | -no-glib |
michael@1 | 335 | |
michael@86 | 336 | # default options are implicitly used, for example... |
michael@1 | 337 | #-no-fast -exceptions -accessibility -stl -qt3support -nis |
michael@1 | 338 | #-sm -xshape -xinerama -xcursor -xfixes -xrandr -tablet -xkb |
michael@1 | 339 | |
michael@1 | 340 | # carry out static build procedure |
michael@1 | 341 | %{l_make} %{l_mflags -O} sub-src |
michael@1 | 342 | %if "%{with_tools}" == "yes" |
michael@1 | 343 | %{l_make} %{l_mflags -O} sub-tools |
michael@1 | 344 | %endif |
michael@1 | 345 | %if "%{with_examples}" == "yes" |
michael@1 | 346 | %{l_make} %{l_mflags -O} \ |
michael@1 | 347 | sub-demos-make_default-ordered \ |
michael@1 | 348 | sub-examples-make_default-ordered |
michael@1 | 349 | %endif |
michael@1 | 350 | |
michael@1 | 351 | %install |
michael@1 | 352 | rm -rf $RPM_BUILD_ROOT |
michael@1 | 353 | |
michael@1 | 354 | # carry out installation procedure |
michael@1 | 355 | targets="sub-moc-install_subtargets-ordered \ |
michael@1 | 356 | sub-rcc-install_subtargets-ordered \ |
michael@1 | 357 | sub-uic-install_subtargets-ordered \ |
michael@1 | 358 | sub-corelib-install_subtargets-ordered \ |
michael@1 | 359 | sub-xml-install_subtargets-ordered \ |
michael@1 | 360 | sub-network-install_subtargets-ordered \ |
michael@1 | 361 | sub-gui-install_subtargets-ordered \ |
michael@1 | 362 | sub-sql-install_subtargets-ordered \ |
michael@1 | 363 | sub-script-install_subtargets-ordered \ |
michael@1 | 364 | sub-testlib-install_subtargets-ordered \ |
michael@1 | 365 | sub-qt3support-install_subtargets-ordered \ |
michael@1 | 366 | sub-dbus-install_subtargets-ordered \ |
michael@1 | 367 | sub-uic3-install_subtargets-ordered \ |
michael@1 | 368 | sub-opengl-install_subtargets-ordered \ |
michael@1 | 369 | sub-xmlpatterns-install_subtargets-ordered \ |
michael@1 | 370 | sub-svg-install_subtargets-ordered \ |
michael@1 | 371 | sub-plugins-install_subtargets-ordered" |
michael@1 | 372 | %if "%{with_tools}" == "yes" |
michael@1 | 373 | targets="$targets sub-tools-install_subtargets-ordered" |
michael@1 | 374 | %endif |
michael@1 | 375 | %if "%{with_examples}" == "yes" |
michael@1 | 376 | targets="$targets sub-demos-install_subtargets-ordered sub-examples-install_subtargets-ordered" |
michael@1 | 377 | %endif |
michael@3 | 378 | targets="$targets install_htmldocs install_qchdocs install_docimages install_translations install_qmake install_mkspecs" |
michael@1 | 379 | %{l_make} %{l_mflags} $targets INSTALL_ROOT="$RPM_BUILD_ROOT" |
michael@1 | 380 | |
michael@1 | 381 | %if "%{with_shared}" == "yes" |
michael@1 | 382 | # install shared libs and symlinks |
michael@1 | 383 | %{l_shtool} mkdir -f -p -m 755 \ |
michael@1 | 384 | $RPM_BUILD_ROOT%{l_prefix}/lib/qt |
michael@1 | 385 | %{l_tar} cf - dynamic | %{l_tar} xf - -C $RPM_BUILD_ROOT%{l_prefix}/lib/qt |
michael@1 | 386 | |
michael@86 | 387 | # offer limited support of pkg-config(1) for shared libs |
michael@86 | 388 | %{l_shtool} subst \ |
michael@86 | 389 | -e "s;\(moc_location[^=]*=\).*;\1%{l_prefix}/bin/moc;" \ |
michael@86 | 390 | -e "s;\(uic_location[^=]*=\).*;\1%{l_prefix}/bin/uic;" \ |
michael@86 | 391 | $RPM_BUILD_ROOT%{l_prefix}/lib/qt/dynamic/pkgconfig |
michael@86 | 392 | |
michael@1 | 393 | # explain nonstandard shared library placement |
michael@86 | 394 | ( echo "This OpenPKG Qt build is using the with_shared option." |
michael@86 | 395 | echo "" |
michael@86 | 396 | echo "This directory contains optional shared libraries as" |
michael@1 | 397 | echo "defined by the OpenPKG build specification. Although" |
michael@86 | 398 | echo "shared libraries have been optionally built (see the" |
michael@1 | 399 | echo "build time 'with_shared yes' option), static libraries" |
michael@86 | 400 | echo "were built by default as usual, and installed in the" |
michael@86 | 401 | echo "standard library directory %{l_prefix}/lib." |
michael@86 | 402 | echo "" |
michael@86 | 403 | echo "To build applications using shared libraries instead," |
michael@86 | 404 | echo "please direct pkg-config(1) to use the properdefinitions" |
michael@86 | 405 | echo "by setting the environment variable PKG_CONFIG_PATH to " |
michael@86 | 406 | echo "%{l_prefix}/lib/qt/dynamic/pkgconfig." |
michael@1 | 407 | ) >$RPM_BUILD_ROOT%{l_prefix}/lib/qt/README |
michael@1 | 408 | |
michael@1 | 409 | # remove temporary dynamic link paths |
michael@1 | 410 | %{l_shtool} subst \ |
michael@86 | 411 | -e 's;\(QMAKE_PRL_BUILD_DIR[^=]*=\).*\(qt-x11-opensource-src.*\);\1 /tmp/\2;' \ |
michael@1 | 412 | $RPM_BUILD_ROOT%{l_prefix}/lib/*.prl |
michael@1 | 413 | %endif |
michael@1 | 414 | |
michael@1 | 415 | # determine internal file listing |
michael@1 | 416 | %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |
michael@1 | 417 | %{l_files_std} \ |
michael@86 | 418 | '%doc %{l_prefix}/share/qt/doc/*/*' \ |
michael@1 | 419 | '%not %dir %{l_prefix}/lib/pkgconfig' |
michael@1 | 420 | |
michael@1 | 421 | %files -f files |
michael@1 | 422 | |
michael@1 | 423 | %clean |
michael@1 | 424 | rm -rf $RPM_BUILD_ROOT |
michael@1 | 425 |