blob: 6e360c833a1845ecb1337c9684fd6e9380bac3f5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# 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
}
|