From cd450195ef3ab3a24d0e005b70d51304e9e18729 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sat, 25 Mar 2017 03:12:15 +0000 Subject: main/flex: fix yywrap problem --- main/flex/APKBUILD | 10 +++++----- main/flex/fix-yywrap.patch | 27 +++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 5 deletions(-) create mode 100644 main/flex/fix-yywrap.patch (limited to 'main/flex') diff --git a/main/flex/APKBUILD b/main/flex/APKBUILD index 552cd9c894..543b524b9c 100644 --- a/main/flex/APKBUILD +++ b/main/flex/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa pkgname=flex pkgver=2.6.3 -pkgrel=0 +pkgrel=1 pkgdesc="A tool for generating text-scanning programs" url="https://github.com/westes/flex" arch="all" @@ -10,7 +10,8 @@ depends="m4" depends_dev="flex" makedepends="$depends_dev m4 bison help2man" subpackages="$pkgname-doc $pkgname-libs $pkgname-dev" -source="https://github.com/westes/$pkgname/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz" +source="https://github.com/westes/$pkgname/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz + fix-yywrap.patch" builddir="$srcdir"/$pkgname-$pkgver build() { @@ -33,6 +34,5 @@ package() { ln -s flex "$pkgdir"/usr/bin/lex || return 1 } -md5sums="a5f65570cd9107ec8a8ec88f17b31bb1 flex-2.6.3.tar.gz" -sha256sums="68b2742233e747c462f781462a2a1e299dc6207401dac8f0bbb316f48565c2aa flex-2.6.3.tar.gz" -sha512sums="f14b1af7ddd148660737991787fcf13d86cc0bef3859ed6c2135963373e76524d70382795c845cb6491b0435f8c40ba81e17f15267592b8d1656cfd4c3430b00 flex-2.6.3.tar.gz" +sha512sums="f14b1af7ddd148660737991787fcf13d86cc0bef3859ed6c2135963373e76524d70382795c845cb6491b0435f8c40ba81e17f15267592b8d1656cfd4c3430b00 flex-2.6.3.tar.gz +c1f50405102b6e74d3c21206aab4419a42d12931454d858e8cb7b617773338ea3ff34e4ed8813998709f515da42e98bca0123607bcf77fb74e61acb0cf30a2f9 fix-yywrap.patch" diff --git a/main/flex/fix-yywrap.patch b/main/flex/fix-yywrap.patch new file mode 100644 index 0000000000..39dd8852ad --- /dev/null +++ b/main/flex/fix-yywrap.patch @@ -0,0 +1,27 @@ +From f5d87f1a26f4a5c3402497008ae10e9a1345d327 Mon Sep 17 00:00:00 2001 +From: Christos Zoulas +Date: Sun, 22 Jan 2017 18:20:44 +0100 +Subject: [PATCH] scanner: Use prefix when defining yywrap to avoid + redefinition. + +Fixes regression introduced in v2.6.3. +--- + src/main.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/main.c b/src/main.c +index f70b1aa..83f66b0 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -1586,9 +1586,9 @@ void readin (void) + if (!do_yywrap) { + if (!C_plus_plus) { + if (reentrant) +- outn ("\n#define yywrap(yyscanner) (/*CONSTCOND*/1)"); ++ out_str ("\n#define %swrap(yyscanner) (/*CONSTCOND*/1)\n", prefix); + else +- outn ("\n#define yywrap() (/*CONSTCOND*/1)"); ++ out_str ("\n#define %swrap() (/*CONSTCOND*/1)\n", prefix); + } + outn ("#define YY_SKIP_YYWRAP"); + } -- cgit v1.2.3