1 |
commit: 6f785d6f9e50eba6c72cace0157f3e864fdf871d |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Mar 1 09:51:20 2021 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Mar 1 09:51:30 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f785d6f |
7 |
|
8 |
sys-fs/dd-rescue: Bump to version 1.99.9 |
9 |
|
10 |
Package-Manager: Portage-3.0.16, Repoman-3.0.2 |
11 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
12 |
|
13 |
sys-fs/dd-rescue/Manifest | 1 + |
14 |
sys-fs/dd-rescue/dd-rescue-1.99.9.ebuild | 105 +++++++++++++++++++++ |
15 |
.../dd-rescue/files/dd-rescue-1.99.9-musl-r2.patch | 30 ++++++ |
16 |
3 files changed, 136 insertions(+) |
17 |
|
18 |
diff --git a/sys-fs/dd-rescue/Manifest b/sys-fs/dd-rescue/Manifest |
19 |
index 380ebad15a8..6ee7e5d7144 100644 |
20 |
--- a/sys-fs/dd-rescue/Manifest |
21 |
+++ b/sys-fs/dd-rescue/Manifest |
22 |
@@ -1 +1,2 @@ |
23 |
DIST dd_rescue-1.99.8.tar.bz2 174594 BLAKE2B 51e62989bf6318cb5926f30bc1db746bddd41fb49aab15dc2b1c67e0af079469161d390ba4e1e109d195249b3aace3aa830a3aec14ba534eb47f38c0136f910c SHA512 a230e1df4532671ea631036012dd1e38614e45bed58b00757f0017b0ea60f14ac3bdac07777d175aa4929def593b3c8485e463b1fc25b5067adf4cf3f3ac040d |
24 |
+DIST dd_rescue-1.99.9.tar.bz2 176015 BLAKE2B b0955182eaa9fff967e77278de8a5582b3ad75861f1279cf8aea47a5c50925692f2223408444f6c73a38b67bee9738df0ce2cf60b262e86d5d32c26d59aab97d SHA512 f181f33b80637da09f8c47efe2961b0c272540bb9df932a1e6714d3e3018b1ec251f9bca8473b04bb84673812fe68a4f12fd9cc72d2340b5246a7ac25b7f8238 |
25 |
|
26 |
diff --git a/sys-fs/dd-rescue/dd-rescue-1.99.9.ebuild b/sys-fs/dd-rescue/dd-rescue-1.99.9.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000000..51fcc2cf92d |
29 |
--- /dev/null |
30 |
+++ b/sys-fs/dd-rescue/dd-rescue-1.99.9.ebuild |
31 |
@@ -0,0 +1,105 @@ |
32 |
+# Copyright 1999-2021 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=7 |
36 |
+ |
37 |
+inherit autotools flag-o-matic multilib toolchain-funcs |
38 |
+ |
39 |
+MY_PN="${PN/-/_}" |
40 |
+MY_P="${MY_PN}-${PV}" |
41 |
+ |
42 |
+DESCRIPTION="Similar to dd but can copy from source with errors" |
43 |
+HOMEPAGE="http://www.garloff.de/kurt/linux/ddrescue/" |
44 |
+SRC_URI="http://www.garloff.de/kurt/linux/ddrescue/${MY_P}.tar.bz2" |
45 |
+ |
46 |
+LICENSE="GPL-2" |
47 |
+SLOT="0" |
48 |
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos" |
49 |
+IUSE="cpu_flags_x86_avx2 lzo cpu_flags_x86_sse4_2 static xattr" |
50 |
+ |
51 |
+RDEPEND="lzo? ( dev-libs/lzo ) |
52 |
+ xattr? ( sys-apps/attr )" |
53 |
+DEPEND="${RDEPEND}" |
54 |
+ |
55 |
+S="${WORKDIR}/${MY_P}" |
56 |
+ |
57 |
+PATCHES=( |
58 |
+ "${FILESDIR}"/${PN}-1.99.9-musl-r2.patch |
59 |
+) |
60 |
+ |
61 |
+src_prepare() { |
62 |
+ default |
63 |
+ |
64 |
+ sed -i \ |
65 |
+ -e 's:-ldl:$(LDFLAGS) -ldl:' \ |
66 |
+ -e 's:-shared:$(CFLAGS) $(LDFLAGS) -shared:' \ |
67 |
+ Makefile || die |
68 |
+ |
69 |
+ if ! use cpu_flags_x86_sse4_2; then |
70 |
+ sed -i \ |
71 |
+ -e 's:^CC_FLAGS_CHECK(-msse4.2,SSE42):#&:' \ |
72 |
+ configure.in || die |
73 |
+ fi |
74 |
+ |
75 |
+ if ! use cpu_flags_x86_avx2; then |
76 |
+ sed -i \ |
77 |
+ -e 's:^CC_FLAGS_CHECK(-mavx2,AVX2):#&:' \ |
78 |
+ configure.in || die |
79 |
+ fi |
80 |
+ |
81 |
+ eautoreconf |
82 |
+} |
83 |
+ |
84 |
+src_configure() { |
85 |
+ use static && append-ldflags -static |
86 |
+ # OpenSSL is only used by a random helper tool we don't install. |
87 |
+ ac_cv_header_attr_xattr_h=$(usex xattr) \ |
88 |
+ ac_cv_header_openssl_evp_h=no \ |
89 |
+ ac_cv_lib_crypto_EVP_aes_192_ctr=no \ |
90 |
+ ac_cv_lib_lzo2_lzo1x_1_compress=$(usex lzo) \ |
91 |
+ ac_cv_header_lzo_lzo1x_h=$(usex lzo) \ |
92 |
+ econf |
93 |
+} |
94 |
+ |
95 |
+_emake() { |
96 |
+ local arch |
97 |
+ case ${ARCH} in |
98 |
+ x86) arch=i386;; |
99 |
+ amd64) arch=x86_64;; |
100 |
+ arm) arch=arm;; |
101 |
+ arm64) arch=aarch64;; |
102 |
+ esac |
103 |
+ |
104 |
+ local os=$(usex kernel_linux Linux IDK) |
105 |
+ |
106 |
+ # The Makefile is a mess. Override a few vars rather than patch it. |
107 |
+ emake \ |
108 |
+ MACH="${arch}" \ |
109 |
+ OS="${os}" \ |
110 |
+ HAVE_SSE42=$(usex cpu_flags_x86_sse4_2 1 0) \ |
111 |
+ HAVE_AVX2=$(usex cpu_flags_x86_avx2 1 0) \ |
112 |
+ RPM_OPT_FLAGS="${CFLAGS} ${CPPFLAGS}" \ |
113 |
+ CFLAGS_OPT='$(CFLAGS)' \ |
114 |
+ LDFLAGS="${LDFLAGS} -Wl,-rpath,${EPREFIX}/usr/$(get_libdir)/${PN}" \ |
115 |
+ CC="$(tc-getCC)" \ |
116 |
+ "$@" |
117 |
+} |
118 |
+ |
119 |
+src_compile() { |
120 |
+ _emake |
121 |
+} |
122 |
+ |
123 |
+src_test() { |
124 |
+ append-cflags -fcommon # bug 707796 |
125 |
+ _emake check |
126 |
+} |
127 |
+ |
128 |
+src_install() { |
129 |
+ # easier to install by hand than trying to make sense of the Makefile. |
130 |
+ dobin dd_rescue |
131 |
+ dodir /usr/$(get_libdir)/${PN} |
132 |
+ cp -pPR libddr_*.so "${ED%/}"/usr/$(get_libdir)/${PN}/ || die |
133 |
+ dodoc README.dd_rescue |
134 |
+ doman dd_rescue.1 |
135 |
+ use lzo && doman ddr_lzo.1 |
136 |
+} |
137 |
|
138 |
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 |
139 |
new file mode 100644 |
140 |
index 00000000000..1089a63f06c |
141 |
--- /dev/null |
142 |
+++ b/sys-fs/dd-rescue/files/dd-rescue-1.99.9-musl-r2.patch |
143 |
@@ -0,0 +1,30 @@ |
144 |
+From 28818d18cfc7a459675ac388e5cf7b50bdd9ad89 Mon Sep 17 00:00:00 2001 |
145 |
+From: Thomas Deutschmann <whissi@g.o> |
146 |
+Date: Wed, 13 Dec 2017 01:02:12 +0100 |
147 |
+Subject: [PATCH] loff_t and __WORDSIZE includes for MUSL |
148 |
+ |
149 |
+Rewrite of Justin Keogh's patch [Link 1] to fix build problems |
150 |
+on ARM. |
151 |
+ |
152 |
+Link 1: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5f5abc0f1b036921d6eb5b0f434c960ed280619f |
153 |
+Fixes: https://bugs.gentoo.org/616364 |
154 |
+--- |
155 |
+ configure.in | 2 +- |
156 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
157 |
+ |
158 |
+diff --git a/configure.in b/configure.in |
159 |
+index 813accf..5a8246c 100644 |
160 |
+--- a/configure.in |
161 |
++++ b/configure.in |
162 |
+@@ -6,7 +6,7 @@ AC_C_INLINE |
163 |
+ AC_HEADER_STDC |
164 |
+ #AC_PROG_INSTALL |
165 |
+ #CFLAGS="$CFLAGS -DHAVE_CONFIG_H" |
166 |
+-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]) |
167 |
++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]) |
168 |
+ 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]) |
169 |
+ AC_CHECK_LIB(dl,dlsym) |
170 |
+ AC_CHECK_LIB(fallocate,linux_fallocate64) |
171 |
+-- |
172 |
+2.31.0.rc0 |
173 |
+ |