# $Id: PKGBUILD,v 1.34 2005/02/28 04:43:02 judd Exp $ # Maintainer: Judd Vinet # Contributor: John Proctor pkgname=qt pkgver=3.3.4 pkgrel=4 pkgdesc="The QT gui toolkit." url="http://www.trolltech.com/products/qt/index.html" pkgfqn=${pkgname}-x11-free-${pkgver} # We need the postgresql sources for QT's postgres sql plugin psqlver=7.4.6 install=qt.install depends=('x-server' 'libpng' 'libjpeg') makedepends=('mysql' 'postgresql' 'sqlite3' 'libmng') source=(ftp://ftp.trolltech.com/qt/source/${pkgfqn}.tar.bz2 qt.profile \ ftp://ftp.postgresql.org/pub/source/v$psqlver/postgresql-$psqlver.tar.gz \ qt-patches.tar.bz2 qtrc) md5sums=('027f4e82fbe592b39d2f160bfb3a73af' '150b04e600b06f14d535404c2bc60272'\ 'e67dff3cab615a3795b8fc13c5341a79') build() { export QTDIR=$startdir/src/$pkgfqn export PATH=${QTDIR}/bin:${PATH} export LD_LIBRARY_PATH=${QTDIR}/lib:${LD_LIBRARY_PATH} cd $startdir/src/$pkgfqn # apply qt patches from kde.org and one security fix from debian/gentoo for i in ../patches/* do patch -Np0 -i $i || return 1 echo 'applied' $i done # install qtrc to /etc/skel that fonts are antialiased on first login install -D -m644 $startdir/src/qtrc $startdir/pkg/etc/skel/.qt/qtrc # start compiling qt sed -i 's|-cp -P -f|-cp -L -f|' qmake/Makefile.unix rm -rf doc/html examples tutorial 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 sed -i "s|read acceptance|acceptance=yes|" configure ./configure -prefix /opt/qt -platform linux-g++ \ -system-zlib -qt-gif -release -shared -sm -nis -thread -no-stl \ -{system-lib,plugin-imgfmt-}{png,jpeg,mng} \ -no-g++-exceptions -plugin-sql-{mysql,psql,sqlite} cd $startdir/src/$pkgfqn/plugins/src/sqldrivers/mysql qmake -o Makefile "INCLUDEPATH+=/usr/include/mysql" "LIBS+=-L/usr/lib/mysql -lmysqlclient" mysql.pro cd $startdir/src/$pkgfqn/plugins/src/sqldrivers/psql qmake -o Makefile "INCLUDEPATH+=$startdir/src/postgresql-$psqlver/src/include $startdir/src/postgresql-$psqlver/src/interfaces/libpq" "LIBS+=-L/usr/lib -lpq" psql.pro cd $startdir/src/$pkgfqn # fix the broken makefiles #sed -i 's|[[:space:]]*strip.*doc/html.*$|#|g' src/Makefile make || return 1 make INSTALL_ROOT=$startdir/pkg install rm -rf `find $startdir/pkg/opt/qt/mkspecs/* | grep -v linux-g++` rm -rf $startdir/pkg/opt/qt/{phrasebooks,templates,translations} sed -i "s|-L$startdir/src/$pkgfqn/lib ||g" $startdir/pkg/opt/qt/lib/*.prl install -D -m755 qmake/qmake $startdir/pkg/opt/qt/bin/qmake install -D -m755 $startdir/qt.profile $startdir/pkg/etc/profile.d/qt.sh rm -f $startdir/pkg/opt/qt/mkspecs/linux-g++/linux-g++ }