From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 90BA558973 for ; Tue, 9 Feb 2016 20:37:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D745D21C2E3; Tue, 9 Feb 2016 20:36:55 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 69EFA21C2E3 for ; Tue, 9 Feb 2016 20:36:55 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 119FF340AA1 for ; Tue, 9 Feb 2016 20:36:54 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id F35DD8DF for ; Tue, 9 Feb 2016 20:36:51 +0000 (UTC) From: "Robin H. Johnson" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" Message-ID: <1455050206.5f5abc0f1b036921d6eb5b0f434c960ed280619f.robbat2@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/dd-rescue/, sys-fs/dd-rescue/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-fs/dd-rescue/dd-rescue-1.99-r1.ebuild sys-fs/dd-rescue/files/dd_rescue-1.99-musl.patch X-VCS-Directories: sys-fs/dd-rescue/ sys-fs/dd-rescue/files/ X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: 5f5abc0f1b036921d6eb5b0f434c960ed280619f X-VCS-Branch: master Date: Tue, 9 Feb 2016 20:36:51 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: ec323e95-f007-4d48-abd1-f7816ca2b3c5 X-Archives-Hash: 3221433f4c7d6acd5780b75b835fcf2e commit: 5f5abc0f1b036921d6eb5b0f434c960ed280619f Author: jakeogh v6y net> AuthorDate: Tue Feb 9 05:38:00 2016 +0000 Commit: Robin H. Johnson gentoo org> CommitDate: Tue Feb 9 20:36:46 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5f5abc0f sys-fs/dd-rescue: (musl) loff_t and __WORDSIZE includes Signed-off-by: Robin H. Johnson gentoo.org> sys-fs/dd-rescue/dd-rescue-1.99-r1.ebuild | 87 +++++++++++++++++++++++ sys-fs/dd-rescue/files/dd_rescue-1.99-musl.patch | 90 ++++++++++++++++++++++++ 2 files changed, 177 insertions(+) diff --git a/sys-fs/dd-rescue/dd-rescue-1.99-r1.ebuild b/sys-fs/dd-rescue/dd-rescue-1.99-r1.ebuild new file mode 100644 index 0000000..cdd1a10 --- /dev/null +++ b/sys-fs/dd-rescue/dd-rescue-1.99-r1.ebuild @@ -0,0 +1,87 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit toolchain-funcs flag-o-matic multilib autotools + +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}" + +src_prepare() { + epatch "${FILESDIR}/${MY_PN}-1.99-test_fix.patch" + epatch "${FILESDIR}/${MY_PN}-1.99-musl.patch" + + sed -i \ + -e 's:-ldl:$(LDFLAGS) -ldl:' \ + -e 's:-shared:$(CFLAGS) $(LDFLAGS) -shared:' \ + Makefile + eautoreconf +} + +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_lzo2_lzo1x_1_compress=$(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() { + _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-musl.patch b/sys-fs/dd-rescue/files/dd_rescue-1.99-musl.patch new file mode 100644 index 0000000..6647e5f --- /dev/null +++ b/sys-fs/dd-rescue/files/dd_rescue-1.99-musl.patch @@ -0,0 +1,90 @@ +--- a/ffs.h 2016-02-09 03:37:14.422639513 +0000 ++++ b/ffs.h 2016-02-09 03:38:59.843641094 +0000 +@@ -27,7 +27,8 @@ + #ifdef HAVE_ENDIAN_H + #include + #endif +- ++/* __WORDSIZE */ ++#include + + #ifdef HAVE_FFS + # define myffs(x) ffs(x) +--- a/fiemap.h 2016-02-09 03:45:05.550646582 +0000 ++++ b/fiemap.h 2016-02-09 03:45:56.683647349 +0000 +@@ -31,3 +31,4 @@ + + #endif /* _FIEMAPH */ + ++#include +--- a/libddr_hash.c 2016-02-09 03:49:16.334650345 +0000 ++++ b/libddr_hash.c 2016-02-09 03:50:01.309651020 +0000 +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + + #include /* For ntohl/htonl */ + #include +--- a/libddr_lzo.c 2016-02-09 03:52:31.775653278 +0000 ++++ b/libddr_lzo.c 2016-02-09 03:52:53.537653604 +0000 +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + #include + #include + #include +--- a/libddr_null.c 2016-02-09 03:54:04.110654663 +0000 ++++ b/libddr_null.c 2016-02-09 03:54:18.018654872 +0000 +@@ -10,6 +10,7 @@ + #include "ddr_ctrl.h" + #include + #include ++#include + + /* fwd decl */ + extern ddr_plugin_t ddr_plug; +--- a/sha512.h 2016-02-09 03:55:33.209656000 +0000 ++++ b/sha512.h 2016-02-09 03:56:39.923657001 +0000 +@@ -2,6 +2,8 @@ + #define _SHA512_H + + #include "hash.h" ++/* __WORDSIZE */ ++#include + + void sha512_init(hash_t *ctx); + void sha384_init(hash_t *ctx); +--- a/fmt_no.h 2016-02-09 04:52:13.760707026 +0000 ++++ b/fmt_no.h 2016-02-09 04:52:50.874707583 +0000 +@@ -1,4 +1,6 @@ + /** Decl for int to str conversion with highlighting */ ++#define _GNU_SOURCE ++#include + + #ifndef _FMT_NO_H + #define _FMT_NO_H +--- a/fstrim.h 2016-02-09 04:55:43.871710178 +0000 ++++ b/fstrim.h 2016-02-09 04:56:11.270710590 +0000 +@@ -1,3 +1,6 @@ ++#define _GNU_SOURCE ++#include ++ + #ifndef _FSTRIM_H + #define _FSTRIM_H + +--- a/ddr_ctrl.h 2016-02-09 04:58:08.442712348 +0000 ++++ b/ddr_ctrl.h 2016-02-09 04:58:50.842712984 +0000 +@@ -7,6 +7,9 @@ + * License: GNU GPLv2 or v3 + */ + ++#define _GNU_SOURCE ++#include ++ + #ifndef _DDR_CTRL_H + #define _DDR_CTRL_H +