mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
sys-fs/dd-rescue: add 1.99.17
* Update LICENSE to || ( GPL-2 GPL-3 ) per footer of website: "The program is protected by the GNU GPL (v2 or v3)." and output from the program. * Add USE=lzma for new support. * Ensure we respect flags for the testsuite. * Wire up more cpu_flags_x86_* flags. Closes: https://bugs.gentoo.org/920159 Closes: https://bugs.gentoo.org/937492 Closes: https://bugs.gentoo.org/939440 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -1 +1,2 @@
|
||||
DIST dd_rescue-1.99.13.tar.bz2 182574 BLAKE2B da16f37dffc702695d49517aed9a33ce4d00b5e9903c363deaf4b4ed8b5294246d0fe78e977b8a6f6128b9b643a8986437359c78726695fc8e68be41bb11d93e SHA512 2276128fe176dce3ecbd6aa8e0d00b9547887f0498ce0cd135e61dbf882c521e22e2afce3539a73496da1d0472cd9582971a30eb558ce3211820c8d0358c8241
|
||||
DIST dd_rescue-1.99.17.tar.bz2 199774 BLAKE2B fd235ce5cb9d80960451f5a65eef0fdc73cd21f684210037056bc5a4952af40e5d494cf541f9e87b76d5d18508caa221c2f4919d537580d4eb58fd67a0c65177 SHA512 8bdd63ed48413607e1da004f497feec8b8a990488348105d30d4d7e56e342b54b4e6439270e581e434b4b0edcf55ab11490739b0c6563358c59b5a64a390a0df
|
||||
|
||||
125
sys-fs/dd-rescue/dd-rescue-1.99.17.ebuild
Normal file
125
sys-fs/dd-rescue/dd-rescue-1.99.17.ebuild
Normal file
@@ -0,0 +1,125 @@
|
||||
# Copyright 1999-2024 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"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
LICENSE="|| ( GPL-2 GPL-3 )"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
|
||||
IUSE="cpu_flags_x86_aes cpu_flags_x86_avx2 lzo lzma cpu_flags_x86_rdrand cpu_flags_x86_sha cpu_flags_x86_sse4_2 static test xattr"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
lzo? ( dev-libs/lzo )
|
||||
xattr? ( sys-apps/attr )
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="
|
||||
test? (
|
||||
lzo? (
|
||||
app-arch/lzop
|
||||
)
|
||||
)
|
||||
"
|
||||
|
||||
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.
|
||||
export ac_cv_header_attr_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.
|
||||
emake \
|
||||
MACH="${arch}" \
|
||||
OS="${os}" \
|
||||
HAVE_SSE42=$(usex cpu_flags_x86_sse4_2 1 0) \
|
||||
HAVE_AES=$(usex cpu_flags_x86_aes 1 0) \
|
||||
HAVE_AVX2=$(usex cpu_flags_x86_avx2 1 0) \
|
||||
HAVE_SHA=$(usex cpu_flags_x86_sha 1 0) \
|
||||
HAVE_RDRND=$(usex cpu_flags_x86_rdrand 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)" \
|
||||
"$@"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
_emake
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if ! use lzo ; then
|
||||
sed -i \
|
||||
-e '/^LZOP=/s:LZOP=.*:LZOP=:' \
|
||||
-e '/^LZOP=/a exit 0' \
|
||||
test_lzo.sh || die
|
||||
fi
|
||||
|
||||
_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
|
||||
}
|
||||
Reference in New Issue
Block a user