commit: 0651969b55abf2bce481cb8d48a983463ddcc5cf
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 2 06:13:03 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Dec 2 21:09:49 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0651969b
app-alternatives/yacc: install env.d file for YACC
Without this, autotools will end up probing for bison even when
it's not specifically needed.
If packages really do need bison, it's not expected that
ebuild maintainers will fix the underlying problem, but
the ebuilds should then set YACC=bison 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/yacc/yacc-1.ebuild | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/app-alternatives/yacc/yacc-1.ebuild
b/app-alternatives/yacc/yacc-1.ebuild
index 93e55d2d17fd..d5508b6ebb90 100644
--- a/app-alternatives/yacc/yacc-1.ebuild
+++ b/app-alternatives/yacc/yacc-1.ebuild
@@ -28,12 +28,24 @@ src_install() {
# around bison(1).
dosym yacc.bison /usr/bin/yacc
newman - yacc.1 <<<".so yacc.bison.1"
+
+ newenvd - 90yacc <<-EOF
+ YACC=bison
+ EOF
elif use byacc; then
dosym byacc /usr/bin/yacc
newman - yacc.1 <<<".so byacc.1"
+
+ newenvd - 90yacc <<-EOF
+ YACC=byacc
+ EOF
elif use reference; then
dosym yacc-reference /usr/bin/yacc
newman - yacc.1 <<<".so yacc-reference.1"
+
+ newenvd - 90yacc <<-EOF
+ YACC=yacc
+ EOF
else
die "Invalid USE flag combination (broken REQUIRED_USE?)"
fi