app-arch/gzip: Sync with Gentoo

It's from Gentoo commit a352c18f669ad811ffa9d89477a88214904dcf79.
This commit is contained in:
Flatcar Buildbot 2024-03-11 07:10:50 +00:00 committed by Krzesimir Nowak
parent caf560f7f5
commit 82d85d06db
2 changed files with 0 additions and 84 deletions

View File

@ -1,4 +1,2 @@
DIST gzip-1.12.tar.xz 825548 BLAKE2B 7e2d482c08555f5fb0ff5408c0afe48c61034e9779eed6e3dd8046c847234c0a8a6bc34d49a934a54db0d73033e12c71a228d373551384a4cd663315071637e0 SHA512 116326fe991828227de150336a0c016f4fe932dfbb728a16b4a84965256d9929574a4f5cfaf3cf6bb4154972ef0d110f26ab472c93e62ec9a5fd7a5d65abea24
DIST gzip-1.12.tar.xz.sig 833 BLAKE2B ab7b4a759ef163d67f20773607ba0408ea9f1f7c7c224f43635fc3752acc521b74dbea4ec9ebb58a2f4fa13ecae19e00779b4b56c2cb95976301445beff817aa SHA512 1f4702797f7c5f1873c2f9c2f6210ba23824455d17ee82f50f0bf24240ed5bdf0090cf85338ccf76ba82422f8b4ad3a329d8bbf1350cb094d7bd61aa45550397
DIST gzip-1.13.tar.xz 838248 BLAKE2B f0e3b4c28bafcd3b59b65ac2d71218dc58d81b52c6921c1be038757c99e99184178c5d0e9674caa5099713b8b64e8c85cf061f4abfa20b73b478288f121fb05d SHA512 e3d4d4aa4b2e53fdad980620307257c91dfbbc40bcec9baa8d4e85e8327f55e2ece552c9baf209df7b66a07103ab92d4954ac53c86c57fbde5e1dd461143f94c
DIST gzip-1.13.tar.xz.sig 833 BLAKE2B 42e38fa7b3a6b6d21a18308cf662844ed84e1a142a945f3f3142db0a14212c0e642de514abb1307ec12ee7bb9644472cc3aed40582d9c266ab24808acbca0215 SHA512 f95e016f61f4a67cb4cec6cede2510af6bb5567d72bbd3d70210a6d5cf3ee5fea8f0cbf8f7b612fa52f2ecfd9dba050d9cd4494075ce5ac4abac7b74eaa7ccbc

View File

@ -1,82 +0,0 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gzip.asc
inherit flag-o-matic verify-sig
DESCRIPTION="Standard GNU compressor"
HOMEPAGE="https://www.gnu.org/software/gzip/"
SRC_URI="mirror://gnu/gzip/${P}.tar.xz
https://alpha.gnu.org/gnu/gzip/${P}.tar.xz"
SRC_URI+=" verify-sig? (
mirror://gnu/gzip/${P}.tar.xz.sig
https://alpha.gnu.org/gnu/gzip/${P}.tar.xz.sig
)"
LICENSE="GPL-3+"
SLOT="0"
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"
IUSE="pic static"
BDEPEND="verify-sig? ( sec-keys/openpgp-keys-gzip )"
RDEPEND="!app-arch/pigz[symlink(-)]"
PDEPEND="
app-alternatives/gzip
"
PATCHES=(
"${FILESDIR}/${PN}-1.3.8-install-symlinks.patch"
)
src_configure() {
use static && append-flags -static
# Avoid text relocation in gzip
use pic && export DEFS="NO_ASM"
# bug #663928
econf --disable-gcc-warnings
}
src_install() {
default
docinto txt
dodoc algorithm.doc gzip.doc
# Avoid conflict with app-arch/ncompress
rm "${ED}"/usr/bin/uncompress || die
# keep most things in /usr, just the fun stuff in /
# also rename them to avoid conflict with app-alternatives/gzip
dodir /bin
local x
for x in gunzip gzip zcat; do
mv "${ED}/usr/bin/${x}" "${ED}/bin/${x}-reference" || die
done
mv "${ED}"/usr/share/man/man1/gzip{,-reference}.1 || die
rm "${ED}"/usr/share/man/man1/{gunzip,zcat}.1 || die
}
pkg_postinst() {
if [[ -n ${REPLACING_VERSIONS} ]]; then
local ver
for ver in ${REPLACING_VERSIONS}; do
if ver_test "${ver}" -lt "1.12-r2"; then
ewarn "This package no longer installs 'uncompress'."
ewarn "Please use 'gzip -d' to decompress .Z files."
fi
done
fi
# ensure to preserve the symlinks before app-alternatives/gzip
# is installed
local x
for x in gunzip gzip zcat; do
if [[ ! -h ${EROOT}/bin/${x} ]]; then
ln -s "${x}-reference" "${EROOT}/bin/${x}" || die
fi
done
}