|
|
@@ -34,7 +34,7 @@ Class: EVAL
|
|
|
Group: KDE
|
|
|
License: GPL
|
|
|
Version: 3.2.3
|
|
|
-Release: 20040203
|
|
|
+Release: 20040206
|
|
|
|
|
|
# list of sources
|
|
|
Source0: ftp://ftp.trolltech.com/pub/qt/source/qt-x11-free-%{version}.tar.bz2
|
|
|
@@ -58,13 +58,13 @@ AutoReqProv: no
|
|
|
|
|
|
(The major differences between this package and the standard OpenPKG
|
|
|
Qt package are: shared library version only, threading enabled,
|
|
|
- stripped down installation size, slightly older version to fullfill
|
|
|
- exactly the requirements of KDE, no build options, etc. So, this
|
|
|
- package just is for KDE internal use only.)
|
|
|
+ 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 = 3.2.3
|
|
|
+ version = %{version}
|
|
|
url = ftp://ftp.trolltech.com/pub/qt/source/
|
|
|
regex = qt-x11-free-(3\.2\.\d+)\.tar\.gz
|
|
|
}
|
|
|
@@ -72,25 +72,46 @@ AutoReqProv: no
|
|
|
%prep
|
|
|
%setup -q -n qt-x11-free-%{version}
|
|
|
|
|
|
- # just checking for the definition of POSIX feature test macros
|
|
|
- # is a violation of the standard. The macros are allowed to
|
|
|
- # have values -1, 0 and >0 and especially a defined value
|
|
|
- # of -1 still means "feature not available". It case of
|
|
|
- # _POSIX_THREAD_SAFE_FUNCTIONS, SUSv3 says in particular "if this
|
|
|
- # symbol has a value other than -1 or 0, it shall have the value
|
|
|
- # 200112L".
|
|
|
+ # 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
|
|
|
- # set $HOME to a writable directory for qsettings
|
|
|
- # and set QTDIR to just the source tree directory
|
|
|
- export HOME=`pwd`
|
|
|
- export QTDIR=`pwd`
|
|
|
+ # 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
|
|
|
|
|
|
- # determine target platform for building
|
|
|
+ # 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++" ;;
|
|
|
@@ -98,9 +119,20 @@ AutoReqProv: no
|
|
|
* ) echo "platform %{l_platform -t} not supported" 2>&1; exit 1 ;;
|
|
|
esac
|
|
|
|
|
|
- # configure Qt for target platform
|
|
|
+ # 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} \
|
|
|
@@ -123,10 +155,12 @@ AutoReqProv: no
|
|
|
# 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 $?
|
|
|
|
|
|
@@ -180,7 +214,7 @@ AutoReqProv: no
|
|
|
-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
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig/
|
|
|
|
|
|
# determine installation files
|
|
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
|