commit: d05bcafc980182a12a9c8a86dd23fdc9bc7885d5
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 2 06:18:20 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=d05bcafc
app-alternatives/lex: install env.d file for LEX
Without this, autotools will end up probing for flex even when
it's not specifically needed.
If packages really do need flex, it's not expected that
ebuild maintainers will fix the underlying problem, but
the ebuilds should then set LEX=flex and BDEPEND on it.
If upstream is active, they should consider reporting the problem
to them though.
Signed-off-by: Sam James <sam <AT> gentoo.org>
app-alternatives/lex/lex-0.ebuild | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/app-alternatives/lex/lex-0.ebuild
b/app-alternatives/lex/lex-0.ebuild
index 260f9d0ba5f2..88a00b0f7b8f 100644
--- a/app-alternatives/lex/lex-0.ebuild
+++ b/app-alternatives/lex/lex-0.ebuild
@@ -24,9 +24,17 @@ src_install() {
if use reflex; then
dosym reflex /bin/lex
newman - lex.1 <<<".so reflex.1"
+
+ newenvd - 90lex <<-EOF
+ LEX=reflex
+ EOF
elif use flex; then
dosym flex /bin/lex
newman - lex.1 <<<".so flex.1"
+
+ newenvd - 90lex <<-EOF
+ LEX=flex
+ EOF
else
die "Invalid USE flag combination (broken REQUIRED_USE?)"
fi