summaryrefslogtreecommitdiff
path: root/app-alternatives/gzip
diff options
context:
space:
mode:
Diffstat (limited to 'app-alternatives/gzip')
-rw-r--r--app-alternatives/gzip/Manifest2
-rw-r--r--app-alternatives/gzip/gzip-0.ebuild47
2 files changed, 24 insertions, 25 deletions
diff --git a/app-alternatives/gzip/Manifest b/app-alternatives/gzip/Manifest
index 2e003e8b62ab..56a89830e4db 100644
--- a/app-alternatives/gzip/Manifest
+++ b/app-alternatives/gzip/Manifest
@@ -1,2 +1,2 @@
-EBUILD gzip-0.ebuild 1269 BLAKE2B e1bb6a3ad0fe76590937e5be1558aa6d3f5769812df813c10c7dc3b6351f6ab4a622703cdfabaf7fa9aa55f48a082e53bc81d338f8ed9b612d2319e9dc64b759 SHA512 604814007334d62429b28ada0097d9d329e5ce9a974afafd151642d5a1ef88bfcf2b1447f7e1db819665e3f50399ec80d646028be8df87a088e1f1cdc2d7ae50
+EBUILD gzip-0.ebuild 1097 BLAKE2B e4da2779aaeedd2fd0ded0f05c37fc8e184c41004c56903e779615d32a3792dae97e46adc925a28a8a3e5658c6c61c98cd924a3750291417ce5c439a00499fc7 SHA512 00499b7b2ae9130459c936d1b37700521456adee8f64105c9f20b150d8532677525eb7947b63d2b5b57b75f874eaa576f41fae69207bd3690ea231bce078d88d
MISC metadata.xml 528 BLAKE2B 099aec3cb340caeedc0fc6e2f62162baf276b1262b4758dd39695a03ee5110c717a9b553190762c939171d7776b2048fe73c1fc7a966eef916e992abeed0ec21 SHA512 e654f8d548769c00425cd9a3f796c17af28300ea297294b335166f023164a5696216135badc82074b6a88669114f7db819af827aad8144987c7cfc7a474a2191
diff --git a/app-alternatives/gzip/gzip-0.ebuild b/app-alternatives/gzip/gzip-0.ebuild
index 29e0808da453..77090242607d 100644
--- a/app-alternatives/gzip/gzip-0.ebuild
+++ b/app-alternatives/gzip/gzip-0.ebuild
@@ -3,20 +3,18 @@
EAPI=8
-DESCRIPTION="gzip symlinks"
-HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Base/Alternatives"
-SRC_URI=""
-S=${WORKDIR}
+ALTERNATIVES=(
+ "reference:>=app-arch/gzip-1.12-r3"
+ "pigz:app-arch/pigz[-symlink(-)]"
+)
+
+inherit app-alternatives
-LICENSE="CC0-1.0"
-SLOT="0"
+DESCRIPTION="gzip 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="pigz +reference split-usr"
-REQUIRED_USE="^^ ( pigz reference )"
+IUSE="split-usr"
RDEPEND="
- pigz? ( app-arch/pigz[-symlink(-)] )
- reference? ( >=app-arch/gzip-1.12-r3 )
!<app-arch/gzip-1.12-r3
!app-arch/pigz[symlink(-)]
"
@@ -25,20 +23,21 @@ src_install() {
local usr_prefix=
use split-usr && usr_prefix=../usr/bin/
- if use pigz; then
- dosym "${usr_prefix}pigz" /bin/gzip
- dosym gzip /bin/gunzip
- dosym gzip /bin/zcat
- newman - gzip.1 <<<".so pigz.1"
- elif use reference; then
- dosym gzip-reference /bin/gzip
- # gzip uses shell wrappers rather than argv[0]
- dosym gunzip-reference /bin/gunzip
- dosym zcat-reference /bin/zcat
- newman - gzip.1 <<<".so gzip-reference.1"
- else
- die "Invalid USE flag combination (broken REQUIRED_USE?)"
- fi
+ case $(get_alternative) in
+ pigz)
+ dosym "${usr_prefix}pigz" /bin/gzip
+ dosym gzip /bin/gunzip
+ dosym gzip /bin/zcat
+ newman - gzip.1 <<<".so pigz.1"
+ ;;
+ reference)
+ dosym gzip-reference /bin/gzip
+ # gzip uses shell wrappers rather than argv[0]
+ dosym gunzip-reference /bin/gunzip
+ dosym zcat-reference /bin/zcat
+ newman - gzip.1 <<<".so gzip-reference.1"
+ ;;
+ esac
newman - gunzip.1 <<<".so gzip.1"
newman - zcat.1 <<<".so gzip.1"