summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-libs/dietlibc/Manifest3
-rw-r--r--dev-libs/dietlibc/dietlibc-0.33_pre20110403.ebuild99
-rw-r--r--dev-libs/dietlibc/files/dietlibc-4e86d5e-BJA-strip-override.diff11
3 files changed, 113 insertions, 0 deletions
diff --git a/dev-libs/dietlibc/Manifest b/dev-libs/dietlibc/Manifest
new file mode 100644
index 00000000..5b1d085f
--- /dev/null
+++ b/dev-libs/dietlibc/Manifest
@@ -0,0 +1,3 @@
+AUX dietlibc-4e86d5e-BJA-strip-override.diff 317 RMD160 90979a75c06e969e5114c90f57cd093a8dc14fe0 SHA1 682c8483399affeb4996fa41a6e6b94935fc9a83 SHA256 27be6455a660b3b05c42629db0ea8c350585b12d118d74a10a0492ea5ae4e546
+DIST dietlibc-0.33_pre20110403.tar.gz 743758 RMD160 75ee2c54bfe7dace47082e23a439a220950b0631 SHA1 e20dc31a97f0e6cc4e9aaf95ad5016a4dbc594fd SHA256 6505ed424a5b53850ae1dcbc75fbf92f3b7e4038dd1104d114b366221cc48eea
+EBUILD dietlibc-0.33_pre20110403.ebuild 2431 RMD160 f3ac11d9791fe37b94d4c8007946a2da197f15bb SHA1 a9befca2ab68f2dcab6deac203327756bb0d0753 SHA256 1520f6513a49bc68b1aa8f3f16e92eca0214e19387cc79c3dd38ed35327bfc66
diff --git a/dev-libs/dietlibc/dietlibc-0.33_pre20110403.ebuild b/dev-libs/dietlibc/dietlibc-0.33_pre20110403.ebuild
new file mode 100644
index 00000000..ac199ec6
--- /dev/null
+++ b/dev-libs/dietlibc/dietlibc-0.33_pre20110403.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/dietlibc/dietlibc-0.33_pre20110403.ebuild,v 1.4 2011/05/06 11:57:39 gmsoft Exp $
+
+EAPI="3"
+
+inherit eutils flag-o-matic toolchain-funcs
+
+GITHUB_AUTHOR="hollow"
+GITHUB_PROJECT="dietlibc"
+GITHUB_COMMIT="4e86d5e"
+
+DESCRIPTION="A libc optimized for small size"
+HOMEPAGE="http://www.fefe.de/dietlibc/"
+SRC_URI="http://nodeload.github.com/${GITHUB_AUTHOR}/${GITHUB_PROJECT}/tarball/v${PV} -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm -hppa ~mips ~ppc ~ppc64 ~sparc x86"
+IUSE="debug"
+
+DEPEND=""
+RDEPEND=""
+
+S="${WORKDIR}"/${GITHUB_AUTHOR}-${GITHUB_PROJECT}-${GITHUB_COMMIT}
+
+DIETHOME=/usr/diet
+
+IUSE_LIBC_TARGET="alpha arm armeb i386 ia64 mips mipsel parisc parisc64 ppc ppc64 s390 s390x sparc sparc64 x86_64"
+
+for t in ${IUSE_LIBC_TARGET} ; do
+ IUSE="${IUSE} target_${t}"
+done
+
+pkg_setup() {
+ CFLAGS=""
+
+ # Replace sparc64 related C[XX]FLAGS (see bug #45716)
+ use sparc && replace-sparc64-flags
+
+ # gcc-hppa suffers support for SSP, compilation will fail
+ use hppa && strip-unsupported-flags
+
+ # debug flags
+ use debug && append-flags -g
+
+ # Makefile does not append CFLAGS
+ append-flags -nostdinc -W -Wall -Wextra -Wchar-subscripts \
+ -Wmissing-prototypes -Wmissing-declarations -Wno-switch \
+ -Wno-unused -Wredundant-decls -fno-strict-aliasing
+
+ # only use -nopie on archs that support it
+ gcc-specs-pie && append-flags -nopie
+}
+
+src_compile() {
+ for t in ${IUSE_LIBC_TARGET} ; do
+ use target_$t $USE || continue
+
+ tC="CROSS_$t"
+ if [ -z "${!tC}" ] ; then
+ ewarn "CROSS_$t not defined, can't build"
+ sleep 15
+ continue
+ fi
+
+ einfo "Building libc $t"
+ emake prefix=${DIETHOME} \
+ MYARCH="${t}" \
+ CROSS="${!tC}" \
+ CFLAGS="${CFLAGS}" \
+ STRIP=":" \
+ || die "make failed"
+ done
+}
+
+src_install() {
+ emake prefix=${DIETHOME} \
+ DESTDIR="${D}" \
+ install-headers \
+ || die "make install-headers failed"
+
+ for t in ${IUSE_LIBC_TARGET} ; do
+ use target_$t $USE || continue
+
+ einfo "Installing libc $t"
+ emake prefix=${DIETHOME} \
+ MYARCH="${t}" \
+ DESTDIR="${D}" \
+ install-bin \
+ || die "make install-bin failed"
+ done
+
+ dobin "${D}"${DIETHOME}/bin/* || die "dobin failed"
+ doman "${D}"${DIETHOME}/man/*/* || die "doman failed"
+ rm -r "${D}"${DIETHOME}/{man,bin}
+
+ dodoc AUTHOR BUGS CAVEAT CHANGES README THANKS TODO PORTING
+}
diff --git a/dev-libs/dietlibc/files/dietlibc-4e86d5e-BJA-strip-override.diff b/dev-libs/dietlibc/files/dietlibc-4e86d5e-BJA-strip-override.diff
new file mode 100644
index 00000000..1d90194f
--- /dev/null
+++ b/dev-libs/dietlibc/files/dietlibc-4e86d5e-BJA-strip-override.diff
@@ -0,0 +1,11 @@
+--- Makefile.ori 2011-08-10 22:15:33.407819951 +0200
++++ Makefile 2011-08-10 22:15:52.794002728 +0200
+@@ -105,7 +105,7 @@
+
+ CC=gcc
+ INC=-I. -isystem include
+-STRIP=$(CROSS)strip
++STRIP?=$(CROSS)strip
+
+ VPATH=lib:libstdio:libugly:libcruft:libcrypt:libshell:liblatin1:libcompat:libdl:librpc:libregex:libm:profiling
+