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.

50 lines
1.0 KiB

  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. # var_append CC_WRAPPER_FILTER "|" \
  22. # "sed -r 's,-lglut,-L/usr/X11/lib\n-lXmu\n-lXi\n-lglut,g'"
  23. if [ "$xpkg" = mesalib -o "$xpkg" = mesademos ] ; then
  24. prepatch="mesalib_prepatch"
  25. postmake="mesalib_postmake"
  26. fi
  27. if [ "$xpkg" = mesalib ] ; then
  28. case "$arch" in
  29. ppc)
  30. makeopt="linux-dri-$arch_target"
  31. ;;
  32. x86)
  33. if [ "$arch_machine" = x86_64 ] ; then
  34. makeopt="linux-dri-x86-64"
  35. else
  36. makeopt="linux-dri-x86"
  37. fi
  38. ;;
  39. *)
  40. makeopt="linux-dri"
  41. ;;
  42. esac
  43. fi
  44. export CFLAGS="$CFLAGS -I/usr/X11/include"