summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2008-06-26 18:23:46 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2008-06-26 18:23:46 +0000
commit853b0263169f56fc024997f0df40989adc2618dc (patch)
tree6f4e106bdf0ef39055c775552c141bd3e716726a /dev-libs/klibc
parentVersion bump per bug #217738, and also fix x86_64 io.h header per bug #229525. (diff)
downloadgentoo-2-853b0263169f56fc024997f0df40989adc2618dc.tar.gz
gentoo-2-853b0263169f56fc024997f0df40989adc2618dc.tar.bz2
gentoo-2-853b0263169f56fc024997f0df40989adc2618dc.zip
Trim old ebuilds and patches.
(Portage version: 2.2_rc1/cvs/Linux 2.6.26-rc4-00103-g1beee8d x86_64)
Diffstat (limited to 'dev-libs/klibc')
-rw-r--r--dev-libs/klibc/ChangeLog11
-rw-r--r--dev-libs/klibc/files/klibc-1.2.1-nostdinc-flags.patch22
-rw-r--r--dev-libs/klibc/files/klibc-1.2.4-kbuild.patch14
-rw-r--r--dev-libs/klibc/files/klibc-1.4.13-resumelib.patch13
-rw-r--r--dev-libs/klibc/files/klibc-1.4.13-types.h.patch12
-rw-r--r--dev-libs/klibc/files/klibc-1.4.7-nostdinc-flags.patch22
-rw-r--r--dev-libs/klibc/files/klibc-1.4.9-mips32.patch13
-rw-r--r--dev-libs/klibc/klibc-1.2.1-r1.ebuild173
-rw-r--r--dev-libs/klibc/klibc-1.2.1-r2.ebuild203
-rw-r--r--dev-libs/klibc/klibc-1.4.12.ebuild219
-rw-r--r--dev-libs/klibc/klibc-1.4.13.ebuild235
-rw-r--r--dev-libs/klibc/klibc-1.5.7-r1.ebuild203
-rw-r--r--dev-libs/klibc/klibc-1.5.7-r2.ebuild230
-rw-r--r--dev-libs/klibc/klibc-1.5.7.ebuild196
-rw-r--r--dev-libs/klibc/klibc-1.5.ebuild202
15 files changed, 10 insertions, 1758 deletions
diff --git a/dev-libs/klibc/ChangeLog b/dev-libs/klibc/ChangeLog
index 25694b54f345..acbc45d54f54 100644
--- a/dev-libs/klibc/ChangeLog
+++ b/dev-libs/klibc/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for dev-libs/klibc
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/klibc/ChangeLog,v 1.58 2008/06/26 18:18:09 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/klibc/ChangeLog,v 1.59 2008/06/26 18:23:46 robbat2 Exp $
+
+ 26 Jun 2008; Robin H. Johnson <robbat2@gentoo.org>
+ -files/klibc-1.2.1-nostdinc-flags.patch, -files/klibc-1.2.4-kbuild.patch,
+ -files/klibc-1.4.7-nostdinc-flags.patch, -files/klibc-1.4.9-mips32.patch,
+ -files/klibc-1.4.13-resumelib.patch, -files/klibc-1.4.13-types.h.patch,
+ -klibc-1.2.1-r1.ebuild, -klibc-1.2.1-r2.ebuild, -klibc-1.4.12.ebuild,
+ -klibc-1.4.13.ebuild, -klibc-1.5.ebuild, -klibc-1.5.7.ebuild,
+ -klibc-1.5.7-r1.ebuild, -klibc-1.5.7-r2.ebuild:
+ Trim old ebuilds and patches.
*klibc-1.5.11 (26 Jun 2008)
diff --git a/dev-libs/klibc/files/klibc-1.2.1-nostdinc-flags.patch b/dev-libs/klibc/files/klibc-1.2.1-nostdinc-flags.patch
deleted file mode 100644
index acdbcb6f4c84..000000000000
--- a/dev-libs/klibc/files/klibc-1.2.1-nostdinc-flags.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- klibc-1.2.1/Makefile 2006-02-07 10:14:05.000000000 +0200
-+++ klibc-1.2.1.az/Makefile 2006-02-07 10:14:11.000000000 +0200
-@@ -12,7 +12,7 @@
- include scripts/Kbuild.include
-
- export CC := gcc
--NOSTDINC_FLAGS := -nostdlib -nostdinc -isystem $(shell $(CC) -print-file-name=include)
-+export NOSTDINC_FLAGS := -nostdlib -nostdinc -isystem $(shell $(CC) -print-file-name=include)
-
- export 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/)
-
---- klibc-1.2.1/klcc/Kbuild 2006-02-07 10:26:11.000000000 +0200
-+++ klibc-1.2.1.az/klcc/Kbuild 2006-02-07 10:28:16.000000000 +0200
-@@ -14,7 +14,7 @@
- $(Q)echo 'KCROSS=$(KCROSS)' >> $@
- $(Q)echo 'CC=$(KLIBCCC)' >> $@
- $(Q)echo 'LD=$(KLIBCLD)' >> $@
-- $(Q)echo 'REQFLAGS=$(filter-out -I%,$(KLIBCDEFS) $(KLIBCREQFLAGS) $(KLIBCARCHREQFLAGS))' >> $@
-+ $(Q)echo 'REQFLAGS=$(NOSTDINC_FLAGS) $(filter-out -I%,$(KLIBCDEFS) $(KLIBCREQFLAGS) $(KLIBCARCHREQFLAGS))' >> $@
- $(Q)echo 'OPTFLAGS=$(KLIBCOPTFLAGS)' >> $@
- $(Q)echo 'LDFLAGS=$(KLIBCLDFLAGS)' >> $@
- $(Q)echo 'STRIP=$(KLIBCSTRIP)' >> $@
diff --git a/dev-libs/klibc/files/klibc-1.2.4-kbuild.patch b/dev-libs/klibc/files/klibc-1.2.4-kbuild.patch
deleted file mode 100644
index 431247a989b3..000000000000
--- a/dev-libs/klibc/files/klibc-1.2.4-kbuild.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -Naurp klibc-1.2.4-orig/scripts/Makefile.host klibc-1.2.4/scripts/Makefile.host
---- klibc-1.2.4-orig/scripts/Makefile.host 2006-03-12 01:04:15.000000000 +0100
-+++ klibc-1.2.4/scripts/Makefile.host 2006-03-12 01:17:08.000000000 +0100
-@@ -85,8 +85,8 @@ ifeq ($(KBUILD_SRC),)
- __hostc_flags = $(_hostc_flags)
- __hostcxx_flags = $(_hostcxx_flags)
- else
--__hostc_flags = -I$(obj) $(call flags,_hostc_flags)
--__hostcxx_flags = -I$(obj) $(call flags,_hostcxx_flags)
-+__hostc_flags = -I$(obj) $(_hostc_flags)
-+__hostcxx_flags = -I$(obj) $(_hostcxx_flags)
- endif
-
- hostc_flags = -Wp,-MD,$(depfile) $(__hostc_flags)
diff --git a/dev-libs/klibc/files/klibc-1.4.13-resumelib.patch b/dev-libs/klibc/files/klibc-1.4.13-resumelib.patch
deleted file mode 100644
index ba22a82b8d02..000000000000
--- a/dev-libs/klibc/files/klibc-1.4.13-resumelib.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: klibc-1.4.13/usr/kinit/resume/resumelib.c
-===================================================================
---- klibc-1.4.13.orig/usr/kinit/resume/resumelib.c
-+++ klibc-1.4.13/usr/kinit/resume/resumelib.c
-@@ -12,7 +12,7 @@
- #include <limits.h>
- #include <sys/stat.h>
- #include <sys/sysmacros.h>
--#include <linux/config.h> /* For CONFIG_PM_STD_PARTITION */
-+#include <linux/autoconf.h> /* For CONFIG_PM_STD_PARTITION */
-
- #include "kinit.h"
- #include "do_mounts.h"
diff --git a/dev-libs/klibc/files/klibc-1.4.13-types.h.patch b/dev-libs/klibc/files/klibc-1.4.13-types.h.patch
deleted file mode 100644
index f08ce2fbca23..000000000000
--- a/dev-libs/klibc/files/klibc-1.4.13-types.h.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -urNp klibc-1.4.13.org/usr/include/sys/types.h klibc-1.4.13/usr/include/sys/types.h
---- klibc-1.4.13.org/usr/include/sys/types.h 2006-07-25 23:55:23.000000000 +0300
-+++ klibc-1.4.13/usr/include/sys/types.h 2007-02-07 15:24:03.000000000 +0200
-@@ -96,6 +96,8 @@ typedef uint32_t __bitwise __be32;
- typedef uint64_t __bitwise __le64;
- typedef uint64_t __bitwise __be64;
-
-+typedef __u16 __bitwise __sum16;
-+
- /*
- * Some headers seem to require this...
- */
diff --git a/dev-libs/klibc/files/klibc-1.4.7-nostdinc-flags.patch b/dev-libs/klibc/files/klibc-1.4.7-nostdinc-flags.patch
deleted file mode 100644
index da145af009be..000000000000
--- a/dev-libs/klibc/files/klibc-1.4.7-nostdinc-flags.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- klibc-1.4.7/Makefile 2006-06-27 11:21:22.000000000 +0200
-+++ klibc-1.4.7.az/Makefile 2006-06-27 11:21:52.000000000 +0200
-@@ -22,7 +22,7 @@
- export OBJCOPY := $(KLIBCROSS)objcopy
- export OBJDUMP := $(KLIBCROSS)objdump
-
--NOSTDINC_FLAGS := -nostdlib -nostdinc -isystem $(shell $(CC) -print-file-name=include)
-+export 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/)
- export KLIBCARCH ?= $(ARCH)
---- klibc-1.4.7/klcc/Kbuild 2006-06-27 11:21:27.000000000 +0200
-+++ klibc-1.4.7.az/klcc/Kbuild 2006-06-27 11:22:28.000000000 +0200
-@@ -14,7 +14,7 @@
- $(Q)echo 'KCROSS=$(KCROSS)' >> $@
- $(Q)echo 'CC=$(KLIBCCC)' >> $@
- $(Q)echo 'LD=$(KLIBCLD)' >> $@
-- $(Q)echo 'REQFLAGS=$(filter-out -I%,$(KLIBCDEFS) $(KLIBCREQFLAGS) $(KLIBCARCHREQFLAGS))' >> $@
-+ $(Q)echo 'REQFLAGS=$(NOSTDINC_FLAGS) $(filter-out -I%,$(KLIBCDEFS) $(KLIBCREQFLAGS) $(KLIBCARCHREQFLAGS))' >> $@
- $(Q)echo 'OPTFLAGS=$(KLIBCOPTFLAGS)' >> $@
- $(Q)echo 'LDFLAGS=$(KLIBCLDFLAGS)' >> $@
- $(Q)echo 'STRIP=$(KLIBCSTRIP)' >> $@
diff --git a/dev-libs/klibc/files/klibc-1.4.9-mips32.patch b/dev-libs/klibc/files/klibc-1.4.9-mips32.patch
deleted file mode 100644
index 044cb6d32867..000000000000
--- a/dev-libs/klibc/files/klibc-1.4.9-mips32.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-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/dev-libs/klibc/klibc-1.2.1-r1.ebuild b/dev-libs/klibc/klibc-1.2.1-r1.ebuild
deleted file mode 100644
index 930a8194685d..000000000000
--- a/dev-libs/klibc/klibc-1.2.1-r1.ebuild
+++ /dev/null
@@ -1,173 +0,0 @@
-# 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.2.1-r1.ebuild,v 1.4 2007/07/02 14:54:32 peper Exp $
-
-inherit eutils linux-info
-
-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/Stable/${P}.tar.bz2
- ftp://ftp.kernel.org/pub/linux/libs/klibc/Testing/${P}.tar.bz2"
-LICENSE="|| ( GPL-2 LGPL-2 )"
-# Mips patches needs updating ...
-KEYWORDS="~amd64 -mips ppc ~x86"
-IUSE="n32"
-RESTRICT="strip"
-
-DEPEND="dev-lang/perl
- virtual/linux-sources"
-RDEPEND="dev-lang/perl"
-
-if [[ ${CTARGET} != ${CHOST} ]] ; then
- SLOT="${CTARGET}"
-else
- SLOT="0"
-fi
-
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-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}/include/arch/" | sort -r) ; do
- if [[ ${host} == "${x}" ]] ; then
- echo "${x}"
- return 0
- fi
- done
-
- return 1
-}
-
-pkg_setup() {
- # Make sure kernel sources are OK
- # (Override for linux-mod eclass)
- check_kernel_built
-}
-
-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
-
- 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-::')
- 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}
-
- # Add our linux source tree symlink
- ln -snf ${KV_DIR} linux
-
- # We do not want all the nice prelink warnings
- # NOTE: for amd64, we might change below to '/usr/$(get_libdir)/klibc',
- # but I do not do it right now, as the build system do not support
- # the lib64 yet ....
- cat > "${S}/70klibc" <<-EOF
- PRELINK_PATH_MASK="/usr/lib/klibc"
- EOF
-
- # Export the NOSTDINC_FLAGS to ensure -nostdlib is passed, bug #120678
- epatch ${FILESDIR}/${P}-nostdinc-flags.patch
-
- # klibc detects mips64 systems as having 64bit userland
- # Force them to 32bit userlands instead
-# if ! use n32; then
-# epatch ${FILESDIR}/${PN}-1.1.16-mips32.patch
-# fi
-
- # Linker path is awry
-# epatch ${FILESDIR}/${PN}-1.1.16-mips-ldpaths.patch
-}
-
-src_compile() {
- local myargs
-
- [[ ${KV_DIR} != "${KV_OUT_DIR}" ]] && \
- myargs="KLIBCKERNELOBJ='${KV_OUT_DIR}/' KBUILD_SRC='1'"
-
- if is_cross ; then
- einfo "ARCH = \"$(guess_arch)\""
- einfo "CROSS = \"${CTARGET}-\""
- emake ARCH=$(guess_arch) \
- CROSS="${CTARGET}-" \
- ${myargs} || die "Compile failed!"
- else
- env -u ARCH \
- emake ${myargs} || die "Compile failed!"
- fi
-}
-
-src_install() {
- local myargs klibc_prefix
-
- [[ ${KV_DIR} != "${KV_OUT_DIR}" ]] && \
- myargs="KLIBCKERNELOBJ='${KV_OUT_DIR}/' KBUILD_SRC='1'"
-
- if is_cross ; then
- make INSTALLROOT=${D} \
- ARCH=$(guess_arch) \
- CROSS="${CTARGET}-" \
- ${myargs} \
- install || die "Install failed!"
-
- klibc_prefix=$("${S}/klcc/${CTARGET}-klcc" -print-klibc-bindir)
- else
- env -u ARCH \
- make INSTALLROOT=${D} ${myargs} install || die "Install failed!"
-
- klibc_prefix=$("${S}/klcc/klcc" -print-klibc-bindir)
- fi
-
- # Hardlinks becoming copies
- for x in gunzip zcat ; do
- rm -f "${D}/${klibc_prefix}/${x}"
- dosym gzip "${klibc_prefix}/${x}"
- done
-
- if ! is_cross ; then
- insinto /usr/share/aclocal
- doins ${FILESDIR}/klibc.m4
-
- doenvd ${S}/70klibc
-
- dodoc ${S}/README ${S}/klibc/{LICENSE,CAVEATS}
- newdoc ${S}/klibc/README README.klibc
- newdoc ${S}/klibc/arch/README README.klibc.arch
- docinto dash; newdoc ${S}/dash/README.klibc README
- docinto gzip; dodoc ${S}/gzip/{COPYING,README}
- fi
-}
-
-pkg_postinst() {
- # Override for linux-mod eclass
- return 0
-}
diff --git a/dev-libs/klibc/klibc-1.2.1-r2.ebuild b/dev-libs/klibc/klibc-1.2.1-r2.ebuild
deleted file mode 100644
index cf36e8987c64..000000000000
--- a/dev-libs/klibc/klibc-1.2.1-r2.ebuild
+++ /dev/null
@@ -1,203 +0,0 @@
-# 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.2.1-r2.ebuild,v 1.7 2007/07/02 14:54:32 peper Exp $
-
-inherit eutils linux-info multilib
-
-# klibc has no PT_GNU_STACK support, so scanning for execstacks is moot
-QA_EXECSTACK="*"
-
-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/Stable/${P}.tar.bz2
- ftp://ftp.kernel.org/pub/linux/libs/klibc/Testing/${P}.tar.bz2"
-LICENSE="|| ( GPL-2 LGPL-2 )"
-# Mips patches needs updating ...
-KEYWORDS="amd64 -mips ppc x86"
-IUSE="n32"
-RESTRICT="strip"
-
-DEPEND="dev-lang/perl
- virtual/linux-sources"
-RDEPEND="dev-lang/perl"
-
-if [[ ${CTARGET} != ${CHOST} ]] ; then
- SLOT="${CTARGET}"
-else
- SLOT="0"
-fi
-
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-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}/include/arch/" | sort -r) ; do
- if [[ ${host} == "${x}" ]] ; then
- echo "${x}"
- return 0
- fi
- done
-
- return 1
-}
-
-pkg_setup() {
- # Make sure kernel sources are OK
- # (Override for linux-mod eclass)
- check_kernel_built
-}
-
-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
-
- 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}"
-
- # Add our linux source tree symlink
- ln -snf ${KV_DIR} linux
-
- # We do not want all the nice prelink warnings
- # NOTE: for amd64, we might change below to '/usr/$(get_libdir)/klibc',
- # but I do not do it right now, as the build system do not support
- # the lib64 yet ....
- cat > "${S}/70klibc" <<-EOF
- PRELINK_PATH_MASK="/usr/lib/klibc"
- EOF
-
- # Export the NOSTDINC_FLAGS to ensure -nostdlib is passed, bug #120678
- epatch "${FILESDIR}"/${P}-nostdinc-flags.patch
-
- # Fix building when KBUILD_OUTPUT is set, bug #122173.
- epatch "${FILESDIR}"/${PN}-1.2.4-kbuild.patch
-
- # Fix a nasty typedef error in the sources, appearing on >= linux-2.6.19
- # (see #165472).
- epatch "${FILESDIR}"/${PN}-1.4.13-types.h.patch
-
- # klibc detects mips64 systems as having 64bit userland
- # Force them to 32bit userlands instead
-# if ! use n32; then
-# epatch "${FILESDIR}"/${PN}-1.1.16-mips32.patch
-# fi
-
- # Linker path is awry
-# epatch "${FILESDIR}"/${PN}-1.1.16-mips-ldpaths.patch
-}
-
-src_compile() {
- local myargs
-
- [[ ${KV_DIR} != "${KV_OUT_DIR}" ]] && \
- myargs="KLIBCKERNELOBJ='${KV_OUT_DIR}/' KBUILD_SRC='1'"
-
- if is_cross ; then
- einfo "ARCH = \"$(guess_arch)\""
- einfo "CROSS = \"${CTARGET}-\""
- emake ARCH=$(guess_arch) \
- CROSS="${CTARGET}-" \
- 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 \
- 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'"
-
- if is_cross ; then
- klibc_prefix=$("${S}/klcc/${CTARGET}-klcc" -print-klibc-prefix)
-
- make INSTALLROOT="${D}" \
- ARCH=$(guess_arch) \
- CROSS="${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 INSTALLROOT="${D}" \
- libdir="/usr/$(get_libdir)" \
- SHLIBDIR="/$(get_libdir)" \
- mandir="/usr/share/man" \
- INSTALLDIR="/usr/$(get_libdir)/klibc" \
- ${myargs} \
- install || die "Install failed!"
- fi
-
- # Hardlinks becoming copies
- for x in gunzip zcat ; do
- rm -f "${D}/${klibc_prefix}/bin/${x}"
- dosym gzip "${klibc_prefix}/bin/${x}"
- done
-
- if ! is_cross ; then
- insinto /usr/share/aclocal
- doins "${FILESDIR}"/klibc.m4
-
- doenvd "${S}"/70klibc
-
- dodoc "${S}"/README "${S}"/klibc/{LICENSE,CAVEATS}
- newdoc "${S}"/klibc/README README.klibc
- newdoc "${S}"/klibc/arch/README README.klibc.arch
- docinto dash; newdoc "${S}"/dash/README.klibc README
- docinto gzip; dodoc "${S}"/gzip/{COPYING,README}
- fi
-}
-
-pkg_postinst() {
- # Override for linux-mod eclass
- return 0
-}
diff --git a/dev-libs/klibc/klibc-1.4.12.ebuild b/dev-libs/klibc/klibc-1.4.12.ebuild
deleted file mode 100644
index c572b1a6eec3..000000000000
--- a/dev-libs/klibc/klibc-1.4.12.ebuild
+++ /dev/null
@@ -1,219 +0,0 @@
-# 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.4.12.ebuild,v 1.2 2007/07/02 14:54:32 peper Exp $
-
-inherit eutils linux-info multilib
-
-# Klibc has no PT_GNU_STACK support, so scanning for execstacks is moot
-QA_EXECSTACK="*"
-
-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/Stable/${P}.tar.bz2
- ftp://ftp.kernel.org/pub/linux/libs/klibc/Testing/${P}.tar.bz2"
-LICENSE="|| ( GPL-2 LGPL-2 )"
-# Mips patches needs updating ...
-KEYWORDS="~amd64 -mips ~ppc ~x86"
-IUSE="debug n32"
-RESTRICT="strip"
-
-DEPEND="dev-lang/perl
- virtual/linux-sources"
-RDEPEND="dev-lang/perl"
-
-if [[ ${CTARGET} != ${CHOST} ]] ; then
- SLOT="${CTARGET}"
-else
- SLOT="0"
-fi
-
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-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
-}
-
-pkg_setup() {
- # Make sure kernel sources are OK
- # (Override for linux-mod eclass)
- check_kernel_built
-}
-
-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}
-
- # Add our linux source tree symlink
- ln -snf ${KV_DIR} linux
-
- # Some reason .config has outdated mtime
- touch ${S}/.config
-
- # We do not want all the nice prelink warnings
- # NOTE: for amd64, we might change below to '/usr/$(get_libdir)/klibc',
- # but I do not do it right now, as the build system do not support
- # the lib64 yet ....
- cat > "${S}/70klibc" <<-EOF
- PRELINK_PATH_MASK="/usr/lib/klibc"
- EOF
-
- # Export the NOSTDINC_FLAGS to ensure -nostdlib is passed, bug #120678
- # NOTE: Disabling this for now, as klibc have -fno-stack-protector. Will
- # enable it again if there is still issues.
- #epatch "${FILESDIR}/${PN}"-1.4.7-nostdinc-flags.patch
- # 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 n32; then
- epatch "${FILESDIR}/${PN}"-1.4.9-mips32.patch
- fi
-
- # Linker path is awry
- # NB: Still needed ???
- #epatch "${FILESDIR}/${PN}"-1.1.16-mips-ldpaths.patch
-}
-
-src_compile() {
- local myargs
-
- [[ ${KV_DIR} != "${KV_OUT_DIR}" ]] && \
- myargs="KLIBCKERNELOBJ='${KV_OUT_DIR}/' KBUILD_SRC='1'"
-
- use debug && myargs="${myargs} V=1"
-
- if is_cross ; then
- einfo "ARCH = \"$(guess_arch)\""
- einfo "CROSS = \"${CTARGET}-\""
- emake ARCH=$(guess_arch) \
- CROSS="${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 is_cross ; then
- klibc_prefix=$("${S}/klcc/${CTARGET}-klcc" -print-klibc-prefix)
-
- make \
- EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \
- EXTRA_KLIBCLDFLAGS="-z,noexecstack" \
- INSTALLROOT=${D} \
- ARCH=$(guess_arch) \
- CROSS="${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
-
- # Hardlinks becoming copies
- for x in gunzip zcat ; do
- rm -f "${D}/${klibc_prefix}/bin/${x}"
- dosym gzip "${klibc_prefix}/bin/${x}"
- done
-
- if ! is_cross ; then
- insinto /usr/share/aclocal
- doins ${FILESDIR}/klibc.m4
-
- doenvd ${S}/70klibc
-
- dodoc ${S}/README ${S}/usr/klibc/{LICENSE,CAVEATS}
- newdoc ${S}/usr/klibc/README README.klibc
- newdoc ${S}/usr/klibc/arch/README README.klibc.arch
- docinto dash; newdoc ${S}/usr/dash/README.klibc README
- docinto gzip; dodoc ${S}/usr/gzip/{COPYING,README}
- fi
-}
-
-pkg_postinst() {
- # Override for linux-mod eclass
- return 0
-}
diff --git a/dev-libs/klibc/klibc-1.4.13.ebuild b/dev-libs/klibc/klibc-1.4.13.ebuild
deleted file mode 100644
index 10cf136d28ca..000000000000
--- a/dev-libs/klibc/klibc-1.4.13.ebuild
+++ /dev/null
@@ -1,235 +0,0 @@
-# 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.4.13.ebuild,v 1.8 2007/07/02 14:54:32 peper Exp $
-
-inherit eutils linux-info multilib
-
-# Klibc has no PT_GNU_STACK support, so scanning for execstacks is moot
-QA_EXECSTACK="*"
-
-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/Stable/${P}.tar.bz2
- ftp://ftp.kernel.org/pub/linux/libs/klibc/Testing/${P}.tar.bz2"
-LICENSE="|| ( GPL-2 LGPL-2 )"
-# Mips patches needs updating ...
-KEYWORDS="amd64 -mips ppc x86"
-IUSE="debug n32"
-RESTRICT="strip"
-
-DEPEND="dev-lang/perl
- virtual/linux-sources"
-RDEPEND="dev-lang/perl"
-
-if [[ ${CTARGET} != ${CHOST} ]] ; then
- SLOT="${CTARGET}"
-else
- SLOT="0"
-fi
-
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
-
-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
-}
-
-pkg_setup() {
- # Make sure kernel sources are OK
- # (Override for linux-mod eclass)
- check_kernel_built
-}
-
-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}"
-
- # Add our linux source tree symlink
- ln -snf ${KV_DIR} linux
-
- # Some reason .config has outdated mtime
- touch "${S}"/.config
-
- # We do not want all the nice prelink warnings
- # NOTE: for amd64, we might change below to '/usr/$(get_libdir)/klibc',
- # but I do not do it right now, as the build system do not support
- # the lib64 yet ....
- cat > "${S}/70klibc" <<-EOF
- PRELINK_PATH_MASK="/usr/lib/klibc"
- EOF
-
- # Export the NOSTDINC_FLAGS to ensure -nostdlib is passed, bug #120678
- # NOTE: Disabling this for now, as klibc have -fno-stack-protector. Will
- # enable it again if there is still issues.
- #epatch "${FILESDIR}/${PN}"-1.4.7-nostdinc-flags.patch
-
- # Build interp.o with EXTRA_KLIBCAFLAGS (.S source)
- epatch "${FILESDIR}"/${PN}-1.4.11-interp-flags.patch
-
- # Fix a nasty typedef error in the sources, appearing on >= linux-2.6.19
- # (see #165472).
- epatch "${FILESDIR}"/${PN}-1.4.13-types.h.patch
-
- # Fix the include in ${S}usr/kinit/resume/resumelib.c to use autoconf.h
- # instead of config.h.
- epatch "${FILESDIR}"/${PN}-1.4.13-resumelib.patch
-
- # klibc detects mips64 systems as having 64bit userland
- # Force them to 32bit userlands instead
- if ! use n32; then
- epatch "${FILESDIR}"/${PN}-1.4.9-mips32.patch
- fi
-
- # Linker path is awry
- # NB: Still needed ???
- #epatch "${FILESDIR}/${PN}"-1.1.16-mips-ldpaths.patch
-}
-
-src_compile() {
- local myargs
-
- [[ ${KV_DIR} != "${KV_OUT_DIR}" ]] && \
- myargs="KLIBCKERNELOBJ='${KV_OUT_DIR}/' KBUILD_SRC='1'"
-
- use debug && myargs="${myargs} V=1"
-
- if is_cross ; then
- einfo "ARCH = \"$(guess_arch)\""
- einfo "CROSS = \"${CTARGET}-\""
- emake ARCH=$(guess_arch) \
- CROSS="${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 is_cross ; then
- klibc_prefix=$("${S}/klcc/${CTARGET}-klcc" -print-klibc-prefix)
-
- make \
- EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \
- EXTRA_KLIBCLDFLAGS="-z,noexecstack" \
- INSTALLROOT="${D}" \
- ARCH=$(guess_arch) \
- CROSS="${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
-
- # 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 ! is_cross ; then
- insinto /usr/share/aclocal
- doins "${FILESDIR}"/klibc.m4
-
- doenvd "${S}"/70klibc
-
- dodoc "${S}"/README "${S}"/usr/klibc/{LICENSE,CAVEATS}
- newdoc "${S}"/usr/klibc/README README.klibc
- newdoc "${S}"/usr/klibc/arch/README README.klibc.arch
- docinto dash; newdoc "${S}"/usr/dash/README.klibc README
- docinto gzip; dodoc "${S}"/usr/gzip/{COPYING,README}
- fi
-}
-
-pkg_postinst() {
- # Override for linux-mod eclass
- return 0
-}
diff --git a/dev-libs/klibc/klibc-1.5.7-r1.ebuild b/dev-libs/klibc/klibc-1.5.7-r1.ebuild
deleted file mode 100644
index 5c2ad1661920..000000000000
--- a/dev-libs/klibc/klibc-1.5.7-r1.ebuild
+++ /dev/null
@@ -1,203 +0,0 @@
-# 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.7-r1.ebuild,v 1.2 2007/11/14 06:00:02 robbat2 Exp $
-
-# Robin H. Johnson <robbat2@gentoo.org>, 12 Nov 2007:
-# This still needs major work.
-# But it is significently better than the previous version.
-# In that it will now build on biarch systems, such as ppc64-32ul.
-
-# NOTES:
-# ======
-# We need to bring in the kernel sources seperately
-# Because they have to be configured in a way that differs from the copy in
-# /usr/src/. The sys-kernel/linux-headers are too stripped down to use
-# unfortunetly.
-# This will be able to go away once the klibc author updates his code
-# to build again the headers provided by the kernel's 'headers_install' target.
-
-inherit eutils multilib toolchain-funcs
-
-DESCRIPTION="A minimal libc subset for use with initramfs."
-HOMEPAGE="http://www.zytor.com/mailman/listinfo/klibc"
-OKV="2.6.23" KV_MAJOR="2" KV_MINOR="6"
-KERNEL_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.bz2"
-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
- ${KERNEL_URI}"
-
-LICENSE="|| ( GPL-2 LGPL-2 )"
-KEYWORDS="~amd64 -mips ~ppc ~x86 ~sparc"
-SLOT="0"
-IUSE="debug n32"
-
-DEPEND="dev-lang/perl"
-RDEPEND="${DEPEND}"
-
-KS="${WORKDIR}/linux-${OKV}"
-
-# Klibc has no PT_GNU_STACK support, so scanning for execstacks is moot
-QA_EXECSTACK="*"
-# Do not strip
-RESTRICT="strip"
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
-
- # Symlink /usr/src/linux to ${S}/linux
- ln -snf "${KS}" linux
- #ln -snf "/usr" linux
-
- # Build interp.o with EXTRA_KLIBCAFLAGS (.S source)
- epatch "${FILESDIR}"/${PN}-1.4.11-interp-flags.patch
-
- # Fixes for sparc and ppc
- epatch "${FILESDIR}"/${PN}-1.5-sigaction.patch
-
- # Prevent klibc from prestripping stuff
-# epatch "${FILESDIR}"/${P}-nostrip.patch
-
- # Fix the asm-ppc vs. asm-powerpc issue, bug #196521
- epatch "${FILESDIR}"/${PN}-1.5-klibcasmarch.patch
-}
-
-# For a given Gentoo ARCH,
-# specify the kernel defconfig most relevant
-kernel_defconfig() {
- a="${1:${ARCH}}"
- # most, but not all arches have a sanely named defconfig
- case ${a} in
- ppc64) echo ppc64_defconfig ;;
- ppc) echo pmac32_defconfig ;;
- arm*|sh*) die "TODO: Your arch is not supported by the klibc ebuild. Please suggest a defconfig in a bug." ;;
- *) echo defconfig ;;
- esac
-}
-
-# klibc has it's own ideas of arches
-# They reflect userspace strictly.
-# This functions maps from a Gentoo ARCH, to an arch that klibc expects
-# Look at klibc-${S}/usr/klibc/arch for a list of these arches
-klibc_arch() {
- a="${1:${ARCH}}"
- case ${a} in
- amd64) echo x86_64 ;;
- mips) die 'TODO: Use the $ABI' ;;
- x86) echo i386 ;;
- *) echo ${a} ;;
- esac
-}
-
-src_compile() {
- local myargs
- local myARCH="${ARCH}" myABI="${ABI}"
- # TODO: For cross-compiling
- # You should set ARCH and ABI here
- CC="$(tc-getCC)"
- HOSTCC="$(tc-getBUILD_CC)"
- KLIBCARCH="$(klibc_arch ${ARCH})"
- libdir="$(get_libdir)"
- # This should be the defconfig corresponding to your userspace!
- # NOT your kernel. PPC64-32ul would choose 'ppc' for example.
- defconfig=$(kernel_defconfig ${ARCH})
- unset ABI ARCH # Unset these, because they interfere
- unset KBUILD_OUTPUT # we are using a private copy
-
- cd "${KS}"
- emake ${defconfig} || die "No defconfig"
- emake prepare || die "Failed to prepare kernel sources for header usage"
-
- cd "${S}"
-
- use debug && myargs="${myargs} V=1"
-
- emake \
- EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \
- EXTRA_KLIBCLDFLAGS="-z,noexecstack" \
- HOSTCC="${HOSTCC}" CC="${CC}" \
- INSTALLDIR="/usr/${libdir}/klibc" \
- KLIBCARCH=${KLIBCARCH} \
- SHLIBDIR="/${libdir}" \
- libdir="/usr/${libdir}" \
- mandir="/usr/share/man" \
- ${myargs} || die "Compile failed!"
-
- #SHLIBDIR="/${libdir}" \
-
- ARCH="${myARCH}" ABI="${myABI}"
-}
-
-src_install() {
- local myargs
- local myARCH="${ARCH}" myABI="${ABI}"
- # TODO: For cross-compiling
- # You should set ARCH and ABI here
- CC="$(tc-getCC)"
- HOSTCC="$(tc-getBUILD_CC)"
- KLIBCARCH="$(klibc_arch ${ARCH})"
- libdir="$(get_libdir)"
- # This should be the defconfig corresponding to your userspace!
- # NOT your kernel. PPC64-32ul would choose 'ppc' for example.
- defconfig=$(kernel_defconfig ${ARCH})
-
- use debug && myargs="${myargs} V=1"
-
- local klibc_prefix
- if tc-is-cross-compiler ; then
- klibc_prefix=$("${S}/klcc/${KLIBCARCH}-klcc" -print-klibc-prefix)
- else
- klibc_prefix=$("${S}/klcc/klcc" -print-klibc-prefix)
- fi
-
- unset ABI ARCH # Unset these, because they interfere
- unset KBUILD_OUTPUT # we are using a private copy
-
- emake \
- EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \
- EXTRA_KLIBCLDFLAGS="-z,noexecstack" \
- HOSTCC="${HOSTCC}" CC="${CC}" \
- INSTALLDIR="/usr/${libdir}/klibc" \
- INSTALLROOT="${D}" \
- KLIBCARCH=${KLIBCARCH} \
- SHLIBDIR="/${libdir}" \
- libdir="/usr/${libdir}" \
- mandir="/usr/share/man" \
- ${myargs} \
- install || die "Install failed!"
-
- #SHLIBDIR="/${libdir}" \
-
- # klibc doesn't support prelinking, so we need to mask it
- cat > "${T}/70klibc" <<-EOF
- PRELINK_PATH_MASK="/usr/${libdir}/klibc"
- EOF
-
- doenvd "${T}"/70klibc
-
- # Fix the permissions (bug #178053) on /usr/${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/${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
-
- # Restore now, so we can use the tc- functions
- ARCH="${myARCH}" ABI="${myABI}"
- 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
-
-}
diff --git a/dev-libs/klibc/klibc-1.5.7-r2.ebuild b/dev-libs/klibc/klibc-1.5.7-r2.ebuild
deleted file mode 100644
index e10fe7114daf..000000000000
--- a/dev-libs/klibc/klibc-1.5.7-r2.ebuild
+++ /dev/null
@@ -1,230 +0,0 @@
-# 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.7-r2.ebuild,v 1.3 2007/12/21 15:07:36 nixnut Exp $
-
-# Robin H. Johnson <robbat2@gentoo.org>, 12 Nov 2007:
-# This still needs major work.
-# But it is significently better than the previous version.
-# In that it will now build on biarch systems, such as ppc64-32ul.
-
-# NOTES:
-# ======
-# We need to bring in the kernel sources seperately
-# Because they have to be configured in a way that differs from the copy in
-# /usr/src/. The sys-kernel/linux-headers are too stripped down to use
-# unfortunetly.
-# This will be able to go away once the klibc author updates his code
-# to build again the headers provided by the kernel's 'headers_install' target.
-
-inherit eutils multilib toolchain-funcs
-
-DESCRIPTION="A minimal libc subset for use with initramfs."
-HOMEPAGE="http://www.zytor.com/mailman/listinfo/klibc"
-KV_MAJOR="2" KV_MINOR="6" KV_SUB="23"
-OKV="${KV_MAJOR}.${KV_MINOR}.${KV_SUB}"
-PKV="${KV_MAJOR}.${KV_MINOR}.$((${KV_SUB}+1))-rc2"
-PATCH_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/patch-${PKV}.bz2"
-KERNEL_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/testing/linux-${OKV}.tar.bz2"
-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
- ${PATCH_URI}
- ${KERNEL_URI}"
-
-LICENSE="|| ( GPL-2 LGPL-2 )"
-KEYWORDS="~amd64 -mips ppc ~sparc ~x86"
-SLOT="0"
-IUSE="debug n32"
-
-DEPEND="dev-lang/perl"
-RDEPEND="${DEPEND}"
-
-KS="${WORKDIR}/linux-${OKV}"
-
-# Klibc has no PT_GNU_STACK support, so scanning for execstacks is moot
-QA_EXECSTACK="*"
-# Do not strip
-RESTRICT="strip"
-
-src_unpack() {
- unpack linux-${OKV}.tar.bz2 ${P}.tar.bz2
- EPATCH_OPTS="-d ${KS} -p1" epatch "${DISTDIR}"/patch-${PKV}.bz2
- cd "${S}"
-
- # Symlink /usr/src/linux to ${S}/linux
- ln -snf "${KS}" linux
- #ln -snf "/usr" linux
-
- # Build interp.o with EXTRA_KLIBCAFLAGS (.S source)
- epatch "${FILESDIR}"/${PN}-1.4.11-interp-flags.patch
-
- # Fixes for sparc and ppc
- epatch "${FILESDIR}"/${PN}-1.5-sigaction.patch
-
- # Prevent klibc from prestripping stuff
-# epatch "${FILESDIR}"/${P}-nostrip.patch
-
- # Fix the asm-ppc vs. asm-powerpc issue, bug #196521
- epatch "${FILESDIR}"/${PN}-1.5-klibcasmarch.patch
-}
-
-# For a given Gentoo ARCH,
-# specify the kernel defconfig most relevant
-kernel_defconfig() {
- a="${1:${ARCH}}"
- # most, but not all arches have a sanely named defconfig
- case ${a} in
- ppc64) echo ppc64_defconfig ;;
- ppc) echo pmac32_defconfig ;;
- arm*|sh*) die "TODO: Your arch is not supported by the klibc ebuild. Please suggest a defconfig in a bug." ;;
- *) echo defconfig ;;
- esac
-}
-
-# klibc has it's own ideas of arches
-# They reflect userspace strictly.
-# This functions maps from a Gentoo ARCH, to an arch that klibc expects
-# Look at klibc-${S}/usr/klibc/arch for a list of these arches
-klibc_arch() {
- a="${1:${ARCH}}"
- case ${a} in
- amd64) echo x86_64 ;;
- mips) die 'TODO: Use the $ABI' ;;
- x86) echo i386 ;;
- *) echo ${a} ;;
- esac
-}
-
-kernel_asm_arch() {
- a="${1:${ARCH}}"
- case ${a} in
- # Merged arches
- x86|amd64) echo x86 ;;
- ppc*) echo powerpc ;;
- # Non-merged
- alpha|arm|ia64|m68k|mips|sh|sparc*) echo ${1} ;;
- *) die "TODO: Update the code for your asm-ARCH symlink" ;;
- esac
-}
-
-src_compile() {
- local myargs
- local myARCH="${ARCH}" myABI="${ABI}"
- # TODO: For cross-compiling
- # You should set ARCH and ABI here
- CC="$(tc-getCC)"
- HOSTCC="$(tc-getBUILD_CC)"
- KLIBCARCH="$(klibc_arch ${ARCH})"
- KLIBCASMARCH="$(kernel_asm_arch ${ARCH})"
- libdir="$(get_libdir)"
- # This should be the defconfig corresponding to your userspace!
- # NOT your kernel. PPC64-32ul would choose 'ppc' for example.
- defconfig=$(kernel_defconfig ${ARCH})
- unset ABI ARCH # Unset these, because they interfere
- unset KBUILD_OUTPUT # we are using a private copy
-
- cd "${KS}"
- emake ${defconfig} || die "No defconfig"
- emake prepare || die "Failed to prepare kernel sources for header usage"
-
- cd "${S}"
-
- use debug && myargs="${myargs} V=1"
-
- emake \
- EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \
- EXTRA_KLIBCLDFLAGS="-z,noexecstack" \
- HOSTCC="${HOSTCC}" CC="${CC}" \
- INSTALLDIR="/usr/${libdir}/klibc" \
- KLIBCARCH=${KLIBCARCH} \
- KLIBCASMARCH=${KLIBCASMARCH} \
- SHLIBDIR="/${libdir}" \
- libdir="/usr/${libdir}" \
- mandir="/usr/share/man" \
- ${myargs} || die "Compile failed!"
-
- #SHLIBDIR="/${libdir}" \
-
- ARCH="${myARCH}" ABI="${myABI}"
-}
-
-src_install() {
- local myargs
- local myARCH="${ARCH}" myABI="${ABI}"
- # TODO: For cross-compiling
- # You should set ARCH and ABI here
- CC="$(tc-getCC)"
- HOSTCC="$(tc-getBUILD_CC)"
- KLIBCARCH="$(klibc_arch ${ARCH})"
- KLIBCASMARCH="$(kernel_asm_arch ${ARCH})"
- libdir="$(get_libdir)"
- # This should be the defconfig corresponding to your userspace!
- # NOT your kernel. PPC64-32ul would choose 'ppc' for example.
- defconfig=$(kernel_defconfig ${ARCH})
-
- use debug && myargs="${myargs} V=1"
-
- local klibc_prefix
- if tc-is-cross-compiler ; then
- klibc_prefix=$("${S}/klcc/${KLIBCARCH}-klcc" -print-klibc-prefix)
- else
- klibc_prefix=$("${S}/klcc/klcc" -print-klibc-prefix)
- fi
-
- unset ABI ARCH # Unset these, because they interfere
- unset KBUILD_OUTPUT # we are using a private copy
-
- emake \
- EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \
- EXTRA_KLIBCLDFLAGS="-z,noexecstack" \
- HOSTCC="${HOSTCC}" CC="${CC}" \
- INSTALLDIR="/usr/${libdir}/klibc" \
- INSTALLROOT="${D}" \
- KLIBCARCH=${KLIBCARCH} \
- KLIBCASMARCH=${KLIBCASMARCH} \
- SHLIBDIR="/${libdir}" \
- libdir="/usr/${libdir}" \
- mandir="/usr/share/man" \
- ${myargs} \
- install || die "Install failed!"
-
- #SHLIBDIR="/${libdir}" \
-
- # klibc doesn't support prelinking, so we need to mask it
- cat > "${T}/70klibc" <<-EOF
- PRELINK_PATH_MASK="/usr/${libdir}/klibc"
- EOF
-
- doenvd "${T}"/70klibc
-
- # Fix the permissions (bug #178053) on /usr/${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/${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
-
- # Restore now, so we can use the tc- functions
- ARCH="${myARCH}" ABI="${myABI}"
- 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
-
- # Fix up the symlink
- # Mainly for merged arches
- linkname="${D}/usr/${libdir}/klibc/include/asm"
- if [ -L "${linkname}" ] && [ ! -e "${linkname}" ] ; then
- ln -snf asm-${KLIBCASMARCH} "${linkname}"
- fi
-}
diff --git a/dev-libs/klibc/klibc-1.5.7.ebuild b/dev-libs/klibc/klibc-1.5.7.ebuild
deleted file mode 100644
index 97cd48bb61bc..000000000000
--- a/dev-libs/klibc/klibc-1.5.7.ebuild
+++ /dev/null
@@ -1,196 +0,0 @@
-# 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.7.ebuild,v 1.1 2007/11/12 10:17:27 robbat2 Exp $
-
-# Robin H. Johnson <robbat2@gentoo.org>, 12 Nov 2007:
-# This still needs major work.
-# But it is significently better than the previous version.
-# In that it will now build on biarch systems, such as ppc64-32ul.
-
-# NOTES:
-# ======
-# We need to bring in the kernel sources seperately
-# Because they have to be configured in a way that differs from the copy in
-# /usr/src/. The sys-kernel/linux-headers are too stripped down to use
-# unfortunetly.
-# This will be able to go away once the klibc author updates his code
-# to build again the headers provided by the kernel's 'headers_install' target.
-
-inherit eutils multilib toolchain-funcs
-
-DESCRIPTION="A minimal libc subset for use with initramfs."
-HOMEPAGE="http://www.zytor.com/mailman/listinfo/klibc"
-OKV="2.6.23" KV_MAJOR="2" KV_MINOR="6"
-KERNEL_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.bz2"
-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
- ${KERNEL_URI}"
-
-LICENSE="|| ( GPL-2 LGPL-2 )"
-KEYWORDS="~amd64 -mips ~ppc ~x86 ~sparc"
-SLOT="0"
-IUSE="debug n32"
-
-DEPEND="dev-lang/perl"
-RDEPEND="${DEPEND}"
-
-KS="${WORKDIR}/linux-${OKV}"
-
-# Klibc has no PT_GNU_STACK support, so scanning for execstacks is moot
-QA_EXECSTACK="*"
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
-
- # Symlink /usr/src/linux to ${S}/linux
- ln -snf "${KS}" linux
- #ln -snf "/usr" linux
-
- # Build interp.o with EXTRA_KLIBCAFLAGS (.S source)
- epatch "${FILESDIR}"/${PN}-1.4.11-interp-flags.patch
-
- # Fixes for sparc and ppc
- epatch "${FILESDIR}"/${PN}-1.5-sigaction.patch
-
- # Prevent klibc from prestripping stuff
-# epatch "${FILESDIR}"/${P}-nostrip.patch
-}
-
-# For a given Gentoo ARCH,
-# specify the kernel defconfig most relevant
-kernel_defconfig() {
- a="${1:${ARCH}}"
- # most, but not all arches have a sanely named defconfig
- case ${a} in
- ppc64) echo ppc64_defconfig ;;
- ppc) echo pmac32_defconfig ;;
- arm*|sh*) die "TODO: Your arch is not supported by the klibc ebuild. Please suggest a defconfig in a bug." ;;
- *) echo defconfig ;;
- esac
-}
-
-# klibc has it's own ideas of arches
-# They reflect userspace strictly.
-# This functions maps from a Gentoo ARCH, to an arch that klibc expects
-# Look at klibc-${S}/usr/klibc/arch for a list of these arches
-klibc_arch() {
- a="${1:${ARCH}}"
- case ${a} in
- amd64) echo x86_64 ;;
- mips) die 'TODO: Use the $ABI' ;;
- x86) echo i386 ;;
- *) echo ${a} ;;
- esac
-}
-
-src_compile() {
- local myargs
- local myARCH="${ARCH}" myABI="${ABI}"
- # TODO: For cross-compiling
- # You should set ARCH and ABI here
- CC="$(tc-getCC)"
- HOSTCC="$(tc-getBUILD_CC)"
- KLIBCARCH="$(klibc_arch ${ARCH})"
- libdir="$(get_libdir)"
- # This should be the defconfig corresponding to your userspace!
- # NOT your kernel. PPC64-32ul would choose 'ppc' for example.
- defconfig=$(kernel_defconfig ${ARCH})
- unset ABI ARCH # Unset these, because they interfere
-
- cd "${KS}"
- emake ${defconfig} || die "No defconfig"
- emake prepare || die "Failed to prepare kernel sources for header usage"
-
- cd "${S}"
-
- use debug && myargs="${myargs} V=1"
-
- emake \
- EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \
- EXTRA_KLIBCLDFLAGS="-z,noexecstack" \
- HOSTCC="${HOSTCC}" CC="${CC}" \
- INSTALLDIR="/usr/${libdir}/klibc" \
- KLIBCARCH=${KLIBCARCH} \
- SHLIBDIR="/${libdir}" \
- libdir="/usr/${libdir}" \
- mandir="/usr/share/man" \
- ${myargs} || die "Compile failed!"
-
- #SHLIBDIR="/${libdir}" \
-
- ARCH="${myARCH}" ABI="${myABI}"
-}
-
-src_install() {
- local myargs
- local myARCH="${ARCH}" myABI="${ABI}"
- # TODO: For cross-compiling
- # You should set ARCH and ABI here
- CC="$(tc-getCC)"
- HOSTCC="$(tc-getBUILD_CC)"
- KLIBCARCH="$(klibc_arch ${ARCH})"
- libdir="$(get_libdir)"
- # This should be the defconfig corresponding to your userspace!
- # NOT your kernel. PPC64-32ul would choose 'ppc' for example.
- defconfig=$(kernel_defconfig ${ARCH})
-
- use debug && myargs="${myargs} V=1"
-
- local klibc_prefix
- if tc-is-cross-compiler ; then
- klibc_prefix=$("${S}/klcc/${KLIBCARCH}-klcc" -print-klibc-prefix)
- else
- klibc_prefix=$("${S}/klcc/klcc" -print-klibc-prefix)
- fi
-
- unset ABI ARCH # Unset these, because they interfere
-
- emake \
- EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \
- EXTRA_KLIBCLDFLAGS="-z,noexecstack" \
- HOSTCC="${HOSTCC}" CC="${CC}" \
- INSTALLDIR="/usr/${libdir}/klibc" \
- INSTALLROOT="${D}" \
- KLIBCARCH=${KLIBCARCH} \
- SHLIBDIR="/${libdir}" \
- libdir="/usr/${libdir}" \
- mandir="/usr/share/man" \
- ${myargs} \
- install || die "Install failed!"
-
- #SHLIBDIR="/${libdir}" \
-
- # klibc doesn't support prelinking, so we need to mask it
- cat > "${T}/70klibc" <<-EOF
- PRELINK_PATH_MASK="/usr/${libdir}/klibc"
- EOF
-
- doenvd "${T}"/70klibc
-
- # Fix the permissions (bug #178053) on /usr/${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/${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
-
- # Restore now, so we can use the tc- functions
- ARCH="${myARCH}" ABI="${myABI}"
- 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
-
-}
diff --git a/dev-libs/klibc/klibc-1.5.ebuild b/dev-libs/klibc/klibc-1.5.ebuild
deleted file mode 100644
index 98795630fc8f..000000000000
--- a/dev-libs/klibc/klibc-1.5.ebuild
+++ /dev/null
@@ -1,202 +0,0 @@
-# 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.5 2007/10/21 19:35:05 beandog Exp $
-
-# XXX: The cross-compiling stuff in here seems to be incorrect ...
-# It should be reviewed and compared against other libcs.
-# It most likely falls apart when CBUILD == CHOST != CTARGET
-
-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"
-RESTRICT="strip"
-
-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
-}