#!/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.shcflagscxxflagsprepare# Yeah we're ARCH friendly :Dif [ "$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, Muahahaspewdo "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.bz2findpatch filename MesaGLUT-6.4.2.tar.bz2spewdo "tar -jxf $filename"downloadfile $PKG_COREREPOS http://umn.dl.sourceforge.net/sourceforge/mesa3d/MesaDemos-6.4.2.tar.bz2findpatch filename MesaDemos-6.4.2.tar.bz2spewdo "tar -jxf $filename"analyzesourcemake -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 glxinfocreatedir $PKG_STAGEROOT$PKG_PREFIX/binspewdo "cd $PKG_SRCROOT/progs/xdemos"spewdo "cp glxgears glxinfo $PKG_STAGEROOT$PKG_PREFIX/bin"makeinstallspewdo "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/drispewdo "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 :Pspewdo "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 fsckedcreatedir $PKG_STAGEROOT$PKG_DOCDIRspewdo "cp -adR $PKG_SRCROOT/docs/* $PKG_STAGEROOT$PKG_DOCDIR/"spewdo "rm $PKG_STAGEROOT$PKG_DOCDIR/RELNOTES-6.4.2~"tidydocumentationanalyzebinariesfinalizepackagepackagizecleanup