| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232 |
- ##
- ## kde-qt.spec -- OpenPKG RPM Specification
- ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
- ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
- ## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.com/>
- ##
- ## Permission to use, copy, modify, and distribute this software for
- ## any purpose with or without fee is hereby granted, provided that
- ## the above copyright notice and this permission notice appear in all
- ## copies.
- ##
- ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
- ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- ## SUCH DAMAGE.
- ##
- # package information
- Name: kde-qt
- Summary: K Desktop Environment (Qt Toolkit)
- URL: http://www.kde.org/
- Vendor: TrollTech AS
- Packager: The OpenPKG Project
- Distribution: OpenPKG
- Class: EVAL
- Group: KDE
- License: GPL
- Version: 3.2.3
- Release: 20040701
- # list of sources
- Source0: ftp://ftp.trolltech.com/pub/qt/source/qt-x11-free-%{version}.tar.bz2
- Source1: kde-qt.pc
- Patch0: kde-qt.patch
- # build information
- Prefix: %{l_prefix}
- BuildRoot: %{l_buildroot}
- BuildPreReq: OpenPKG, openpkg >= 20040130, X11, gcc, png, mng, jpeg, zlib
- PreReq: OpenPKG, openpkg >= 20040130, X11, png, mng, jpeg, zlib
- AutoReq: no
- AutoReqProv: no
- %description
- KDE is a powerful Open Source graphical desktop environment for Unix
- workstations. It combines ease of use, contemporary functionality,
- and outstanding graphical design with the technological superiority
- of the Unix operating system.
- This part is the KDE underlying Qt Toolkit.
- (The major differences between this package and the standard OpenPKG
- Qt package are: shared library version only, threading enabled,
- stripped down installation size, perhaps different version to
- fullfill exactly the requirements of KDE, no build options, etc. So,
- this package is just for KDE internal use only.)
- %track
- prog kde-qt = {
- version = %{version}
- url = ftp://ftp.trolltech.com/pub/qt/source/
- regex = qt-x11-free-(3\.2\.\d+)\.tar\.gz
- }
- %prep
- %setup -q -n qt-x11-free-%{version}
- %patch
- # avoid dependencies external to OpenPKG instance
- cp -rp mkspecs mkspecs.fresh
- %{l_shtool} subst \
- -e 's;[ \t]*-I/usr/local/include;;g' \
- -e 's;[ \t]*/usr/local/include;;g' \
- -e 's;[ \t]*-L/usr/local/lib;;g' \
- -e 's;[ \t]*/usr/local/lib;;g' \
- mkspecs/darwin-g++/qmake.conf \
- mkspecs/freebsd-g++/qmake.conf \
- mkspecs/netbsd-g++/qmake.conf \
- mkspecs/macx-pbuilder/qmake.conf \
- mkspecs/openbsd-g++/qmake.conf
- # correctly detect OpenPKG xrender and xft installations
- %{l_shtool} subst \
- -e 's;INCDIRS=";INCDIRS="%{l_prefix}/include ;g' \
- -e 's;LIBDIRS=";LIBDIRS="%{l_prefix}/lib ;g' \
- -e 's;freetype2/freetype/;freetype/;g' \
- -e 's;freetype2;freetype;g' \
- config.tests/x11/xfreetype.test \
- config.tests/x11/xrender.test
- # repair nonstandard posix thread test macro usage
- %{l_shtool} subst \
- -e 's/\(defined(_POSIX_THREAD_SAFE_FUNCTIONS)\)/(\1 \&\& _POSIX_THREAD_SAFE_FUNCTIONS-0>0)/g' \
- src/dialogs/qfiledialog.cpp src/kernel/qfont_x11.cpp \
- src/tools/qdatetime.cpp src/tools/qdir_unix.cpp
- %build
- # display a warning that this package is a beast
- ( echo "The qt package requires about 320 MB of temporary disk space"
- echo "and one to five hours (depending on options) to build on a"
- echo "800 MHz system. Therefore, please be prepared and be patient."
- ) | %{l_rpmtool} msg -b -t notice
- # set HOME to a writable directory for qsettings
- # and set QTDIR to just the source tree directory
- # and determine the target platform to build
- HOME=`pwd`
- QTDIR=`pwd`
- case "%{l_platform -t}" in
- *-freebsd* ) oscomp="freebsd-g++" ;;
- *-linux* ) oscomp="linux-g++" ;;
- *-sunos* ) oscomp="solaris-g++" ;;
- * ) echo "platform %{l_platform -t} not supported" 2>&1; exit 1 ;;
- esac
- # put in proper search paths for dynamic libraries
- rflags=`echo '%{l_ldflags}' | %{l_shtool} subst \
- -e 's;%{l_prefix}/lib;%{l_prefix}/lib/qtdyn;g' \
- -e 's;-L;-R;g'`
- # calculate X11 paths in advance
- l_x11_incdir=`%{l_prefix}/etc/rc --query x11_incdir`
- l_x11_libdir=`%{l_prefix}/etc/rc --query x11_libdir`
- # special trolltech configuration
- CC="%{l_cc}" \
- CXX="%{l_cxx}" \
- CFLAGS="%{l_cflags -O}" \
- CXXFLAGS="%{l_cxxflags -O}" \
- echo "yes" | ./configure \
- -platform $oscomp \
- -prefix %{l_prefix} \
- -bindir %{l_prefix}/libexec/kde \
- -libdir %{l_prefix}/lib/kde \
- -headerdir %{l_prefix}/include/kde \
- -docdir %{l_prefix}/share/kde/qt/doc \
- -datadir %{l_prefix}/share/kde/qt/data \
- -release -shared -stl -sm \
- -system-zlib -system-libpng \
- -system-libjpeg -system-libmng -qt-gif \
- -no-nis -no-cups -no-nas-sound -no-xinerama \
- -xrender -no-xft -no-tablet -no-xkb \
- -disable-opengl -enable-sql \
- -no-exceptions -thread \
- -I$QTDIR/include \
- %{l_cppflags} %{l_ldflags} \
- -I${l_x11_incdir} -L${l_x11_libdir} \
- -R%{l_prefix}/lib/kde
- # build Qt (but without additional tools, the tutorial and the examples)
- %{l_make} %{l_mflags -O} \
- MAKE="%{l_make} %{l_mflags -O}" \
- LD_LIBRARY_PATH="$QTDIR/lib" \
- symlinks src-qmake src-moc sub-src
- ( cd tools/designer
- %{l_make} %{l_mflags -O} \
- MAKE="%{l_make} %{l_mflags -O}" \
- LD_LIBRARY_PATH="$QTDIR/lib" \
- sub-uic
- ) || exit $?
- %install
- rm -rf $RPM_BUILD_ROOT
- # create directory structure
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/libexec/kde \
- $RPM_BUILD_ROOT%{l_prefix}/include/kde/qt/private \
- $RPM_BUILD_ROOT%{l_prefix}/lib/kde \
- $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig
- # install tools
- %{l_shtool} install -c -s -m 755 \
- bin/moc bin/uic \
- $RPM_BUILD_ROOT%{l_prefix}/libexec/kde/
- # install library
- %{l_shtool} install -c -m 755 \
- lib/libqt-mt.so.%{version} \
- $RPM_BUILD_ROOT%{l_prefix}/lib/kde/
- %{l_shtool} mkln -s \
- $RPM_BUILD_ROOT%{l_prefix}/lib/kde/libqt-mt.so.%{version} \
- $RPM_BUILD_ROOT%{l_prefix}/lib/kde/libqt-mt.so.`echo %{version} | sed -e 's;\.[0-9]$;;'`
- %{l_shtool} mkln -s \
- $RPM_BUILD_ROOT%{l_prefix}/lib/kde/libqt-mt.so.%{version} \
- $RPM_BUILD_ROOT%{l_prefix}/lib/kde/libqt-mt.so.`echo %{version} | sed -e 's;\.[0-9]\.[0-9]$;;'`
- %{l_shtool} mkln -s \
- $RPM_BUILD_ROOT%{l_prefix}/lib/kde/libqt-mt.so.%{version} \
- $RPM_BUILD_ROOT%{l_prefix}/lib/kde/libqt-mt.so
- # install headers
- ( cd include
- # (do not pick up symlinks to non-existing files)
- rm -f qxtwidget.h qmotif.h qmotifdialog.h qmotifwidget.h
- ) || exit $?
- %{l_shtool} install -c -m 644 \
- include/*.h \
- $RPM_BUILD_ROOT%{l_prefix}/include/kde/qt/
- %{l_shtool} install -c -m 644 \
- include/private/*.h \
- $RPM_BUILD_ROOT%{l_prefix}/include/kde/qt/private/
- # install pkg-config specification
- l_x11_incdir=`%{l_prefix}/etc/rc --query x11_incdir`
- l_x11_libdir=`%{l_prefix}/etc/rc --query x11_libdir`
- %{l_shtool} install -c -m 644 \
- %{l_value -s l_prefix} \
- -e "s;@l_version@;%{version};g" \
- -e "s;@l_x11_incdir@;${l_x11_incdir};g" \
- -e "s;@l_x11_libdir@;${l_x11_libdir};g" \
- %{SOURCE kde-qt.pc} \
- $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig/
- # determine installation files
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
- %{l_files_std} \
- '%not %dir %{l_prefix}/lib/pkgconfig'
- %files -f files
- %clean
- rm -rf $RPM_BUILD_ROOT
|