summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2014-10-19 03:25:11 +0000
committerMike Gilbert <floppym@gentoo.org>2014-10-19 03:25:11 +0000
commit31987d79343aeaffc5672dec7a4e5b70ef5499c8 (patch)
tree8dc379e226aff89513552164f9cb94c0ba8779ba /sys-apps/toybox
parentVersion bump. (diff)
downloadgentoo-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')
-rw-r--r--sys-apps/toybox/ChangeLog6
-rw-r--r--sys-apps/toybox/toybox-0.5.0.ebuild26
-rw-r--r--sys-apps/toybox/toybox-9999.ebuild42
3 files changed, 55 insertions, 19 deletions
diff --git a/sys-apps/toybox/ChangeLog b/sys-apps/toybox/ChangeLog
index 227ecd68fd7b..9e2ec6d0ffad 100644
--- a/sys-apps/toybox/ChangeLog
+++ b/sys-apps/toybox/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-apps/toybox
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/toybox/ChangeLog,v 1.5 2014/10/06 07:20:16 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/toybox/ChangeLog,v 1.6 2014/10/19 03:25:11 floppym Exp $
+
+ 19 Oct 2014; Mike Gilbert <floppym@gentoo.org> toybox-0.5.0.ebuild,
+ toybox-9999.ebuild:
+ A few build fixes, including cross-compile support.
*toybox-0.5.0 (06 Oct 2014)
diff --git a/sys-apps/toybox/toybox-0.5.0.ebuild b/sys-apps/toybox/toybox-0.5.0.ebuild
index 6338a8ca5e5c..346166fb6599 100644
--- a/sys-apps/toybox/toybox-0.5.0.ebuild
+++ b/sys-apps/toybox/toybox-0.5.0.ebuild
@@ -1,29 +1,33 @@
# 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-0.5.0.ebuild,v 1.1 2014/10/06 07:20:16 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/toybox/toybox-0.5.0.ebuild,v 1.2 2014/10/19 03:25:11 floppym Exp $
EAPI=5
-inherit eutils savedconfig toolchain-funcs
+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/"
-SRC_URI="http://landley.net/code/toybox/downloads/${P}.tar.bz2"
# The source code does not explicitly say that it's BSD, but the author has repeatedly said it
LICENSE="BSD-2"
SLOT="0"
-KEYWORDS="~x86 ~amd64"
IUSE=""
src_prepare() {
- sed -i -e 's/LOCALE/LC_ALL/' scripts/make.sh || die
+ epatch_user
restore_config .config
- export CC="$(tc-getCC)"
- export HOSTCC="$(tc-getCC)"
}
src_configure() {
@@ -31,13 +35,17 @@ src_configure() {
yes "" | emake -j1 oldconfig > /dev/null
return 0
else
- ewarn "Could not locate user configfile, so we will save a default one"
+ einfo "Could not locate user configfile, so we will save a default one"
emake defconfig > /dev/null
fi
}
src_compile() {
- emake toybox_unstripped V=1
+ tc-export CC STRIP
+ export HOSTCC=$(tc-getBUILD_CC)
+ unset CROSS_COMPILE
+ export CPUS=$(makeopts_jobs)
+ emake V=1
}
src_test() {
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
}