summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Kinard <kumba@gentoo.org>2005-09-18 07:53:49 +0000
committerJoshua Kinard <kumba@gentoo.org>2005-09-18 07:53:49 +0000
commit2072c4eade3bd70463517579fa1802eb9d611bce (patch)
tree9aaa43e697e9fda8c29add16ba16272262973d47 /sys-boot/getdvhoff/getdvhoff-0.12-r1.ebuild
parentAdded ~ppc64 (bug #105807) (diff)
downloadgentoo-2-2072c4eade3bd70463517579fa1802eb9d611bce.tar.gz
gentoo-2-2072c4eade3bd70463517579fa1802eb9d611bce.tar.bz2
gentoo-2-2072c4eade3bd70463517579fa1802eb9d611bce.zip
Modify getdvhoff's ebuild to statically link against klibc, resulting in an ~8.8kb binary. Keep 0.12 around as stable until we bump klibc to stable.
(Portage version: 2.0.51.22-r2)
Diffstat (limited to 'sys-boot/getdvhoff/getdvhoff-0.12-r1.ebuild')
-rw-r--r--sys-boot/getdvhoff/getdvhoff-0.12-r1.ebuild37
1 files changed, 37 insertions, 0 deletions
diff --git a/sys-boot/getdvhoff/getdvhoff-0.12-r1.ebuild b/sys-boot/getdvhoff/getdvhoff-0.12-r1.ebuild
new file mode 100644
index 000000000000..122beb43d74f
--- /dev/null
+++ b/sys-boot/getdvhoff/getdvhoff-0.12-r1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/getdvhoff/getdvhoff-0.12-r1.ebuild,v 1.1 2005/09/18 07:53:49 kumba Exp $
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Utility for use on LiveCDs to calculate offset of the ext2 partition for losetup"
+HOMEPAGE="ftp://ftp.linux-mips.org/pub/linux/mips/people/skylark/"
+SRC_URI="ftp://ftp.linux-mips.org/pub/linux/mips/people/skylark/sgibootcd-${PV}.tar.bz2"
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="-* ~mips"
+IUSE=""
+DEPEND="dev-libs/klibc"
+RESTRICT=""
+S="${WORKDIR}/sgibootcd-${PV}"
+MY_S="${S}/helpers"
+
+
+src_compile() {
+ cd ${MY_S}
+ local mycc="$(tc-getCC)"
+ local mysrc="getdvhoff.c"
+ local klloc="/usr/lib/klibc"
+ local klobjs="${klloc}/lib/crt0.o ${klloc}/lib/libc.a"
+ local klcflags="-march=mips3 -Os -fno-pic -mno-abicalls -I${klloc}/include -I${klloc}/include/bits32 -D__KLIBC__ -nostdlib"
+
+ [ -f "${MY_S}/getdvhoff" ] && rm -f ${MY_S}/${PN}
+ einfo "${mycc} ${klcflags} ${mysrc} ${klobjs} -o ${PN} -N"
+ ${mycc} ${klcflags} ${mysrc} ${klobjs} -o ${PN} -N
+}
+
+src_install() {
+ cd ${MY_S}
+ dodir /usr/lib/${PN}
+ cp ${MY_S}/${PN} ${D}/usr/lib/${PN}
+}