summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2012-12-25 18:30:03 +0000
committerLuca Barbato <lu_zero@gentoo.org>2012-12-25 18:30:03 +0000
commit1c7d4274decd603e74921c8ed5ce52c6e5883d1f (patch)
tree73873e52234358a68413b52fb094d412e38bdb1b /sys-libs/musl
parentstable ppc, bug #448520, thanks peratu (diff)
downloadgentoo-2-1c7d4274decd603e74921c8ed5ce52c6e5883d1f.tar.gz
gentoo-2-1c7d4274decd603e74921c8ed5ce52c6e5883d1f.tar.bz2
gentoo-2-1c7d4274decd603e74921c8ed5ce52c6e5883d1f.zip
Initial commit
(Portage version: 2.2.0_alpha149/cvs/Linux x86_64, signed Manifest commit with key 1191738E)
Diffstat (limited to 'sys-libs/musl')
-rw-r--r--sys-libs/musl/ChangeLog10
-rw-r--r--sys-libs/musl/Manifest3
-rw-r--r--sys-libs/musl/metadata.xml8
-rw-r--r--sys-libs/musl/musl-9999.ebuild93
4 files changed, 114 insertions, 0 deletions
diff --git a/sys-libs/musl/ChangeLog b/sys-libs/musl/ChangeLog
new file mode 100644
index 000000000000..f0f3940bf8aa
--- /dev/null
+++ b/sys-libs/musl/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for sys-libs/musl
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/musl/ChangeLog,v 1.1 2012/12/25 18:30:03 lu_zero Exp $
+
+*musl-9999 (25 Dec 2012)
+
+ 25 Dec 2012; Luca Barbato <lu_zero@gentoo.org> +musl-9999.ebuild,
+ +metadata.xml:
+ Initial commit
+
diff --git a/sys-libs/musl/Manifest b/sys-libs/musl/Manifest
new file mode 100644
index 000000000000..d69e84ed7954
--- /dev/null
+++ b/sys-libs/musl/Manifest
@@ -0,0 +1,3 @@
+EBUILD musl-9999.ebuild 2021 SHA256 d1e8551a611c191ed12131d88bd126db7a088d4e4bc5b49ef74e12d95f7ce8f7 SHA512 30747ff545d2ae83c1f55025486fda7eb2903e728354a5c368ff8c25ea7151a4aed1df43c156e27d1e4601f427c44212503573b2bd49d8e004c5ec3993126fc6 WHIRLPOOL c0cca92edfbd41cff0767087009cf3e22ebe41e239ede79b1d65a42c9a44dff06b8eccada5e72f6a62675e951849e5d46c48f9f0e6f84edc98ca250e166c5a85
+MISC ChangeLog 243 SHA256 886a67952875a784d7a96fcc18a060321e70f09a55fb26d8f6d52506259fbd38 SHA512 de39bffc9182c3eec4f36a7884bd16223a0fc50fdc2b0645023bc0ffc70e6312d85f988b10bcfd2b02a2e9826d9c2e658955918c1f74c8d938e02db863e24287 WHIRLPOOL 1954d9d4ee61720d990ad5673810e41332321cd015b69e386e3f882b2a125e0d908be6488153571e2e59a02981f274e1ee7ca907f5435ea31ff380bc2ded1e63
+MISC metadata.xml 223 SHA256 d0effd32fc7c73c97f14108c4bdb0c2636af5763f7c0a987ad7ea264921a827f SHA512 0ca3a7e96a01f7dfe2b97441ee1a01b73a316cae084c6b1e0cb8c356f9fa0fe16fc33523ce321d293bbf0da9ca45c0dce922f9a49d3e59554b64a6b7f6b8af6b WHIRLPOOL 03dae507a05b599be2ee562f0ec3fce0aaf914d43a59a82a773479335589553f051423777b2c905cfc142e89f118a40f72101a80a55b000d09e23fd771a1f4f1
diff --git a/sys-libs/musl/metadata.xml b/sys-libs/musl/metadata.xml
new file mode 100644
index 000000000000..c30294285aee
--- /dev/null
+++ b/sys-libs/musl/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>toolchain</herd>
+<maintainer>
+<email>lu_zero@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-libs/musl/musl-9999.ebuild b/sys-libs/musl/musl-9999.ebuild
new file mode 100644
index 000000000000..2ed2198fd27f
--- /dev/null
+++ b/sys-libs/musl/musl-9999.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/musl/musl-9999.ebuild,v 1.1 2012/12/25 18:30:03 lu_zero Exp $
+
+EAPI=4
+
+inherit eutils flag-o-matic multilib toolchain-funcs
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://git.musl-libc.org/musl"
+ inherit git-2
+fi
+
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
+ export CTARGET=${CATEGORY/cross-}
+ fi
+fi
+
+DESCRIPTION="Lightweight, fast and simple C library focused on standards-conformance and safety"
+HOMEPAGE="http://www.musl-libc.org/"
+if [[ ${PV} != "9999" ]] ; then
+ PATCH_VER=""
+ SRC_URI="http://www.musl-libc.org/releases/${P}.tar.gz"
+ KEYWORDS="-* ~amd64 ~arm"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="crosscompile_opts_headers-only"
+
+S=${WORKDIR}/${MY_P}
+
+is_crosscompile() {
+ [[ ${CHOST} != ${CTARGET} ]]
+}
+
+just_headers() {
+ use crosscompile_opts_headers-only && is_crosscompile
+}
+
+pkg_setup() {
+ if [ ${CTARGET} == ${CHOST} ] ; then
+ case ${CHOST} in
+ *-musl*) ;;
+ *) die "Use sys-devel/crossdev to build a uclibc toolchain" ;;
+ esac
+ fi
+}
+
+src_configure() {
+ tc-export CC
+ local myconf="--disable-gcc-wrapper"
+
+ ./configure \
+ --target="${CTARGET}" \
+ --prefix="/usr" \
+ --disable-gcc-wrapper
+}
+
+src_compile() {
+ emake include/bits/alltypes.h || die
+ just_headers && return 0
+
+ emake || die
+}
+
+src_install() {
+ local sysroot=${D}
+ is_crosscompile && sysroot+="/usr/${CTARGET}"
+
+ local target="install"
+ just_headers && target="install-headers"
+ emake DESTDIR="${sysroot}" ${target} || die
+
+ # Make sure we install the sys-include symlink so that when
+ # we build a 2nd stage cross-compiler, gcc finds the target
+ # system headers correctly. See gcc/doc/gccinstall.info
+ if is_crosscompile ; then
+ dosym usr/include /usr/${CTARGET}/sys-include
+ fi
+}
+
+pkg_postinst() {
+ is_crosscompile && return 0
+
+ [ "${ROOT}" != "/" ] && return 0
+ # update cache before reloading init
+ ldconfig
+ # reload init ...
+ /sbin/telinit U 2>/dev/null
+}