From: Michael Tremer Date: Wed, 10 Mar 2010 11:29:51 +0000 (+0100) Subject: flex: Add a gcc compile fix so we are able to run the testsuite. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bebe2200879adf63be619585a54201692ee4cd2f;p=ipfire-3.x.git flex: Add a gcc compile fix so we are able to run the testsuite. --- diff --git a/pkgs/core/flex/flex.nm b/pkgs/core/flex/flex.nm index 78b540ac0..ee1229370 100644 --- a/pkgs/core/flex/flex.nm +++ b/pkgs/core/flex/flex.nm @@ -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 index 000000000..8f0e80fd7 --- /dev/null +++ b/pkgs/core/flex/patches/flex-2.5.35-gcc44-1.patch @@ -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 ", + "#include ", ++ "#include ", + "#include ", + "#include ", + "/* end standard C++ headers. */",