From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1466777-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id D915E158020
	for <garchives@archives.gentoo.org>; Tue, 13 Dec 2022 20:15:33 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 3B997E0937;
	Tue, 13 Dec 2022 20:15:33 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 2383CE0937
	for <gentoo-commits@lists.gentoo.org>; Tue, 13 Dec 2022 20:15:33 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 556C533FA71
	for <gentoo-commits@lists.gentoo.org>; Tue, 13 Dec 2022 20:15:32 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id B851677F
	for <gentoo-commits@lists.gentoo.org>; Tue, 13 Dec 2022 20:15:30 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org>
Message-ID: <1670962498.4a1f6589bad32f10253e109fe4b7eafb8c69390a.sam@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: app-arch/xz-utils/
X-VCS-Repository: repo/gentoo
X-VCS-Files: app-arch/xz-utils/Manifest app-arch/xz-utils/xz-utils-5.4.0.ebuild
X-VCS-Directories: app-arch/xz-utils/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: 4a1f6589bad32f10253e109fe4b7eafb8c69390a
X-VCS-Branch: master
Date: Tue, 13 Dec 2022 20:15:30 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 2e793477-a42c-44db-9767-e9d240032fd3
X-Archives-Hash: d9cbc248540e346f2356a433b1a78cad

commit:     4a1f6589bad32f10253e109fe4b7eafb8c69390a
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 13 20:13:56 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Dec 13 20:14:58 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a1f6589

app-arch/xz-utils: add 5.4.0

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-arch/xz-utils/Manifest              |   2 +
 app-arch/xz-utils/xz-utils-5.4.0.ebuild | 115 ++++++++++++++++++++++++++++++++
 2 files changed, 117 insertions(+)

diff --git a/app-arch/xz-utils/Manifest b/app-arch/xz-utils/Manifest
index 79740e8d3d15..02cb27e5d6fe 100644
--- a/app-arch/xz-utils/Manifest
+++ b/app-arch/xz-utils/Manifest
@@ -6,3 +6,5 @@ DIST xz-5.2.9.tar.gz 2122988 BLAKE2B 20e8552302ef73469edaf7dbdc8ca1df8df9ddd5e4b
 DIST xz-5.2.9.tar.gz.sig 566 BLAKE2B 0f5807e2c963aaba2a65495cbe49c80047f022c0ac0f2d1b001e1c4d434605499148e01855e586595d4b0db99cd9c81f72bef8dadf5c9a61ba4f6f5d7da85d9d SHA512 871f71cf4e3ed77249fb8279301a77bd2ca174647cc4d0fe034bda349d5c52438f1aafe04294a1c260ad93d9ecda16ee8aece1655de79a898536b2a6e2a65ba8
 DIST xz-5.3.5beta.tar.gz 2244769 BLAKE2B e8037838e26f75f03070a27806b8ae3e25ae1d65f199e323148c02864fcd5d820a3a89b18b264cab6e4a03885211adddaa5221ab42150554cff262dbd2bde2c8 SHA512 fb3890100b8390162a87f2b415bd78e8e434e5417853fa76c71f40eee98c1f7a27eaa8486ecff19751abbe3761cb7ee5e9333b63eafe1c66d6265143a8404efb
 DIST xz-5.3.5beta.tar.gz.sig 566 BLAKE2B 151067af9bb21ab763c5ab8e299b623b9f18267280cb8fa653703691b98c19cec457b68a9987d5df931bf5fbc190c021d0bbd30840422e0c2b2d5876a5bb1812 SHA512 723457b736f6cb27c9a15234dd17dd290b4734007eed63afe6befe412219dd7cf304601ef2a328087f77a51212ab9560202fc04cf880e4c1ce84884210c78dc6
+DIST xz-5.4.0.tar.gz 2332619 BLAKE2B 7bcf2e48470b885ae48b1fd0d46ab504961e7c5b1358d8c57a6fe1ba32311f5ca837740cff7ba77767f0a25ef80ec68c3d43029f87af035131526cb71f961d0f SHA512 29b2cd25bb5b234b329ffe9547692d2c29be393db9d8d4ce70a66dfdaebd54433e79a89d80c57e58cd4559c3c68b9845507d5fedf3eec1c528a81e3d9ddbd811
+DIST xz-5.4.0.tar.gz.sig 566 BLAKE2B 6f8a6c81c0d91cea08b218e8f8ed74cea3b471a0adb0b5aac114f85d103977052b735ce5582e4fe5354dde17a7072d776f2fd64844531c3f67e60c770ccdc10e SHA512 9bebc2ad25ff63036e6cb07e9ea6767441138fd91ef59e6f068c370296a594135479477a18f086dbf06b7dda5188fa0da09c24a6b7b3e7222e4bca70104d20d2

diff --git a/app-arch/xz-utils/xz-utils-5.4.0.ebuild b/app-arch/xz-utils/xz-utils-5.4.0.ebuild
new file mode 100644
index 000000000000..53811b5967ca
--- /dev/null
+++ b/app-arch/xz-utils/xz-utils-5.4.0.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# Remember: we cannot leverage autotools in this ebuild in order
+#           to avoid circular deps with autotools
+
+EAPI=7
+
+inherit libtool multilib multilib-minimal preserve-libs usr-ldscript
+
+if [[ ${PV} == 9999 ]] ; then
+	EGIT_REPO_URI="https://git.tukaani.org/xz.git"
+	inherit git-r3 autotools
+
+	# bug #272880 and bug #286068
+	BDEPEND="sys-devel/gettext >=sys-devel/libtool-2"
+else
+	VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/lassecollin.asc
+	inherit verify-sig
+
+	MY_P="${PN/-utils}-${PV/_}"
+	SRC_URI="
+		mirror://sourceforge/lzmautils/${MY_P}.tar.gz
+		https://tukaani.org/xz/${MY_P}.tar.gz
+		verify-sig? (
+			https://tukaani.org/xz/${MY_P}.tar.gz.sig
+		)
+	"
+
+	if [[ ${PV} != *_alpha* && ${PV} != *_beta* ]] ; then
+		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"
+	fi
+
+	S="${WORKDIR}/${MY_P}"
+fi
+
+DESCRIPTION="Utils for managing LZMA compressed files"
+HOMEPAGE="https://tukaani.org/xz/"
+
+# See top-level COPYING file as it outlines the various pieces and their licenses.
+LICENSE="public-domain LGPL-2.1+ GPL-2+"
+SLOT="0"
+IUSE="+extra-filters nls static-libs"
+
+if [[ ${PV} != 9999 ]] ; then
+	BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-lassecollin )"
+fi
+
+src_prepare() {
+	default
+
+	if [[ ${PV} == 9999 ]] ; then
+		eautopoint
+		eautoreconf
+	else
+		# Allow building shared libs on Solaris/x64
+		elibtoolize
+	fi
+}
+
+multilib_src_configure() {
+	local myconf=(
+		--enable-threads
+		$(use_enable nls)
+		$(use_enable static-libs static)
+	)
+
+	if ! multilib_is_native_abi ; then
+		myconf+=(
+			--disable-{xz,xzdec,lzmadec,lzmainfo,lzma-links,scripts}
+		)
+	fi
+
+	if ! use extra-filters ; then
+		myconf+=(
+			# LZMA1 + LZMA2 for standard .lzma & .xz files
+			--enable-encoders=lzma1,lzma2
+			--enable-decoders=lzma1,lzma2
+
+			# those are used by default, depending on preset
+			--enable-match-finders=hc3,hc4,bt4
+
+			# CRC64 is used by default, though some (old?) files use CRC32
+			--enable-checks=crc32,crc64
+		)
+	fi
+
+	if [[ ${CHOST} == *-solaris* ]] ; then
+		export gl_cv_posix_shell="${EPREFIX}"/bin/sh
+
+		# Undo Solaris-based defaults pointing to /usr/xpg5/bin
+		myconf+=( --disable-path-for-script )
+	fi
+
+	ECONF_SOURCE="${S}" econf "${myconf[@]}"
+}
+
+multilib_src_install() {
+	default
+
+	gen_usr_ldscript -a lzma
+}
+
+multilib_src_install_all() {
+	find "${ED}" -type f -name '*.la' -delete || die
+	rm "${ED}"/usr/share/doc/${PF}/COPYING* || die
+}
+
+pkg_preinst() {
+	preserve_old_lib /usr/$(get_libdir)/liblzma$(get_libname 0)
+}
+
+pkg_postinst() {
+	preserve_old_lib_notify /usr/$(get_libdir)/liblzma$(get_libname 0)
+}