summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-devel/flex/ChangeLog8
-rw-r--r--sys-devel/flex/files/digest-flex-2.5.31-r12
-rw-r--r--sys-devel/flex/files/flex-2.5.31-isatty.patch40
-rw-r--r--sys-devel/flex/flex-2.5.31-r1.ebuild45
4 files changed, 94 insertions, 1 deletions
diff --git a/sys-devel/flex/ChangeLog b/sys-devel/flex/ChangeLog
index ffaf1824b187..8f068969caa1 100644
--- a/sys-devel/flex/ChangeLog
+++ b/sys-devel/flex/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-devel/flex
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/flex/ChangeLog,v 1.35 2006/02/04 00:46:21 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/flex/ChangeLog,v 1.36 2006/02/06 23:17:45 vapier Exp $
+
+*flex-2.5.31-r1 (06 Feb 2006)
+
+ 06 Feb 2006; Mike Frysinger <vapier@gentoo.org>
+ +files/flex-2.5.31-isatty.patch, +flex-2.5.31-r1.ebuild:
+ Fix building C++ apps like doxygen #119598 by Michael Cramer.
04 Feb 2006; Mike Frysinger <vapier@gentoo.org>
+files/flex-configure-LANG.patch, flex-2.5.4a-r6.ebuild:
diff --git a/sys-devel/flex/files/digest-flex-2.5.31-r1 b/sys-devel/flex/files/digest-flex-2.5.31-r1
new file mode 100644
index 000000000000..61100ba95b7b
--- /dev/null
+++ b/sys-devel/flex/files/digest-flex-2.5.31-r1
@@ -0,0 +1,2 @@
+MD5 363dcc4afc917dc51306eb9d3de0152f flex-2.5.31.tar.bz2 681792
+MD5 7ed573f6e5f9cf7ddea521bc06bedb8a flex_2.5.31-36.diff.gz 211072
diff --git a/sys-devel/flex/files/flex-2.5.31-isatty.patch b/sys-devel/flex/files/flex-2.5.31-isatty.patch
new file mode 100644
index 000000000000..402d47b9a31e
--- /dev/null
+++ b/sys-devel/flex/files/flex-2.5.31-isatty.patch
@@ -0,0 +1,40 @@
+Declare the isatty prototype all the time
+
+http://bugs.gentoo.org/119598
+
+--- flex/scan.c
++++ flex/scan.c
+@@ -3935,9 +3935,13 @@
+ yyfree((void *) b );
+ }
+
+-#ifndef __cplusplus
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern int isatty (int );
+-#endif /* __cplusplus */
++#ifdef __cplusplus
++}
++#endif
+
+ /* Initializes or reinitializes a buffer.
+ * This function is sometimes called more than once on the same buffer,
+--- flex/skel.c
++++ flex/skel.c
+@@ -2183,9 +2183,13 @@
+ "[[",
+ " m4_ifdef( [[M4_YY_NEVER_INTERACTIVE]],,",
+ " [[",
+- "#ifndef __cplusplus",
++ "#ifdef __cplusplus",
++ "extern \"C\" {",
++ "#endif",
+ "extern int isatty M4_YY_PARAMS( int );",
+- "#endif /* __cplusplus */",
++ "#ifdef __cplusplus",
++ "}",
++ "#endif",
+ " ]])",
+ "]])",
+ "%endif",
diff --git a/sys-devel/flex/flex-2.5.31-r1.ebuild b/sys-devel/flex/flex-2.5.31-r1.ebuild
new file mode 100644
index 000000000000..32ee71cb2bf7
--- /dev/null
+++ b/sys-devel/flex/flex-2.5.31-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/flex/flex-2.5.31-r1.ebuild,v 1.10 2006/02/06 23:17:45 vapier Exp $
+
+inherit eutils flag-o-matic
+
+DEB_VER=36
+DESCRIPTION="GNU lexical analyser generator"
+HOMEPAGE="http://lex.sourceforge.net/"
+SRC_URI="mirror://sourceforge/lex/${P}.tar.bz2
+ mirror://debian/pool/main/f/flex/${PN}_${PV}-${DEB_VER}.diff.gz"
+
+LICENSE="FLEX"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc-macos ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="build nls static"
+
+DEPEND="nls? ( sys-devel/gettext )"
+RDEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${WORKDIR}"/${PN}_${PV}-${DEB_VER}.diff
+ epatch "${FILESDIR}"/${P}-include.patch
+ epatch "${FILESDIR}"/${P}-isatty.patch
+}
+
+src_compile() {
+ use static && append-ldflags -static
+ econf $(use_enable nls) || die
+ emake || die
+}
+
+src_install() {
+ make install DESTDIR="${D}" || die "make install failed"
+
+ if use build ; then
+ rm -r "${D}"/usr/{include,lib,share}
+ else
+ dodoc AUTHORS ChangeLog NEWS ONEWS README* RoadMap THANKS TODO
+ fi
+
+ dosym flex /usr/bin/lex
+}