diff options
-rw-r--r-- | abs/core/flex/PKGBUILD | 50 | ||||
-rw-r--r-- | abs/core/flex/flex-yytext.patch | 22 | ||||
-rw-r--r-- | abs/core/flex/flex.install | 22 |
3 files changed, 54 insertions, 40 deletions
diff --git a/abs/core/flex/PKGBUILD b/abs/core/flex/PKGBUILD index f36300f..d51091d 100644 --- a/abs/core/flex/PKGBUILD +++ b/abs/core/flex/PKGBUILD @@ -1,30 +1,44 @@ -# $Id: PKGBUILD 3606 2008-06-26 00:29:52Z paul $ -# Maintainer: judd <jvinet@zeroflux.org> +# $Id: PKGBUILD 163839 2012-07-21 10:43:39Z allan $ +# Maintainer: Allan McRae <allan@archlinux.org> +# Contributor: judd <jvinet@zeroflux.org> + pkgname=flex -pkgver=2.5.35 +pkgver=2.5.36 pkgrel=1 pkgdesc="A tool for generating text-scanning programs" -arch=(i686 x86_64) +arch=('i686' 'x86_64') url="http://flex.sourceforge.net" license=('custom') groups=('base-devel') -depends=('glibc' 'sh') -source=(http://downloads.sourceforge.net/sourceforge/flex/flex-$pkgver.tar.bz2 - lex.sh) -md5sums=('10714e50cea54dc7a227e3eddcd44d57' 'f725259ec23a9e87ee29e2ef82eda9a5') +depends=('glibc' 'm4' 'sh') +install=flex.install +source=(http://downloads.sourceforge.net/sourceforge/flex/flex-$pkgver.tar.bz2 + lex.sh) +md5sums=('5e637290609fd3c2f1f2e75ac2bce1c5' + 'f725259ec23a9e87ee29e2ef82eda9a5') build() { - cd $startdir/src/$pkgname-$pkgver || return 1 + cd $srcdir/$pkgname-$pkgver + ./configure --prefix=/usr + make +} + +check() { + cd $srcdir/$pkgname-$pkgver - # configure - ./configure --prefix=/usr --mandir=/usr/share/man || return 1 + # these tests used features removed in bison-2.6 + sed -i -e '/test-bison-yylloc/d' -e '/test-bison-yylval/d' tests/Makefile.in - # build and install - make || return 1 - make prefix=$startdir/pkg/usr mandir=$startdir/pkg/usr/share/man install || return 1 - install -D -m755 $startdir/src/lex.sh $startdir/pkg/usr/bin/lex || return 1 + make check +} - # install license - install -D -m644 COPYING \ - $startdir/pkg/usr/share/licenses/$pkgname/license.txt || return 1 +package() { + cd $srcdir/$pkgname-$pkgver + + make DESTDIR=$pkgdir install + install -Dm755 $srcdir/lex.sh $pkgdir/usr/bin/lex + + install -Dm644 COPYING \ + $pkgdir/usr/share/licenses/$pkgname/license.txt } + diff --git a/abs/core/flex/flex-yytext.patch b/abs/core/flex/flex-yytext.patch deleted file mode 100644 index 27cfaa4..0000000 --- a/abs/core/flex/flex-yytext.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -Naur flex-2.5.31-orig/flex.skl flex-2.5.31/flex.skl ---- flex-2.5.31-orig/flex.skl 2003-03-31 17:51:38.000000000 -0800 -+++ flex-2.5.31/flex.skl 2004-04-11 12:19:10.000000000 -0700 -@@ -3280,7 +3280,6 @@ - #undef yy_set_bol - #undef yy_new_buffer - #undef yy_set_interactive --#undef yytext_ptr - #undef YY_DO_BEFORE_ACTION - - #ifdef YY_DECL_IS_OURS -diff -Naur flex-2.5.31-orig/gen.c flex-2.5.31/gen.c ---- flex-2.5.31-orig/gen.c 2003-03-30 11:58:44.000000000 -0800 -+++ flex-2.5.31/gen.c 2004-04-11 12:19:38.000000000 -0700 -@@ -1812,7 +1812,6 @@ - if (yytext_is_array) { - if (!reentrant){ - indent_puts ("static int yy_more_offset = 0;"); -- }else{ - indent_puts ("static int yy_prev_more_offset = 0;"); - } - } diff --git a/abs/core/flex/flex.install b/abs/core/flex/flex.install new file mode 100644 index 0000000..5b328c7 --- /dev/null +++ b/abs/core/flex/flex.install @@ -0,0 +1,22 @@ +infodir=/usr/share/info +filelist=(flex.info{,-1,-2}) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +# vim:set ts=2 sw=2 et: |