summaryrefslogtreecommitdiff
path: root/sys-apps/noxcuse/noxcuse-1.0.ebuild
blob: 0ac754367581188aff9fead153ab0fef89a6ab4d (plain) (blame)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Copyright 2015-2016 Adélie Linux Team
# Distributed under the terms of the NCSA License

EAPI=6

DESCRIPTION="Implementation of SUS/XCU utilities, with a focus on lean code"
HOMEPAGE="http://git.etalabs.net/cgit/noxcuse/"
SRC_URI="mirror://foxkit/${PN}/${P}.tar.xz"

LICENSE="GPLv2+"
SLOT="0"
KEYWORDS="ppc ppc64 x86 x86_64"
IUSE_APPS="basename cat dirname false fold grep iconv link pwd strings true wc"
IUSE=""

for app in ${IUSE_APPS} ; do
	IUSE="${IUSE} noxcuse_apps_${app}"
done

# require at least one app
IUSE_REQUIRED="|| ( ${IUSE} )"

# Add further IUSE here in the future, if necessary.
#IUSE="${IUSE} "

PATCHES=(
	"${FILESDIR}/0001-Makefile-Fix-install-target-dependencies.patch"
	"${FILESDIR}/0002-Makefile-Support-DESTDIR.patch"
)

DEPEND=""
RDEPEND="${DEPEND}"

src_install() {
	emake DESTDIR="${D}" install
	dodoc README TODO

	# Really wish there was a configure for this.
	use noxcuse_apps_basename || rm ${D}/usr/bin/basename
	use noxcuse_apps_cat || rm ${D}/bin/cat
	use noxcuse_apps_dirname || rm ${D}/usr/bin/dirname
	use noxcuse_apps_false || rm ${D}/bin/false
	use noxcuse_apps_fold || rm ${D}/usr/bin/fold
	use noxcuse_apps_grep || rm ${D}/bin/grep
	use noxcuse_apps_iconv || rm ${D}/usr/bin/iconv
	use noxcuse_apps_link || rm ${D}/usr/bin/link
	use noxcuse_apps_pwd || rm ${D}/bin/pwd
	use noxcuse_apps_strings || rm ${D}/usr/bin/strings
	use noxcuse_apps_true || rm ${D}/bin/true
	use noxcuse_apps_wc || rm ${D}/usr/bin/wc
}