Version bump.
authorTim Harder <radhermit@gentoo.org>
Tue, 30 Aug 2011 01:37:01 +0000 (01:37 +0000)
committerTim Harder <radhermit@gentoo.org>
Tue, 30 Aug 2011 01:37:01 +0000 (01:37 +0000)
Package-Manager: portage-2.2.0_alpha51/cvs/Linux x86_64

dev-libs/klibc/ChangeLog
dev-libs/klibc/Manifest
dev-libs/klibc/klibc-1.5.25.ebuild [new file with mode: 0644]

index 167e454dafa1be2c17cdae67ad8d079ad2e5f3b7..fd0b7bb862225fd9243e639043985ab9874bbcb7 100644 (file)
@@ -1,6 +1,11 @@
 # ChangeLog for dev-libs/klibc
 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/klibc/ChangeLog,v 1.81 2011/08/17 21:16:51 radhermit Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/klibc/ChangeLog,v 1.82 2011/08/30 01:37:01 radhermit Exp $
+
+*klibc-1.5.25 (30 Aug 2011)
+
+  30 Aug 2011; Tim Harder <radhermit@gentoo.org> +klibc-1.5.25.ebuild:
+  Version bump.
 
 *klibc-1.5.24 (17 Aug 2011)
 
index f7445dbb5fdaa7317137e238c1f75c7b8b0ec820..89f141ffaa87a3aafe5a6f5abf81c6191160a999 100644 (file)
@@ -18,6 +18,7 @@ DIST klibc-1.5.15.tar.bz2 488692 RMD160 e4f44d93735913606bc70522f520c122e53c1fcf
 DIST klibc-1.5.20.tar.bz2 506232 RMD160 5ac3a170b63e0d989b79d9e26ae876f06db97ed1 SHA1 411feb9546f448e4873bfc4d93b970ac53ba27e0 SHA256 f55c4c12902116f29f70a68e8e1b6da7337c11b21adc6b5a197364146c1bc81c
 DIST klibc-1.5.23.tar.bz2 506362 RMD160 39ab666232ef2f95ce6ac39de89f4117a5cb341c SHA1 8fc75c8227870e13e836135a71aad21a49e16404 SHA256 71741882b8323fc1ce1c22a41b1901526c7fa2b7c97845d7a9558ca9d3931ef0
 DIST klibc-1.5.24.tar.bz2 506682 RMD160 458b959089a91b187dd4a1dd2ec99d3965f3405a SHA1 0d09d6140bcbd35984f0eba4a7eb4e6448246e34 SHA256 71fac12937ead3f104aad8ac40567ecdcac1ea27474cce939f6226499b1895a2
+DIST klibc-1.5.25.tar.bz2 510064 RMD160 eb7da635a8621e2a0199689fbfaf1ebfc5910616 SHA1 03ec41c47af9bbe193ec97a4dae280cc6ef5ad81 SHA256 0b910ec0b2a97d4c775ed06e44ad7bca7be150efdf2a77a19253a573e16367d3
 DIST klibc-1.5.8.tar.bz2 490132 RMD160 870bf1df35c05c2fbac7b1623c2250bed1b39e92 SHA1 db0beb7bf00a97e2ab0ab48f13f1aaea3e402ffe SHA256 b010fd9ea4624f4abc62a0ec93cecae9e9f0a7f856dd678da3fc61cc1d59ca0d
 DIST linux-2.6.23.tar.bz2 45488158 RMD160 755690e80751d5de86d260fe05c6eeadde116c4e SHA1 3a186adf13e44415796ab6381aa8979b16a5d5ca SHA256 d4e67c0935ffb2a4158234bff92cc791b83177866009fc9b2214104e0038dbdb
 DIST linux-2.6.26.tar.bz2 49441874 RMD160 57c37e81afa48e7c05e1a933d390a12ac2921255 SHA1 3f44384bf84f27add3b6c43ec68f974d7f7e9c67 SHA256 666488e2511393fdb901eaf1e67275bcc38ab37c930e8a9adb290a95c1721a2a
@@ -33,17 +34,18 @@ EBUILD klibc-1.5.15.ebuild 8072 RMD160 5b86b63653382849d92ededaac02a6e7b505165a
 EBUILD klibc-1.5.20.ebuild 7800 RMD160 93655e35879e2746d7a69855d272491050bb3d5c SHA1 d4aeda7be9730b1c732fd77ac60483d405cbfce6 SHA256 f8f6452da4bdda0b353ef44d8a80f437b117e5c79331c12fbe10fb297de951b1
 EBUILD klibc-1.5.23.ebuild 7720 RMD160 22c492f4c2485f5064fcc32b5b20c8b0ebe8e52c SHA1 ca37758971b4cb5fda6bce548dcaf467b6940e6e SHA256 41f34de6a6b64d0506bc214441ffcb4855b01d68741af28e885742cee17fdd35
 EBUILD klibc-1.5.24.ebuild 7586 RMD160 059ff3920f5cf20994c34859e8ac97ffd6376e7d SHA1 7cc2715fe42928384b69bf5b86d6743d4f5d1786 SHA256 95ac310267dbf7364b092947157bb31ff8eeb3d815929fc9ad2c817552014b81
+EBUILD klibc-1.5.25.ebuild 7586 RMD160 71da7a73fb7d3047edf8b90117a523a424f8a41b SHA1 098be1f08e6aaed89d3123455b0c013e4df2334e SHA256 bdb0f4891a83abb5c1fa2877901f33e5d6f40ba2d080b952ef03b9dbd56f2dcf
 EBUILD klibc-1.5.8.ebuild 6826 RMD160 609b142f3edf453c1d1eee627e23a05632acfa04 SHA1 02db30dbff2e5ec64de58a333c0084d35203514e SHA256 94ad6efd58dd2b037b55b05a9218988dc297f8d0dca936db258b6aa91ec3fb35
-MISC ChangeLog 13651 RMD160 cd3cda98035132d137262b2275bd1875b992236c SHA1 5adde893a0867ad92ae9795ca0f72311c8606c7b SHA256 cb1eb2fa9dabd41b7f55fab369c3a2788a7195a1681c8af404cd226b7fb7238e
+MISC ChangeLog 13768 RMD160 d84d7baa318875536f15b02cb279de864453d25e SHA1 0050e21a564d3cd06d49f5ddf800fdda1ede132d SHA256 055c293f03ab86cd53ae9c8710343083144771c3e63006b15e60584c280c9c25
 MISC metadata.xml 164 RMD160 dbe3031de69fe3fad413460e8e09b6eacdc6d918 SHA1 5626e640d90b48bd766991e846b1cde8ff9cc7cd SHA256 3b1b59f5a5a6e3a377f6124aa855936c20e9b883f7bbbef0210fdef022da34f3
 -----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.17 (GNU/Linux)
+Version: GnuPG v2.0.18 (GNU/Linux)
 
-iQEcBAEBCgAGBQJOTC/NAAoJEEqz6FtPBkyjsrgH/31mnzhGB6g+G7RdAB+6jqlp
-0HGBGbgtQydut5282kmHWXp6h1DqEzaAVVSHC80uixcDHv/aYcSHK5Ey6qohXZOw
-4+7HnHuF4oQkxW0Tgv3UMUQkAlPL54Mn2vCQ2me3IPNQCsAKU+OAHj61HRRVYqan
-NAbofrgYtBldsHGk+B4lzVSgFEb9+NuMlr/S90SN59fVB+L+NL3LXmxBYBS2ur4j
-EekKycfzRkkEXYVVMT6/BDdb80Bql3r1zWOySAL4/WYMFonJsR5dR3h/1bcjsek9
-wndh41ZprwsKT2xSUaMCkdiksoNjqnH4SEldyRYwL3Qmcmd1sDpI/Dka0bQuOlw=
-=J9tE
+iQEcBAEBCgAGBQJOXD7GAAoJEEqz6FtPBkyjRVEIAIBwxVbFXVcPwNtxmGMSXuYP
+JSLd772vmjjaO65ismlLDFegTxSJw6FbHwOZaM1xO+OPWkS8ThE2oTaJkrJrE61g
+JgptaejMM84zf+VIiQTMH+8fSKcL8RE/L0G8qgR17Ai4xpwlw36jC4mUpJr9sC9l
+VIbt/cx5/W/Yn45pz88ndSqSyQE1uUxatmjKQkLZlS5yVtzvBHVZPAbq9IyodCKf
+L4N3CKpP52ZWNdt3x1pPG++BGS6dnyZUdmqWRM2zts4j962LW+xB0oxSAxMm/ipx
+G3kh7/fglvYpN6ZGGVH9oa9GaNRF+69R+KeR84BuCfmP9435rt4zIM6PuCGKqOc=
+=3jE9
 -----END PGP SIGNATURE-----
diff --git a/dev-libs/klibc/klibc-1.5.25.ebuild b/dev-libs/klibc/klibc-1.5.25.ebuild
new file mode 100644 (file)
index 0000000..2412bd5
--- /dev/null
@@ -0,0 +1,266 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/klibc/klibc-1.5.25.ebuild,v 1.1 2011/08/30 01:37:01 radhermit 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="39"
+PKV_EXTRA=""
+if [ -n "${PKV_EXTRA}" ]; then
+       PKV="${KV_MAJOR}.${KV_MINOR}.$((${KV_SUB}+1))-${PKV_EXTRA}"
+       PATCH_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/patch-${PKV}.bz2"
+fi
+OKV="${KV_MAJOR}.${KV_MINOR}.${KV_SUB}"
+KERNEL_URI="
+       mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.bz2
+       mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/testing/linux-${OKV}.tar.bz2"
+SRC_URI="
+       mirror://kernel/linux/libs/klibc/${PV:0:3}/${P}.tar.bz2
+       ${PATCH_URI}
+       ${KERNEL_URI}"
+
+LICENSE="|| ( GPL-2 LGPL-2 )"
+KEYWORDS="~amd64 ~arm -mips ~ppc ~x86"
+SLOT="0"
+IUSE="debug"
+
+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"
+
+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
+}
+
+# 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 ;;
+               sh*) die "TODO: Your arch is not supported by the klibc ebuild. Please suggest a defconfig in a bug." ;;
+               *) echo defconfig ;;
+       esac
+}
+
+src_unpack() {
+       unpack linux-${OKV}.tar.bz2 ${P}.tar.bz2
+       [ -n "${PKV}" ] && 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
+
+       # Fix usage of -s, bug #201006
+       epatch "${FILESDIR}"/klibc-1.5.7-strip-fix-dash-s.patch
+}
+
+# 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="all"
+       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} CC="${CC}" HOSTCC="${HOSTCC}" || die "No defconfig"
+       if [[ "${KLIBCARCH/arm}" != "${KLIBCARCH}" ]] && \
+          [[ "${CHOST/eabi}" != "${CHOST}" ]]; then
+               # The delete and insert are seperate statements
+               # so that they are reliably used.
+               sed -i \
+               -e '/CONFIG_AEABI/d' \
+               -e '1iCONFIG_AEABI=y' \
+               -e '/CONFIG_OABI_COMPAT/d' \
+               -e '1iCONFIG_OABI_COMPAT=y' \
+               "${KS}"/.config \
+               "${S}"/defconfig
+       fi
+       emake prepare CC="${CC}" HOSTCC="${HOSTCC}" || die "Failed to prepare kernel sources for header usage"
+
+       cd "${S}"
+
+       use debug && myargs="${myargs} V=1"
+       use test && myargs="${myargs} test"
+
+       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" \
+               T="${T}" \
+               ${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
+               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
+}
+
+src_test() {
+       if ! tc-is-cross-compiler ; then
+               cd "${S}"/usr/klibc/tests
+               ALL_TESTS="$(ls *.c |sed 's,\.c$,,g')"
+               BROKEN_TESTS="fcntl fnmatch testrand48"
+               failed=0
+               for t in $ALL_TESTS ; do
+                       if has $t $BROKEN_TESTS ; then
+                               echo "=== $t SKIP"
+                       else
+                               echo -n "=== $t "
+                               ./$t </dev/null >/dev/null
+                               rc=$?
+                               if [ $rc -eq 0 ]; then
+                                       echo PASS
+                               else
+                                       echo FAIL
+                                       failed=1
+                               fi
+                       fi
+               done
+               [ $failed -ne 0 ] && die "Some tests failed."
+       fi
+}