commit:     d4cca385687aaeedfb00e5684d08d9da0d3f4fc4
Author:     Ben Kohler <bkohler <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 30 15:28:56 2020 +0000
Commit:     Ben Kohler <bkohler <AT> gentoo <DOT> org>
CommitDate: Mon Mar 30 15:29:49 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4cca385

app-cdr/dumpet: add musl fix

Closes: https://bugs.gentoo.org/715450
Package-Manager: Portage-2.3.96, Repoman-2.3.22
Signed-off-by: Ben Kohler <bkohler <AT> gentoo.org>

 app-cdr/dumpet/dumpet-2.1_p20140601-r2.ebuild | 44 +++++++++++++++++++++++++++
 app-cdr/dumpet/files/musl-byteswap-fix.patch  | 11 +++++++
 2 files changed, 55 insertions(+)

diff --git a/app-cdr/dumpet/dumpet-2.1_p20140601-r2.ebuild 
b/app-cdr/dumpet/dumpet-2.1_p20140601-r2.ebuild
new file mode 100644
index 00000000000..fb18f5b349b
--- /dev/null
+++ b/app-cdr/dumpet/dumpet-2.1_p20140601-r2.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs vcs-snapshot
+
+COMMIT="8f47670dd582c96ad1b6dd3c9b9da0acebded5d8"
+
+DESCRIPTION="A tool to dump and debug bootable CD-like images"
+HOMEPAGE="https://github.com/rhboot/dumpet";
+SRC_URI="https://github.com/rhboot/dumpet/archive/${COMMIT}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+#Restrict tests since required test file is unavailable
+RESTRICT="test"
+
+RDEPEND="dev-libs/libxml2
+       dev-libs/popt"
+DEPEND="${RDEPEND}
+       virtual/pkgconfig
+       test? ( dev-util/valgrind )"
+
+PATCHES=( "${FILESDIR}"/musl-byteswap-fix.patch )
+
+src_prepare() {
+       sed -i Makefile \
+               -e "s/^install : all$/install :/" \
+               -e "s/^CFLAGS:=/CFLAGS?=/" \
+               -e "s/^CC:=/CC?=/" \
+               || die
+       default
+}
+
+src_compile() {
+       emake CFLAGS="${CFLAGS}" dumpet
+}
+
+pkg_setup() {
+       tc-export CC
+}

diff --git a/app-cdr/dumpet/files/musl-byteswap-fix.patch 
b/app-cdr/dumpet/files/musl-byteswap-fix.patch
new file mode 100644
index 00000000000..83beb321c59
--- /dev/null
+++ b/app-cdr/dumpet/files/musl-byteswap-fix.patch
@@ -0,0 +1,11 @@
+diff -ur a/applepart.c b/applepart.c
+--- a/applepart.c      2020-03-30 10:25:52.122137073 -0500
++++ b/applepart.c      2020-03-30 10:26:09.803672537 -0500
+@@ -27,6 +27,7 @@
+ #include <string.h>
+ #include <stdio.h>
+ #include <errno.h>
++#include <byteswap.h>
+ 
+ #include "applepart.h"
+ #include "endian.h"

Reply via email to