public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-arch/gzip/
Date: Thu,  1 Dec 2022 19:38:43 +0000 (UTC)	[thread overview]
Message-ID: <1669923503.aa9e23f4d96ed4046d265751ac8d8902f389c26b.sam@gentoo> (raw)

commit:     aa9e23f4d96ed4046d265751ac8d8902f389c26b
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Dec  1 16:11:16 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Dec  1 19:38:23 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa9e23f4

app-arch/gzip: Support app-alternatives/gzip

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-arch/gzip/gzip-1.12-r3.ebuild | 84 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 84 insertions(+)

diff --git a/app-arch/gzip/gzip-1.12-r3.ebuild b/app-arch/gzip/gzip-1.12-r3.ebuild
new file mode 100644
index 000000000000..98f464a9e840
--- /dev/null
+++ b/app-arch/gzip/gzip-1.12-r3.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/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 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-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
+	sed -i -e 's:exec gzip:&-reference:' \
+		"${ED}"/bin/{gunzip,zcat}-reference || die
+	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
+}


             reply	other threads:[~2022-12-01 19:38 UTC|newest]

Thread overview: 84+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-01 19:38 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-04-10  6:47 [gentoo-commits] repo/gentoo:master commit in: app-arch/gzip/ Sam James
2025-04-06  2:02 Sam James
2024-07-09  3:08 Eli Schwartz
2024-04-15  5:48 Sam James
2024-03-04 10:24 Sam James
2024-01-19 23:08 Ionen Wolkens
2024-01-16  5:46 Viorel Munteanu
2024-01-15  3:32 Ionen Wolkens
2023-12-24 15:11 Sam James
2023-09-22 20:52 Sam James
2023-09-22 20:25 Sam James
2023-09-22 20:25 Sam James
2023-09-22 18:58 Arthur Zamarin
2023-02-24 18:36 Sam James
2023-01-14 17:10 Sam James
2022-12-28 22:47 Sam James
2022-12-28  0:33 Sam James
2022-12-27 19:53 Sam James
2022-12-27 19:45 Sam James
2022-12-27 13:40 Sam James
2022-12-27 11:31 Sam James
2022-09-19  3:28 Sam James
2022-09-06  0:55 Mike Gilbert
2022-09-06  0:55 Mike Gilbert
2022-09-05 22:34 Mike Gilbert
2022-09-05 21:32 Mike Gilbert
2022-04-17 17:15 Sam James
2022-04-14  8:11 Agostino Sarubbo
2022-04-10 17:38 Arthur Zamarin
2022-04-10 17:38 Arthur Zamarin
2022-04-09 19:56 Arthur Zamarin
2022-04-09 18:21 Arthur Zamarin
2022-04-09 17:57 Agostino Sarubbo
2022-04-08  7:06 Agostino Sarubbo
2022-04-07 18:11 Sam James
2022-04-06 23:58 Sam James
2022-01-16 12:20 Fabian Groffen
2021-12-07 20:23 Sam James
2021-12-06  1:16 Sam James
2021-12-05 18:39 Sam James
2021-12-05 18:31 Sam James
2021-12-05 18:21 Arthur Zamarin
2021-12-05  3:45 Sam James
2021-10-16 12:15 Fabian Groffen
2021-09-03 21:37 Lars Wendler
2021-03-23  8:03 Lars Wendler
2021-01-06 12:52 Fabian Groffen
2020-12-27 13:34 Fabian Groffen
2020-09-18  8:11 Agostino Sarubbo
2020-09-06  7:49 Sergei Trofimovich
2020-08-26 22:04 Sergei Trofimovich
2020-08-22  5:50 Agostino Sarubbo
2020-08-18 11:16 Agostino Sarubbo
2020-08-17 14:52 Agostino Sarubbo
2020-08-17  9:21 Sam James
2020-08-17  7:35 Sam James
2019-05-03 23:17 Andreas K. Hüttel
2019-01-22 11:05 Mikle Kolyada
2019-01-22 11:05 Mikle Kolyada
2019-01-22 11:05 Mikle Kolyada
2019-01-22  7:16 Matt Turner
2019-01-08  9:35 Mart Raudsepp
2019-01-03 18:58 Mikle Kolyada
2019-01-01 14:49 Lars Wendler
2019-01-01 12:50 Sergei Trofimovich
2019-01-01 12:17 Sergei Trofimovich
2019-01-01 12:17 Sergei Trofimovich
2019-01-01 12:05 Sergei Trofimovich
2018-12-31 16:43 Thomas Deutschmann
2018-12-31 10:59 Sergei Trofimovich
2018-12-30 16:25 Lars Wendler
2018-10-14 10:20 Sergei Trofimovich
2018-01-08  8:33 Lars Wendler
2016-12-08  6:37 Mike Frysinger
2016-09-01 13:07 Agostino Sarubbo
2016-09-01 13:06 Agostino Sarubbo
2016-07-08 14:47 Markus Meier
2016-07-03 10:53 Jeroen Roovers
2016-06-30 16:15 Tobias Klausmann
2016-05-04 20:53 Mike Gilbert
2016-04-27  5:23 Lars Wendler
2016-03-28  7:38 Lars Wendler
2016-03-28  7:38 Lars Wendler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1669923503.aa9e23f4d96ed4046d265751ac8d8902f389c26b.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox