1 # Description: Qt Free Edition
2 # URL: http://www.trolltech.com
3 # Maintainer: Simone Rota, sip at crux dot nu
4 # Packager: Daniel Mueller, daniel at danm dot de
5 # Depends on: x11, libmng
6
7 name=qt3
8 version=3.3.7
9 release=1
10 source=(ftp://ftp.trolltech.com/qt/source/qt-x11-free-$version.tar.bz2 \
11 http://crux.nu/files/patches/$name-$version-1-patches.tar.bz2
12 $name-$version-gcc4.patch
13 qt-x11-free-3.3.5-no-rpath.patch)
14
15 build() {
16 cd qt-x11-free-$version
17
18 # KDE patches (http://websvn.kde.org/branches/qt/3.3/qt-copy/patches/?rev=507267)
19 for i in $(ls $SRC/$name-patches/* | sort); do
20 patch -p2 -i $i
21 done
22
23 # gcc4 + 64bit issue
24 patch -p1 -i $SRC/$name-$version-gcc4.patch
25 patch -p0 -i $SRC/qt-x11-free-3.3.5-no-rpath.patch
26
27 local SQL
28 if [ "`pkginfo -i | grep mysql`" ];then
29 SQL="-qt-sql-mysql -I/usr/include/mysql -L/usr/lib/mysql"
30 fi
31
32 if [ -d /usr/include/nvidia ]; then
33 export CFLAGS="$CFLAGS -I/usr/include/nvidia"
34 export CXXFLAGS="$CXXFLAGS -I/usr/include/nvidia"
35 fi
36
37 # don't link against our currently installed libraries
38 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:`pwd`/lib"
39 rm -rf {doc/html,examples,tutorial}
40
41 # we don't want docs, sample code; please use our optimizations flags
42 sed -i "s|sub-tutorial sub-examples| |" Makefile
43 sed -i "s|-O2|$CXXFLAGS|" mkspecs/linux-g++/qmake.conf
44 sed -i "s|-I. |$CXXFLAGS -I. |" qmake/Makefile.unix
45
46 ./configure -prefix /usr/share/qt \
47 -bindir /usr/bin \
48 -headerdir /usr/include/qt \
49 -libdir /usr/lib \
50 -plugindir /usr/lib/qt \
51 -platform linux-g++ -release -shared -thread -sm \
52 -tablet -nis -verbose -qt-gif -system-zlib \
53 -{system-lib,plugin-imgfmt-}{png,jpeg,mng} \
54 -no-{cups,fast,exceptions,nas-sound} \
55 -x{cursor,ft,inerama,kb,randr,render} \
56 $SQL
57
58 make src-moc sub-src
59
60 # Makefile magic, don't link against our currently installed libs
61 find . -name Makefile -exec sed -i "s|,/usr/lib|,`pwd`/lib|" {} \;
62 make sub-tools
63 make INSTALL_ROOT=$PKG install
64
65 for i in mergetr msg2qm qconfig qembed qvfb; do
66 (cd tools/$i/;make SUBLIBS="-lpng -lmng";mv $i $PKG/usr/bin/)
67 done
68 mv bin/{findtr,qtrename140} $PKG/usr/bin/
69
70 mkdir $PKG/usr/man
71 mv doc/man/man1 $PKG/usr/man
72
73 rm -rf `find $PKG/usr/share/qt/mkspecs/* | grep -v linux-g++` \
74 $PKG/usr/share/qt/{phrasebooks,templates,translations} \
75 $PKG/usr/include/qt/{j,n}*
76 rm -f $PKG/usr/share/qt/mkspecs/linux-g++/linux-g++
77
78 ln -s ../../bin $PKG/usr/share/qt/bin
79 ln -s ../../include/qt $PKG/usr/share/qt/include
80 ln -s ../../lib $PKG/usr/share/qt/lib
81 ln -s ../../lib/qt $PKG/usr/share/qt/plugins
82 ln -s linux-g++ $PKG/usr/share/qt/mkspecs/default
83
84 # correct qmake's PRL files (the libraries were placed into /usr/lib*/ and
85 # not in our temporary build directory ./work/src/..)
86 sed -i "s|-L$SRC/qt-x11-free-$version/lib ||g" $PKG/usr/lib/*.prl
87
88 chmod -R u+w,g-sw $PKG
89 chown -R root:root $PKG
90 }
|