2006-02-23 15:26:10 +00:00
|
|
|
# Description: Qt Free Edition
|
|
|
|
# URL: http://www.trolltech.com
|
|
|
|
# Maintainer: Daniel Mueller, daniel at danm dot de
|
|
|
|
# Depends on: x11, freetype, libjpeg, libmng, libpng, fontconfig, expat
|
|
|
|
|
|
|
|
name=qt3
|
|
|
|
version=3.3.5
|
2006-04-04 10:16:52 +00:00
|
|
|
release=2
|
2006-02-23 15:26:10 +00:00
|
|
|
source=(ftp://ftp.trolltech.com/qt/source/qt-x11-free-$version.tar.bz2 \
|
|
|
|
http://crux.danm.de/files/dist/$name/$version/$name-$version-2-patches.tar.bz2 \
|
2006-04-04 10:16:52 +00:00
|
|
|
$name-$version-gcc4.patch 0999_qt-3.3.5-qlistview.patch)
|
2006-02-23 15:26:10 +00:00
|
|
|
|
|
|
|
build () {
|
|
|
|
cd qt-x11-free-$version
|
|
|
|
|
|
|
|
# KDE patches (http://websvn.kde.org/branches/qt/3.3/qt-copy/patches/?rev=507267)
|
|
|
|
for i in ../$name-patches/*.*; do
|
|
|
|
patch -p2 < $i
|
|
|
|
done
|
|
|
|
|
|
|
|
# gcc4 + 64bit issue
|
|
|
|
patch -p1 < $SRC/$name-$version-gcc4.patch
|
|
|
|
|
|
|
|
local SQL
|
|
|
|
if [ "`pkginfo -i | grep mysql`" ];then
|
|
|
|
SQL="-qt-sql-mysql -I/usr/include/mysql -L/usr/lib/mysql"
|
|
|
|
fi
|
|
|
|
|
2006-04-04 10:16:52 +00:00
|
|
|
# fix serious, crashy bugs in widgets/qlistview.cpp
|
|
|
|
patch -p1 < $SRC/0999_qt-$version-qlistview.patch
|
|
|
|
|
2006-02-23 15:26:10 +00:00
|
|
|
if [ -d /usr/include/nvidia ]; then
|
|
|
|
export CFLAGS="$CFLAGS -I/usr/include/nvidia"
|
|
|
|
export CXXFLAGS="$CXXFLAGS -I/usr/include/nvidia"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# don't link against our currently installed libraries
|
|
|
|
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:`pwd`/lib"
|
|
|
|
rm -rf {doc/html,examples,tutorial}
|
|
|
|
|
|
|
|
# we don't want docs, sample code; please use our optimizations flags
|
|
|
|
sed -i "s|sub-tutorial sub-examples| |" Makefile
|
|
|
|
sed -i "s|-O2|$CXXFLAGS|" mkspecs/linux-g++/qmake.conf
|
|
|
|
sed -i "s|-I. |$CXXFLAGS -I. |" qmake/Makefile.unix
|
|
|
|
|
|
|
|
./configure -prefix /usr/share/qt \
|
|
|
|
-bindir /usr/bin \
|
|
|
|
-headerdir /usr/include/qt \
|
|
|
|
-libdir /usr/lib \
|
|
|
|
-plugindir /usr/lib/qt \
|
|
|
|
-platform linux-g++ -release -shared -thread -sm \
|
|
|
|
-tablet -nis -verbose -qt-gif -system-zlib \
|
|
|
|
-{system-lib,plugin-imgfmt-}{png,jpeg,mng} \
|
|
|
|
-no-{cups,fast,exceptions,nas-sound} \
|
|
|
|
-x{cursor,ft,inerama,kb,randr,render} \
|
|
|
|
$SQL
|
|
|
|
|
|
|
|
make src-moc sub-src
|
|
|
|
|
|
|
|
# Makefile magic, don't link against our currently installed libs
|
|
|
|
find . -name Makefile -exec sed -i "s|,/usr/lib|,`pwd`/lib|" {} \;
|
|
|
|
make sub-tools
|
|
|
|
make INSTALL_ROOT=$PKG install
|
|
|
|
|
|
|
|
for i in mergetr msg2qm qconfig qembed qvfb; do
|
|
|
|
(cd tools/$i/;make SUBLIBS="-lpng -lmng";mv $i $PKG/usr/bin/)
|
|
|
|
done
|
|
|
|
mv bin/{findtr,qtrename140} $PKG/usr/bin/
|
|
|
|
|
|
|
|
mkdir $PKG/usr/man
|
|
|
|
mv doc/man/man1 $PKG/usr/man
|
|
|
|
|
|
|
|
rm -rf `find $PKG/usr/share/qt/mkspecs/* | grep -v linux-g++` \
|
|
|
|
$PKG/usr/share/qt/{phrasebooks,templates,translations} \
|
|
|
|
$PKG/usr/include/qt/{j,n}*
|
|
|
|
rm -f $PKG/usr/share/qt/mkspecs/linux-g++/linux-g++
|
|
|
|
|
|
|
|
ln -s ../../bin $PKG/usr/share/qt/bin
|
|
|
|
ln -s ../../include/qt $PKG/usr/share/qt/include
|
|
|
|
ln -s ../../lib $PKG/usr/share/qt/lib
|
|
|
|
ln -s ../../lib/qt $PKG/usr/share/qt/plugins
|
|
|
|
ln -s linux-g++ $PKG/usr/share/qt/mkspecs/default
|
|
|
|
|
|
|
|
# correct qmake's PRL files (the libraries were placed into /usr/lib*/ and
|
|
|
|
# not in our temporary build directory ./work/src/..)
|
|
|
|
sed -i "s|-L$SRC/qt-x11-free-$version/lib ||g" $PKG/usr/lib/*.prl
|
|
|
|
|
|
|
|
chmod -R u+w,g-sw $PKG
|
|
|
|
chown -R root:root $PKG
|
|
|
|
}
|