forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Package-Manager: Portage-2.3.24, Repoman-2.3.6
- Loading branch information
1 parent
bbfe51a
commit 2d9a195
Showing
2 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Copyright 1999-2018 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=5 | ||
|
||
inherit eutils multiprocessing savedconfig toolchain-funcs | ||
|
||
if [[ ${PV} == 9999 ]]; then | ||
inherit git-r3 | ||
EGIT_REPO_URI="https://github.com/gfto/toybox.git" | ||
else | ||
SRC_URI="http://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="http://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() { | ||
epatch_user | ||
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 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 | ||
} |