Lines 1-97
Link Here
|
1 |
# Copyright 1999-2024 Gentoo Authors |
1 |
# Copyright 1999-2024 Gentoo Authors |
2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
|
3 |
|
4 |
EAPI=8 |
4 |
EAPI=8 |
5 |
|
5 |
|
6 |
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gzip.asc |
6 |
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gzip.asc |
7 |
inherit flag-o-matic verify-sig |
7 |
inherit flag-o-matic verify-sig |
8 |
|
8 |
|
9 |
DESCRIPTION="Standard GNU compressor" |
9 |
DESCRIPTION="Standard GNU compressor" |
10 |
HOMEPAGE="https://www.gnu.org/software/gzip/" |
10 |
HOMEPAGE="https://www.gnu.org/software/gzip/" |
11 |
if [[ ${PV} == *_p* ]] ; then |
11 |
if [[ ${PV} == *_p* ]] ; then |
12 |
# Note: could put this in devspace, but if it's gone, we don't want |
12 |
# Note: could put this in devspace, but if it's gone, we don't want |
13 |
# it in tree anyway. It's just for testing. |
13 |
# it in tree anyway. It's just for testing. |
14 |
MY_SNAPSHOT="$(ver_cut 1-2).31-7553" |
14 |
MY_SNAPSHOT="$(ver_cut 1-2).31-7553" |
15 |
SRC_URI=" |
15 |
SRC_URI=" |
16 |
https://meyering.net/gzip/gzip-${MY_SNAPSHOT}.tar.xz -> ${P}.tar.xz |
16 |
https://meyering.net/gzip/gzip-${MY_SNAPSHOT}.tar.xz -> ${P}.tar.xz |
17 |
verify-sig? ( |
17 |
verify-sig? ( |
18 |
https://meyering.net/gzip/gzip-${MY_SNAPSHOT}.tar.xz.sig -> ${P}.tar.xz.sig |
18 |
https://meyering.net/gzip/gzip-${MY_SNAPSHOT}.tar.xz.sig -> ${P}.tar.xz.sig |
19 |
) |
19 |
) |
20 |
" |
20 |
" |
21 |
S="${WORKDIR}"/${PN}-${MY_SNAPSHOT} |
21 |
S="${WORKDIR}"/${PN}-${MY_SNAPSHOT} |
22 |
else |
22 |
else |
23 |
SRC_URI=" |
23 |
SRC_URI=" |
24 |
mirror://gnu/gzip/${P}.tar.xz |
24 |
mirror://gnu/gzip/${P}.tar.xz |
25 |
verify-sig? ( |
25 |
verify-sig? ( |
26 |
mirror://gnu/gzip/${P}.tar.xz.sig |
26 |
mirror://gnu/gzip/${P}.tar.xz.sig |
27 |
) |
27 |
) |
28 |
" |
28 |
" |
29 |
fi |
29 |
fi |
30 |
|
30 |
|
31 |
LICENSE="GPL-3+" |
31 |
LICENSE="GPL-3+" |
32 |
SLOT="0" |
32 |
SLOT="0" |
33 |
if [[ ${PV} != *_p* ]] ; then |
33 |
if [[ ${PV} != *_p* ]] ; then |
34 |
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" |
34 |
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" |
35 |
fi |
35 |
fi |
36 |
IUSE="pic static" |
36 |
IUSE="pic static" |
37 |
|
37 |
|
38 |
BDEPEND="verify-sig? ( sec-keys/openpgp-keys-gzip )" |
38 |
BDEPEND="verify-sig? ( sec-keys/openpgp-keys-gzip )" |
39 |
RDEPEND="!app-arch/pigz[symlink(-)]" |
39 |
RDEPEND="!app-arch/pigz[symlink(-)]" |
40 |
PDEPEND=" |
40 |
PDEPEND=" |
41 |
app-alternatives/gzip |
41 |
app-alternatives/gzip |
42 |
" |
42 |
" |
43 |
|
43 |
|
44 |
PATCHES=( |
44 |
PATCHES=( |
45 |
"${FILESDIR}/${PN}-1.3.8-install-symlinks.patch" |
45 |
"${FILESDIR}/${PN}-1.3.8-install-symlinks.patch" |
46 |
) |
46 |
) |
47 |
|
47 |
|
48 |
src_configure() { |
48 |
src_configure() { |
49 |
use static && append-flags -static |
49 |
use static && append-flags -static |
50 |
|
50 |
|
51 |
# Avoid text relocation in gzip |
51 |
# Avoid text relocation in gzip |
52 |
use pic && export DEFS="NO_ASM" |
52 |
use pic && export DEFS="NO_ASM" |
53 |
|
53 |
|
|
|
54 |
# embeds the path to grep detected at build time into installed scripts; |
55 |
# use the canonical USE="split-usr" agnostic path. bug #935721 |
56 |
export GREP="${EPREFIX}/bin/grep" |
57 |
|
54 |
# bug #663928 |
58 |
# bug #663928 |
55 |
econf --disable-gcc-warnings |
59 |
econf --disable-gcc-warnings |
56 |
} |
60 |
} |
57 |
|
61 |
|
58 |
src_install() { |
62 |
src_install() { |
59 |
default |
63 |
default |
60 |
|
64 |
|
61 |
docinto txt |
65 |
docinto txt |
62 |
dodoc algorithm.doc gzip.doc |
66 |
dodoc algorithm.doc gzip.doc |
63 |
|
67 |
|
64 |
# Avoid conflict with app-arch/ncompress |
68 |
# Avoid conflict with app-arch/ncompress |
65 |
rm "${ED}"/usr/bin/uncompress || die |
69 |
rm "${ED}"/usr/bin/uncompress || die |
66 |
|
70 |
|
67 |
# keep most things in /usr, just the fun stuff in / |
71 |
# keep most things in /usr, just the fun stuff in / |
68 |
# also rename them to avoid conflict with app-alternatives/gzip |
72 |
# also rename them to avoid conflict with app-alternatives/gzip |
69 |
dodir /bin |
73 |
dodir /bin |
70 |
local x |
74 |
local x |
71 |
for x in gunzip gzip zcat; do |
75 |
for x in gunzip gzip zcat; do |
72 |
mv "${ED}/usr/bin/${x}" "${ED}/bin/${x}-reference" || die |
76 |
mv "${ED}/usr/bin/${x}" "${ED}/bin/${x}-reference" || die |
73 |
done |
77 |
done |
74 |
mv "${ED}"/usr/share/man/man1/gzip{,-reference}.1 || die |
78 |
mv "${ED}"/usr/share/man/man1/gzip{,-reference}.1 || die |
75 |
rm "${ED}"/usr/share/man/man1/{gunzip,zcat}.1 || die |
79 |
rm "${ED}"/usr/share/man/man1/{gunzip,zcat}.1 || die |
76 |
} |
80 |
} |
77 |
|
81 |
|
78 |
pkg_postinst() { |
82 |
pkg_postinst() { |
79 |
if [[ -n ${REPLACING_VERSIONS} ]]; then |
83 |
if [[ -n ${REPLACING_VERSIONS} ]]; then |
80 |
local ver |
84 |
local ver |
81 |
for ver in ${REPLACING_VERSIONS}; do |
85 |
for ver in ${REPLACING_VERSIONS}; do |
82 |
if ver_test "${ver}" -lt "1.12-r2"; then |
86 |
if ver_test "${ver}" -lt "1.12-r2"; then |
83 |
ewarn "This package no longer installs 'uncompress'." |
87 |
ewarn "This package no longer installs 'uncompress'." |
84 |
ewarn "Please use 'gzip -d' to decompress .Z files." |
88 |
ewarn "Please use 'gzip -d' to decompress .Z files." |
85 |
fi |
89 |
fi |
86 |
done |
90 |
done |
87 |
fi |
91 |
fi |
88 |
|
92 |
|
89 |
# ensure to preserve the symlinks before app-alternatives/gzip |
93 |
# ensure to preserve the symlinks before app-alternatives/gzip |
90 |
# is installed |
94 |
# is installed |
91 |
local x |
95 |
local x |
92 |
for x in gunzip gzip zcat; do |
96 |
for x in gunzip gzip zcat; do |
93 |
if [[ ! -h ${EROOT}/bin/${x} ]]; then |
97 |
if [[ ! -h ${EROOT}/bin/${x} ]]; then |
94 |
ln -s "${x}-reference" "${EROOT}/bin/${x}" || die |
98 |
ln -s "${x}-reference" "${EROOT}/bin/${x}" || die |
95 |
fi |
99 |
fi |
96 |
done |
100 |
done |
97 |
} |
101 |
} |
98 |
- |
|
|