mesalib_prepatch() { if [ $xpkg = mesademos ]; then tar xvjf $archdir/MesaDemos-$ver.tar.bz2 -C .. patch -p1 < $confdir/no_broken_demos.diff fi find progs/ -type f -perm +111 | xargs -r chmod -x sed -i 's,/usr/local,/usr,g' configs/* } mesalib_postmake() { find progs/ -type f -perm +111 | while read src; do if [[ `basename $src` == gl* ]]; then trg=`basename $src` else trg=${src//\//-}; trg=${trg/progs-/mesa-} fi echo "installing $src: $root/usr/X11/bin/$trg" install $src $root/usr/X11/bin/$trg done } var_append CC_WRAPPER_FILTER "|" \ "sed -r 's,-lglut,-L/usr/X11/lib\n-lXmu\n-lXi\n-lglut,g'" # FIXME: use a different makeopt if arch != x86 makeopt="linux-x86" if [ $xpkg = mesademos ]; then makeinstopt="" fi prepatch="mesalib_prepatch" postmake="mesalib_postmake" export CFLAGS="$CFLAGS -I/usr/X11/include"