summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2006-12-19 13:43:39 +0000
committerLuca Barbato <lu_zero@gentoo.org>2006-12-19 13:43:39 +0000
commitccdbb4ddeef0df504ccc3d62f6de4465e091e639 (patch)
treea992e794c76d7e9fe7e5c9d9eca89c2dc1077347 /sys-libs/newlib/newlib-1.15.0.ebuild
parentPunt the create_dev_nodes function as it's no longer used. (diff)
downloadgentoo-2-ccdbb4ddeef0df504ccc3d62f6de4465e091e639.tar.gz
gentoo-2-ccdbb4ddeef0df504ccc3d62f6de4465e091e639.tar.bz2
gentoo-2-ccdbb4ddeef0df504ccc3d62f6de4465e091e639.zip
New version
(Portage version: 2.1.2_rc3-r6)
Diffstat (limited to 'sys-libs/newlib/newlib-1.15.0.ebuild')
-rw-r--r--sys-libs/newlib/newlib-1.15.0.ebuild75
1 files changed, 75 insertions, 0 deletions
diff --git a/sys-libs/newlib/newlib-1.15.0.ebuild b/sys-libs/newlib/newlib-1.15.0.ebuild
new file mode 100644
index 000000000000..68c9e85ed12d
--- /dev/null
+++ b/sys-libs/newlib/newlib-1.15.0.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/newlib/newlib-1.15.0.ebuild,v 1.1 2006/12/19 13:43:39 lu_zero Exp $
+
+inherit eutils flag-o-matic
+
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
+ export CTARGET=${CATEGORY/cross-}
+ fi
+fi
+
+# Handle the case where we want newlib on glibc ...
+if [[ ${CTARGET} == ${CHOST} ]] && [[ ${CHOST} != *-newlib ]] ; then
+ export CTARGET=${CHOST%%-*}-pc-linux-newlib
+fi
+
+DESCRIPTION="Newlib is a C library intended for use on embedded systems"
+HOMEPAGE="http://sourceware.org/newlib/"
+SRC_URI="ftp://sources.redhat.com/pub/newlib/${P}.tar.gz"
+
+LICENSE="NEWLIB LIBGLOSS GPL-2"
+[[ ${CTARGET} != ${CHOST} ]] \
+ && SLOT="${CTARGET}" \
+ || SLOT="0"
+KEYWORDS="-* ~ppc64 ~ppc"
+IUSE="nls threads unicode multilib"
+RESTRICT="strip"
+
+DEPEND=""
+RDEPEND=""
+
+NEWLIBBUILD="${WORKDIR}/build"
+
+src_unpack() {
+ unpack ${A}
+ mkdir -p "${NEWLIBBUILD}"
+}
+
+src_compile() {
+ # we should fix this ...
+ unset LDFLAGS
+ CHOST=${CTARGET} strip-unsupported-flags
+
+ local myconf=""
+ # hardwired to avoid breakages
+ [[ ${CTARGET} == *-softfloat-* ]] \
+ && myconf="--disable-newlib-hw-fp" \
+ || myconf="--enable-newlib-hw-fp"
+ [[ ${CTARGET} == "spu" ]] \
+ && myconf="${myconf} --disable-threads" \
+ || myconf="${myconf} $(use_enable threads)"
+
+ cd "${NEWLIBBUILD}"
+
+ ECONF_SOURCE=${S} \
+ econf \
+ $(use_enable unicode newlib-mb) \
+ $(use_enable nls) \
+ $(use_enable multilib) \
+ ${myconf} \
+ || die "econf failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ cd "${NEWLIBBUILD}"
+ emake -j1 DESTDIR="${D}" install
+ env -uRESTRICT CHOST=${CTARGET} prepallstrip
+ # minor hack to keep things clean
+ rm -fR "${D}"/usr/share/info
+ rm -fR "${D}"/usr/info
+}