107 lines
3.3 KiB
Plaintext
107 lines
3.3 KiB
Plaintext
# Description: Qt4 Free Edition.
|
|
# URL: http://trolltech.com/
|
|
# Packager: Johannes Winkelmann, jw at tks6 dot net
|
|
# Maintainer: Danny Rawlins, romster at shortcircuit dot net dot au
|
|
# Depends on: dbus freetype glib libmng libpng openssl xorg-libsm xorg-libxcursor xorg-libxinerama xorg-setxkbmap fontconfig xorg-libxi xorg-libxrandr
|
|
# Optional: mysql sqlite3 nvidia gtk
|
|
|
|
name=qt4
|
|
version=4.3.4
|
|
release=1
|
|
source=(ftp://ftp.trolltech.com/pub/qt/source/qt-x11-opensource-src-$version.tar.gz \
|
|
qt4-$version-x11-path-fix.patch)
|
|
|
|
mirror=(ftp://ftp.tu-chemnitz.de/pub/Qt/qt/source/qt-x11-opensource-src-$version.tar.gz)
|
|
|
|
build() {
|
|
local file SQL
|
|
|
|
cd qt-x11-opensource-src-$version
|
|
|
|
patch -p1 -i $SRC/qt4-$version-x11-path-fix.patch
|
|
|
|
# don't use distcc as it wont compile but use ccache if installed
|
|
if pkginfo -i |grep '^distcc ' > /dev/null; then
|
|
if pkginfo -i |grep '^ccache ' > /dev/null; then
|
|
if [ $CCACHE_PREFIX = distcc ]; then
|
|
unset CCACHE_PREFIX
|
|
fi
|
|
else
|
|
export PATH="`echo $PATH |sed -e 's|/usr/lib/distcc:||'`"
|
|
fi
|
|
fi
|
|
|
|
if [ "`pkginfo -i |grep '^mysql '`" ]; then
|
|
SQL='-qt-sql-mysql -I/usr/include/mysql -L/usr/lib/mysql'
|
|
fi
|
|
|
|
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"
|
|
|
|
# we don't want docs, sample code; please use our optimization flags
|
|
sed -i mkspecs/common/g++.conf -e "s|-O2|$CXXFLAGS|"
|
|
sed -i qmake/Makefile.unix -e "s|-I. |$CXXFLAGS -I. |"
|
|
sed -i configure -e 's|read acceptance|acceptance=yes|'
|
|
|
|
./configure \
|
|
-prefix /usr/share/qt4 \
|
|
-bindir /usr/share/qt4/bin \
|
|
-headerdir /usr/include/qt4 \
|
|
-libdir /usr/lib \
|
|
-plugindir /usr/lib/qt4 \
|
|
-platform linux-g++ -release -shared -sm \
|
|
-tablet -nis -verbose -qt-gif -system-zlib \
|
|
-system-lib{png,jpeg} \
|
|
-no-{cups,fast,exceptions,nas-sound} \
|
|
-x{cursor,inerama,kb,randr,render} \
|
|
-nomake demos -nomake examples \
|
|
$SQL
|
|
|
|
make
|
|
make INSTALL_ROOT=$PKG install_subtargets install_qmake
|
|
|
|
# install mkspecs without having to delete more junk than it's worth using make install
|
|
install -d $PKG/usr/share/qt4/mkspecs
|
|
mv mkspecs/{linux-g++{,-32,-64},common,features} $PKG/usr/share/qt4/mkspecs/
|
|
ln -s linux-g++ $PKG/usr/share/qt4/mkspecs/default
|
|
|
|
# remove junk
|
|
rm $PKG/usr/share/qt4/mkspecs/common/mac{,-g++}.conf
|
|
find $PKG -name '*.debug' -exec rm {} \;
|
|
|
|
rm -r \
|
|
$PKG/usr/share/qt4/phrasebooks \
|
|
$PKG/usr/share/qt4/mkspecs/features/{win32,mac}
|
|
|
|
# symlinks for qt4
|
|
ln -s ../../include/qt4 $PKG/usr/share/qt4/include
|
|
ln -s ../../lib $PKG/usr/share/qt4/lib
|
|
ln -s ../../lib/qt $PKG/usr/share/qt4/plugins
|
|
|
|
# fix paths
|
|
sed -i $PKG/usr/lib/*.prl -e "s|-L$SRC/qt-x11-opensource-src-$version/lib ||g"
|
|
|
|
sed -i $PKG/usr/lib/pkgconfig/*.pc \
|
|
-e "s|-L$SRC/qt-x11-opensource-src-$version/lib ||g" \
|
|
-e "s|$SRC/qt-x11-opensource-src-$version/bin|/usr/share/qt4/bin|g"
|
|
|
|
# add symlinks for qt4 in /usr/bin
|
|
install -d $PKG/usr/bin
|
|
pushd $PKG/usr/bin
|
|
|
|
for file in assistant designer linguist lrelease lupdate moc qmake qtconfig uic; do
|
|
ln -s ../share/qt4/bin/$file $file-qt4
|
|
done
|
|
|
|
for file in pixeltool qdbus qdbuscpp2xml qdbusxml2cpp qt3to4 rcc uic3; do
|
|
ln -s ../share/qt4/bin/$file $file
|
|
done
|
|
popd
|
|
}
|
|
|