public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Lars Wendler" <polynomial-c@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/dd-rescue/files/, sys-fs/dd-rescue/
Date: Mon,  1 Mar 2021 09:51:32 +0000 (UTC)	[thread overview]
Message-ID: <1614592290.6f785d6f9e50eba6c72cace0157f3e864fdf871d.polynomial-c@gentoo> (raw)

commit:     6f785d6f9e50eba6c72cace0157f3e864fdf871d
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Mon Mar  1 09:51:20 2021 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Mon Mar  1 09:51:30 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f785d6f

sys-fs/dd-rescue: Bump to version 1.99.9

Package-Manager: Portage-3.0.16, Repoman-3.0.2
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 sys-fs/dd-rescue/Manifest                          |   1 +
 sys-fs/dd-rescue/dd-rescue-1.99.9.ebuild           | 105 +++++++++++++++++++++
 .../dd-rescue/files/dd-rescue-1.99.9-musl-r2.patch |  30 ++++++
 3 files changed, 136 insertions(+)

diff --git a/sys-fs/dd-rescue/Manifest b/sys-fs/dd-rescue/Manifest
index 380ebad15a8..6ee7e5d7144 100644
--- a/sys-fs/dd-rescue/Manifest
+++ b/sys-fs/dd-rescue/Manifest
@@ -1 +1,2 @@
 DIST dd_rescue-1.99.8.tar.bz2 174594 BLAKE2B 51e62989bf6318cb5926f30bc1db746bddd41fb49aab15dc2b1c67e0af079469161d390ba4e1e109d195249b3aace3aa830a3aec14ba534eb47f38c0136f910c SHA512 a230e1df4532671ea631036012dd1e38614e45bed58b00757f0017b0ea60f14ac3bdac07777d175aa4929def593b3c8485e463b1fc25b5067adf4cf3f3ac040d
+DIST dd_rescue-1.99.9.tar.bz2 176015 BLAKE2B b0955182eaa9fff967e77278de8a5582b3ad75861f1279cf8aea47a5c50925692f2223408444f6c73a38b67bee9738df0ce2cf60b262e86d5d32c26d59aab97d SHA512 f181f33b80637da09f8c47efe2961b0c272540bb9df932a1e6714d3e3018b1ec251f9bca8473b04bb84673812fe68a4f12fd9cc72d2340b5246a7ac25b7f8238

diff --git a/sys-fs/dd-rescue/dd-rescue-1.99.9.ebuild b/sys-fs/dd-rescue/dd-rescue-1.99.9.ebuild
new file mode 100644
index 00000000000..51fcc2cf92d
--- /dev/null
+++ b/sys-fs/dd-rescue/dd-rescue-1.99.9.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools flag-o-matic multilib 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"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="cpu_flags_x86_avx2 lzo cpu_flags_x86_sse4_2 static xattr"
+
+RDEPEND="lzo? ( dev-libs/lzo )
+	xattr? ( sys-apps/attr )"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-1.99.9-musl-r2.patch
+)
+
+src_prepare() {
+	default
+
+	sed -i \
+		-e 's:-ldl:$(LDFLAGS) -ldl:' \
+		-e 's:-shared:$(CFLAGS) $(LDFLAGS) -shared:' \
+		Makefile || die
+
+	if ! use cpu_flags_x86_sse4_2; then
+		sed -i \
+			-e 's:^CC_FLAGS_CHECK(-msse4.2,SSE42):#&:' \
+			configure.in || die
+	fi
+
+	if ! use cpu_flags_x86_avx2; then
+		sed -i \
+			-e 's:^CC_FLAGS_CHECK(-mavx2,AVX2):#&:' \
+			configure.in || die
+	fi
+
+	eautoreconf
+}
+
+src_configure() {
+	use static && append-ldflags -static
+	# OpenSSL is only used by a random helper tool we don't install.
+	ac_cv_header_attr_xattr_h=$(usex xattr) \
+	ac_cv_header_openssl_evp_h=no \
+	ac_cv_lib_crypto_EVP_aes_192_ctr=no \
+	ac_cv_lib_lzo2_lzo1x_1_compress=$(usex lzo) \
+	ac_cv_header_lzo_lzo1x_h=$(usex lzo) \
+	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)
+
+	# The Makefile is a mess.  Override a few vars rather than patch it.
+	emake \
+		MACH="${arch}" \
+		OS="${os}" \
+		HAVE_SSE42=$(usex cpu_flags_x86_sse4_2 1 0) \
+		HAVE_AVX2=$(usex cpu_flags_x86_avx2 1 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() {
+	append-cflags -fcommon # bug 707796
+	_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
+}

diff --git a/sys-fs/dd-rescue/files/dd-rescue-1.99.9-musl-r2.patch b/sys-fs/dd-rescue/files/dd-rescue-1.99.9-musl-r2.patch
new file mode 100644
index 00000000000..1089a63f06c
--- /dev/null
+++ b/sys-fs/dd-rescue/files/dd-rescue-1.99.9-musl-r2.patch
@@ -0,0 +1,30 @@
+From 28818d18cfc7a459675ac388e5cf7b50bdd9ad89 Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi@gentoo.org>
+Date: Wed, 13 Dec 2017 01:02:12 +0100
+Subject: [PATCH] loff_t and __WORDSIZE includes for MUSL
+
+Rewrite of Justin Keogh's patch [Link 1] to fix build problems
+on ARM.
+
+Link 1: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5f5abc0f1b036921d6eb5b0f434c960ed280619f
+Fixes: https://bugs.gentoo.org/616364
+---
+ configure.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.in b/configure.in
+index 813accf..5a8246c 100644
+--- a/configure.in
++++ b/configure.in
+@@ -6,7 +6,7 @@ AC_C_INLINE
+ AC_HEADER_STDC
+ #AC_PROG_INSTALL
+ #CFLAGS="$CFLAGS -DHAVE_CONFIG_H"
+-AC_CHECK_HEADERS([fallocate.h dlfcn.h unistd.h sys/xattr.h attr/xattr.h sys/acl.h sys/ioctl.h endian.h linux/fs.h linux/fiemap.h stdint.h lzo/lzo1x.h openssl/evp.h linux/random.h sys/random.h malloc.h sched.h sys/statvfs.h sys/resource.h])
++AC_CHECK_HEADERS([fallocate.h dlfcn.h unistd.h sys/xattr.h attr/xattr.h sys/acl.h sys/ioctl.h sys/reg.h endian.h linux/fs.h linux/fiemap.h stdint.h lzo/lzo1x.h openssl/evp.h linux/random.h sys/random.h malloc.h sched.h sys/statvfs.h sys/resource.h])
+ AC_CHECK_FUNCS([ffs ffsl basename fallocate64 splice getopt_long open64 pread pread64 lseek64 stat64 posix_fadvise posix_fadvise64 __builtin_prefetch htobe64 feof_unlocked getline getentropy getrandom posix_memalign valloc sched_yield fstatvfs __builtin_cpu_supports getrlimit])
+ AC_CHECK_LIB(dl,dlsym)
+ AC_CHECK_LIB(fallocate,linux_fallocate64)
+-- 
+2.31.0.rc0
+


             reply	other threads:[~2021-03-01  9:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-01  9:51 Lars Wendler [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-07-23  1:52 [gentoo-commits] repo/gentoo:master commit in: sys-fs/dd-rescue/files/, sys-fs/dd-rescue/ Sam James
2022-12-26  8:35 Sam James
2022-10-28 20:09 Sam James
2021-04-29 17:59 Lars Wendler
2021-03-12 10:45 Lars Wendler
2020-05-03 19:52 Thomas Deutschmann
2018-02-26 12:29 Lars Wendler
2017-12-13  0:09 Sebastian Pipping
2015-09-09 20:58 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=1614592290.6f785d6f9e50eba6c72cace0157f3e864fdf871d.polynomial-c@gentoo \
    --to=polynomial-c@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