mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
988 B

  1. #!/bin/bash
  2. mesalib_prepatch() {
  3. if [ "$xpkg" == mesademos ] ; then
  4. tar xvjf $archdir/MesaDemos-$ver.tar.bz2 -C ..
  5. patch -p1 < $confdir/no_broken_demos.diff
  6. fi
  7. find progs/ -type f -perm +111 | xargs -r chmod -x
  8. sed -i 's,/usr/local,/usr,g' configs/*
  9. }
  10. mesalib_postmake() {
  11. find progs/ -type f -perm +111 | while read src; do
  12. if [[ `basename $src` == gl* ]]; then
  13. trg=`basename $src`
  14. else
  15. trg=${src//\//-}; trg=${trg/progs-/mesa-}
  16. fi
  17. echo "installing $src: $root/usr/X11/bin/$trg"
  18. install $src $root/usr/X11/bin/$trg
  19. done
  20. }
  21. if [ "$xpkg" = mesalib -o "$xpkg" = mesademos ] ; then
  22. prepatch="mesalib_prepatch"
  23. postmake="mesalib_postmake"
  24. case "$arch" in
  25. ppc)
  26. makeopt="linux-dri-$arch_target"
  27. ;;
  28. x86)
  29. if [ "$arch_machine" = x86_64 ] ; then
  30. makeopt="linux-dri-x86-64"
  31. else
  32. makeopt="linux-dri-x86"
  33. fi
  34. ;;
  35. *)
  36. makeopt="linux-dri"
  37. ;;
  38. esac
  39. fi
  40. if [ "$xpkg" = mesademos ] ; then
  41. makeinstopt=""
  42. fi
  43. export CFLAGS="$CFLAGS -I/usr/X11/include"