diff options
author | Michał Górny <mgorny@gentoo.org> | 2022-12-05 20:47:20 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2022-12-06 15:46:40 +0100 |
commit | cbe30238ca28ea10d944d120cae33e5ebd351fd0 (patch) | |
tree | b25d89c6e2e103bdadc3e9ab911fca2b5bbefb51 /app-alternatives | |
parent | app-alternatives/cpio: Use app-alternatives.eclass (diff) | |
download | gentoo-cbe30238ca28ea10d944d120cae33e5ebd351fd0.tar.gz gentoo-cbe30238ca28ea10d944d120cae33e5ebd351fd0.tar.bz2 gentoo-cbe30238ca28ea10d944d120cae33e5ebd351fd0.zip |
app-alternatives/tar: Use app-alternatives.eclass
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'app-alternatives')
-rw-r--r-- | app-alternatives/tar/tar-0.ebuild | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/app-alternatives/tar/tar-0.ebuild b/app-alternatives/tar/tar-0.ebuild index dc594b0f8933..b37377fa0f63 100644 --- a/app-alternatives/tar/tar-0.ebuild +++ b/app-alternatives/tar/tar-0.ebuild @@ -3,20 +3,18 @@ EAPI=8 -DESCRIPTION="Tar symlink" -HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Base/Alternatives" -SRC_URI="" -S=${WORKDIR} +ALTERNATIVES=( + "gnu:>=app-arch/tar-1.34-r2" + libarchive:app-arch/libarchive +) + +inherit app-alternatives -LICENSE="CC0-1.0" -SLOT="0" +DESCRIPTION="Tar symlink" 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="+gnu libarchive split-usr" -REQUIRED_USE="^^ ( gnu libarchive )" +IUSE="split-usr" RDEPEND=" - gnu? ( >=app-arch/tar-1.34-r2 ) - libarchive? ( app-arch/libarchive ) !<app-arch/tar-1.34-r2 " @@ -24,13 +22,14 @@ src_install() { local usr_prefix= use split-usr && usr_prefix=../usr/bin/ - if use gnu; then - dosym gtar /bin/tar - newman - tar.1 <<<".so gtar.1" - elif use libarchive; then - dosym "${usr_prefix}bsdtar" /bin/tar - newman - tar.1 <<<".so bsdtar.1" - else - die "Invalid USE flag combination (broken REQUIRED_USE?)" - fi + case $(get_alternative) in + gnu) + dosym gtar /bin/tar + newman - tar.1 <<<".so gtar.1" + ;; + libarchive) + dosym "${usr_prefix}bsdtar" /bin/tar + newman - tar.1 <<<".so bsdtar.1" + ;; + esac } |