From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-1727840-garchives=archives.gentoo.org@lists.gentoo.org> Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 A09D41584F2 for <garchives@archives.gentoo.org>; Fri, 14 Mar 2025 16:24:56 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (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) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 8D57A343188 for <garchives@archives.gentoo.org>; Fri, 14 Mar 2025 16:24:56 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 8A5D31103C7; Fri, 14 Mar 2025 16:24:55 +0000 (UTC) Received: from smtp.gentoo.org (mail.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)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 7F0711103C7 for <gentoo-commits@lists.gentoo.org>; Fri, 14 Mar 2025 16:24:55 +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)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 361333430E4 for <gentoo-commits@lists.gentoo.org>; Fri, 14 Mar 2025 16:24:55 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C49E41C96 for <gentoo-commits@lists.gentoo.org>; Fri, 14 Mar 2025 16:24:53 +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: <1741969458.0561bd1023d8ebe3fd01f7efb0bedb4b966668b5.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/dd-rescue-9999.ebuild X-VCS-Directories: sys-fs/dd-rescue/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 0561bd1023d8ebe3fd01f7efb0bedb4b966668b5 X-VCS-Branch: master Date: Fri, 14 Mar 2025 16:24:53 +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: 7324d267-6506-455c-bc6f-dc5057add997 X-Archives-Hash: 954a4bbce16bc54e137cf36bfe97a45f commit: 0561bd1023d8ebe3fd01f7efb0bedb4b966668b5 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Fri Mar 14 16:23:44 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Fri Mar 14 16:24:18 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0561bd10 sys-fs/dd-rescue: add 9999 Testing new upstream changes. Bug: https://bugs.gentoo.org/950609 Signed-off-by: Sam James <sam <AT> gentoo.org> sys-fs/dd-rescue/dd-rescue-9999.ebuild | 132 +++++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) diff --git a/sys-fs/dd-rescue/dd-rescue-9999.ebuild b/sys-fs/dd-rescue/dd-rescue-9999.ebuild new file mode 100644 index 000000000000..ff16b0e78e78 --- /dev/null +++ b/sys-fs/dd-rescue/dd-rescue-9999.ebuild @@ -0,0 +1,132 @@ +# 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/" + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://git.code.sf.net/p/ddrescue/code" + EGIT_BRANCH=DD_RESCUE_1_99_BRANCH + inherit git-r3 +else + SRC_URI="http://www.garloff.de/kurt/linux/ddrescue/${MY_P}.tar.bz2" + S="${WORKDIR}/${MY_P}" + + KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos" +fi + +LICENSE="|| ( GPL-2 GPL-3 )" +SLOT="0" +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 +}