1 |
commit: 301007ece2dfacc07e6802abe32cc2a3388c8341 |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Feb 22 08:59:57 2016 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 22 08:59:57 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=301007ec |
7 |
|
8 |
sys-libs/musl: version bump to 1.1.14 |
9 |
|
10 |
Package-Manager: portage-2.2.26 |
11 |
|
12 |
sys-libs/musl/Manifest | 1 + |
13 |
sys-libs/musl/musl-1.1.14.ebuild | 131 +++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 132 insertions(+) |
15 |
|
16 |
diff --git a/sys-libs/musl/Manifest b/sys-libs/musl/Manifest |
17 |
index a4d3803..ffea79c 100644 |
18 |
--- a/sys-libs/musl/Manifest |
19 |
+++ b/sys-libs/musl/Manifest |
20 |
@@ -1 +1,2 @@ |
21 |
DIST musl-1.1.12.tar.gz 918757 SHA256 720b83c7e276b4b679c0bffe9509340d5f81fd601508e607e708177df0d31c0e SHA512 7cabbe2665e32bd3408c8865f89f474106e982b4e5de81d0cdeea19e19e20b4d2496faf1adc6b2811d996f30f39258184ba347e8eb5f3811eab89179e8f52d70 WHIRLPOOL cd500c3457be42d8dd927420d2352bda87e7b424fabf19fbd387858b913636793a7ff8d0e249bcc292e58c6d0d3889738c8790f3a6409d6df2da81408a77238c |
22 |
+DIST musl-1.1.14.tar.gz 894971 SHA256 35f6c00c84a6091bd5dab29eedde7508dae755ead92dcc0239f3677d1055b9b5 SHA512 9016246b44a7e6ef51477f0a246373c79f3e796c70031c3323be1b6c4c0518a2d4578f1aa712adfd9a80cdc1d71918bd7a35855052a0452b854755bf0cc2424e WHIRLPOOL e675ed13888021376812c65addf245906bfca00c5291ca5979cb4894cbe72b3a1b69c0fd793bd49f9cef2154131f717b15b52398b43c68fcfb7c5530b1258e72 |
23 |
|
24 |
diff --git a/sys-libs/musl/musl-1.1.14.ebuild b/sys-libs/musl/musl-1.1.14.ebuild |
25 |
new file mode 100644 |
26 |
index 0000000..85bdc9b |
27 |
--- /dev/null |
28 |
+++ b/sys-libs/musl/musl-1.1.14.ebuild |
29 |
@@ -0,0 +1,131 @@ |
30 |
+# Copyright 1999-2016 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-r3 |
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="Light, 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 |
+QA_SONAME="/usr/lib/libc.so" |
65 |
+QA_DT_NEEDED="/usr/lib/libc.so" |
66 |
+ |
67 |
+is_crosscompile() { |
68 |
+ [[ ${CHOST} != ${CTARGET} ]] |
69 |
+} |
70 |
+ |
71 |
+just_headers() { |
72 |
+ use crosscompile_opts_headers-only && is_crosscompile |
73 |
+} |
74 |
+ |
75 |
+musl_endian() { |
76 |
+ # XXX: this wont work for bi-endian, but we dont have any |
77 |
+ touch "${T}"/endian.s || die |
78 |
+ $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o |
79 |
+ case $(file "${T}"/endian.o) in |
80 |
+ *" MSB "*) echo "";; |
81 |
+ *" LSB "*) echo "el";; |
82 |
+ *) echo "nfc";; # We shouldn't be here |
83 |
+ esac |
84 |
+} |
85 |
+ |
86 |
+pkg_setup() { |
87 |
+ if [ ${CTARGET} == ${CHOST} ] ; then |
88 |
+ case ${CHOST} in |
89 |
+ *-musl*) ;; |
90 |
+ *) die "Use sys-devel/crossdev to build a musl toolchain" ;; |
91 |
+ esac |
92 |
+ fi |
93 |
+} |
94 |
+ |
95 |
+src_prepare() { |
96 |
+ epatch_user |
97 |
+} |
98 |
+ |
99 |
+src_configure() { |
100 |
+ tc-getCC ${CTARGET} |
101 |
+ just_headers && export CC=true |
102 |
+ |
103 |
+ local sysroot |
104 |
+ is_crosscompile && sysroot=/usr/${CTARGET} |
105 |
+ ./configure \ |
106 |
+ --target=${CTARGET} \ |
107 |
+ --prefix=${sysroot}/usr \ |
108 |
+ --syslibdir=${sysroot}/lib \ |
109 |
+ --disable-gcc-wrapper |
110 |
+} |
111 |
+ |
112 |
+src_compile() { |
113 |
+ emake obj/include/bits/alltypes.h |
114 |
+ just_headers && return 0 |
115 |
+ |
116 |
+ emake |
117 |
+} |
118 |
+ |
119 |
+src_install() { |
120 |
+ local target="install" |
121 |
+ just_headers && target="install-headers" |
122 |
+ emake DESTDIR="${D}" ${target} |
123 |
+ just_headers && return 0 |
124 |
+ |
125 |
+ # musl provides ldd via a sym link to its ld.so |
126 |
+ local sysroot |
127 |
+ is_crosscompile && sysroot=/usr/${CTARGET} |
128 |
+ local ldso=$(basename "${D}"${sysroot}/lib/ld-musl-*) |
129 |
+ dosym ${sysroot}/lib/${ldso} ${sysroot}/usr/bin/ldd |
130 |
+ |
131 |
+ if [[ ${CATEGORY} != cross-* ]] ; then |
132 |
+ local target=$(tc-arch) arch |
133 |
+ local endian=$(musl_endian) |
134 |
+ case ${target} in |
135 |
+ amd64) arch="x86_64";; |
136 |
+ arm) arch="armhf";; # We only have hardfloat right now |
137 |
+ mips) arch="mips${endian}";; |
138 |
+ ppc) arch="powerpc";; |
139 |
+ x86) arch="i386";; |
140 |
+ esac |
141 |
+ cp "${FILESDIR}"/ldconfig.in "${T}" || die |
142 |
+ sed -e "s|@@ARCH@@|${arch}|" "${T}"/ldconfig.in > "${T}"/ldconfig || die |
143 |
+ into / |
144 |
+ dosbin "${T}"/ldconfig |
145 |
+ into /usr |
146 |
+ dobin "${FILESDIR}"/getent |
147 |
+ echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00musl || die |
148 |
+ doenvd "${T}"/00musl || die |
149 |
+ fi |
150 |
+} |
151 |
+ |
152 |
+pkg_postinst() { |
153 |
+ is_crosscompile && return 0 |
154 |
+ |
155 |
+ [ "${ROOT}" != "/" ] && return 0 |
156 |
+ |
157 |
+ ldconfig |
158 |
+ # reload init ... |
159 |
+ /sbin/telinit U 2>/dev/null |
160 |
+} |