diff options
author | Mike Gilbert <floppym@gentoo.org> | 2014-10-19 03:25:11 +0000 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2014-10-19 03:25:11 +0000 |
commit | 31987d79343aeaffc5672dec7a4e5b70ef5499c8 (patch) | |
tree | 8dc379e226aff89513552164f9cb94c0ba8779ba /sys-apps/toybox/toybox-9999.ebuild | |
parent | Version bump. (diff) | |
download | gentoo-2-31987d79343aeaffc5672dec7a4e5b70ef5499c8.tar.gz gentoo-2-31987d79343aeaffc5672dec7a4e5b70ef5499c8.tar.bz2 gentoo-2-31987d79343aeaffc5672dec7a4e5b70ef5499c8.zip |
A few build fixes, including cross-compile support.
(Portage version: 2.2.14_rc1/cvs/Linux x86_64, signed Manifest commit with key 0BBEEA1FEA4843A4)
Diffstat (limited to 'sys-apps/toybox/toybox-9999.ebuild')
-rw-r--r-- | sys-apps/toybox/toybox-9999.ebuild | 42 |
1 files changed, 33 insertions, 9 deletions
diff --git a/sys-apps/toybox/toybox-9999.ebuild b/sys-apps/toybox/toybox-9999.ebuild index 32d8c4c261dc..e01965bdf473 100644 --- a/sys-apps/toybox/toybox-9999.ebuild +++ b/sys-apps/toybox/toybox-9999.ebuild @@ -1,34 +1,58 @@ # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/toybox/toybox-9999.ebuild,v 1.1 2014/04/01 04:09:36 patrick Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/toybox/toybox-9999.ebuild,v 1.2 2014/10/19 03:25:11 floppym Exp $ EAPI=5 -inherit eutils git-r3 +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.bz2" + KEYWORDS="~amd64 ~x86" +fi + +# makefile is stupid +RESTRICT="test" DESCRIPTION="Common linux commands in a multicall binary" HOMEPAGE="http://landley.net/code/toybox/" -EGIT_REPO_URI="https://github.com/gfto/toybox.git" # The source code does not explicitly say that it's BSD, but the author has repeatedly said it LICENSE="BSD-2" SLOT="0" -KEYWORDS="" IUSE="" +src_prepare() { + epatch_user + restore_config .config +} + src_configure() { - make defconfig || die + 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() { - emake || die + tc-export CC STRIP + export HOSTCC=$(tc-getBUILD_CC) + unset CROSS_COMPILE + export CPUS=$(makeopts_jobs) + emake V=1 } src_test() { - emake test || die + emake test } src_install() { - mkdir -p "${D}/usr/bin" - cp toybox "${D}/usr/bin" || die + save_config .config + newbin toybox_unstripped toybox } |