summaryrefslogtreecommitdiff
path: root/sys-devel/flex
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-12-03 02:58:11 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-12-03 02:58:11 +0000
commitfbe7acf59ebf6dc3f04a6ef108ff3887fa5d7972 (patch)
tree3669828a2d0c5f7cb1a4bfd79be8032aac558282 /sys-devel/flex
parent9bc9c4dcc38dc560cff8e5d083d1e5f282ddde98 (diff)
gentoo auto-resync : 03:12:2022 - 02:58:11
Diffstat (limited to 'sys-devel/flex')
-rw-r--r--sys-devel/flex/Manifest1
-rw-r--r--sys-devel/flex/flex-2.6.4-r5.ebuild100
2 files changed, 101 insertions, 0 deletions
diff --git a/sys-devel/flex/Manifest b/sys-devel/flex/Manifest
index 5cfcb49ebe44..e8b4b1e17800 100644
--- a/sys-devel/flex/Manifest
+++ b/sys-devel/flex/Manifest
@@ -5,4 +5,5 @@ DIST flex-2.6.4-autotools-regenerate.patch.xz 282588 BLAKE2B 3995b8b5e354a43b1a4
DIST flex-2.6.4.tar.gz 1419096 BLAKE2B c003d4f764f7f4d41e33af7ee28c2af272a9f0aee6ba7c2494ba96722d8d0b18f7a3f745217e9a2cecb43b6863328267a810280670c04464156b3eb3d7ee9d62 SHA512 e9785f3d620a204b7d20222888917dc065c2036cae28667065bf7862dfa1b25235095a12fd04efdbd09bfd17d3452e6b9ef953a8c1137862ff671c97132a082e
EBUILD flex-2.6.4-r2.ebuild 2326 BLAKE2B 39ec3e1f7392d4705f36a513c6161ddbe147a311d8eecd08e66f1f7ba7cea20dc16b98acc3a280560f66e74766945fc2d47e3ef8d44c1eaac73e0e0c889968b1 SHA512 ed939eea185f0cbc27c2128c3b248494ef66b19f2b6106dce04ab9019a8d9b9d01b40233b44399ba231663938718c76f4ba7eab8b4c8cbedec91180453684126
EBUILD flex-2.6.4-r4.ebuild 2325 BLAKE2B 0c5f118f59417a4d3a53ca54207b16eeca458908ed364981fd848f75b547493200aa83322fd20be3223006fc765c2b8fe9c20ed0c6a5f147e57550d4bdf1146f SHA512 2c151810e4b2f7a935546a609d1ef0fc2b34f83cf68538e647d1d135720bbde99bd88f1cb122a10f62b23648103cb00bdcaf203164dd627febb9e8570089d3c8
+EBUILD flex-2.6.4-r5.ebuild 2525 BLAKE2B f568378f26e3da5037542f8d1fe7214e8a74584e7bc2c739e543848a4ab5db182b0ad9f1e7a866ae0a25c723288980206a1fa87b8b9da54bdd44b2b243bd356c SHA512 e7ecea20c5e014edc81322bc98e3d21d271795656a524b851e70fc3e19f1b0a7ede1a8a79204def93f5f7dfffcee8ab3b88de73a2b29962e121928d8306b03d7
MISC metadata.xml 444 BLAKE2B 28bd0cd35c6ab4386dffdf221e6b43927e47971bea62a0f0395e3cd6725567114675055dc1267ce5ffbd42fe4731a806b4e5666ea6b83ad4bcf4d35b5529ce85 SHA512 53f91d714d7f4401f7d986d743c08a817d794147f9b277d829a4e8065ce91ce00123cd5b42957af60ef9051568a214b7ce791aa8a4baf82a5179859971357d56
diff --git a/sys-devel/flex/flex-2.6.4-r5.ebuild b/sys-devel/flex/flex-2.6.4-r5.ebuild
new file mode 100644
index 000000000000..e064eb4e45ac
--- /dev/null
+++ b/sys-devel/flex/flex-2.6.4-r5.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic libtool multilib-minimal toolchain-funcs
+
+DESCRIPTION="The Fast Lexical Analyzer"
+HOMEPAGE="https://github.com/westes/flex"
+SRC_URI="https://github.com/westes/${PN}/releases/download/v${PV}/${P}.tar.gz"
+SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-autotools-regenerate.patch.xz"
+
+LICENSE="FLEX"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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"
+RESTRICT="!test? ( test )"
+
+RDEPEND="sys-devel/m4"
+# We want bison explicitly and not yacc in general, bug #381273
+BDEPEND="
+ ${RDEPEND}
+ nls? ( sys-devel/gettext )
+ test? ( sys-devel/bison )
+"
+PDEPEND="app-alternatives/lex"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-libobjdir.patch
+ "${FILESDIR}"/${P}-fix-build-with-glibc2.26.patch
+
+ "${WORKDIR}"/${P}-autotools-regenerate.patch
+)
+
+src_prepare() {
+ default
+
+ # Drop on next release when we can remove ${P}-autotools-regenerate.patch
+ touch configure.ac aclocal.m4 Makefile.in configure src/config.h.in || die
+
+ # Disable running in the tests/ subdir as it has a bunch of built sources
+ # that cannot be made conditional (automake limitation). bug #568842
+ if ! use test ; then
+ sed -i \
+ -e '/^SUBDIRS =/,/^$/{/tests/d}' \
+ Makefile.in || die
+ fi
+
+ # Prefix always needs this
+ elibtoolize
+}
+
+src_configure() {
+ use static && append-ldflags -static
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ # Do not install shared libs, #503522
+ ECONF_SOURCE="${S}" econf \
+ CC_FOR_BUILD="$(tc-getBUILD_CC)" \
+ --disable-shared \
+ $(use_enable nls)
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+ else
+ emake -C src -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
+ emake -C src DESTDIR="${D}" install-libLTLIBRARIES install-includeHEADERS
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ dodoc ONEWS
+ find "${ED}" -name '*.la' -type f -delete || die
+ rm "${ED}"/usr/share/doc/${PF}/COPYING || die
+}
+
+pkg_postinst() {
+ # ensure to preserve the symlink before app-alternatives/lex
+ # is installed
+ if [[ ! -h ${EROOT}/usr/bin/lex ]]; then
+ ln -s flex "${EROOT}/usr/bin/lex" || die
+ fi
+}