diff options
author | Martin Schlemmer <azarah@gentoo.org> | 2005-03-09 20:59:05 +0000 |
---|---|---|
committer | Martin Schlemmer <azarah@gentoo.org> | 2005-03-09 20:59:05 +0000 |
commit | a1d345e700c0fdd339c516163484cd00efc06425 (patch) | |
tree | ae825866e37ce3188e63ef3e0bf954c0635a5180 /dev-libs | |
parent | add gnome-backgrounds (diff) | |
download | historical-a1d345e700c0fdd339c516163484cd00efc06425.tar.gz historical-a1d345e700c0fdd339c516163484cd00efc06425.tar.bz2 historical-a1d345e700c0fdd339c516163484cd00efc06425.zip |
Initial version
Package-Manager: portage-2.0.51.19
Diffstat (limited to 'dev-libs')
-rw-r--r-- | dev-libs/klibc/ChangeLog | 10 | ||||
-rw-r--r-- | dev-libs/klibc/Manifest | 15 | ||||
-rw-r--r-- | dev-libs/klibc/files/digest-klibc-1.0 | 1 | ||||
-rw-r--r-- | dev-libs/klibc/files/klibc.m4 | 75 | ||||
-rw-r--r-- | dev-libs/klibc/klibc-1.0.ebuild | 117 | ||||
-rw-r--r-- | dev-libs/klibc/metadata.xml | 9 |
6 files changed, 227 insertions, 0 deletions
diff --git a/dev-libs/klibc/ChangeLog b/dev-libs/klibc/ChangeLog new file mode 100644 index 000000000000..93f9a2e841c4 --- /dev/null +++ b/dev-libs/klibc/ChangeLog @@ -0,0 +1,10 @@ +# ChangeLog for dev-libs/klibc +# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/klibc/ChangeLog,v 1.1 2005/03/09 20:59:05 azarah Exp $ + +*klibc-1.0 (09 Mar 2005) + + 09 Mar 2005; Martin Schlemmer <azarah@gentoo.org> +metadata.xml, + +files/klibc.m4, +klibc-1.0.ebuild: + Initial version + diff --git a/dev-libs/klibc/Manifest b/dev-libs/klibc/Manifest new file mode 100644 index 000000000000..797a8da106ae --- /dev/null +++ b/dev-libs/klibc/Manifest @@ -0,0 +1,15 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +MD5 752e00ddb36492cd8a8069bb0a2f46b7 klibc-1.0.ebuild 3162 +MD5 b612d343db3c54560665171eb7db245c metadata.xml 223 +MD5 8c182fba2dd6a4c798fbf1fe6993ef73 ChangeLog 351 +MD5 d995810231e49d3aee9101cebc8a6a17 files/digest-klibc-1.0 62 +MD5 5c3c81897bd984be9f30c508fc07745b files/klibc.m4 2936 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.0 (GNU/Linux) + +iD8DBQFCL2RfqburzKaJYLYRAjOKAJ9LAwOh0vAvUgHSVjWhTjE7ZXpTbwCgmF4k +ilDRELJVjD+FaXxuNYzbBaM= +=SUnq +-----END PGP SIGNATURE----- diff --git a/dev-libs/klibc/files/digest-klibc-1.0 b/dev-libs/klibc/files/digest-klibc-1.0 new file mode 100644 index 000000000000..770a4cc89e7d --- /dev/null +++ b/dev-libs/klibc/files/digest-klibc-1.0 @@ -0,0 +1 @@ +MD5 daaa233fb7905cbe110896fcad9bec7f klibc-1.0.tar.bz2 435794 diff --git a/dev-libs/klibc/files/klibc.m4 b/dev-libs/klibc/files/klibc.m4 new file mode 100644 index 000000000000..33a659ad8752 --- /dev/null +++ b/dev-libs/klibc/files/klibc.m4 @@ -0,0 +1,75 @@ +# klibc.m4 serial 99 +## Copyright (C) 1995-2003 Free Software Foundation, Inc. +## This file is free software, distributed under the terms of the GNU +## General Public License. As a special exception to the GNU General +## Public License, this file may be distributed as part of a program +## that contains a configuration script generated by Autoconf, under +## the same distribution terms as the rest of that program. +## +## This file can can be used in projects which are not available under +## the GNU General Public License or the GNU Library General Public +## License but which still want to provide support for the GNU gettext +## functionality. +## Please note that the actual code of the GNU gettext library is covered +## by the GNU Library General Public License, and the rest of the GNU +## gettext package package is covered by the GNU General Public License. +## They are *not* in the public domain. + +# Authors: +# Martin Schlemmer <azarah@nosferatu.za.org>, 2005. + + +# AC_CHECK_KLIBC +# -------------- +# Check if the user wants KLIBC support enabled. If so, set KLIBC=yes and +# fill in KLIBC_PREFIX, KLIBC_BINDIR, KLIBC_SBINDIR, KLIBC_LIBDIR and +# KLIBC_INCLUDEDIR. CC is also set to the proper klcc executable. +# NOTE: This should be called before AC_PROG_CC, and before header, function +# or type checks. +AC_DEFUN([AC_CHECK_KLIBC], +[AC_BEFORE([$0], [AC_PROG_CC]) +AC_REQUIRE([AC_CANONICAL_HOST]) +AC_ARG_ENABLE([klibc], + [AS_HELP_STRING([--enable-klibc], + [Use this to link the tools to klibc. Set KLCC + to the absolute file name of klcc if not in + the PATH.])], + [KLIBC=yes], [KLIBC=no]) + +if test "X$KLIBC" = Xyes; then + # Basic cross compiling support. I do not think it is wise to use + # AC_CHECK_TOOL, because if we are cross compiling, we do not want + # just 'klcc' to be returned ... + if test "${host_alias}" != "${build_alias}"; then + AC_CHECK_PROGS([KLCC], [${host_alias}-klcc], [no]) + else + AC_CHECK_PROGS([KLCC], [klcc], [no]) + fi + if test "X$KLCC" = Xno; then + AC_MSG_ERROR([cannot find klibc frontend 'klcc'!]) + fi + + CC="$KLCC" + CFLAGS="-Os" + KLIBC_KCROSS="$($KLCC -print-klibc-kcross 2>/dev/null)" + KLIBC_PREFIX="$($KLCC -print-klibc-prefix 2>/dev/null)" + KLIBC_BIN_DIR="$($KLCC -print-klibc-bindir 2>/dev/null)" + KLIBC_SBIN_DIR="${KLIBC_PREFIX}/${KLIBC_KCROSS}sbin" + KLIBC_LIB_DIR="$($KLCC -print-klibc-libdir 2>/dev/null)" + KLIBC_INCLUDE_DIR="$($KLCC -print-klibc-includedir 2>/dev/null)" + + # At least KLIBC_LIB_DIR should be valid, else klibc is too old or + # something went wrong + if test ! -d "$KLIBC_LIB_DIR"; then + AC_MSG_ERROR([your klibc installation is too old or not functional!]) + fi +fi + +AC_SUBST(KLIBC) +AC_SUBST(KLIBC_PREFIX) +AC_SUBST(KLIBC_BIN_DIR) +AC_SUBST(KLIBC_SBIN_DIR) +AC_SUBST(KLIBC_LIB_DIR) +AC_SUBST(KLIBC_INCLUDE_DIR) +])# AC_CHECK_KLIBC + diff --git a/dev-libs/klibc/klibc-1.0.ebuild b/dev-libs/klibc/klibc-1.0.ebuild new file mode 100644 index 000000000000..c16a2b92e44d --- /dev/null +++ b/dev-libs/klibc/klibc-1.0.ebuild @@ -0,0 +1,117 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/klibc/klibc-1.0.ebuild,v 1.1 2005/03/09 20:59:05 azarah Exp $ + +inherit linux-mod + +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 )" +KEYWORDS="~x86" +IUSE="" +RESTRICT="nostrip" + +DEPEND="virtual/linux-sources" + +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 +} + + +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 + + # Make sure kernel sources are ok + check_kernel_built + + kernel_arch=$(readlink "${KV_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} + ln -snf ${KV_DIR} linux +} + +src_compile() { + if is_cross ; then + einfo "ARCH = \"$(guess_arch)\"" + einfo "CROSS = \"${CTARGET}-\"" + emake ARCH=$(guess_arch) \ + CROSS="${CTARGET}-" || die "Compile failed!" + else + env -u ARCH \ + emake || die "Compile failed!" + fi +} + +src_install() { + if is_cross ; then + make INSTALLROOT=${D} \ + ARCH=$(guess_arch) \ + CROSS="${CTARGET}-" \ + install || die "Install failed!" + else + env -u ARCH \ + make INSTALLROOT=${D} install || die "Install failed!" + + insinto /usr/share/aclocal + doins ${FILESDIR}/klibc.m4 + + dodoc ${S}/README ${S}/klibc/{LICENSE,CAVEATS} + newdoc ${S}/klibc/README README.klibc + newdoc ${S}/klibc/arch/README README.klibc.arch + docinto ash; newdoc ${S}/ash/README.klibc README + docinto gzip; dodoc ${S}/gzip/{COPYING,README} + docinto ipconfig; dodoc ${S}/ipconfig/README + docinto kinit; dodoc ${S}/kinit/README + fi +} diff --git a/dev-libs/klibc/metadata.xml b/dev-libs/klibc/metadata.xml new file mode 100644 index 000000000000..7fdfe1013083 --- /dev/null +++ b/dev-libs/klibc/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> + +<pkgmetadata> +<herd>no-herd</herd> +<maintainer> + <email>azarah@gentoo.org</email> +</maintainer> +</pkgmetadata> |