Commit | Line | Data |
---|---|---|
2891e795 VM |
1 | # Description: Qt Free Edition |
2 | # URL: http://www.trolltech.com | |
2891e795 VM |
3 | # Maintainer: Jose V Beneyto, sepen at crux dot nu |
4 | # Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu | |
c308cfb5 | 5 | # Packager: Johannes Winkelmann, jw at smts dot ch |
2891e795 VM |
6 | # Depends on: fontconfig glib libmng libpng mesa3d xorg-libxcursor xorg-libxi xorg-libxinerama xorg-libxrandr dbus |
7 | ||
8 | name=qt4 | |
c308cfb5 VM |
9 | version=4.8.1 |
10 | release=2 | |
11 | source=(http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-$version.tar.gz \ | |
12 | http://www.linuxfromscratch.org/patches/blfs/svn/qt-everywhere-opensource-src-4.8.2-glib_fix-1.patch) | |
2891e795 VM |
13 | |
14 | build () { | |
15 | cd qt-everywhere-opensource-src-$version | |
c308cfb5 VM |
16 | |
17 | patch -p1 -i $SRC/qt-everywhere-opensource-src-4.8.2-glib_fix-1.patch | |
18 | export CFLAGS="$(echo $CFLAGS | sed -e 's/\-mthumb//' -e's/\-O2/\-O1/')" | |
19 | export CXXFLAGS="$CFLAGS -fno-strict-volatile-bitfields" | |
20 | sed -i 's|X11R6/||g' mkspecs/*/*.conf | |
2891e795 VM |
21 | sed -i "s|-O2|$CXXFLAGS|" mkspecs/common/g++.conf |
22 | sed -i "s|INSTALLS += translations||" projects.pro | |
c308cfb5 VM |
23 | sed -i 's|"$COMPILER" -c|$COMPILER -c|' config.tests/unix/fvisibility.test |
24 | ||
25 | find . -name Makefile -exec sed -i 's|-O2|-O1|g' {} \; | |
26 | find . -name gcc-base.conf -exec sed -i 's|-O2|-O1|g' {} \; | |
27 | find . -name g++-base.conf -exec sed -i 's|-O2|-O1|g' {} \; | |
28 | ||
2891e795 VM |
29 | ./configure -prefix /usr/share/qt4 \ |
30 | -bindir /usr/share/qt4/bin \ | |
31 | -headerdir /usr/share/qt4/include \ | |
32 | -libdir /usr/share/qt4/lib \ | |
33 | -plugindir /usr/share/qt4/plugins \ | |
34 | -platform linux-g++ -release -shared -sm \ | |
c308cfb5 | 35 | -nis -verbose -system-zlib \ |
2891e795 VM |
36 | -system-lib{png,jpeg} -xmlpatterns \ |
37 | -no-{cups,fast,nas-sound,phonon} \ | |
38 | -x{cursor,inerama,kb,randr,render} \ | |
39 | -nomake demos -nomake examples -nomake docs \ | |
40 | -no-separate-debug-info -opensource -confirm-license | |
41 | ||
c308cfb5 | 42 | LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PWD/lib" make |
2891e795 VM |
43 | make INSTALL_ROOT=$PKG install |
44 | ||
45 | rm -rf `find $PKG/usr/share/qt4/mkspecs/* | \ | |
46 | grep -v linux-g++ | grep -v common | grep -v pri | grep -v features` | |
47 | rm -f $PKG/usr/share/qt4/mkspecs/linux-g++/linux-g++ | |
48 | rm -rf $PKG/usr/share/qt4/mkspecs/features/{mac,win32} | |
49 | rm -rf $PKG/usr/share/qt4/mkspecs/common/mac* | |
50 | rm -rf $PKG/usr/share/qt4/phrasebooks | |
51 | ||
52 | install -d $PKG/{etc/ld.so.conf.d,usr/{bin,lib,include}} | |
53 | echo "/usr/share/qt4/lib" > $PKG/etc/ld.so.conf.d/qt4.conf | |
54 | ||
55 | ln -s ../share/qt4/include $PKG/usr/include/qt4 | |
56 | ln -s ../share/qt4/lib $PKG/usr/lib/qt4 | |
57 | ln -s linux-g++ $PKG/usr/share/qt4/mkspecs/default | |
58 | ||
59 | mv $PKG/usr/share/qt4/lib/pkgconfig $PKG/usr/lib | |
60 | ||
61 | sed -i -e "s|-L$SRC/qt-everywhere-opensource-src-$version/lib ||g" \ | |
62 | -e "s|$SRC/qt-everywhere-opensource-src-$version/bin|/usr/share/qt4/bin|g" \ | |
63 | $PKG/usr/lib/pkgconfig/*.pc | |
64 | ||
65 | for f in assistant designer linguist lrelease lupdate moc qmake qtconfig uic \ | |
c308cfb5 | 66 | pixeltool qdbus qdbuscpp2xml qdbusxml2cpp qt3to4 rcc uic3; do |
2891e795 VM |
67 | ln -s ../share/qt4/bin/$f $PKG/usr/bin/$f |
68 | done | |
69 | } |