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

Generated by cgit