diff options
author | Sam James <sam@gentoo.org> | 2022-12-02 04:22:56 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-12-02 21:09:49 +0000 |
commit | 04d3f4f98d5336a1e8456bbe975abad22bc00471 (patch) | |
tree | 299ae0df878349d9abe6802a67685db404f75ddf /app-alternatives/yacc | |
parent | Move {virtual -> app-alternatives}/yacc (diff) | |
download | gentoo-04d3f4f98d5336a1e8456bbe975abad22bc00471.tar.gz gentoo-04d3f4f98d5336a1e8456bbe975abad22bc00471.tar.bz2 gentoo-04d3f4f98d5336a1e8456bbe975abad22bc00471.zip |
app-alternatives/yacc: new package to control yacc symlinks
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-alternatives/yacc')
-rw-r--r-- | app-alternatives/yacc/metadata.xml | 16 | ||||
-rw-r--r-- | app-alternatives/yacc/yacc-1.ebuild | 40 |
2 files changed, 55 insertions, 1 deletions
diff --git a/app-alternatives/yacc/metadata.xml b/app-alternatives/yacc/metadata.xml index de9d78424186..0672d9fe1a27 100644 --- a/app-alternatives/yacc/metadata.xml +++ b/app-alternatives/yacc/metadata.xml @@ -5,5 +5,19 @@ <email>base-system@gentoo.org</email> <name>Gentoo Base System</name> </maintainer> - <stabilize-allarches/> + <maintainer type="person"> + <email>mgorny@gentoo.org</email> + <name>Michał Górny</name> + </maintainer> + <use> + <flag name="bison"> + Symlink to <pkg>sys-devel/bison</pkg>. + </flag> + <flag name="byacc"> + Symlink to <pkg>dev-util/byacc</pkg>. + </flag> + <flag name="reference"> + Symlink to <pkg>dev-util/yacc</pkg>. + </flag> + </use> </pkgmetadata> diff --git a/app-alternatives/yacc/yacc-1.ebuild b/app-alternatives/yacc/yacc-1.ebuild new file mode 100644 index 000000000000..93e55d2d17fd --- /dev/null +++ b/app-alternatives/yacc/yacc-1.ebuild @@ -0,0 +1,40 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="yacc symlinks" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Base/Alternatives" +SRC_URI="" +S=${WORKDIR} + +LICENSE="CC0-1.0" +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="+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 + # 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" + elif use byacc; then + dosym byacc /usr/bin/yacc + newman - yacc.1 <<<".so byacc.1" + elif use reference; then + dosym yacc-reference /usr/bin/yacc + newman - yacc.1 <<<".so yacc-reference.1" + else + die "Invalid USE flag combination (broken REQUIRED_USE?)" + fi +} |