1 # Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
2 # Contributor: Allan McRae <allan@archlinux.org>
3 # Contributor: judd <jvinet@zeroflux.org>
8 pkgdesc="A tool for generating text-scanning programs"
10 url="https://github.com/westes/flex"
12 depends=('glibc' 'm4' 'sh')
13 makedepends=('help2man')
15 "https://github.com/westes/flex/releases/download/v$pkgver/flex-$pkgver.tar.gz"{,.sig}
18 sha256sums=('e87aae032bf07c26f85ac0ed3250998c37621d95f8bd748b31f15b33c45ee995'
20 '20f3cce6b0ea6ab67a902a46b89c292b959994dedcbe6ee5d187f9bba1408b0e')
21 validpgpkeys=('56C67868E93390AA1039AD1CE4B29C8D64885307') # Will Estes
25 patch -p1 -i "$srcdir"/flex-pie.patch
31 ./configure --prefix=/usr
32 # prevent excessive overlinking due to libtool
33 sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
38 make -k check -C $pkgname-$pkgver
44 make DESTDIR="$pkgdir" install
45 ln -s flex "${pkgdir}/usr/bin/lex"
47 install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/license.txt"