106 lines
3.6 KiB
Plaintext
106 lines
3.6 KiB
Plaintext
# Description: Qt Free Edition
|
|
# URL: http://www.trolltech.com
|
|
# Packager: Daniel Mueller, daniel at danm dot de
|
|
# Maintainer: Alan Mizrahi, alan at mizrahi dot com dot ve
|
|
# Depends on: freeglut, xorg-libxcursor, xorg-xrandr, xorg-libxft, xorg-libxinerama, xorg-libxi, xorg-libice, libpng, libmng
|
|
|
|
name=qt3
|
|
version=3.3.8
|
|
release=2
|
|
source=(
|
|
ftp://marmot.tn.utexas.edu/pub/fink/distfiles/md5/cf3c43a7dfde5bfb76f8001102fe6e85/qt-x11-free-$version.tar.bz2
|
|
$name-$version-gcc4.patch
|
|
qt-x11-free-3.3.5-no-rpath.patch
|
|
qt3-libpng14.patch
|
|
)
|
|
|
|
build() {
|
|
cd qt-x11-free-$version
|
|
|
|
# KDE patches (http://websvn.kde.org/branches/qt/3.3/qt-copy/patches/?rev=784432)
|
|
for i in $(ls $SRC/$name-patches/* | sort); do
|
|
patch -p0 -i $i
|
|
done
|
|
|
|
# gcc4 + 64bit issue
|
|
patch -p1 -i $SRC/$name-$version-gcc4.patch
|
|
patch -p0 -i $SRC/qt-x11-free-3.3.5-no-rpath.patch
|
|
|
|
# libpng-1.4 structure changes
|
|
patch -p1 -i $SRC/qt3-libpng14.patch
|
|
|
|
local SQL
|
|
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"
|
|
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
|
|
sed -i "s|read acceptance|acceptance=yes|" configure
|
|
sed -i 's|X11R6/||g' mkspecs/*/*.conf
|
|
[ "$CC" ] && sed -i "s|gcc|$CC|" mkspecs/*/*.conf
|
|
[ "$CXX" ] && sed -i "s|g++|$CXX|" mkspecs/*/*.conf
|
|
|
|
./configure -prefix /usr/share/qt3 \
|
|
-bindir /usr/share/qt3/bin \
|
|
-headerdir /usr/include/qt3 \
|
|
-libdir /usr/lib \
|
|
-plugindir /usr/lib/qt3 \
|
|
-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/share/qt3/bin/)
|
|
done
|
|
mv bin/{findtr,qtrename140} $PKG/usr/share/qt3/bin/
|
|
|
|
mkdir -p $PKG/usr/bin
|
|
for i in $PKG/usr/share/qt3/bin/*
|
|
do
|
|
f="`basename $i`"
|
|
ln -s ../share/qt3/bin/$f $PKG/usr/bin/$f-qt3
|
|
done
|
|
|
|
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/qt3/{phrasebooks,templates,translations} \
|
|
$PKG/usr/include/qt3/{j,n}*
|
|
rm -f $PKG/usr/share/qt3/mkspecs/linux-g++/linux-g++
|
|
|
|
ln -s ../../include/qt3 $PKG/usr/share/qt3/include
|
|
ln -s ../../lib $PKG/usr/share/qt3/lib
|
|
ln -s ../../lib/qt3 $PKG/usr/share/qt3/plugins
|
|
ln -s linux-g++ $PKG/usr/share/qt3/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
|
|
}
|