From d0cff01fba28a120bb353f89d18a9ea981e68a6a Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sat, 3 Jan 2009 18:32:32 +0000 Subject: flex: Clean up and convert to BBCLASSEXTEND --- meta/packages/flex/files/fix-gen.patch | 17 --------------- meta/packages/flex/files/flex-lvalue.diff | 36 ------------------------------- meta/packages/flex/flex-native_2.5.31.bb | 10 --------- meta/packages/flex/flex.inc | 3 +-- meta/packages/flex/flex/fix-gen.patch | 17 +++++++++++++++ meta/packages/flex/flex/flex-lvalue.diff | 36 +++++++++++++++++++++++++++++++ meta/packages/flex/flex_2.5.31.bb | 7 ++---- 7 files changed, 56 insertions(+), 70 deletions(-) delete mode 100644 meta/packages/flex/files/fix-gen.patch delete mode 100644 meta/packages/flex/files/flex-lvalue.diff delete mode 100644 meta/packages/flex/flex-native_2.5.31.bb create mode 100644 meta/packages/flex/flex/fix-gen.patch create mode 100644 meta/packages/flex/flex/flex-lvalue.diff (limited to 'meta/packages') diff --git a/meta/packages/flex/files/fix-gen.patch b/meta/packages/flex/files/fix-gen.patch deleted file mode 100644 index 55f4f6fdf..000000000 --- a/meta/packages/flex/files/fix-gen.patch +++ /dev/null @@ -1,17 +0,0 @@ - -# -# Patch managed by http://www.holgerschurig.de/patcher.html -# - ---- flex-2.5.31/gen.c~fix-gen -+++ flex-2.5.31/gen.c -@@ -1812,8 +1812,7 @@ - if (yytext_is_array) { - if (!reentrant){ - indent_puts ("static int yy_more_offset = 0;"); -- }else{ -- indent_puts ("static int yy_prev_more_offset = 0;"); -+ indent_puts ("static int yy_prev_more_offset = 0;"); - } - } - else if (!reentrant) { diff --git a/meta/packages/flex/files/flex-lvalue.diff b/meta/packages/flex/files/flex-lvalue.diff deleted file mode 100644 index 56ae539a6..000000000 --- a/meta/packages/flex/files/flex-lvalue.diff +++ /dev/null @@ -1,36 +0,0 @@ -Patch from http://bugs.debian.org/cgi-bin/bugreport.cgi/flex-lvalue.diff?bug=194844;msg=10;att=1 - -according to posix 0,1,2 are already setup and this avoids -the issues with -| filter.c: In function 'filter_apply_chain': -| filter.c:161: error: invalid lvalue in assignment -| filter.c:163: error: invalid lvalue in assignment -| filter.c:184: error: invalid lvalue in assignment - - -diff -ur flex-2.5.31.ORIG/filter.c flex-2.5.31/filter.c ---- flex-2.5.31.ORIG/filter.c 2003-03-25 16:39:08.000000000 +0000 -+++ flex-2.5.31/filter.c 2003-05-27 17:00:26.000000000 +0000 -@@ -157,11 +157,8 @@ - if (chain->filter_func) { - int r; - -- /* setup streams again */ -- if ((stdin = fdopen (0, "r")) == NULL) -- flexfatal (_("fdopen(0) failed")); -- if ((stdout = fdopen (1, "w")) == NULL) -- flexfatal (_("fdopen(1) failed")); -+ /* POSIX says we inherit fd[0-2], so we don't need -+ to do anything to them here */ - - if ((r = chain->filter_func (chain)) == -1) - flexfatal (_("filter_func failed")); -@@ -181,8 +178,6 @@ - if (dup2 (pipes[1], 1) == -1) - flexfatal (_("dup2(pipes[1],1)")); - close (pipes[1]); -- if ((stdout = fdopen (1, "w")) == NULL) -- flexfatal (_("fdopen(1) failed")); - - return true; - } diff --git a/meta/packages/flex/flex-native_2.5.31.bb b/meta/packages/flex/flex-native_2.5.31.bb deleted file mode 100644 index 1e9354afd..000000000 --- a/meta/packages/flex/flex-native_2.5.31.bb +++ /dev/null @@ -1,10 +0,0 @@ -require flex.inc -inherit native -PR = "r2" - -do_stage () { - install -m 0755 flex ${STAGING_BINDIR} - oe_libinstall -a libfl ${STAGING_LIBDIR} - ln -sf ./flex ${STAGING_BINDIR}/flex++ - ln -sf ./flex ${STAGING_BINDIR}/lex -} diff --git a/meta/packages/flex/flex.inc b/meta/packages/flex/flex.inc index 048b3cb47..0e8bf76e7 100644 --- a/meta/packages/flex/flex.inc +++ b/meta/packages/flex/flex.inc @@ -5,7 +5,6 @@ LICENSE = "BSD" SRC_URI = "${SOURCEFORGE_MIRROR}/flex/flex-2.5.31.tar.bz2 \ file://flex-lvalue.diff;patch=1 \ file://fix-gen.patch;patch=1" -S = "${WORKDIR}/flex-${PV}" -inherit autotools +inherit autotools_stage diff --git a/meta/packages/flex/flex/fix-gen.patch b/meta/packages/flex/flex/fix-gen.patch new file mode 100644 index 000000000..55f4f6fdf --- /dev/null +++ b/meta/packages/flex/flex/fix-gen.patch @@ -0,0 +1,17 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- flex-2.5.31/gen.c~fix-gen ++++ flex-2.5.31/gen.c +@@ -1812,8 +1812,7 @@ + if (yytext_is_array) { + if (!reentrant){ + indent_puts ("static int yy_more_offset = 0;"); +- }else{ +- indent_puts ("static int yy_prev_more_offset = 0;"); ++ indent_puts ("static int yy_prev_more_offset = 0;"); + } + } + else if (!reentrant) { diff --git a/meta/packages/flex/flex/flex-lvalue.diff b/meta/packages/flex/flex/flex-lvalue.diff new file mode 100644 index 000000000..56ae539a6 --- /dev/null +++ b/meta/packages/flex/flex/flex-lvalue.diff @@ -0,0 +1,36 @@ +Patch from http://bugs.debian.org/cgi-bin/bugreport.cgi/flex-lvalue.diff?bug=194844;msg=10;att=1 + +according to posix 0,1,2 are already setup and this avoids +the issues with +| filter.c: In function 'filter_apply_chain': +| filter.c:161: error: invalid lvalue in assignment +| filter.c:163: error: invalid lvalue in assignment +| filter.c:184: error: invalid lvalue in assignment + + +diff -ur flex-2.5.31.ORIG/filter.c flex-2.5.31/filter.c +--- flex-2.5.31.ORIG/filter.c 2003-03-25 16:39:08.000000000 +0000 ++++ flex-2.5.31/filter.c 2003-05-27 17:00:26.000000000 +0000 +@@ -157,11 +157,8 @@ + if (chain->filter_func) { + int r; + +- /* setup streams again */ +- if ((stdin = fdopen (0, "r")) == NULL) +- flexfatal (_("fdopen(0) failed")); +- if ((stdout = fdopen (1, "w")) == NULL) +- flexfatal (_("fdopen(1) failed")); ++ /* POSIX says we inherit fd[0-2], so we don't need ++ to do anything to them here */ + + if ((r = chain->filter_func (chain)) == -1) + flexfatal (_("filter_func failed")); +@@ -181,8 +178,6 @@ + if (dup2 (pipes[1], 1) == -1) + flexfatal (_("dup2(pipes[1],1)")); + close (pipes[1]); +- if ((stdout = fdopen (1, "w")) == NULL) +- flexfatal (_("fdopen(1) failed")); + + return true; + } diff --git a/meta/packages/flex/flex_2.5.31.bb b/meta/packages/flex/flex_2.5.31.bb index 3062e2d8d..7ca7c7ee3 100644 --- a/meta/packages/flex/flex_2.5.31.bb +++ b/meta/packages/flex/flex_2.5.31.bb @@ -1,9 +1,6 @@ require flex.inc -PR = "r4" +PR = "r5" SRC_URI += "file://include.patch;patch=1" -do_stage() { - oe_libinstall -a libfl ${STAGING_LIBDIR} -} - +BBCLASSEXTEND = "native" -- cgit v1.2.3