summaryrefslogtreecommitdiff
path: root/sys-fs/dd-rescue
diff options
context:
space:
mode:
Diffstat (limited to 'sys-fs/dd-rescue')
-rw-r--r--sys-fs/dd-rescue/Manifest3
-rw-r--r--sys-fs/dd-rescue/dd-rescue-1.99.10.ebuild105
-rw-r--r--sys-fs/dd-rescue/files/dd-rescue-1.99.10-musl-r2.patch29
3 files changed, 137 insertions, 0 deletions
diff --git a/sys-fs/dd-rescue/Manifest b/sys-fs/dd-rescue/Manifest
index 028d3e03d432..b5a7436cd202 100644
--- a/sys-fs/dd-rescue/Manifest
+++ b/sys-fs/dd-rescue/Manifest
@@ -1,10 +1,13 @@
+AUX dd-rescue-1.99.10-musl-r2.patch 1545 BLAKE2B 827079a693ef1f3d86aa9b7041e441c7c0baacb29f93d56144a3756a6be1a2fbf7373187d30b2a46f8499a5ad810946a1137181e217d90fa57d021288e4b6e85 SHA512 69ed831b52f3a9ee0ab0a149341ff46beaa9c37726e198a0ad014765f11645e390ea8af0d1680576c2902380513dd5cdf285fdd1cbbc4f105a0b404716f007ed
AUX dd-rescue-1.99.8-sysrandom.patch 1204 BLAKE2B 4ef909c294a9299c93fb0ca793e5815fa6f98a9860de1886d9f8da8584a16c0320d56c6ecb6894cbe7f62be62e290f36b76319ed714ccc085c59f952a03cacc6 SHA512 14020e023ea7cf5b56d78776149933241f7424fb22076686a9541737f2fe887406b94e584c5cf650d754e9ead9bf6f2f96c390a2c1fba49f961955df49445a06
AUX dd-rescue-1.99.8-testhole.patch 1267 BLAKE2B 137961d607cd93ad758c7cf6b8f8ab4b2e54017f43585e277563a5050e9c32ee52567de08af83a048e7e59b2ed05753fc67286d640d3c7998504bd11e9a1286c SHA512 f6a6649a4bce486a07f2eac382db609a47585361ad24ce03bad49da284c0b5485e35fcaec95445c46b74f6dfa5fe09d28c45a33a1b319a03c8cbb15c03a4ee8d
AUX dd-rescue-1.99.8-xattr.patch 9308 BLAKE2B 0874806f5394759edacdc4d937619b4ab568cfa501b14f1b56a48f80f7e9777e8be439fe0f1edbe9eb6232344e850360b504dc81ffd1052067c1f68b2152d78e SHA512 b9a2a0c3c035b89c9ef45f52b48d247bcb56f250e86e39bce905826c83823eb855407aeaeadefbf878c946ac019b4f7ec58a46930f0b3450b191b62bd524690a
AUX dd-rescue-1.99.9-musl-r2.patch 1558 BLAKE2B ddaed89adbf48b2946285b906dbe59a9baafc6f0a5aa4ba01332af5801f83119f4ad5ac4864d0ace44c57a0f94b68816b3aa4fdbf3d53adefded5835b51fb2c4 SHA512 94cddb0a1eca0bf6343a06570708a72c4970cd92ccba891b1098199670ea00f91105c0b55ceec72d40bdbf013a35cb0d2f20c504c0723de4ac393e75fff3d404
AUX dd_rescue-1.99-musl-r2.patch 4035 BLAKE2B cffc620f429db2042a405174a280e44c27dc60f9b3da007969b77d66df599b9c4b9fb02cb2799017c7fb6a0a0f1e8b785c88fb741fb478b6a8f256d0e461bf78 SHA512 a0fe42686852cbdd4ce5a4c55c9dc77cff7165109f3c7d4dfaaec527fa116a17f602ad4fab22410991f05aac6aa8f5b57bb711c05e08f146d532aaa807dbfd66
+DIST dd_rescue-1.99.10.tar.bz2 176603 BLAKE2B 66e9f54274363eb9b66c3fb098d398f7ae6f43812eb1560304c14bbe4b0e8158881f891a80ef2b03a77d205402651c7b9ed8bcdc14b3e6e865f4e713ab9249f4 SHA512 8f7cd4fca09302035f26102ce057a05130dcd808f2e44bd057f776dcd0222f9df6317b9703ab6c3b133a55e4bbbdf0ff58fdcbbbc3f1fc20889b29092b522e06
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
+EBUILD dd-rescue-1.99.10.ebuild 2374 BLAKE2B 24f2bfe4c1ed4cad08be6402ffe7934c30fd6972b6a6eb3ee7dc982626c40d6e4c15105a5b7f0b423400b70b69fc6760bf8ab84303e779c3d3f131a39d7bb01a SHA512 85c623d9651b000ee351bc7a51fd11696e4b1005535cb966eda3887322f11a0d9bc414b613488115e2d48ca6606d05fe4cb80b47bb1f74b3ae3c3ffd57b6df3e
EBUILD dd-rescue-1.99.8-r1.ebuild 2502 BLAKE2B 8d7f487f02b8c6cbb1ecab1d9226f646a8a6118eb4d90b25128538b1d4a3430d99a1eb2d17f8e70600346e2f3b987e3cf86276c360bc127d90f15dde0c60a099 SHA512 7df6dceb92cdb93f43002cf33f138cdee775ab431e761663cbb6ea4b15c2bec73d73dabb11347d2a3e6cbbb04a2e1feee8f3bff128bdc9c3cc5b6891e00aacd3
EBUILD dd-rescue-1.99.9.ebuild 2373 BLAKE2B 2ac2d90a48c4d530d9b3d6031c2d4c8dec127ceecdceff6b378c173857066b5782f14c106e1955866dd13a5a3ec26bad1aad547479a2f15dd042ed13642faf0e SHA512 57109a1bae93a8c5a14311e337bf3ee742c8e0036f8c0c11e4cabba47e833b687b970ce4f65b3a1f046ba8bc9cf32035724745c97d7e14dac14c5e4a1f1a1ffe
MISC metadata.xml 253 BLAKE2B 295e9d6d93aaa12af413972e1590c67087801cc09c9aa6b59d4606c0f4106d1dacf2baa9858559083b4c6d91beeef218d0729e8593a33788958da6d2897e8ce2 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555
diff --git a/sys-fs/dd-rescue/dd-rescue-1.99.10.ebuild b/sys-fs/dd-rescue/dd-rescue-1.99.10.ebuild
new file mode 100644
index 000000000000..12cfa7fbbe60
--- /dev/null
+++ b/sys-fs/dd-rescue/dd-rescue-1.99.10.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.10-musl-r2.patch
+)
+
+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) -ldl:' \
+ -e 's:-shared:$(CFLAGS) $(LDFLAGS) -shared:' \
+ Makefile || die
+}
+
+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.10-musl-r2.patch b/sys-fs/dd-rescue/files/dd-rescue-1.99.10-musl-r2.patch
new file mode 100644
index 000000000000..ae348eadf5c8
--- /dev/null
+++ b/sys-fs/dd-rescue/files/dd-rescue-1.99.10-musl-r2.patch
@@ -0,0 +1,29 @@
+From 5429b36d186e73695244cee66f98ff9f61378b67 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.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 454bbcb..ec3fcc7 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -11,7 +11,7 @@ AC_C_INLINE
+
+ #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.rc2