#!/bin/sh # # Copyright 2006 Paul Best # Available under the terms of the GNU GPL. # # This requires makedepend to be dropped in /usr/X11R6/bin, why, I'm not entirely sure. # It can be obtained from the X11R6 packs, hopefully this will get worked out later. X11R="X11R7.0" NAME="mesa" VERSION="6.4.2" REVISION="1" PKG_SOURCEURL='http://umn.dl.sourceforge.net/sourceforge/mesa3d/MesaLib-$VERSION.tar.bz2' . $DLG_ROOT/config . $DLG_ROOT/SCRIPTS/dropline-functions.sh cflags cxxflags prepare # Yeah we're ARCH friendly :D if [ "$DLG_ARCH=i686" ]; then DLG_TARGET='linux-dri-x86' elif [ "$DLG_ARCH=x86-64" ]; then DLG_TARGET='linux-dri-x86-64' elif [ "$DLG_ARCH=x86_64" ]; then DLG_TARGET='linux-dri-x86-64' else DLG_TARGET='linux-dri' fi # And we get to squeeze a few fps out of the sucker, Muahaha spewdo "echo OPT_FLAGS=\"$PKG_CFLAGS\" >> $PKG_BUILDROOT/configs/$DLG_TARGET" downloadfile $PKG_COREREPOS http://umn.dl.sourceforge.net/sourceforge/mesa3d/MesaGLUT-6.4.2.tar.bz2 findpatch filename MesaGLUT-6.4.2.tar.bz2 spewdo "tar -jxf $filename" downloadfile $PKG_COREREPOS http://umn.dl.sourceforge.net/sourceforge/mesa3d/MesaDemos-6.4.2.tar.bz2 findpatch filename MesaDemos-6.4.2.tar.bz2 spewdo "tar -jxf $filename" analyzesource make -j2 $DLG_TARGET # MesaDemos #(cd $PKG_SRCROOT/configs && rm -f current && ln -s linux-dri-x86 current) make -j2 -C $PKG_SRCROOT/progs/xdemos glxgears glxinfo createdir $PKG_STAGEROOT$PKG_PREFIX/bin spewdo "cd $PKG_SRCROOT/progs/xdemos" spewdo "cp glxgears glxinfo $PKG_STAGEROOT$PKG_PREFIX/bin" makeinstall spewdo "cd $PKG_STAGEROOT/" spewdo "mv $PKG_STAGEROOT/include $PKG_STAGEROOT$PKG_PREFIX" spewdo "mv $PKG_STAGEROOT/lib $PKG_STAGEROOT$PKG_PREFIX" #dri drivers? createdir $PKG_STAGEROOT$PKG_PREFIX/lib/xorg/modules/dri spewdo "cp -r $PKG_SRCROOT/lib/*_dri.so $PKG_STAGEROOT$PKG_PREFIX/lib/xorg/modules/dri" # All done, time to make the package. # but before that occurs, let's strip the libs :P spewdo "find $PKG_STAGEROOT -type f -name *.a | xargs strip --strip-debug 2>/dev/null" spewdo "find $PKG_STAGEROOT -type f -name *.so | xargs strip --strip-debug 2>/dev/null" # Docs are all fscked createdir $PKG_STAGEROOT$PKG_DOCDIR spewdo "cp -adR $PKG_SRCROOT/docs/* $PKG_STAGEROOT$PKG_DOCDIR/" spewdo "rm $PKG_STAGEROOT$PKG_DOCDIR/RELNOTES-6.4.2~" tidydocumentation analyzebinaries finalizepackage packagize cleanup