summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-01-14 10:32:49 +0000
committerMike Frysinger <vapier@gentoo.org>2012-01-14 10:32:49 +0000
commite150702e05dd69f32b7e242b9eed7e2b3897a770 (patch)
tree4f25f86f00f9172e3978cc5182262303c0702c16 /sys-libs
parentVersion bump. (diff)
downloadgentoo-2-e150702e05dd69f32b7e242b9eed7e2b3897a770.tar.gz
gentoo-2-e150702e05dd69f32b7e242b9eed7e2b3897a770.tar.bz2
gentoo-2-e150702e05dd69f32b7e242b9eed7e2b3897a770.zip
Version bump.
(Portage version: 2.2.0_alpha84/cvs/Linux x86_64)
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/newlib/ChangeLog9
-rw-r--r--sys-libs/newlib/newlib-1.20.0.ebuild76
2 files changed, 83 insertions, 2 deletions
diff --git a/sys-libs/newlib/ChangeLog b/sys-libs/newlib/ChangeLog
index 88e6950f19ed..008ec53e61a1 100644
--- a/sys-libs/newlib/ChangeLog
+++ b/sys-libs/newlib/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sys-libs/newlib
-# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/newlib/ChangeLog,v 1.15 2011/02/12 23:49:27 vapier Exp $
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/newlib/ChangeLog,v 1.16 2012/01/14 10:32:49 vapier Exp $
+
+*newlib-1.20.0 (14 Jan 2012)
+
+ 14 Jan 2012; Mike Frysinger <vapier@gentoo.org> +newlib-1.20.0.ebuild:
+ Version bump.
*newlib-1.19.0 (12 Feb 2011)
diff --git a/sys-libs/newlib/newlib-1.20.0.ebuild b/sys-libs/newlib/newlib-1.20.0.ebuild
new file mode 100644
index 000000000000..64ad7f9e410d
--- /dev/null
+++ b/sys-libs/newlib/newlib-1.20.0.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/newlib/newlib-1.20.0.ebuild,v 1.1 2012/01/14 10:32:49 vapier Exp $
+
+inherit eutils flag-o-matic toolchain-funcs
+
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
+ export CTARGET=${CATEGORY/cross-}
+ fi
+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="-* ~arm ~hppa ~m68k ~mips ~ppc ~ppc64 ~sh ~sparc ~x86"
+IUSE="nls threads unicode crosscompile_opts_headers-only"
+RESTRICT="strip"
+
+NEWLIBBUILD="${WORKDIR}/build"
+
+pkg_setup() {
+ # Reject newlib-on-glibc type installs
+ if [[ ${CTARGET} == ${CHOST} ]] ; then
+ case ${CHOST} in
+ *-newlib|*-elf) ;;
+ *) die "Use sys-devel/crossdev to build a newlib toolchain" ;;
+ esac
+ fi
+}
+
+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
+ [[ $(tc-is-softfloat) != "no" ]] \
+ && myconf="--disable-newlib-hw-fp" \
+ || myconf="--enable-newlib-hw-fp"
+ [[ ${CTARGET} == "spu" ]] \
+ && myconf="${myconf} --disable-newlib-multithread" \
+ || myconf="${myconf} $(use_enable threads newlib-multithread)"
+
+ cd "${NEWLIBBUILD}"
+
+ ECONF_SOURCE=${S} \
+ econf \
+ $(use_enable unicode newlib-mb) \
+ $(use_enable nls) \
+ ${myconf} \
+ || die "econf failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ cd "${NEWLIBBUILD}"
+ emake -j1 DESTDIR="${D}" install || die
+# env -uRESTRICT CHOST=${CTARGET} prepallstrip
+ # minor hack to keep things clean
+ rm -fR "${D}"/usr/share/info
+ rm -fR "${D}"/usr/info
+}