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

Generated by cgit