summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Kinard <kumba@gentoo.org>2009-02-25 00:32:25 +0000
committerJoshua Kinard <kumba@gentoo.org>2009-02-25 00:32:25 +0000
commit32ade6f5300e3a89b5da78b04b2c06990502ad56 (patch)
treef6d3f0520805e792b819c4a15fcb0667dcfa0420 /sys-boot
parentAdd tc-getOBJCOPY (diff)
downloadgentoo-2-32ade6f5300e3a89b5da78b04b2c06990502ad56.tar.gz
gentoo-2-32ade6f5300e3a89b5da78b04b2c06990502ad56.tar.bz2
gentoo-2-32ade6f5300e3a89b5da78b04b2c06990502ad56.zip
Make sys-boot/colo cross-compiler safe, dodge gcc-4.3.x stricter checks, and fixup the ebuild a little.
(Portage version: 2.1.6.7/cvs/Linux mips64)
Diffstat (limited to 'sys-boot')
-rw-r--r--sys-boot/colo/ChangeLog8
-rw-r--r--sys-boot/colo/colo-1.22.ebuild44
2 files changed, 39 insertions, 13 deletions
diff --git a/sys-boot/colo/ChangeLog b/sys-boot/colo/ChangeLog
index 4f52ed41a4bb..4cd6a5e57d00 100644
--- a/sys-boot/colo/ChangeLog
+++ b/sys-boot/colo/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-boot/colo
-# Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-boot/colo/ChangeLog,v 1.20 2007/09/19 04:14:12 redhatter Exp $
+# Copyright 2000-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/colo/ChangeLog,v 1.21 2009/02/25 00:32:25 kumba Exp $
+
+ 25 Feb 2009; Joshua Kinard <kumba@gentoo.org> colo-1.22.ebuild:
+ Make sys-boot/colo cross-compiler safe, dodge gcc-4.3.x stricter checks,
+ and fixup the ebuild a little.
19 Sep 2007; Stuart Longland <redhatter@gentoo.org> -colo-1.19.ebuild,
-colo-1.21.ebuild:
diff --git a/sys-boot/colo/colo-1.22.ebuild b/sys-boot/colo/colo-1.22.ebuild
index cf657e4eccb4..d16d036f5b12 100644
--- a/sys-boot/colo/colo-1.22.ebuild
+++ b/sys-boot/colo/colo-1.22.ebuild
@@ -1,15 +1,15 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-boot/colo/colo-1.22.ebuild,v 1.3 2007/07/15 02:25:03 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/colo/colo-1.22.ebuild,v 1.4 2009/02/25 00:32:25 kumba Exp $
-inherit eutils
+inherit eutils toolchain-funcs
DESCRIPTION="CObalt LOader - Modern bootloader for Cobalt MIPS machines"
HOMEPAGE="http://www.colonel-panic.org/cobalt-mips/"
SRC_URI="http://www.colonel-panic.org/cobalt-mips/colo/colo-${PV}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="-* mips"
+KEYWORDS="-* ~mips"
IUSE=""
DEPEND=""
RESTRICT="strip"
@@ -33,20 +33,42 @@ src_unpack() {
src_compile() {
echo -e ""
einfo ">>> Building the CoLo Bootloader ..."
- cd ${S}
+
+ # Remove -Werror from CFLAGS
+ # gcc-4.3.x is more strict; We'll go back and fix later
+ cd "${S}"
+ for x in $(grep -rl "Werror" "${S}"/*); do
+ sed -i -e 's/\-Werror//g' "${x}"
+ done
+
+ # Keep elf2rfx from automatically building via the Makefile
+ sed -i -e 's/tools\/elf2rfx //' "${S}"/Makefile
+
+ # Build it first with BUILD_CC in case of cross-compiles
+ cd "${S}"/tools/elf2rfx
+ make CC="$(tc-getBUILD_CC)" || die
+
+ # Build the rest
+ cd "${S}"
make clean || die # emake breaks the build
- make || die
+ make CC="$(tc-getCC)" OBJCOPY="$(tc-getOBJCOPY)" \
+ STRIP="$(tc-getSTRIP)" || die
+
+ # Now rebuild elf2rfx again with CC so it can be installed
+ cd "${S}"/tools/elf2rfx
+ make clean || die
+ make CC="$(tc-getCC)" || die
}
src_install() {
# bins
- cd ${S}
+ cd "${S}"
dodir /usr/lib/colo
- cp binaries/colo-chain.elf ${D}/usr/lib/colo
- cp binaries/colo-rom-image.bin ${D}/usr/lib/colo
+ cp binaries/colo-chain.elf "${D}"/usr/lib/colo
+ cp binaries/colo-rom-image.bin "${D}"/usr/lib/colo
# docs
- dodoc CHANGES COPYING INSTALL README README.{restore,shell,netcon} tools/README.tools TODO
+ dodoc CHANGES INSTALL README README.{restore,shell,netcon} tools/README.tools TODO
# all tools except lcdtools (see below)
local tool
@@ -71,7 +93,7 @@ src_install() {
# bootscripts
dodir /usr/lib/colo/scripts
- cp ${FILESDIR}/*.colo ${D}/usr/lib/colo/scripts
+ cp "${FILESDIR}"/*.colo "${D}"/usr/lib/colo/scripts
}
pkg_postinst() {