sys-fs/zerofree: Fix musl compile error

Added a patch to fix a compile error in musl environments and remove
the older 1.0.4 ebuild.

Closes: https://bugs.gentoo.org/712582
Signed-off-by: Joshua Kinard <kumba@gentoo.org>
Package-Manager: Portage-3.0.9, Repoman-3.0.2
This commit is contained in:
Joshua Kinard
2020-11-11 16:59:25 -05:00
parent 904daafe10
commit 9d92a6f0bd
4 changed files with 15 additions and 36 deletions

View File

@@ -1,2 +1 @@
DIST zerofree-1.0.4.tgz 8509 BLAKE2B d2d5872ad22e7c5f08e00083b0dadb5411023df9d129ec3bd08637e8a74f77f13a535e6f2c1a7cd4d390ed7a0d0b6e2433dacfa89336bb16ffb64c0d1c409929 SHA512 8172c8c43794eab1f751a700f847098343659ceabaf6ab78c3c902b34cf9b0db0dda75308b6bc80d22afccd11be25f35070ca6d715c3282c5c7c7106f598b42b
DIST zerofree-1.1.1.tgz 8710 BLAKE2B 76a84de7db60473c8824129a29515212acc74235e2139eb15fe7f41d1801c42c85378734fdf39a668f0a4eb285c55c49ce2281dda9444b2008557897428bc645 SHA512 2d7ee57a877bff2491c48054338a26d624ae75c238ac2b0568a75de88b6621c16cc1e7d65500879825d14d8ba44a5173587a061459072769c165bee47c3f9f1c

View File

@@ -0,0 +1,10 @@
--- zerofree-1.1.1/zerofree.c.orig 2019-05-05 19:22:49.000000000 -0500
+++ zerofree-1.1.1/zerofree.c 2019-05-05 19:21:50.000000000 -0500
@@ -17,6 +17,7 @@
* Jan Krämer.
*/
+#include <sys/types.h>
#include <ext2fs/ext2fs.h>
#include <stdio.h>
#include <unistd.h>

View File

@@ -1,35 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit eutils toolchain-funcs
DESCRIPTION="Zeroes out all free space on a filesystem"
HOMEPAGE="http://frippery.org/uml/index.html"
SRC_URI="http://frippery.org/uml/${P}.tgz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm ~mips ~x86"
IUSE=""
DEPEND="sys-libs/e2fsprogs-libs"
RDEPEND="${DEPEND}"
src_prepare() {
# Honor system CFLAGS.
# Use pipes for the sed delimiter to resolve #710818.
sed -i \
-e "s|CC=gcc|CC=$(tc-getCC)\nCFLAGS=${CFLAGS}\nLDFLAGS=${LDFLAGS}|g" \
-e "s|-o zerofree|\$(CFLAGS) \$(LDFLAGS) -o zerofree|g" \
-e "/-lext2fs/{ s|-lext2fs||g; s|$| -lext2fs|g; }" \
Makefile || die "Failed to sed the Makefile"
eapply_user
}
src_install() {
# Install into /sbin
into /
dosbin zerofree
}

View File

@@ -17,6 +17,11 @@ DEPEND="sys-libs/e2fsprogs-libs"
RDEPEND="${DEPEND}"
src_prepare() {
default
# Bug #712582, fix compile in musl environments.
eapply "${FILESDIR}/${PN}-include-sys_types.patch"
# Honor system CFLAGS.
# Use pipes for the sed delimiter to resolve #710818.
sed -i \