]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
flex: Add a gcc compile fix so we are able to run the testsuite.
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 10 Mar 2010 11:29:51 +0000 (12:29 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 10 Mar 2010 11:29:51 +0000 (12:29 +0100)
pkgs/core/flex/flex.nm
pkgs/core/flex/patches/flex-2.5.35-gcc44-1.patch [new file with mode: 0644]

index 78b540ac004674bd10845793c536ac82ca86bb24..ee1229370970dfecb5d938905cc326d4be2c9eda 100644 (file)
@@ -34,6 +34,7 @@ PKG_URL        = http://flex.sourceforge.net/
 PKG_LICENSE    = BSD
 PKG_SUMMARY    = A tool for creating scanners (text pattern recognizers).
 
+PKG_BUILD_DEPS+= bison
 PKG_DEPS      += m4
 
 define PKG_DESCRIPTION
@@ -53,6 +54,10 @@ PKG_TARBALL    = $(THISAPP).tar.bz2
 CONFIGURE_OPTIONS += \
        --mandir=/usr/share/man
 
+define STAGE_TEST
+       cd $(DIR_APP) && make check
+endef
+
 define STAGE_INSTALL_CMDS
        echo "#!/bin/sh"                        >  $(BUILDROOT)/usr/bin/lex
        echo "exec /usr/bin/flex -l \"$$@\""    >> $(BUILDROOT)/usr/bin/lex
diff --git a/pkgs/core/flex/patches/flex-2.5.35-gcc44-1.patch b/pkgs/core/flex/patches/flex-2.5.35-gcc44-1.patch
new file mode 100644 (file)
index 0000000..8f0e80f
--- /dev/null
@@ -0,0 +1,24 @@
+Submitted by: Matt Burgess (matthew at linuxfromscratch dot org)
+Date: 2009-05-03
+Initial Package Version: 2.5.35
+Origin: Matt Burgess
+Upstream Status: Submitted (attached to sourceforge bug 2178663)
+Description: Fixes an error caused by header cleanups in GCC 4.4.0 that is
+             evident from the test suite and would affect any C++ lexers
+             generated by Flex.  Without this patch, Flex will generate lexers
+             containing references to the 'EOF' symbol without including the
+             necessary C++ header file, leading to:
+
+             error: 'EOF' was not declared in this scope 
+
+diff -Naur flex-2.5.35.orig/skel.c flex-2.5.35/skel.c
+--- flex-2.5.35.orig/skel.c    2008-02-26 21:34:19.000000000 +0000
++++ flex-2.5.35/skel.c 2009-05-03 15:18:14.000000000 +0000
+@@ -284,6 +284,7 @@
+   "/* begin standard C++ headers. */",
+   "#include <iostream> ",
+   "#include <errno.h>",
++  "#include <cstdio>",
+   "#include <cstdlib>",
+   "#include <cstring>",
+   "/* end standard C++ headers. */",