diff options
Diffstat (limited to 'sys-fs/dd-rescue')
-rw-r--r-- | sys-fs/dd-rescue/Manifest | 4 | ||||
-rw-r--r-- | sys-fs/dd-rescue/dd-rescue-1.99.13-r1.ebuild | 107 | ||||
-rw-r--r-- | sys-fs/dd-rescue/dd-rescue-1.99.13.ebuild | 4 | ||||
-rw-r--r-- | sys-fs/dd-rescue/files/dd-rescue-1.99.13-musl.patch | 145 |
4 files changed, 259 insertions, 1 deletions
diff --git a/sys-fs/dd-rescue/Manifest b/sys-fs/dd-rescue/Manifest index 80f1e2cde929..d09ca23cdf9d 100644 --- a/sys-fs/dd-rescue/Manifest +++ b/sys-fs/dd-rescue/Manifest @@ -1,5 +1,7 @@ +AUX dd-rescue-1.99.13-musl.patch 3604 BLAKE2B 677ccabb3a6b45aadbf521cfca23a7b3ac1984110f44fdff93e3e65b8d7d1a1807a17f7110a0a37b5868db77af039bed50291fa80e263940f1bd99dd516c09a0 SHA512 211bbcc064fb40aaf059f5bd843a760b8cdc6a580365e088e4be7331a8c1b85ff3fd34095bdb559a2fe449044c07c87eb979978cad30d2ca676c77f1541bcc96 DIST dd_rescue-1.99.12.tar.bz2 181798 BLAKE2B 547910af7ac5dde360179dbd75bed36e6420dda162a41f9bb60a454f5c6629d6a1be9b15240ce3d0e7b80e09c660a87765e826909614b037a506ad775b71041f SHA512 61f4f09e7e8442049634c5a5659f887cf82b16bc8b768c0aa79774e18feac6e91fbc258e5a6c8c3cac0577fadbdd26206261cf6c99b3980f763a1b584fb46001 DIST dd_rescue-1.99.13.tar.bz2 182574 BLAKE2B da16f37dffc702695d49517aed9a33ce4d00b5e9903c363deaf4b4ed8b5294246d0fe78e977b8a6f6128b9b643a8986437359c78726695fc8e68be41bb11d93e SHA512 2276128fe176dce3ecbd6aa8e0d00b9547887f0498ce0cd135e61dbf882c521e22e2afce3539a73496da1d0472cd9582971a30eb558ce3211820c8d0358c8241 EBUILD dd-rescue-1.99.12.ebuild 2314 BLAKE2B d04aa3d7412a0810d01fcb6e492ac1cc2c7c79a1c6c0135f2db5ed5c46639b00cc4c691d2f814aa8faab84a9289e971bb6957cd7b2cf23ac49a17fe392b82ebc SHA512 1133b82958fd66ba32ca0cb5e271e2f5d79da7a5137da7aeff4428147c06993635154b1a5d5b3d1d63f5c6e09355a1fff6d5be10fc92dbf413cd694c6d6bd8dd -EBUILD dd-rescue-1.99.13.ebuild 2319 BLAKE2B fcfaeeb14e275922c934c87e4632baf41431e25dce0b0e94a5a31255cff0eb950c2447d32964ea4f7f1bae4c9b1c465b9a5180d52247c2b46d3182d0c5a40a56 SHA512 db3ef610e9581b056370f1cb4605110b56b45bf31e702b2e858fbb8ccce5d5e78e65b505189ef99d3f46d92c48c854a8adb8c99432d1751d44f9bf8f5c05ff71 +EBUILD dd-rescue-1.99.13-r1.ebuild 2374 BLAKE2B 7437b0b4dbbae9390bf9d0617626ab1bef561bcc2d35c15cfb8ca55dde800f6dc5611a75702922ae76a3c351ea6e7806ef9f16c1535c7a31d769975129061d68 SHA512 c464daf415e4cbff27e5a0fd673474e560bf4bdfac2482eabe4c2906b6ca56ee89dc3ba21c0b4a34a1cd979f383d0f444f7b6f7bcb5ba597e3eb5080209f08ef +EBUILD dd-rescue-1.99.13.ebuild 2372 BLAKE2B a918c30666428ac8f41a33c73e4a89bfd7fde3b98d28255870de56bb9e3520d14ba115a67c4b97e17ea737e39047c3180619a786e7beee752eafdb712a78f6c8 SHA512 f7741ed9f2380aa48c8da408ee8f429ff13c929f3c1670c4fbea6057ef3677dea2a155ed1815a9a2f866f8cb05a4eb73c55a845f1c7d623f3fab17e262230faf MISC metadata.xml 254 BLAKE2B f3a9f843cf94243d1129711770df727fcdc8808bca829ef784819cab6f5410dfa463cfed85182f8228c7de796a674dd602653ad3ef817a62c0c3e7198b23befe SHA512 b9fcd3084a7e197f6138e1ce8b0eff99c4c203c37a7d5c40de207040ba1501ef0e5b2f4e00216a567037bcd6d3394fdec6ff587484c9ba2fca9d04f431733b7c diff --git a/sys-fs/dd-rescue/dd-rescue-1.99.13-r1.ebuild b/sys-fs/dd-rescue/dd-rescue-1.99.13-r1.ebuild new file mode 100644 index 000000000000..d0b6a87d18c7 --- /dev/null +++ b/sys-fs/dd-rescue/dd-rescue-1.99.13-r1.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2023 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" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~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.13-musl.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) \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. + 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/dd-rescue-1.99.13.ebuild b/sys-fs/dd-rescue/dd-rescue-1.99.13.ebuild index d330001df26d..e36b59fed8a0 100644 --- a/sys-fs/dd-rescue/dd-rescue-1.99.13.ebuild +++ b/sys-fs/dd-rescue/dd-rescue-1.99.13.ebuild @@ -25,6 +25,10 @@ DEPEND="${RDEPEND}" S="${WORKDIR}/${MY_P}" +PATCHES=( + "${FILESDIR}"/${PN}-1.99.13-musl.patch +) + src_prepare() { default diff --git a/sys-fs/dd-rescue/files/dd-rescue-1.99.13-musl.patch b/sys-fs/dd-rescue/files/dd-rescue-1.99.13-musl.patch new file mode 100644 index 000000000000..53d8af201280 --- /dev/null +++ b/sys-fs/dd-rescue/files/dd-rescue-1.99.13-musl.patch @@ -0,0 +1,145 @@ +# Original patch was created by Thomas Deutschmann <whissi@gentoo.org>, but the +# patch needed to be rebased. Mainly configure.ac instead of configure.in. +# The only additional included part is secmem patch. +# +# Closes: https://bugs.gentoo.org/829285 +From 69c3974670f5a8ee0f2258f10a9228b39025b464 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 +--- 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 sys/endian.h linux/swab.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 sys/endian.h linux/swab.h]) + AC_CHECK_FUNCS([ffs ffsl basename fallocate64 splice getopt_long open64 pread pread64 lseek64 stat64 posix_fadvise posix_fadvise64 __builtin_prefetch htonl htobe64 feof_unlocked getline getentropy getrandom posix_memalign valloc sched_yield fstatvfs __builtin_cpu_supports getrlimit aligned_alloc]) + AC_CHECK_LIB(dl,dlsym) + AC_CHECK_LIB(fallocate,linux_fallocate64) +--- a/ddr_ctrl.h ++++ b/ddr_ctrl.h +@@ -7,6 +7,9 @@ + * License: GNU GPLv2 or v3 + */ + ++#define _GNU_SOURCE ++#include <fcntl.h> ++ + #ifndef _DDR_CTRL_H + #define _DDR_CTRL_H + +--- a/ffs.h ++++ b/ffs.h +@@ -28,6 +28,9 @@ + #include <endian.h> + #endif + ++#ifdef HAVE_SYS_REG_H ++#include <sys/reg.h> ++#endif + + #ifdef HAVE_FFS + # define myffs(x) ffs(x) + +--- a/fiemap.h ++++ b/fiemap.h +@@ -29,5 +29,9 @@ + + #endif /* HAVE_LINUX_FS_H */ + ++#ifdef HAVE_SYS_REG_H ++#include <sys/reg.h> ++#endif ++ + #endif /* _FIEMAPH */ + +--- a/fmt_no.h ++++ b/fmt_no.h +@@ -1,4 +1,6 @@ + /** Decl for int to str conversion with highlighting */ ++#define _GNU_SOURCE ++#include <fcntl.h> + + #ifndef _FMT_NO_H + #define _FMT_NO_H + +--- a/fstrim.h ++++ b/fstrim.h +@@ -1,3 +1,6 @@ ++#define _GNU_SOURCE ++#include <fcntl.h> ++ + #ifndef _FSTRIM_H + #define _FSTRIM_H + +--- a/libddr_hash.c ++++ b/libddr_hash.c +@@ -34,6 +34,10 @@ + #include <unistd.h> + #include <fcntl.h> + ++#ifdef HAVE_SYS_REG_H ++#include <sys/reg.h> ++#endif ++ + #include <netinet/in.h> /* For ntohl/htonl */ + #include <endian.h> + +--- a/libddr_lzo.c ++++ b/libddr_lzo.c +@@ -16,6 +16,9 @@ + #include "ddr_plugin.h" + #include "ddr_ctrl.h" + ++#ifdef HAVE_SYS_REG_H ++#include <sys/reg.h> ++#endif + #include <stdlib.h> + #include <string.h> + #include <stdint.h> + +--- a/libddr_null.c ++++ b/libddr_null.c +@@ -10,6 +10,9 @@ + #include "ddr_ctrl.h" + #include <string.h> + #include <stdlib.h> ++#ifdef HAVE_SYS_REG_H ++#include <sys/reg.h> ++#endif + + /* fwd decl */ + extern ddr_plugin_t ddr_plug; + +--- a/sha512.h ++++ b/sha512.h +@@ -3,6 +3,10 @@ + + #include "hash.h" + ++#ifdef HAVE_SYS_REG_H ++#include <sys/reg.h> ++#endif ++ + void sha512_init(hash_t *ctx); + void sha384_init(hash_t *ctx); + void sha512_128(const uint8_t* msg, hash_t* ctx); + +--- a/secmem.c ++++ b/secmem.c +@@ -15,6 +15,7 @@ + #endif + #ifdef HAVE_SYS_RESOURCE_H + # include <sys/resource.h> ++# include <stddef.h> + #endif + + static unsigned char *optr; |