diff options
author | 2007-06-13 18:14:21 +0000 | |
---|---|---|
committer | 2007-06-13 18:14:21 +0000 | |
commit | 866810e54a06e08611a09148cb9ba9348ea05717 (patch) | |
tree | c354218bbb94b36be7345c38ffbb54a6384a2e5a | |
parent | Marking nload stable on amd64. (diff) | |
download | phreak-866810e54a06e08611a09148cb9ba9348ea05717.tar.gz phreak-866810e54a06e08611a09148cb9ba9348ea05717.tar.bz2 phreak-866810e54a06e08611a09148cb9ba9348ea05717.zip |
Initial ebuild (current state).
svn path=/; revision=335
-rw-r--r-- | bugfixes/dev-libs/klibc/Manifest | 16 | ||||
-rw-r--r-- | bugfixes/dev-libs/klibc/files/digest-klibc-1.5 | 3 | ||||
-rw-r--r-- | bugfixes/dev-libs/klibc/files/klibc-1.4.11-interp-flags.patch | 13 | ||||
-rw-r--r-- | bugfixes/dev-libs/klibc/files/klibc-1.4.9-mips32.patch | 13 | ||||
-rw-r--r-- | bugfixes/dev-libs/klibc/klibc-1.5.ebuild | 197 |
5 files changed, 242 insertions, 0 deletions
diff --git a/bugfixes/dev-libs/klibc/Manifest b/bugfixes/dev-libs/klibc/Manifest new file mode 100644 index 0000000..ae7ba53 --- /dev/null +++ b/bugfixes/dev-libs/klibc/Manifest @@ -0,0 +1,16 @@ +AUX klibc-1.4.11-interp-flags.patch 494 RMD160 71081dc5eae8fff2adc43873f6b447f9b37a2432 SHA1 ecdea82ccbd77c63f8a65443fd64b65325869627 SHA256 ef8c05d059bc0185b8b68ea42e660fa13ddb55e9653b10fbfdabd77dea7abe2a +MD5 82dedd1a4103f65349252a1b755d40ed files/klibc-1.4.11-interp-flags.patch 494 +RMD160 71081dc5eae8fff2adc43873f6b447f9b37a2432 files/klibc-1.4.11-interp-flags.patch 494 +SHA256 ef8c05d059bc0185b8b68ea42e660fa13ddb55e9653b10fbfdabd77dea7abe2a files/klibc-1.4.11-interp-flags.patch 494 +AUX klibc-1.4.9-mips32.patch 632 RMD160 7f9769770208f6b5e44df88f22a682b29acbad3b SHA1 a5f72d885fc191b1f6825cd525ef78472cf2d431 SHA256 546ca8b913721671767fc0c119d694ddaead20f259738ea822a295e20e4f22d3 +MD5 b74d27999ddd26a5b44477849bda10d1 files/klibc-1.4.9-mips32.patch 632 +RMD160 7f9769770208f6b5e44df88f22a682b29acbad3b files/klibc-1.4.9-mips32.patch 632 +SHA256 546ca8b913721671767fc0c119d694ddaead20f259738ea822a295e20e4f22d3 files/klibc-1.4.9-mips32.patch 632 +DIST klibc-1.5.tar.bz2 487483 RMD160 9329426693c39eca2c357987bfa37656570b9d35 SHA1 254444bcc3f42855ec69b3a2497d5e6162e2fe2f SHA256 27000ba4bc73a5977502b27d7036df24dd6ab94a1c33b8f5d6d54ba62772f0c7 +EBUILD klibc-1.5.ebuild 5552 RMD160 1f337596c065c4de1f4686650b4215cea3306fe7 SHA1 0a88bec3592b1803a48df8f155ac6b253492036c SHA256 1b9aac06365fcd06615e011bb1e084b905c25e8bccbd054b518f5da594ed2aea +MD5 b254cfa4fe704023e6e3f19b43d49d11 klibc-1.5.ebuild 5552 +RMD160 1f337596c065c4de1f4686650b4215cea3306fe7 klibc-1.5.ebuild 5552 +SHA256 1b9aac06365fcd06615e011bb1e084b905c25e8bccbd054b518f5da594ed2aea klibc-1.5.ebuild 5552 +MD5 b79c6ebc2ec3079964fc074dfe80e380 files/digest-klibc-1.5 232 +RMD160 759a89e619b883990d30497b55d5042ca172a108 files/digest-klibc-1.5 232 +SHA256 9b784615ed975d744c25afbf8716126d2e2446a20b4a9146d0ced31cda10e26e files/digest-klibc-1.5 232 diff --git a/bugfixes/dev-libs/klibc/files/digest-klibc-1.5 b/bugfixes/dev-libs/klibc/files/digest-klibc-1.5 new file mode 100644 index 0000000..aa7eb0c --- /dev/null +++ b/bugfixes/dev-libs/klibc/files/digest-klibc-1.5 @@ -0,0 +1,3 @@ +MD5 481dfdef7273f2cc776c2637f481f017 klibc-1.5.tar.bz2 487483 +RMD160 9329426693c39eca2c357987bfa37656570b9d35 klibc-1.5.tar.bz2 487483 +SHA256 27000ba4bc73a5977502b27d7036df24dd6ab94a1c33b8f5d6d54ba62772f0c7 klibc-1.5.tar.bz2 487483 diff --git a/bugfixes/dev-libs/klibc/files/klibc-1.4.11-interp-flags.patch b/bugfixes/dev-libs/klibc/files/klibc-1.4.11-interp-flags.patch new file mode 100644 index 0000000..a5bb917 --- /dev/null +++ b/bugfixes/dev-libs/klibc/files/klibc-1.4.11-interp-flags.patch @@ -0,0 +1,13 @@ +diff --git a/usr/klibc/Kbuild b/usr/klibc/Kbuild +index c2bfd2f..8066bda 100644 +--- a/usr/klibc/Kbuild ++++ b/usr/klibc/Kbuild +@@ -152,7 +152,7 @@ # build interp.o + targets += interp.o + + quiet_cmd_interp = BUILD $@ +- cmd_interp = $(KLIBCCC) $(klibccflags) -D__ASSEMBLY__ \ ++ cmd_interp = $(KLIBCCC) $(klibccflags) $(EXTRA_KLIBCAFLAGS) -D__ASSEMBLY__ \ + -DLIBDIR=\"$(SHLIBDIR)\" \ + -DSOHASH=\"$(SOLIBHASH)\" \ + -c -o $@ $< diff --git a/bugfixes/dev-libs/klibc/files/klibc-1.4.9-mips32.patch b/bugfixes/dev-libs/klibc/files/klibc-1.4.9-mips32.patch new file mode 100644 index 0000000..044cb6d --- /dev/null +++ b/bugfixes/dev-libs/klibc/files/klibc-1.4.9-mips32.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile b/Makefile +index bb018cc..4a66577 100644 +--- a/Makefile ++++ b/Makefile +@@ -24,7 +24,7 @@ export OBJDUMP := $(KLIBCROSS)objdump + + NOSTDINC_FLAGS := -nostdlib -nostdinc -isystem $(shell $(CC) -print-file-name=include) + +-ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/parisc64/parisc/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/) ++ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/parisc64/parisc/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/ -e s/mips64/mips/) + export KLIBCARCH ?= $(ARCH) + export KLIBCARCHDIR := $(shell echo $(KLIBCARCH) | sed -e s/s390x/s390/) + diff --git a/bugfixes/dev-libs/klibc/klibc-1.5.ebuild b/bugfixes/dev-libs/klibc/klibc-1.5.ebuild new file mode 100644 index 0000000..eb51c0a --- /dev/null +++ b/bugfixes/dev-libs/klibc/klibc-1.5.ebuild @@ -0,0 +1,197 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/klibc/klibc-1.5.ebuild,v 1.2 2007/06/13 18:10:34 phreak Exp $ + +inherit eutils linux-info multilib toolchain-funcs + +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then + export CTARGET=${CATEGORY/cross-} + fi +fi + +DESCRIPTION="A minimal libc subset for use with initramfs." +HOMEPAGE="http://www.zytor.com/mailman/listinfo/klibc" +SRC_URI="ftp://ftp.kernel.org/pub/linux/libs/klibc/${P}.tar.bz2 + ftp://ftp.kernel.org/pub/linux/libs/klibc/Testing/${P}.tar.bz2" + +LICENSE="|| ( GPL-2 LGPL-2 )" +KEYWORDS="~amd64 -mips ~ppc ~x86" +IUSE="debug n32" + +DEPEND="dev-lang/perl + virtual/linux-sources" +RDEPEND="dev-lang/perl" + +if [[ ${CTARGET} != ${CHOST} ]] ; then + SLOT="${CTARGET}" +else + SLOT="0" +fi + +# Klibc has no PT_GNU_STACK support, so scanning for execstacks is moot +QA_EXECSTACK="*" + +guess_arch() { + local x + local host=$(echo "${CTARGET%%-*}" | sed -e 's/i.86/i386/' \ + -e 's/sun4u/sparc64/' \ + -e 's/arm.*/arm/' \ + -e 's/sa110/arm/' \ + -e 's/powerpc/ppc/') + + # Sort reverse so that we will get ppc64 before ppc, etc + for x in $(ls -1 "${S}/usr/include/arch/" | sort -r) ; do + if [[ ${host} == "${x}" ]] ; then + echo "${x}" + return 0 + fi + done + + return 1 +} + +src_unpack() { + unpack ${A} + + if [[ ! -d /usr/${CTARGET} ]] ; then + echo + eerror "It does not look like your cross-compiler is setup properly!" + die "It does not look like your cross-compiler is setup properly!" + fi + + einfo "CTARGET = $CTARGET" + if ! guess_arch &>/dev/null ; then + echo + eerror "Could not guess klibc's ARCH from your CTARGET!" + die "Could not guess klibc's ARCH from your CTARGET!" + fi + + kernel_arch=$(readlink "${KV_OUT_DIR}/include/asm" | sed -e 's:asm-::' | \ + sed -e 's/powerpc/ppc/') + if [[ ${kernel_arch} != $(guess_arch) ]] ; then + echo + eerror "Your kernel sources are not configured for your chosen arch!" + eerror "(KERNEL_ARCH=\"${kernel_arch}\", ARCH=\"$(guess_arch)\")" + die "Your kernel sources are not configured for your chosen arch!" + fi + + cd "${S}" + + # Symlink /usr/src/linux to ${S}/linux + ln -snf ${KV_DIR} linux + + # Build interp.o with EXTRA_KLIBCAFLAGS (.S source) + epatch "${FILESDIR}"/${PN}-1.4.11-interp-flags.patch + + # klibc detects mips64 systems as having 64bit userland + # Force them to 32bit userlands instead + if use mips ; then + ! use n32 && epatch "${FILESDIR}"/${PN}-1.4.9-mips32.patch + fi +} + +src_compile() { + local myargs + + [[ ${KV_DIR} != "${KV_OUT_DIR}" ]] && \ + myargs="KLIBCKERNELOBJ='${KV_OUT_DIR}/' KBUILD_SRC='1'" + + use debug && myargs="${myargs} V=1" + + if tc-is-cross-compiler ; then + einfo "ARCH = \"$(guess_arch)\"" + einfo "CROSS = \"${CTARGET}-\"" + emake KLIBCARCH=$(guess_arch) \ + CROSS_COMPILE="${CTARGET}-" \ + EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \ + EXTRA_KLIBCLDFLAGS="-z,noexecstack" \ + libdir="/usr/$(get_libdir)" \ + SHLIBDIR="/$(get_libdir)" \ + mandir="/usr/share/man" \ + INSTALLDIR="/usr/$(get_libdir)/klibc" \ + ${myargs} || die "Compile failed!" + else + env -u ARCH \ + emake \ + EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \ + EXTRA_KLIBCLDFLAGS="-z,noexecstack" \ + libdir="/usr/$(get_libdir)" \ + SHLIBDIR="/$(get_libdir)" \ + mandir="/usr/share/man" \ + INSTALLDIR="/usr/$(get_libdir)/klibc" \ + ${myargs} || die "Compile failed!" + fi +} + +src_install() { + local myargs klibc_prefix + + [[ ${KV_DIR} != "${KV_OUT_DIR}" ]] && \ + myargs="KLIBCKERNELOBJ='${KV_OUT_DIR}/' KBUILD_SRC='1'" + + use debug && myargs="${myargs} V=1" + + if tc-is-cross-compiler ; then + klibc_prefix=$("${S}/klcc/${CTARGET}-klcc" -print-klibc-prefix) + + make \ + EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \ + EXTRA_KLIBCLDFLAGS="-z,noexecstack" \ + INSTALLROOT="${D}" \ + KLIBCARCH=$(guess_arch) \ + CROSS_COMPILE="${CTARGET}-" \ + libdir="/usr/$(get_libdir)" \ + SHLIBDIR="/$(get_libdir)" \ + mandir="/usr/share/man" \ + INSTALLDIR="/usr/$(get_libdir)/klibc" \ + ${myargs} \ + install || die "Install failed!" + else + klibc_prefix=$("${S}/klcc/klcc" -print-klibc-prefix) + + env -u ARCH \ + make \ + EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \ + EXTRA_KLIBCLDFLAGS="-z,noexecstack" \ + INSTALLROOT="${D}" \ + libdir="/usr/$(get_libdir)" \ + SHLIBDIR="/$(get_libdir)" \ + mandir="/usr/share/man" \ + INSTALLDIR="/usr/$(get_libdir)/klibc" \ + ${myargs} \ + install || die "Install failed!" + fi + + # klibc doesn't support prelinking, so we need to mask it + cat > "${T}/70klibc" <<-EOF + PRELINK_PATH_MASK="/usr/$(get_libdir)/klibc" + EOF + + doenvd "${T}"/70klibc + + # Fix the permissions (bug #178053) on /usr/$(get_libdir)/klibc/include + # Actually I have no idea, why the includes have those weird-ass permissions + # on a particular system, might be due to inherited permissions from parent + # directory + + find "${D}"/usr/$(get_libdir)/klibc/include | xargs chmod o+rX + + # Hardlinks becoming copies + for x in gunzip zcat ; do + rm -f "${D}/${klibc_prefix}/bin/${x}" + dosym gzip "${klibc_prefix}/bin/${x}" + done + + if ! tc-is-cross-compiler ; then + cd "${S}" + insinto /usr/share/aclocal + doins contrib/klibc.m4 + + dodoc README usr/klibc/CAVEATS usr/klibc/README + newdoc usr/klibc/arch/README README.klibc.arch + docinto dash; newdoc usr/dash/README.klibc README + docinto gzip; dodoc usr/gzip/README + fi +} |