#!/bin/bash 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 } if [ "$xpkg" = mesalib -o "$xpkg" = mesademos ] ; then prepatch="mesalib_prepatch" postmake="mesalib_postmake" case "$arch" in ppc) makeopt="linux-dri-$arch_target" ;; x86) if [ "$arch_machine" = x86_64 ] ; then makeopt="linux-dri-x86-64" else makeopt="linux-dri-x86" fi ;; *) makeopt="linux-dri" ;; esac fi if [ "$xpkg" = mesademos ] ; then makeinstopt="" fi export CFLAGS="$CFLAGS -I/usr/X11/include"