public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/flex/
Date: Fri,  2 Dec 2022 21:16:11 +0000 (UTC)	[thread overview]
Message-ID: <1670015370.0f4c0cca41ac0cb32d7632f6278d58d4a8cf88f1.sam@gentoo> (raw)

commit:     0f4c0cca41ac0cb32d7632f6278d58d4a8cf88f1
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Dec  2 03:56:54 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Dec  2 21:09:30 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0f4c0cca

sys-devel/flex: support app-alternatives/lex

Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-devel/flex/flex-2.6.4-r5.ebuild | 100 ++++++++++++++++++++++++++++++++++++
 1 file changed, 100 insertions(+)

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
+}


             reply	other threads:[~2022-12-02 21:16 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-02 21:16 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-03-04 11:09 [gentoo-commits] repo/gentoo:master commit in: sys-devel/flex/ Sam James
2023-04-22 12:13 Sam James
2023-04-07  6:56 Sam James
2023-04-07  6:38 Sam James
2023-04-07  5:07 Sam James
2023-04-07  5:07 Sam James
2023-04-07  5:07 Sam James
2023-04-07  5:07 Sam James
2023-04-07  5:07 Sam James
2023-04-07  5:07 Sam James
2023-02-20 13:49 Sam James
2022-12-27 19:53 Sam James
2022-12-27 19:45 Sam James
2022-12-27 13:40 Sam James
2022-12-27 11:31 Sam James
2022-11-18  7:50 Arthur Zamarin
2022-11-18  4:54 Sam James
2022-11-18  4:54 Sam James
2022-11-18  4:54 Sam James
2022-11-18  4:54 Sam James
2022-11-18  4:54 Sam James
2022-11-18  4:54 Sam James
2022-11-18  4:26 Sam James
2022-10-28  2:02 Sam James
2022-10-28  1:54 Sam James
2022-09-26  4:16 Arthur Zamarin
2022-09-25  7:21 Arthur Zamarin
2022-09-25  6:25 Agostino Sarubbo
2022-09-25  6:24 Agostino Sarubbo
2022-09-25  4:43 Sam James
2022-09-25  4:43 Sam James
2022-09-25  4:35 Sam James
2022-09-25  4:35 Sam James
2022-06-17 12:11 Sam James
2021-05-17 22:36 Sam James
2021-03-23 20:58 Lars Wendler
2021-01-06 15:32 Fabian Groffen
2020-12-27 18:18 Fabian Groffen
2020-06-13 14:58 Mike Gilbert
2020-05-04 17:36 Thomas Deutschmann
2020-02-15 10:03 David Seifert
2019-05-04 19:51 Andreas K. Hüttel
2018-04-21  9:29 Mikle Kolyada
2018-04-14 21:33 Mart Raudsepp
2017-11-25 11:55 Markus Meier
2017-11-02 14:33 Tobias Klausmann
2017-10-24 19:23 Sergei Trofimovich
2017-10-24 18:56 Sergei Trofimovich
2017-10-23 20:51 Sergei Trofimovich
2017-10-23 18:42 Thomas Deutschmann
2017-10-23 13:11 Manuel Rüger
2017-09-09  8:28 Sergei Trofimovich
2017-05-07 18:55 Lars Wendler
2017-03-21 15:46 Michael Haubenwallner
2017-03-19 10:13 Fabian Groffen
2017-03-19 10:10 Fabian Groffen
2017-01-17 20:38 Mike Frysinger
2017-01-09 13:52 Jeroen Roovers
2016-12-30 21:18 Lars Wendler
2016-12-22  9:34 Agostino Sarubbo
2016-12-20  9:44 Agostino Sarubbo
2016-12-19 15:12 Agostino Sarubbo
2016-12-19 14:35 Agostino Sarubbo
2016-12-02 14:21 Tobias Klausmann
2016-11-30 19:34 Markus Meier
2016-11-29 11:23 Agostino Sarubbo
2016-11-29 11:22 Agostino Sarubbo
2016-10-26  8:06 Lars Wendler
2016-10-26  8:06 Lars Wendler
2016-04-02 21:55 Mike Frysinger
2015-12-20 18:04 Mike Frysinger
2015-11-23 11:02 Lars Wendler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1670015370.0f4c0cca41ac0cb32d7632f6278d58d4a8cf88f1.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox