sys-devel/flex: Sync with gentoo

It's from gentoo commit 38b155fa1bf907617067c98eb4ba3a5d0790eb1a.
This commit is contained in:
Krzesimir Nowak 2022-03-02 16:43:38 +01:00
parent 69696bbf97
commit 63c71d0550
8 changed files with 15 additions and 420 deletions

View File

@ -1,3 +1 @@
DIST flex-2.6.1.tar.xz 835048 BLAKE2B 5b0b67774d1ba2d4b2ad8a8cba1f0b8fed9aecdae387e54e6cb8fd1c0c9ef78559bc1a6fe6b97f984f16b438d350de4dccda7e3427d71fead9073ab6616b0ecc SHA512 1e35d0447f59139b98ede085d1a603d4f61cf8bc11cf2e291a3f492a05c60ee61535481b878585cd6843cd9b3c7952c834adfa78a6a71c64802e7b3069dec9d1
DIST flex-2.6.3.tar.gz 1405560 BLAKE2B 2aa9ca18f2ab124db9567e2d2ee512881a71755342bdcbd05ef536653396d1e4ed47dafc1227531bf9e9a610d9c5aa2d924bf864b18c5a618b2ccb61db7fef4e SHA512 f14b1af7ddd148660737991787fcf13d86cc0bef3859ed6c2135963373e76524d70382795c845cb6491b0435f8c40ba81e17f15267592b8d1656cfd4c3430b00
DIST flex-2.6.4.tar.gz 1419096 BLAKE2B c003d4f764f7f4d41e33af7ee28c2af272a9f0aee6ba7c2494ba96722d8d0b18f7a3f745217e9a2cecb43b6863328267a810280670c04464156b3eb3d7ee9d62 SHA512 e9785f3d620a204b7d20222888917dc065c2036cae28667065bf7862dfa1b25235095a12fd04efdbd09bfd17d3452e6b9ef953a8c1137862ff671c97132a082e DIST flex-2.6.4.tar.gz 1419096 BLAKE2B c003d4f764f7f4d41e33af7ee28c2af272a9f0aee6ba7c2494ba96722d8d0b18f7a3f745217e9a2cecb43b6863328267a810280670c04464156b3eb3d7ee9d62 SHA512 e9785f3d620a204b7d20222888917dc065c2036cae28667065bf7862dfa1b25235095a12fd04efdbd09bfd17d3452e6b9ef953a8c1137862ff671c97132a082e

View File

@ -1,82 +0,0 @@
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

View File

@ -1,77 +0,0 @@
# Copyright 1999-2018 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 ~x86-fbsd ~amd64-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
}

View File

@ -1,84 +0,0 @@
# Copyright 1999-2018 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 ~x86-fbsd ~amd64-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
}

View File

@ -1,78 +0,0 @@
# Copyright 1999-2018 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 ~x86-fbsd ~amd64-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
}

View File

@ -1,23 +1,23 @@
# Copyright 1999-2018 Gentoo Foundation # Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
EAPI="6" EAPI=7
inherit eutils flag-o-matic libtool multilib-minimal inherit flag-o-matic libtool multilib-minimal toolchain-funcs
DESCRIPTION="The Fast Lexical Analyzer" DESCRIPTION="The Fast Lexical Analyzer"
HOMEPAGE="https://flex.sourceforge.net/ https://github.com/westes/flex" HOMEPAGE="https://github.com/westes/flex"
SRC_URI="https://github.com/westes/${PN}/releases/download/v${PV}/${P}.tar.gz" SRC_URI="https://github.com/westes/${PN}/releases/download/v${PV}/${P}.tar.gz"
LICENSE="FLEX" LICENSE="FLEX"
SLOT="0" SLOT="0"
KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="nls static test" IUSE="nls static test"
RESTRICT="!test? ( test )"
# We want bison explicitly and not yacc in general #381273 # We want bison explicitly and not yacc in general #381273
RDEPEND="sys-devel/m4" RDEPEND="sys-devel/m4"
DEPEND="${RDEPEND} BDEPEND="${RDEPEND}
app-arch/xz-utils
nls? ( sys-devel/gettext ) nls? ( sys-devel/gettext )
test? ( sys-devel/bison )" test? ( sys-devel/bison )"
@ -49,17 +49,16 @@ multilib_src_configure() {
# Do not install shared libs #503522 # Do not install shared libs #503522
ECONF_SOURCE=${S} \ ECONF_SOURCE=${S} \
econf \ econf \
CC_FOR_BUILD="$(tc-getBUILD_CC)" \
--disable-shared \ --disable-shared \
$(use_enable nls) \ $(use_enable nls)
--docdir='$(datarootdir)/doc/'${PF}
} }
multilib_src_compile() { multilib_src_compile() {
if multilib_is_native_abi; then if multilib_is_native_abi; then
default default
else else
cd src || die emake -C src -f Makefile -f - lib <<< 'lib: $(lib_LTLIBRARIES)'
emake -f Makefile -f - lib <<< 'lib: $(lib_LTLIBRARIES)'
fi fi
} }
@ -71,15 +70,14 @@ multilib_src_install() {
if multilib_is_native_abi; then if multilib_is_native_abi; then
default default
else else
cd src || die emake -C src DESTDIR="${D}" install-libLTLIBRARIES install-includeHEADERS
emake DESTDIR="${D}" install-libLTLIBRARIES install-includeHEADERS
fi fi
} }
multilib_src_install_all() { multilib_src_install_all() {
einstalldocs einstalldocs
dodoc ONEWS dodoc ONEWS
prune_libtool_files --all find "${ED}" -name '*.la' -type f -delete || die
rm "${ED}"/usr/share/doc/${PF}/COPYING || die rm "${ED}"/usr/share/doc/${PF}/COPYING || die
dosym flex /usr/bin/lex dosym flex /usr/bin/lex
} }

View File

@ -1,81 +0,0 @@
# Copyright 1999-2018 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 ~x86-fbsd ~amd64-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
}

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata> <pkgmetadata>
<maintainer type="project"> <maintainer type="project">
<email>base-system@gentoo.org</email> <email>base-system@gentoo.org</email>
@ -8,5 +8,6 @@
<upstream> <upstream>
<remote-id type="sourceforge">flex</remote-id> <remote-id type="sourceforge">flex</remote-id>
<remote-id type="github">westes/flex</remote-id> <remote-id type="github">westes/flex</remote-id>
<remote-id type="cpe">cpe:/a:flex_project:flex</remote-id>
</upstream> </upstream>
</pkgmetadata> </pkgmetadata>