summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2010-11-16 20:32:45 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2010-11-16 20:32:45 +0000
commit1c5ebe65c11df748985212889525712a0c9aab8f (patch)
treefa60c9ed01d44709017e81e7398edddd44d63253 /sys-devel
parentSome icons were not installed, thank Nikoli for this job. (diff)
downloadgentoo-2-1c5ebe65c11df748985212889525712a0c9aab8f.tar.gz
gentoo-2-1c5ebe65c11df748985212889525712a0c9aab8f.tar.bz2
gentoo-2-1c5ebe65c11df748985212889525712a0c9aab8f.zip
Add a flex version with sanitised autotools that can be cross-compiled without further workarounds; the new version also uses the latest Debian patch (and makes it easier to use it). Closes bug #345785.
(Portage version: 2.2.0_alpha4/cvs/Linux x86_64)
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/flex/ChangeLog10
-rw-r--r--sys-devel/flex/files/flex-2.5.35-saneautotools.patch77
-rw-r--r--sys-devel/flex/flex-2.5.35_p10.ebuild47
3 files changed, 133 insertions, 1 deletions
diff --git a/sys-devel/flex/ChangeLog b/sys-devel/flex/ChangeLog
index ecf6bdcee9f9..27025a139bf6 100644
--- a/sys-devel/flex/ChangeLog
+++ b/sys-devel/flex/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for sys-devel/flex
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/flex/ChangeLog,v 1.83 2010/06/08 19:00:00 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/flex/ChangeLog,v 1.84 2010/11/16 20:32:45 flameeyes Exp $
+
+*flex-2.5.35_p10 (16 Nov 2010)
+
+ 16 Nov 2010; Diego E. Pettenò <flameeyes@gentoo.org>
+ +flex-2.5.35_p10.ebuild, +files/flex-2.5.35-saneautotools.patch:
+ Add a flex version with sanitised autotools that can be cross-compiled
+ without further workarounds; the new version also uses the latest Debian
+ patch (and makes it easier to use it). Closes bug #345785.
08 Jun 2010; Samuli Suominen <ssuominen@gentoo.org> flex-2.5.35.ebuild:
Fix DESCRIPTION wrt #323237 by Jaak Ristioja.
diff --git a/sys-devel/flex/files/flex-2.5.35-saneautotools.patch b/sys-devel/flex/files/flex-2.5.35-saneautotools.patch
new file mode 100644
index 000000000000..fd8487a71e83
--- /dev/null
+++ b/sys-devel/flex/files/flex-2.5.35-saneautotools.patch
@@ -0,0 +1,77 @@
+Index: flex-2.5.35/configure.in
+===================================================================
+--- flex-2.5.35.orig/configure.in
++++ flex-2.5.35/configure.in
+@@ -39,6 +39,7 @@ AM_GNU_GETTEXT_VERSION(0.12)
+ AC_PROG_YACC
+ AM_PROG_LEX
+ AC_PROG_CC
++AM_PROG_CC_C_O
+ AC_PROG_CXX
+ AC_PROG_LN_S
+ AC_PROG_RANLIB
+@@ -103,13 +104,6 @@ AC_HEADER_STDBOOL
+ AC_C_CONST
+ AC_TYPE_SIZE_T
+
+-# Checks for library functions.
+-
+-AC_FUNC_FORK
+-AC_FUNC_MALLOC
+-AC_FUNC_REALLOC
+-AC_CHECK_FUNCS([dup2 isascii memset pow regcomp setlocale strchr strtol])
+-
+ AC_CONFIG_FILES(
+ Makefile
+ doc/Makefile
+Index: flex-2.5.35/Makefile.am
+===================================================================
+--- flex-2.5.35.orig/Makefile.am
++++ flex-2.5.35/Makefile.am
+@@ -127,33 +127,6 @@ LIBS = @LIBINTL@ @LIBS@
+ skel.c: flex.skl mkskel.sh flexint.h tables_shared.h
+ sed 's/m4_/m4postproc_/g; s/m4preproc_/m4_/g' $(srcdir)/flex.skl | $(m4) -P -DFLEX_MAJOR_VERSION=`echo $(VERSION)|cut -f 1 -d .` -DFLEX_MINOR_VERSION=`echo $(VERSION)|cut -f 2 -d .` -DFLEX_SUBMINOR_VERSION=`echo $(VERSION)|cut -f 3 -d .` | sed 's/m4postproc_/m4_/g' | $(SHELL) $(srcdir)/mkskel.sh >skel.c
+
+-# Explicitly describe dependencies.
+-# You can recreate this with `gcc -I. -MM *.c'
+-buf.o: buf.c flexdef.h flexint.h
+-ccl.o: ccl.c flexdef.h flexint.h
+-dfa.o: dfa.c flexdef.h flexint.h tables.h tables_shared.h
+-ecs.o: ecs.c flexdef.h flexint.h
+-scanflags.o: scanflags.c flexdef.h flexint.h
+-gen.o: gen.c flexdef.h flexint.h tables.h tables_shared.h
+-libmain.o: libmain.c
+-libyywrap.o: libyywrap.c
+-main.o: main.c flexdef.h flexint.h version.h options.h scanopt.h \
+- tables.h tables_shared.h
+-misc.o: misc.c flexdef.h flexint.h tables.h tables_shared.h
+-nfa.o: nfa.c flexdef.h flexint.h
+-options.o: options.c options.h scanopt.h flexdef.h flexint.h
+-parse.o: parse.c flexdef.h flexint.h tables.h tables_shared.h
+-scan.o: scan.c flexdef.h flexint.h parse.h
+-scanopt.o: scanopt.c flexdef.h flexint.h scanopt.h
+-skel.o: skel.c flexdef.h flexint.h
+-sym.o: sym.c flexdef.h flexint.h
+-tables.o: tables.c flexdef.h flexint.h tables.h tables_shared.h
+-tables_shared.o: tables_shared.c flexdef.h flexint.h tables.h \
+- tables_shared.h
+-tblcmp.o: tblcmp.c flexdef.h flexint.h
+-yylex.o: yylex.c flexdef.h flexint.h parse.h
+-filter.o: filter.c flexdef.h flexint.h
+-
+ # Create the ChangeLog, but only if we're inside a cvs working directory
+
+ ChangeLog: $(srcdir)/tools/cvsauthors $(srcdir)/tools/cvs2cl.pl
+Index: flex-2.5.35/tests/test-pthread/Makefile.am
+===================================================================
+--- flex-2.5.35.orig/tests/test-pthread/Makefile.am
++++ flex-2.5.35/tests/test-pthread/Makefile.am
+@@ -27,7 +27,7 @@ CLEANFILES = scanner.c scanner.h parser.
+ OBJS = scanner.o # parser.o
+
+ AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
+-LDFLAGS = -lpthread
++LOADLIBES = -lpthread
+ #LFLAGS = --header="scanner.h"
+ #YFLAGS = --defines --output=parser.c
+
diff --git a/sys-devel/flex/flex-2.5.35_p10.ebuild b/sys-devel/flex/flex-2.5.35_p10.ebuild
new file mode 100644
index 000000000000..9c943e16b67f
--- /dev/null
+++ b/sys-devel/flex/flex-2.5.35_p10.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/flex/flex-2.5.35_p10.ebuild,v 1.1 2010/11/16 20:32:45 flameeyes Exp $
+
+EAPI=2
+
+inherit eutils flag-o-matic autotools
+
+if [[ ${PV} == *_p* ]]; then
+ DEB_DIFF=${PN}_${PV/_p/-}
+fi
+
+MY_P=${P%_p*}
+
+DESCRIPTION="The Fast Lexical Analyzer"
+HOMEPAGE="http://flex.sourceforge.net/"
+SRC_URI="mirror://sourceforge/flex/${MY_P}.tar.bz2
+ ${DEB_DIFF:+mirror://debian/pool/main/f/flex/${DEB_DIFF}.diff.gz}"
+
+LICENSE="FLEX"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
+IUSE="nls static"
+
+DEPEND="nls? ( sys-devel/gettext )"
+RDEPEND=""
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ [[ -n ${DEB_DIFF} ]] && epatch "${WORKDIR}"/${DEB_DIFF}.diff
+ epatch "${FILESDIR}"/${PN}-2.5.35-gcc44.patch
+ epatch "${FILESDIR}"/${PN}-2.5.35-saneautotools.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ use static && append-ldflags -static
+ econf $(use_enable nls)
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die "make install failed"
+ dodoc AUTHORS ChangeLog NEWS ONEWS README* THANKS TODO || die
+ dosym flex /usr/bin/lex
+}