From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1709331-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 (4096 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 7AB1115813A
	for <garchives@archives.gentoo.org>; Tue, 14 Jan 2025 12:24:15 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 34479E07F1;
	Tue, 14 Jan 2025 12:24:14 +0000 (UTC)
Received: from smtp.gentoo.org (dev.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 F23BBE07EE
	for <gentoo-commits@lists.gentoo.org>; Tue, 14 Jan 2025 12:24:13 +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 D71C1340C57
	for <gentoo-commits@lists.gentoo.org>; Tue, 14 Jan 2025 12:24:12 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 3E5DA1D2A
	for <gentoo-commits@lists.gentoo.org>; Tue, 14 Jan 2025 12:24:11 +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: <1736857015.781a413294eb668122e55054e2dbeb6304d54345.sam@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/dd-rescue/
X-VCS-Repository: repo/gentoo
X-VCS-Files: sys-fs/dd-rescue/Manifest sys-fs/dd-rescue/dd-rescue-1.99.20.ebuild
X-VCS-Directories: sys-fs/dd-rescue/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: 781a413294eb668122e55054e2dbeb6304d54345
X-VCS-Branch: master
Date: Tue, 14 Jan 2025 12:24:11 +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: 5a5b4742-8e24-4ca7-b746-25165c615ee9
X-Archives-Hash: 3fb8344736dc31d90082f0c396eed044

commit:     781a413294eb668122e55054e2dbeb6304d54345
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 14 12:16:55 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jan 14 12:16:55 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=781a4132

sys-fs/dd-rescue: add 1.99.20

Bug: https://bugs.gentoo.org/947105
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-fs/dd-rescue/Manifest                 |   1 +
 sys-fs/dd-rescue/dd-rescue-1.99.20.ebuild | 124 ++++++++++++++++++++++++++++++
 2 files changed, 125 insertions(+)

diff --git a/sys-fs/dd-rescue/Manifest b/sys-fs/dd-rescue/Manifest
index a06e012720ae..1a15dc2aff85 100644
--- a/sys-fs/dd-rescue/Manifest
+++ b/sys-fs/dd-rescue/Manifest
@@ -1,2 +1,3 @@
 DIST dd_rescue-1.99.13.tar.bz2 182574 BLAKE2B da16f37dffc702695d49517aed9a33ce4d00b5e9903c363deaf4b4ed8b5294246d0fe78e977b8a6f6128b9b643a8986437359c78726695fc8e68be41bb11d93e SHA512 2276128fe176dce3ecbd6aa8e0d00b9547887f0498ce0cd135e61dbf882c521e22e2afce3539a73496da1d0472cd9582971a30eb558ce3211820c8d0358c8241
 DIST dd_rescue-1.99.17.tar.bz2 199774 BLAKE2B fd235ce5cb9d80960451f5a65eef0fdc73cd21f684210037056bc5a4952af40e5d494cf541f9e87b76d5d18508caa221c2f4919d537580d4eb58fd67a0c65177 SHA512 8bdd63ed48413607e1da004f497feec8b8a990488348105d30d4d7e56e342b54b4e6439270e581e434b4b0edcf55ab11490739b0c6563358c59b5a64a390a0df
+DIST dd_rescue-1.99.20.tar.bz2 208147 BLAKE2B 145868765b1126a219d2bf9de2e974ba1824d11efd15d58097674ada52bdd4f8909bbf7b4c11a2dd7314639ce487bd4e526cbcbd82d82d43349366ad1284257c SHA512 eb40916f972a486262d4dc03baafdc4b70b0fdc473cd1c20061f64737a99dcceb5ee56334e36f8fa441a0b1d352763d5b8fc153a2ef8403a5b2295f11273c8c2

diff --git a/sys-fs/dd-rescue/dd-rescue-1.99.20.ebuild b/sys-fs/dd-rescue/dd-rescue-1.99.20.ebuild
new file mode 100644
index 000000000000..f4d8e24954eb
--- /dev/null
+++ b/sys-fs/dd-rescue/dd-rescue-1.99.20.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools flag-o-matic toolchain-funcs
+
+MY_PN="${PN/-/_}"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Similar to dd but can copy from source with errors"
+HOMEPAGE="http://www.garloff.de/kurt/linux/ddrescue/"
+SRC_URI="http://www.garloff.de/kurt/linux/ddrescue/${MY_P}.tar.bz2"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="|| ( GPL-2 GPL-3 )"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="cpu_flags_x86_avx2 lzo lzma cpu_flags_x86_sse4_2 static test xattr"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+	lzo? ( dev-libs/lzo )
+	xattr? ( sys-apps/attr )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	test? (
+		lzo? (
+			app-arch/lzop
+		)
+	)
+"
+
+src_prepare() {
+	default
+
+	if ! use cpu_flags_x86_sse4_2; then
+		sed -i \
+			-e 's:^CC_FLAGS_CHECK(-msse4.2,SSE42):#&:' \
+			configure.ac || die
+	fi
+
+	if ! use cpu_flags_x86_avx2; then
+		sed -i \
+			-e 's:^CC_FLAGS_CHECK(-mavx2,AVX2):#&:' \
+			configure.ac || die
+	fi
+
+	eautoreconf
+
+	sed -i \
+		-e 's:\(-ldl\):$(LDFLAGS) \1:' \
+		-e 's:\(-shared\):$(CFLAGS) $(LDFLAGS) \1:' \
+		Makefile || die
+}
+
+src_configure() {
+	use static && append-ldflags -static
+
+	# OpenSSL is only used by a random helper tool we don't install.
+	export ac_cv_header_attr_xattr_h=$(usex xattr)
+	export ac_cv_header_openssl_evp_h=no
+	export ac_cv_lib_crypto_EVP_aes_192_ctr=no
+	export ac_cv_lib_lzo2_lzo1x_1_compress=$(usex lzo)
+	export ac_cv_header_lzo_lzo1x_h=$(usex lzo)
+	export ac_cv_header_lzma_h=$(usex lzma)
+	export ac_cv_lib_lzma_lzma_easy_encoder=$(usex lzma)
+	econf
+}
+
+_emake() {
+	local arch
+	case ${ARCH} in
+		x86)   arch=i386;;
+		amd64) arch=x86_64;;
+		arm)   arch=arm;;
+		arm64) arch=aarch64;;
+	esac
+
+	local os=$(usex kernel_linux Linux IDK)
+
+	# HAVE_LZO is special as it's checked for emptiness in test_crypt.sh.
+	# We could try make RDRND and friends controlled via USE but it's too brittle,
+	# see bug #947105.
+	emake \
+		MACH="${arch}" \
+		OS="${os}" \
+		HAVE_SSE42=$(usex cpu_flags_x86_sse4_2 1 0) \
+		HAVE_AVX2=$(usex cpu_flags_x86_avx2 1 0) \
+		HAVE_LZMA=$(usex lzma 1 0) \
+		HAVE_LZO=$(usev lzo 1) \
+		HAVE_OPENSSL=0 \
+		RPM_OPT_FLAGS="${CFLAGS} ${CPPFLAGS}" \
+		CFLAGS_OPT='$(CFLAGS)' \
+		LDFLAGS="${LDFLAGS} -Wl,-rpath,${EPREFIX}/usr/$(get_libdir)/${PN}" \
+		CC="$(tc-getCC)" \
+		"$@"
+}
+
+src_compile() {
+	_emake
+}
+
+src_test() {
+	if ! use lzo ; then
+		sed -i \
+			-e '/^LZOP=/s:LZOP=.*:LZOP=:' \
+			-e '/^LZOP=/a exit 0' \
+			test_lzo.sh || die
+	fi
+
+	_emake check
+}
+
+src_install() {
+	# easier to install by hand than trying to make sense of the Makefile.
+	dobin dd_rescue
+	dodir /usr/$(get_libdir)/${PN}
+	cp -pPR libddr_*.so "${ED}"/usr/$(get_libdir)/${PN}/ || die
+	dodoc README.dd_rescue
+	doman dd_rescue.1
+	use lzo && doman ddr_lzo.1
+}