summaryrefslogtreecommitdiff
path: root/sys-devel/flex
diff options
context:
space:
mode:
Diffstat (limited to 'sys-devel/flex')
-rw-r--r--sys-devel/flex/Manifest11
-rw-r--r--sys-devel/flex/files/flex-2.6.3-reentrant.patch82
-rw-r--r--sys-devel/flex/flex-2.6.1.ebuild77
-rw-r--r--sys-devel/flex/flex-2.6.3-r1.ebuild84
-rw-r--r--sys-devel/flex/flex-2.6.3.ebuild78
-rw-r--r--sys-devel/flex/flex-2.6.4.ebuild81
-rw-r--r--sys-devel/flex/metadata.xml12
7 files changed, 425 insertions, 0 deletions
diff --git a/sys-devel/flex/Manifest b/sys-devel/flex/Manifest
new file mode 100644
index 000000000000..a898b1973c94
--- /dev/null
+++ b/sys-devel/flex/Manifest
@@ -0,0 +1,11 @@
+AUX flex-2.6.3-reentrant.patch 2816 SHA256 461f0843bc4a1fe2ccea751453d89716502c31a374b5645703ec3a333427c5ac SHA512 105017a1020b339f08ce0c45c9c41ba6b5e42bb9dba22b258947f8d18ed697804c59e5cfa5e995b54652a54e6a500ccb2036b38001bab433d7af6f01c71feda4 WHIRLPOOL 259d44d39dd3e01613654d694b1356661074532a58955356ba4c707ed2f16fe786d9c065b54517bca7f5504e45e507732050e0d1345d4b5ebe69241d5ee346d2
+DIST flex-2.6.1.tar.xz 835048 SHA256 2c7a412c1640e094cb058d9b2fe39d450186e09574bebb7aa28f783e3799103f SHA512 1e35d0447f59139b98ede085d1a603d4f61cf8bc11cf2e291a3f492a05c60ee61535481b878585cd6843cd9b3c7952c834adfa78a6a71c64802e7b3069dec9d1 WHIRLPOOL d671017fd516f5d6457a896f1d50d4a4d310d32476a6db8f1ed99305a96955eec7586d8ef2aff1e03795be3f7417e0f1d8925b073788a14abcdd38868822eb67
+DIST flex-2.6.3.tar.gz 1405560 SHA256 68b2742233e747c462f781462a2a1e299dc6207401dac8f0bbb316f48565c2aa SHA512 f14b1af7ddd148660737991787fcf13d86cc0bef3859ed6c2135963373e76524d70382795c845cb6491b0435f8c40ba81e17f15267592b8d1656cfd4c3430b00 WHIRLPOOL 266266c4c15135fe52ec3b5226645b89c7053ec4dac257c9349d760601eaf50f7ec504d3c4b74951fd415d17299c2ca2e483e8c8c7f8ee936b4822d92603a4e2
+DIST flex-2.6.4.tar.gz 1419096 SHA256 e87aae032bf07c26f85ac0ed3250998c37621d95f8bd748b31f15b33c45ee995 SHA512 e9785f3d620a204b7d20222888917dc065c2036cae28667065bf7862dfa1b25235095a12fd04efdbd09bfd17d3452e6b9ef953a8c1137862ff671c97132a082e WHIRLPOOL b19880ae3d760e04138ca93c848da07baa004bd193616855f1e650a170648288727d6a2bb5e657f05b204505d4b5b70e76a795037c81c6a19e1767cebadf8204
+EBUILD flex-2.6.1.ebuild 1913 SHA256 ee0c9e6314da38de312f2884ac7fff9bfda1bf0de90cda2ec9cc55bb0969edeb SHA512 c0c4baca0a0e4373599be51d6490b46b25ef39d3fbf251a2bd531f438800e1f9dfaec839e9f8c72a66c1928896cfdb69fe52049ab1e1843d9c151ff21be0542e WHIRLPOOL 0b3c6734c549fd5d61ad44dce75d361e168564b793667282de63ca6fafdd7b7146ba4266f8bd65119844421e5563afc838bdc5e4b60dd2b814b12228afd138e5
+EBUILD flex-2.6.3-r1.ebuild 2061 SHA256 a71c37379d143e3abcb1f05fce3ffccce5877d8e17ad42bfc95a114f09058971 SHA512 d798c09ce136155b5e67b144d6eb3ac0e394caf0445678fa1e3e887f2c766fa6975fe2288b843a3f7ef6631193986621dcc2f4d46142ca73e693384d2f8b61e5 WHIRLPOOL a23f58c72c4d6ce243842485236db003198b89356a5e3b3a641ecf0dfe9841d813661b312dfbc597c90e9984e2d0df327b12726e50212f7516debdfe0740afda
+EBUILD flex-2.6.3.ebuild 1987 SHA256 ab00926b33bfb3998722f58731189312c0db1c6279f77573851347b02e6f1816 SHA512 54737594a12c82faf520ac12a3fe9d17b8b2658d9d6736ad25db58686250e2e97ef27c5341df96fa28ca78376f607d139ca6bea85f00ec5e8d52360b94df336f WHIRLPOOL a944131ecfc0e1e71ecf5bccca80e4b5e4bc5534a31367aa55ef2fd9830908d0777c6d00ced7057667689ebd26c98227accdc8c39400c478a492c653731afb9d
+EBUILD flex-2.6.4.ebuild 2026 SHA256 62707a253c137ef5f571a80e297e7607a7055b2ce2aa3efce719a2e2fc927b2e SHA512 4070f280ecf38f09cfd9210b41b5e42d12e2f4da06cf5db775c6738624016a3f58b9b2367b47f6b8a5b1d1b78730922b2c56582d5e93988dfd1edcb6b2e088cc WHIRLPOOL 9d0454152ecc9ef55073d38baf10537278b59f65d146877d14a05b9d744a6571143d7a464d0b16c27227d5cfbe33e047f2074bf268dc5e9dbe122ee8b3645ccf
+MISC ChangeLog 5656 SHA256 1d23877b1b816e90923b7e932f8e4d673e95d2ad3aa5db8814518f29623c6388 SHA512 4e09457657a237398e8b3833c7c934879686527059267cb59b17597ff84bc1a1a565b84f03c86583bbaa246d183a22570ea6627305e167c955cc1ad4db0f9106 WHIRLPOOL 98e7b57d707a18fd7fe5be6464fbedac1953d3beac9c6c251df9b4627da55b82c3c9f844a335645eab33534ed5710ded404abf035f5cf974e5f306181175e8b0
+MISC ChangeLog-2015 14123 SHA256 559935be9fec248b903e470b5e311f39e4e44790aad69495b78410e469604fc1 SHA512 673d316fb9a79bb40b7e241a2653009fecccabcefb7c159b078a31c4b8eac8755c8e404bdeeb3f4d871e6cef63faf7ece9e2b8625331a06f4c618349cf1102bd WHIRLPOOL f12d6b587e8cd44f7b17741da51db8213128f9a9a562d19aab872dba2b20e54e2ebcf35b74b0e195e1faf884c1abca0bc584bce66fceb14049d53606f691bce7
+MISC metadata.xml 382 SHA256 a2def7bad2faece13627db3d490854191891de695c4ecbf97f08d695c311f4e2 SHA512 074161b6d11f46cb704846d60cbc0fe44672a5feacd39107968516d292d12cfbf5975290f23d45abf9a74fdd4bbcf5aad77d48c924d3f57a71b3887b23ec2047 WHIRLPOOL c6cac3fc350669c466eb737610667f588441345345716476e3b89a586f5400fa49cf623b0fecb83c3f355ea14c57ae4a1353aa0539b3862e6983e29ab6e66501
diff --git a/sys-devel/flex/files/flex-2.6.3-reentrant.patch b/sys-devel/flex/files/flex-2.6.3-reentrant.patch
new file mode 100644
index 000000000000..f2f5eb8374ba
--- /dev/null
+++ b/sys-devel/flex/files/flex-2.6.3-reentrant.patch
@@ -0,0 +1,82 @@
+From 078b46c69d063aef1715b11348a2871d6036f253 Mon Sep 17 00:00:00 2001
+From: Christos Zoulas <christos@zoulas.com>
+Date: Sun, 22 Jan 2017 18:34:30 +0100
+Subject: [PATCH] Add more defines in the non-reentrant part.
+
+Fix the reentrant part; don't "#define yyfoo yyfoo" because it breaks
+code that does #ifndef yywrap ..
+---
+ src/flex.skl | 16 ++++++++++++++--
+ 1 file changed, 14 insertions(+), 2 deletions(-)
+
+diff --git a/src/flex.skl b/src/flex.skl
+index 190700f..6a7cde4 100644
+--- a/src/flex.skl
++++ b/src/flex.skl
+@@ -61,11 +61,17 @@ m4_changequote([[, ]])
+ m4_ifelse(M4_YY_PREFIX,yy,,
+ #define yy_create_buffer M4_YY_PREFIX[[_create_buffer]]
+ #define yy_delete_buffer M4_YY_PREFIX[[_delete_buffer]]
+-#define yy_flex_debug M4_YY_PREFIX[[_flex_debug]]
++#define yy_scan_buffer M4_YY_PREFIX[[_scan_buffer]]
++#define yy_scan_string M4_YY_PREFIX[[_scan_string]]
++#define yy_scan_bytes M4_YY_PREFIX[[_scan_bytes]]
+ #define yy_init_buffer M4_YY_PREFIX[[_init_buffer]]
+ #define yy_flush_buffer M4_YY_PREFIX[[_flush_buffer]]
+ #define yy_load_buffer_state M4_YY_PREFIX[[_load_buffer_state]]
+ #define yy_switch_to_buffer M4_YY_PREFIX[[_switch_to_buffer]]
++#define yypush_buffer_state M4_YY_PREFIX[[push_buffer_state]]
++#define yypop_buffer_state M4_YY_PREFIX[[pop_buffer_state]]
++#define yyensure_buffer_stack M4_YY_PREFIX[[ensure_buffer_stack]]
++#define yy_flex_debug M4_YY_PREFIX[[_flex_debug]]
+ #define yyin M4_YY_PREFIX[[in]]
+ #define yyleng M4_YY_PREFIX[[leng]]
+ #define yylex M4_YY_PREFIX[[lex]]
+@@ -107,7 +113,7 @@ m4_ifdef( [[M4_YY_PREFIX]],, [[m4_define([[M4_YY_PREFIX]], [[yy]])]])
+
+ m4preproc_define(`M4_GEN_PREFIX',
+ ``[[#define yy$1 ]]M4_YY_PREFIX[[$1]]
+-m4_define([[yy$1]], [[M4_YY_PREFIX[[$1]]m4_ifelse($'`#,0,,[[($'`@)]])]])'')
++%# m4_define([[yy$1]], [[M4_YY_PREFIX[[$1]]m4_ifelse($'`#,0,,[[($'`@)]])]])'')
+
+ %if-c++-only
+ /* The c++ scanner is a mess. The FlexLexer.h header file relies on the
+@@ -120,6 +126,7 @@ m4_define([[yy$1]], [[M4_YY_PREFIX[[$1]]m4_ifelse($'`#,0,,[[($'`@)]])]])'')
+ %endif
+
+ %if-c-only
++m4_ifelse(M4_YY_PREFIX,yy,,
+ M4_GEN_PREFIX(`_create_buffer')
+ M4_GEN_PREFIX(`_delete_buffer')
+ M4_GEN_PREFIX(`_scan_buffer')
+@@ -155,6 +162,7 @@ m4_define([[yy$1]], [[M4_YY_PREFIX[[$1]]m4_ifelse($'`#,0,,[[($'`@)]])]])'')
+ M4_GEN_PREFIX(`set_column')
+ ]])
+ M4_GEN_PREFIX(`wrap')
++)
+ %endif
+
+ m4_ifdef( [[M4_YY_BISON_LVAL]],
+@@ -170,11 +178,14 @@ m4_ifdef( [[<M4_YY_BISON_LLOC>]],
+ ]])
+
+
++m4_ifelse(M4_YY_PREFIX,yy,,
+ M4_GEN_PREFIX(`alloc')
+ M4_GEN_PREFIX(`realloc')
+ M4_GEN_PREFIX(`free')
++)
+
+ %if-c-only
++m4_ifelse(M4_YY_PREFIX,yy,,
+ m4_ifdef( [[M4_YY_NOT_REENTRANT]],
+ [[
+ M4_GEN_PREFIX(`text')
+@@ -184,6 +195,7 @@ m4_ifdef( [[M4_YY_NOT_REENTRANT]],
+ M4_GEN_PREFIX(`_flex_debug')
+ M4_GEN_PREFIX(`lineno')
+ ]])
++)
+ %endif
+
+
diff --git a/sys-devel/flex/flex-2.6.1.ebuild b/sys-devel/flex/flex-2.6.1.ebuild
new file mode 100644
index 000000000000..ad53e2d86e8c
--- /dev/null
+++ b/sys-devel/flex/flex-2.6.1.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils flag-o-matic multilib-minimal
+
+DESCRIPTION="The Fast Lexical Analyzer"
+HOMEPAGE="https://flex.sourceforge.net/ https://github.com/westes/flex"
+SRC_URI="https://github.com/westes/flex/releases/download/v${PV}/${P}.tar.xz"
+
+LICENSE="FLEX"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="nls static test"
+
+# We want bison explicitly and not yacc in general #381273
+RDEPEND="sys-devel/m4"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ nls? ( sys-devel/gettext )
+ test? ( sys-devel/bison )"
+
+src_prepare() {
+ # Disable running in the tests/ subdir as it has a bunch of built sources
+ # that cannot be made conditional (automake limitation). #568842
+ if ! use test ; then
+ sed -i \
+ -e '/^SUBDIRS =/,/^$/{/tests/d}' \
+ Makefile.in || die
+ fi
+}
+
+src_configure() {
+ use static && append-ldflags -static
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ # Do not install shared libs #503522
+ ECONF_SOURCE=${S} \
+ econf \
+ --disable-shared \
+ $(use_enable nls) \
+ --docdir='$(datarootdir)/doc/'${PF}
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+ else
+ cd src || die
+ emake -f Makefile -f - lib <<< 'lib: $(lib_LTLIBRARIES)'
+ fi
+}
+
+multilib_src_test() {
+ multilib_is_native_abi && emake check
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ default
+ else
+ cd src || die
+ emake DESTDIR="${D}" install-libLTLIBRARIES install-includeHEADERS
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ dodoc ONEWS
+ prune_libtool_files --all
+ rm "${ED}"/usr/share/doc/${PF}/COPYING || die
+ dosym flex /usr/bin/lex
+}
diff --git a/sys-devel/flex/flex-2.6.3-r1.ebuild b/sys-devel/flex/flex-2.6.3-r1.ebuild
new file mode 100644
index 000000000000..2cd53fc6b2fe
--- /dev/null
+++ b/sys-devel/flex/flex-2.6.3-r1.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils flag-o-matic libtool multilib-minimal
+
+DESCRIPTION="The Fast Lexical Analyzer"
+HOMEPAGE="https://flex.sourceforge.net/ https://github.com/westes/flex"
+SRC_URI="https://github.com/westes/${PN}/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="FLEX"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="nls static test"
+
+# We want bison explicitly and not yacc in general #381273
+RDEPEND="sys-devel/m4"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ nls? ( sys-devel/gettext )
+ test? ( sys-devel/bison )"
+
+PATCHES=(
+ "${FILESDIR}/${P}-reentrant.patch"
+)
+
+src_prepare() {
+ epatch "${PATCHES[@]}"
+
+ # Disable running in the tests/ subdir as it has a bunch of built sources
+ # that cannot be made conditional (automake limitation). #568842
+ if ! use test ; then
+ sed -i \
+ -e '/^SUBDIRS =/,/^$/{/tests/d}' \
+ Makefile.in || die
+ fi
+ elibtoolize # Prefix always needs this
+}
+
+src_configure() {
+ use static && append-ldflags -static
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ # Do not install shared libs #503522
+ ECONF_SOURCE=${S} \
+ econf \
+ --disable-shared \
+ $(use_enable nls) \
+ --docdir='$(datarootdir)/doc/'${PF}
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+ else
+ cd src || die
+ emake -f Makefile -f - lib <<< 'lib: $(lib_LTLIBRARIES)'
+ fi
+}
+
+multilib_src_test() {
+ multilib_is_native_abi && emake check
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ default
+ else
+ cd src || die
+ emake DESTDIR="${D}" install-libLTLIBRARIES install-includeHEADERS
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ dodoc ONEWS
+ prune_libtool_files --all
+ rm "${ED}"/usr/share/doc/${PF}/COPYING || die
+ dosym flex /usr/bin/lex
+}
diff --git a/sys-devel/flex/flex-2.6.3.ebuild b/sys-devel/flex/flex-2.6.3.ebuild
new file mode 100644
index 000000000000..c5b8bc754212
--- /dev/null
+++ b/sys-devel/flex/flex-2.6.3.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils flag-o-matic libtool multilib-minimal
+
+DESCRIPTION="The Fast Lexical Analyzer"
+HOMEPAGE="https://flex.sourceforge.net/ https://github.com/westes/flex"
+SRC_URI="https://github.com/westes/${PN}/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="FLEX"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="nls static test"
+
+# We want bison explicitly and not yacc in general #381273
+RDEPEND="sys-devel/m4"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ nls? ( sys-devel/gettext )
+ test? ( sys-devel/bison )"
+
+src_prepare() {
+ # Disable running in the tests/ subdir as it has a bunch of built sources
+ # that cannot be made conditional (automake limitation). #568842
+ if ! use test ; then
+ sed -i \
+ -e '/^SUBDIRS =/,/^$/{/tests/d}' \
+ Makefile.in || die
+ fi
+ elibtoolize # Prefix always needs this
+}
+
+src_configure() {
+ use static && append-ldflags -static
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ # Do not install shared libs #503522
+ ECONF_SOURCE=${S} \
+ econf \
+ --disable-shared \
+ $(use_enable nls) \
+ --docdir='$(datarootdir)/doc/'${PF}
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+ else
+ cd src || die
+ emake -f Makefile -f - lib <<< 'lib: $(lib_LTLIBRARIES)'
+ fi
+}
+
+multilib_src_test() {
+ multilib_is_native_abi && emake check
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ default
+ else
+ cd src || die
+ emake DESTDIR="${D}" install-libLTLIBRARIES install-includeHEADERS
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ dodoc ONEWS
+ prune_libtool_files --all
+ rm "${ED}"/usr/share/doc/${PF}/COPYING || die
+ dosym flex /usr/bin/lex
+}
diff --git a/sys-devel/flex/flex-2.6.4.ebuild b/sys-devel/flex/flex-2.6.4.ebuild
new file mode 100644
index 000000000000..c2d32936d7ca
--- /dev/null
+++ b/sys-devel/flex/flex-2.6.4.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils flag-o-matic libtool multilib-minimal
+
+DESCRIPTION="The Fast Lexical Analyzer"
+HOMEPAGE="https://flex.sourceforge.net/ https://github.com/westes/flex"
+SRC_URI="https://github.com/westes/${PN}/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="FLEX"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="nls static test"
+
+# We want bison explicitly and not yacc in general #381273
+RDEPEND="sys-devel/m4"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ nls? ( sys-devel/gettext )
+ test? ( sys-devel/bison )"
+
+src_prepare() {
+ #epatch "${PATCHES[@]}"
+ epatch_user
+
+ # Disable running in the tests/ subdir as it has a bunch of built sources
+ # that cannot be made conditional (automake limitation). #568842
+ if ! use test ; then
+ sed -i \
+ -e '/^SUBDIRS =/,/^$/{/tests/d}' \
+ Makefile.in || die
+ fi
+ elibtoolize # Prefix always needs this
+}
+
+src_configure() {
+ use static && append-ldflags -static
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ # Do not install shared libs #503522
+ ECONF_SOURCE=${S} \
+ econf \
+ --disable-shared \
+ $(use_enable nls) \
+ --docdir='$(datarootdir)/doc/'${PF}
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+ else
+ cd src || die
+ emake -f Makefile -f - lib <<< 'lib: $(lib_LTLIBRARIES)'
+ fi
+}
+
+multilib_src_test() {
+ multilib_is_native_abi && emake check
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ default
+ else
+ cd src || die
+ emake DESTDIR="${D}" install-libLTLIBRARIES install-includeHEADERS
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ dodoc ONEWS
+ prune_libtool_files --all
+ rm "${ED}"/usr/share/doc/${PF}/COPYING || die
+ dosym flex /usr/bin/lex
+}
diff --git a/sys-devel/flex/metadata.xml b/sys-devel/flex/metadata.xml
new file mode 100644
index 000000000000..6f7c81d076d5
--- /dev/null
+++ b/sys-devel/flex/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">flex</remote-id>
+ <remote-id type="github">westes/flex</remote-id>
+ </upstream>
+</pkgmetadata>