mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-24 18:58:08 -07:00
sys-fs/dd-rescue: add 1.99.22
sync with live and add a patch to fix static Signed-off-by: Nicolas PARLANT <nicolas.parlant@parhuet.fr> Part-of: https://github.com/gentoo/gentoo/pull/45093 Closes: https://github.com/gentoo/gentoo/pull/45093 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
committed by
Sam James
parent
2428e0707d
commit
04eae190c6
@@ -2,3 +2,4 @@ DIST dd_rescue-1.99.13.tar.bz2 182574 BLAKE2B da16f37dffc702695d49517aed9a33ce4d
|
||||
DIST dd_rescue-1.99.17.tar.bz2 199774 BLAKE2B fd235ce5cb9d80960451f5a65eef0fdc73cd21f684210037056bc5a4952af40e5d494cf541f9e87b76d5d18508caa221c2f4919d537580d4eb58fd67a0c65177 SHA512 8bdd63ed48413607e1da004f497feec8b8a990488348105d30d4d7e56e342b54b4e6439270e581e434b4b0edcf55ab11490739b0c6563358c59b5a64a390a0df
|
||||
DIST dd_rescue-1.99.20.tar.bz2 208147 BLAKE2B 145868765b1126a219d2bf9de2e974ba1824d11efd15d58097674ada52bdd4f8909bbf7b4c11a2dd7314639ce487bd4e526cbcbd82d82d43349366ad1284257c SHA512 eb40916f972a486262d4dc03baafdc4b70b0fdc473cd1c20061f64737a99dcceb5ee56334e36f8fa441a0b1d352763d5b8fc153a2ef8403a5b2295f11273c8c2
|
||||
DIST dd_rescue-1.99.21.tar.bz2 213259 BLAKE2B 791966bd6f88107154ce8c86bcbad93ebc6c940c88f57c16e5375a33f685eeebd7def812b6d6ea0cd4a07d7e2ed2b02015635587500fa082783dc26419be4c15 SHA512 1389605ab7ee62e1ebd4751fd17d49bd157d85fef933c08428df23ee1ffd7d862bc703cb91ebaa73de5d58d9950f9678c7a508fe7c347b9fa6a141fd961de71b
|
||||
DIST dd_rescue-1.99.22.tar.bz2 215361 BLAKE2B 90c85e89202a1f1d247967e5fdfa6640db24668fc40e667c7d745f549aa709936fa7b804a6dd5bd02a93a3ce5eafd3f2cad2ddd70f16c72ec9a69e555264667a SHA512 585e748a6e3d2071f86ade55b27808a8313e0795abd147d91d0a7616b38438ab23f32ac3148d2ce580a300f58f6c4e98f25a1dadb3c41978147fddb7860bd7cc
|
||||
|
||||
141
sys-fs/dd-rescue/dd-rescue-1.99.22.ebuild
Normal file
141
sys-fs/dd-rescue/dd-rescue-1.99.22.ebuild
Normal file
@@ -0,0 +1,141 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit autotools toolchain-funcs
|
||||
|
||||
MY_PN="${PN/-/_}"
|
||||
MY_P="${MY_PN}-${PV}"
|
||||
|
||||
DESCRIPTION="Similar to dd but can copy from source with errors"
|
||||
HOMEPAGE="https://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="https://www.garloff.de/kurt/linux/ddrescue/${MY_P}.tar.bz2"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~sparc ~x86"
|
||||
fi
|
||||
|
||||
LICENSE="|| ( GPL-2 GPL-3 )"
|
||||
SLOT="0"
|
||||
IUSE="cpu_flags_x86_avx2 cpu_flags_x86_sse4_2 lzo lzma static test xattr"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
!static? (
|
||||
lzma? ( app-arch/xz-utils )
|
||||
lzo? ( dev-libs/lzo:2 )
|
||||
)
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="
|
||||
test? (
|
||||
lzo? ( app-arch/lzop )
|
||||
)
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
# see https://sourceforge.net/p/ddrescue/tickets/10/
|
||||
"${FILESDIR}"/${PN}-1.99.22-fix_static.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() {
|
||||
# OpenSSL is only used by a random helper tool we don't install.
|
||||
# sys_xattr is preferred over attr_xattr, disable attr_xattr assuming glibc/musl
|
||||
export ac_cv_header_attr_xattr_h=no
|
||||
export ac_cv_header_sys_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.
|
||||
local myemakeargs=(
|
||||
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)"
|
||||
)
|
||||
emake "${myemakeargs[@]}" "$@"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
_emake $(usev static)
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if ! use lzo ; then
|
||||
sed -i \
|
||||
-e '/^LZOP=/s:LZOP=.*:LZOP=:' \
|
||||
-e '/^LZOP=/a exit 0' \
|
||||
test_lzo.sh || die
|
||||
fi
|
||||
|
||||
# make only basic tests for static
|
||||
_emake $(usex static check_fault check)
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# easier to install by hand than trying to make sense of the Makefile.
|
||||
dobin dd_rescue
|
||||
if ! use static; then
|
||||
insinto /usr/$(get_libdir)/${PN}
|
||||
insopts -m 0755
|
||||
doins libddr_*.so
|
||||
fi
|
||||
dodoc README.dd_rescue
|
||||
doman dd_rescue.1
|
||||
use lzo && doman ddr_lzo.1
|
||||
}
|
||||
13
sys-fs/dd-rescue/files/dd-rescue-1.99.22-fix_static.patch
Normal file
13
sys-fs/dd-rescue/files/dd-rescue-1.99.22-fix_static.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
add missing $(OBJECTS2) for static
|
||||
see https://sourceforge.net/p/ddrescue/tickets/10
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -481,7 +481,7 @@ nolib: $(SRCDIR)/dd_rescue.c $(DDR_HEADERS) $(OBJECTS) $(OBJECTS2)
|
||||
nocolor: $(SRCDIR)/dd_rescue.c $(DDR_HEADERS) $(OBJECTS) $(OBJECTS2)
|
||||
$(CC) $(CFLAGS) -DNO_COLORS=1 $(DEFINES) $< $(OUT) $(OBJECTS) $(OBJECTS2) $(EXTRA_LDFLAGS) $(RDYNAMIC)
|
||||
|
||||
-static: $(SRCDIR)/dd_rescue.c $(DDR_HEADERS) $(OBJECTS)
|
||||
+static: $(SRCDIR)/dd_rescue.c $(DDR_HEADERS) $(OBJECTS) $(OBJECTS2)
|
||||
$(CC) $(CFLAGS) -DNO_LIBDL -DNO_LIBFALLOCATE -static $(DEFINES) $< $(OUT) $(OBJECTS) $(OBJECTS2) $(EXTRA_LDFLAGS)
|
||||
|
||||
# Special pseudo targets
|
||||
Reference in New Issue
Block a user