1 |
commit: ab96738da00b829e409c2e857fc27114c5d6c303 |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Aug 30 14:41:04 2015 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Aug 30 14:41:35 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab96738d |
7 |
|
8 |
sys-libs/musl: version bump to 1.1.11 |
9 |
|
10 |
Package-Manager: portage-2.2.20.1 |
11 |
|
12 |
sys-libs/musl/Manifest | 1 + |
13 |
sys-libs/musl/musl-1.1.11.ebuild | 128 +++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 129 insertions(+) |
15 |
|
16 |
diff --git a/sys-libs/musl/Manifest b/sys-libs/musl/Manifest |
17 |
index 4a3c825..1b08e70 100644 |
18 |
--- a/sys-libs/musl/Manifest |
19 |
+++ b/sys-libs/musl/Manifest |
20 |
@@ -1 +1,2 @@ |
21 |
DIST musl-1.1.10.tar.gz 907181 SHA256 45bbe9b1c7f7a0f743477af1e103b6889bfe4dd9815e16f6c89f6c90831c8b7c SHA512 183a66a8cc9cd056a8387a1602dd44b502d8976642a21dd0dcef51165fa0dec8a4a124fda6c1918f402b20ad2d6037fcc188a8b174b07a0cbedf11fc2e011141 WHIRLPOOL b69737c22a77da0ff59886d8233b9b1d43228e75bfdf857a5a74ab26f4699564c5b54390bcf171a4f4d9c8fc211f4c6e9c6d4dd6802cc01a5dfe5369bbdd8158 |
22 |
+DIST musl-1.1.11.tar.gz 915244 SHA256 bb9e6da51b7b12641f5d1abb39705c6c6c1b2fbd20002362948aa736a0aa353f SHA512 573131fe7a2c5a9c9bf796a5fc02e6ec093148648b9b43dc13d9c85e5777b1691499af6f673075a0d2b4b36c788b4dd7d72eb450c6ec3a586901bd410ee1ea6d WHIRLPOOL 17d5299b7554124ec49c2309f9385313cffe0f2126812bbcce87a142b2138153b5634579a33554edba6b76aab87f96ef2bb5dc0773cc9b930356b7da6e0b61fb |
23 |
|
24 |
diff --git a/sys-libs/musl/musl-1.1.11.ebuild b/sys-libs/musl/musl-1.1.11.ebuild |
25 |
new file mode 100644 |
26 |
index 0000000..f7c9ef0 |
27 |
--- /dev/null |
28 |
+++ b/sys-libs/musl/musl-1.1.11.ebuild |
29 |
@@ -0,0 +1,128 @@ |
30 |
+# Copyright 1999-2015 Gentoo Foundation |
31 |
+# Distributed under the terms of the GNU General Public License v2 |
32 |
+# $Id$ |
33 |
+ |
34 |
+EAPI=5 |
35 |
+ |
36 |
+inherit eutils flag-o-matic multilib toolchain-funcs |
37 |
+if [[ ${PV} == "9999" ]] ; then |
38 |
+ EGIT_REPO_URI="git://git.musl-libc.org/musl" |
39 |
+ inherit git-2 |
40 |
+fi |
41 |
+ |
42 |
+export CBUILD=${CBUILD:-${CHOST}} |
43 |
+export CTARGET=${CTARGET:-${CHOST}} |
44 |
+if [[ ${CTARGET} == ${CHOST} ]] ; then |
45 |
+ if [[ ${CATEGORY} == cross-* ]] ; then |
46 |
+ export CTARGET=${CATEGORY#cross-} |
47 |
+ fi |
48 |
+fi |
49 |
+ |
50 |
+DESCRIPTION="Lightweight, fast and simple C library focused on standards-conformance and safety" |
51 |
+HOMEPAGE="http://www.musl-libc.org/" |
52 |
+if [[ ${PV} != "9999" ]] ; then |
53 |
+ PATCH_VER="" |
54 |
+ SRC_URI="http://www.musl-libc.org/releases/${P}.tar.gz" |
55 |
+ KEYWORDS="-* ~amd64 ~arm ~mips ~ppc ~x86" |
56 |
+fi |
57 |
+ |
58 |
+LICENSE="MIT LGPL-2 GPL-2" |
59 |
+SLOT="0" |
60 |
+IUSE="crosscompile_opts_headers-only" |
61 |
+ |
62 |
+RDEPEND="!sys-apps/getent" |
63 |
+ |
64 |
+is_crosscompile() { |
65 |
+ [[ ${CHOST} != ${CTARGET} ]] |
66 |
+} |
67 |
+ |
68 |
+just_headers() { |
69 |
+ use crosscompile_opts_headers-only && is_crosscompile |
70 |
+} |
71 |
+ |
72 |
+musl_endian() { |
73 |
+ # XXX: this wont work for bi-endian, but we dont have any |
74 |
+ touch "${T}"/endian.s |
75 |
+ $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o |
76 |
+ case $(file "${T}"/endian.o) in |
77 |
+ *" MSB "*) echo "";; |
78 |
+ *" LSB "*) echo "el";; |
79 |
+ *) echo "nfc";; # We shouldn't be here |
80 |
+ esac |
81 |
+} |
82 |
+ |
83 |
+pkg_setup() { |
84 |
+ if [ ${CTARGET} == ${CHOST} ] ; then |
85 |
+ case ${CHOST} in |
86 |
+ *-musl*) ;; |
87 |
+ *) die "Use sys-devel/crossdev to build a musl toolchain" ;; |
88 |
+ esac |
89 |
+ fi |
90 |
+} |
91 |
+ |
92 |
+src_prepare() { |
93 |
+ epatch_user |
94 |
+} |
95 |
+ |
96 |
+src_configure() { |
97 |
+ tc-getCC ${CTARGET} |
98 |
+ just_headers && export CC=true |
99 |
+ |
100 |
+ local sysroot |
101 |
+ is_crosscompile && sysroot=/usr/${CTARGET} |
102 |
+ ./configure \ |
103 |
+ --target=${CTARGET} \ |
104 |
+ --prefix=${sysroot}/usr \ |
105 |
+ --syslibdir=${sysroot}/lib \ |
106 |
+ --disable-gcc-wrapper |
107 |
+} |
108 |
+ |
109 |
+src_compile() { |
110 |
+ emake include/bits/alltypes.h || die |
111 |
+ just_headers && return 0 |
112 |
+ |
113 |
+ emake || die |
114 |
+} |
115 |
+ |
116 |
+src_install() { |
117 |
+ local target="install" |
118 |
+ just_headers && target="install-headers" |
119 |
+ emake DESTDIR="${D}" ${target} || die |
120 |
+ just_headers && return 0 |
121 |
+ |
122 |
+ # musl provides ldd via a sym link to its ld.so |
123 |
+ local sysroot |
124 |
+ is_crosscompile && sysroot=/usr/${CTARGET} |
125 |
+ local ldso=$(basename "${D}"${sysroot}/lib/ld-musl-*) |
126 |
+ dosym ${sysroot}/lib/${ldso} ${sysroot}/usr/bin/ldd |
127 |
+ |
128 |
+ if [[ ${CATEGORY} != cross-* ]] ; then |
129 |
+ local target=$(tc-arch) arch |
130 |
+ local endian=$(musl_endian) |
131 |
+ case ${target} in |
132 |
+ amd64) arch="x86_64";; |
133 |
+ arm) arch="armhf";; # We only have hardfloat right now |
134 |
+ mips) arch="mips${endian}";; |
135 |
+ ppc) arch="powerpc";; |
136 |
+ x86) arch="i386";; |
137 |
+ esac |
138 |
+ cp "${FILESDIR}"/ldconfig.in "${T}" |
139 |
+ sed -e "s|@@ARCH@@|${arch}|" "${T}"/ldconfig.in > "${T}"/ldconfig |
140 |
+ into / |
141 |
+ dosbin "${T}"/ldconfig |
142 |
+ into /usr |
143 |
+ dobin "${FILESDIR}"/getent |
144 |
+ echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00musl |
145 |
+ doenvd "${T}"/00musl || die |
146 |
+ fi |
147 |
+} |
148 |
+ |
149 |
+pkg_postinst() { |
150 |
+ is_crosscompile && return 0 |
151 |
+ |
152 |
+ [ "${ROOT}" != "/" ] && return 0 |
153 |
+ |
154 |
+ ldconfig |
155 |
+ # reload init ... |
156 |
+ /sbin/telinit U 2>/dev/null |
157 |
+} |