Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Oct 9th, 2012  |  syntax: Bash  |  size: 2.00 KB  |  views: 54  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Maintainer: Bill Fraser <wfraser@codewise.org>
  2. #
  3. # From flex's PKGBUILD:
  4. #   Maintainer: Allan McRae <allan@archlinux.org>
  5. #   Contributor: judd <jvinet@zeroflux.org>
  6.  
  7. _pkgbasename=flex
  8. pkgname=lib32-flex
  9. pkgver=2.5.35
  10. pkgrel=4
  11. pkgdesc="A tool for generating text-scanning programs"
  12. arch=('x86_64')
  13. url="http://flex.sourceforge.net"
  14. license=('custom')
  15. groups=('base-devel')
  16. depends=('lib32-glibc' 'm4' 'sh' $_pkgbasename)
  17. source=(http://downloads.sourceforge.net/sourceforge/flex/flex-$pkgver.tar.bz2
  18.         http://felipec.org/data/flex-2.5.35-no-bison.patch
  19.         flex-2.5.35-gcc44.patch
  20.         flex-2.5.35-hardening.patch
  21.         flex-2.5.35-missing-prototypes.patch
  22.         flex-2.5.35-sign.patch
  23.         lex.sh)
  24. md5sums=('10714e50cea54dc7a227e3eddcd44d57'
  25.          'cf6159a76b5510a198777bcc9a930996'
  26.          'e4444ef5c07db71a43280be74139bdea'
  27.          'de952b3ed7cc074bc8c3e6ab73634048'
  28.          '6b83f56b1b654c6a321cdc530a3ec68d'
  29.          'd87fd9e9762ba7e230d516bdcf1c8c6f'
  30.          'f725259ec23a9e87ee29e2ef82eda9a5')
  31.  
  32. build() {
  33.   export CC="gcc -m32"
  34.   export CXX="g++ -m32"
  35.   export LD="ld -m32"
  36.   export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
  37.  
  38.   cd $srcdir/$_pkgbasename-$pkgver
  39.  
  40.   patch -Np1 -i $srcdir/flex-2.5.35-gcc44.patch
  41.   patch -Np1 -i $srcdir/flex-2.5.35-hardening.patch
  42.   patch -Np1 -i $srcdir/flex-2.5.35-missing-prototypes.patch
  43.   patch -Np1 -i $srcdir/flex-2.5.35-sign.patch
  44.  
  45.   ./configure --prefix=/usr --libdir=/usr/lib32 \
  46.     --mandir=/usr/share/man --infodir=/usr/share/info
  47.  
  48.   patch -Np1 -i $srcdir/flex-2.5.35-no-bison.patch
  49.  
  50.   make
  51. }
  52.  
  53. check() {
  54.   cd $srcdir/$_pkgbasename-$pkgver
  55.   make check
  56. }
  57.  
  58. package() {
  59.   cd $srcdir/$_pkgbasename-$pkgver
  60.  
  61.   make prefix=$pkgdir/usr \
  62.     mandir=$pkgdir/usr/share/man \
  63.     infodir=$pkgdir/usr/share/info \
  64.     libdir=$pkgdir/usr/lib32 \
  65.     install
  66.  
  67.   rm -rf "${pkgdir}"/usr/{include,share,bin}
  68.  
  69.   mkdir -p $pkgdir/usr/share/licenses
  70.   ln -s $_pkgbasename "$pkgdir/usr/share/licenses/$pkgname"
  71. }