blob: 722524f40455e25862c9b24076928c7ecb24c4c6 (
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
inherit multiprocessing savedconfig toolchain-funcs
if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/landley/toybox.git"
else
SRC_URI="https://landley.net/code/toybox/downloads/${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
fi
# makefile is stupid
RESTRICT="test"
DESCRIPTION="Common linux commands in a multicall binary"
HOMEPAGE="https://landley.net/code/toybox/"
# The source code does not explicitly say that it's BSD, but the author has repeatedly said it
LICENSE="BSD-2"
SLOT="0"
IUSE=""
src_prepare() {
default
restore_config .config
}
src_configure() {
if [ -f .config ]; then
yes "" | emake -j1 oldconfig > /dev/null
return 0
else
einfo "Could not locate user configfile, so we will save a default one"
emake -j1 defconfig > /dev/null
fi
}
src_compile() {
tc-export CC STRIP
export HOSTCC=$(tc-getBUILD_CC)
unset CROSS_COMPILE
export CPUS=$(makeopts_jobs)
emake V=1
}
src_test() {
emake test
}
src_install() {
save_config .config
newbin generated/unstripped/toybox toybox
}
|