summaryrefslogtreecommitdiff
path: root/app-alternatives/yacc
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-12-06 21:11:24 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-12-06 21:11:24 +0000
commitd479c9c5c724c7b1300a98e44975f31f4f2e51dd (patch)
treec2f5550bfe03e1b3f19014e1576dcf50e6bd818c /app-alternatives/yacc
parentee8ad1509f726e8fa598472117e5bbffd241ebab (diff)
gentoo auto-resync : 06:12:2022 - 21:11:24
Diffstat (limited to 'app-alternatives/yacc')
-rw-r--r--app-alternatives/yacc/Manifest2
-rw-r--r--app-alternatives/yacc/yacc-1-r2.ebuild60
2 files changed, 25 insertions, 37 deletions
diff --git a/app-alternatives/yacc/Manifest b/app-alternatives/yacc/Manifest
index 5cbc1ba68918..2e84cdf9d982 100644
--- a/app-alternatives/yacc/Manifest
+++ b/app-alternatives/yacc/Manifest
@@ -1,3 +1,3 @@
EBUILD yacc-0.ebuild 536 BLAKE2B ccb4b1c59c0452254507b81a52c1d9147a109fdf968ad2e71b5776735e5c59c8aa0447964614941e22d927b995c5ec045bdfa8f890fb5a1874f462ca64459f21 SHA512 aff6ef4ac24044dcec4484395cd4b155617035f8c632fd6550e8a17b1c467e0c164880ca1d0ac9df86f00df09d0879f26063457b85807874361fac822879fe57
-EBUILD yacc-1-r2.ebuild 1588 BLAKE2B dc3f5caa5eb6344cfda884841b2360257d1cd0d7665a2513fb970bb580f9f60f5eb1f7f4d1539db73bf06a267f7a91d78bfabf75f312bb822d01a96db96f58f0 SHA512 a242a4022a43c63809049a2fa07f1b4b3da80c7c983cac09eebea9f692e93939ecec3f4e61a0aef6d96c67f65d31ba1d071b75040cb3a362a7d83f953bb9c140
+EBUILD yacc-1-r2.ebuild 1190 BLAKE2B 3be447c988140d2b2630210ecbd5ce6f32d7e1f9b83f09a0954a6ad70fbc2561386301ae6a424a2fc9d3ec1ad1c6bf846533f91780316af28fd2641392c3c395 SHA512 c7c38ecfe7202e7d6454c932b5619a594c962fcf56f7d5b1ab22b9b03c0a1770f979f2624d076c2f573e982e68de7f67eabd62c5c4a9a9388382b0378877a2b0
MISC metadata.xml 604 BLAKE2B a40366e6a7aab1ac9658b2b46cc6409486d2e2b7ac456209b4151974f48facc65e68d2e44965a6eb0680af47663a379da050bfbcf480e6af50951ec6d03647e5 SHA512 24329bbcc9bd0a589559c621a89b0dc26f304f47cdbd62e09bf5d33cb190bdecfc352527970c072080a3c9a7e4a7193b6d7c71ab0a0c83d0dcb76f03e0699a5c
diff --git a/app-alternatives/yacc/yacc-1-r2.ebuild b/app-alternatives/yacc/yacc-1-r2.ebuild
index e748c4e0ab73..2a3e288c2f8b 100644
--- a/app-alternatives/yacc/yacc-1-r2.ebuild
+++ b/app-alternatives/yacc/yacc-1-r2.ebuild
@@ -3,54 +3,42 @@
EAPI=8
-DESCRIPTION="yacc symlinks"
-HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Base/Alternatives"
-SRC_URI=""
-S=${WORKDIR}
+ALTERNATIVES=(
+ "bison:>=sys-devel/bison-3.8.2-r1"
+ byacc:dev-util/byacc
+ "reference:>=dev-util/yacc-1.9.1-r7"
+)
+
+inherit app-alternatives
-LICENSE="CC0-1.0"
-SLOT="0"
+DESCRIPTION="yacc symlinks"
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="+bison byacc reference"
-REQUIRED_USE="^^ ( bison byacc reference )"
RDEPEND="
- bison? ( >=sys-devel/bison-3.8.2-r1 )
- byacc? ( dev-util/byacc )
- reference? ( >=dev-util/yacc-1.9.1-r7 )
!<dev-util/yacc-1.9.1-r7
!<sys-devel/bison-3.8.2-r1
"
src_install() {
- if use bison; then
+ local alt=$(get_alternative)
+
+ case ${alt} in
# bison installs its own small wrapper script 'yacc-bison'
# around bison(1).
- dosym yacc.bison /usr/bin/yacc
- newman - yacc.1 <<<".so yacc.bison.1"
-
- # Leaving this for now to be safe, as it's closer to pre-alternatives
- # status quo to leave it unset and let autoconf probe for Bison by itself
- # as it prefers it anyway, and might be a CPP-like situation wrt
- # calling bison or bison -y if YACC is set.
- #newenvd - 90yacc <<-EOF
- # YACC=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"
-
+ bison) alt=yacc.bison;;
+ reference) alt=yacc-reference;;
+ esac
+
+ dosym "${alt}" /usr/bin/yacc
+ newman - yacc.1 <<<".so ${alt}.1"
+
+ # Leaving this for now to be safe, as it's closer to pre-alternatives
+ # status quo to leave it unset and let autoconf probe for Bison by itself
+ # as it prefers it anyway, and might be a CPP-like situation wrt
+ # calling bison or bison -y if YACC is set.
+ if [[ ${alt} != yacc.bison ]]; then
newenvd - 90yacc <<-EOF
- YACC=yacc
+ YACC=${alt}
EOF
- else
- die "Invalid USE flag combination (broken REQUIRED_USE?)"
fi
}