1 |
commit: b37736d745e1ea1bf0e0bc10917dc6f84b21dbe0 |
2 |
Author: Felix Janda <felix.janda <AT> posteo <DOT> de> |
3 |
AuthorDate: Sat Sep 24 02:41:34 2016 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Sep 24 13:51:08 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b37736d7 |
7 |
|
8 |
sys-libs/musl: revbump to improve the ldconfig script |
9 |
|
10 |
Also add some more "|| die". |
11 |
|
12 |
Gentoo-Bug: https://bugs.gentoo.org/592268 |
13 |
|
14 |
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org> |
15 |
|
16 |
.../{musl-9999.ebuild => musl-1.1.15-r1.ebuild} | 33 ++++------------------ |
17 |
sys-libs/musl/musl-9999.ebuild | 33 ++++------------------ |
18 |
2 files changed, 12 insertions(+), 54 deletions(-) |
19 |
|
20 |
diff --git a/sys-libs/musl/musl-9999.ebuild b/sys-libs/musl/musl-1.1.15-r1.ebuild |
21 |
similarity index 74% |
22 |
copy from sys-libs/musl/musl-9999.ebuild |
23 |
copy to sys-libs/musl/musl-1.1.15-r1.ebuild |
24 |
index 906de18..ae82136 100644 |
25 |
--- a/sys-libs/musl/musl-9999.ebuild |
26 |
+++ b/sys-libs/musl/musl-1.1.15-r1.ebuild |
27 |
@@ -46,17 +46,6 @@ just_headers() { |
28 |
use crosscompile_opts_headers-only && is_crosscompile |
29 |
} |
30 |
|
31 |
-musl_endian() { |
32 |
- # XXX: this wont work for bi-endian, but we dont have any |
33 |
- touch "${T}"/endian.s || die |
34 |
- $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o |
35 |
- case $(file "${T}"/endian.o) in |
36 |
- *" MSB "*) echo "";; |
37 |
- *" LSB "*) echo "el";; |
38 |
- *) echo "nfc";; # We shouldn't be here |
39 |
- esac |
40 |
-} |
41 |
- |
42 |
pkg_setup() { |
43 |
if [ ${CTARGET} == ${CHOST} ] ; then |
44 |
case ${CHOST} in |
45 |
@@ -76,7 +65,7 @@ src_configure() { |
46 |
--target=${CTARGET} \ |
47 |
--prefix=${sysroot}/usr \ |
48 |
--syslibdir=${sysroot}/lib \ |
49 |
- --disable-gcc-wrapper |
50 |
+ --disable-gcc-wrapper || die |
51 |
} |
52 |
|
53 |
src_compile() { |
54 |
@@ -84,9 +73,9 @@ src_compile() { |
55 |
just_headers && return 0 |
56 |
|
57 |
emake |
58 |
- $(tc-getCC) ${CFLAGS} "${DISTDIR}"/getconf.c -o "${T}"/getconf |
59 |
- $(tc-getCC) ${CFLAGS} "${DISTDIR}"/getent.c -o "${T}"/getent |
60 |
- $(tc-getCC) ${CFLAGS} "${DISTDIR}"/iconv.c -o "${T}"/iconv |
61 |
+ $(tc-getCC) ${CFLAGS} "${DISTDIR}"/getconf.c -o "${T}"/getconf || die |
62 |
+ $(tc-getCC) ${CFLAGS} "${DISTDIR}"/getent.c -o "${T}"/getent || die |
63 |
+ $(tc-getCC) ${CFLAGS} "${DISTDIR}"/iconv.c -o "${T}"/iconv || die |
64 |
} |
65 |
|
66 |
src_install() { |
67 |
@@ -102,17 +91,7 @@ src_install() { |
68 |
dosym ${sysroot}/lib/${ldso} ${sysroot}/usr/bin/ldd |
69 |
|
70 |
if [[ ${CATEGORY} != cross-* ]] ; then |
71 |
- # TODO: We may be able to simplify this code by obtianing the arch name with |
72 |
- # /usr/lib/libc.so 2>&1 | sed -n 's/^.*(\(.*\))$/\1/;1p' |
73 |
- local target=$(tc-arch) arch |
74 |
- local endian=$(musl_endian) |
75 |
- case ${target} in |
76 |
- amd64) arch="x86_64";; |
77 |
- arm) arch="armhf";; # We only have hardfloat right now |
78 |
- mips) arch="mips${endian}";; |
79 |
- ppc) arch="powerpc";; |
80 |
- x86) arch="i386";; |
81 |
- esac |
82 |
+ local arch=$("${D}"usr/lib/libc.so 2>&1 | sed -n '1s/^musl libc (\(.*\))$/\1/p') |
83 |
cp "${FILESDIR}"/ldconfig.in "${T}" || die |
84 |
sed -e "s|@@ARCH@@|${arch}|" "${T}"/ldconfig.in > "${T}"/ldconfig || die |
85 |
into / |
86 |
@@ -131,7 +110,7 @@ pkg_postinst() { |
87 |
|
88 |
[ "${ROOT}" != "/" ] && return 0 |
89 |
|
90 |
- ldconfig |
91 |
+ ldconfig || die |
92 |
# reload init ... |
93 |
/sbin/telinit U 2>/dev/null |
94 |
} |
95 |
|
96 |
diff --git a/sys-libs/musl/musl-9999.ebuild b/sys-libs/musl/musl-9999.ebuild |
97 |
index 906de18..ae82136 100644 |
98 |
--- a/sys-libs/musl/musl-9999.ebuild |
99 |
+++ b/sys-libs/musl/musl-9999.ebuild |
100 |
@@ -46,17 +46,6 @@ just_headers() { |
101 |
use crosscompile_opts_headers-only && is_crosscompile |
102 |
} |
103 |
|
104 |
-musl_endian() { |
105 |
- # XXX: this wont work for bi-endian, but we dont have any |
106 |
- touch "${T}"/endian.s || die |
107 |
- $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o |
108 |
- case $(file "${T}"/endian.o) in |
109 |
- *" MSB "*) echo "";; |
110 |
- *" LSB "*) echo "el";; |
111 |
- *) echo "nfc";; # We shouldn't be here |
112 |
- esac |
113 |
-} |
114 |
- |
115 |
pkg_setup() { |
116 |
if [ ${CTARGET} == ${CHOST} ] ; then |
117 |
case ${CHOST} in |
118 |
@@ -76,7 +65,7 @@ src_configure() { |
119 |
--target=${CTARGET} \ |
120 |
--prefix=${sysroot}/usr \ |
121 |
--syslibdir=${sysroot}/lib \ |
122 |
- --disable-gcc-wrapper |
123 |
+ --disable-gcc-wrapper || die |
124 |
} |
125 |
|
126 |
src_compile() { |
127 |
@@ -84,9 +73,9 @@ src_compile() { |
128 |
just_headers && return 0 |
129 |
|
130 |
emake |
131 |
- $(tc-getCC) ${CFLAGS} "${DISTDIR}"/getconf.c -o "${T}"/getconf |
132 |
- $(tc-getCC) ${CFLAGS} "${DISTDIR}"/getent.c -o "${T}"/getent |
133 |
- $(tc-getCC) ${CFLAGS} "${DISTDIR}"/iconv.c -o "${T}"/iconv |
134 |
+ $(tc-getCC) ${CFLAGS} "${DISTDIR}"/getconf.c -o "${T}"/getconf || die |
135 |
+ $(tc-getCC) ${CFLAGS} "${DISTDIR}"/getent.c -o "${T}"/getent || die |
136 |
+ $(tc-getCC) ${CFLAGS} "${DISTDIR}"/iconv.c -o "${T}"/iconv || die |
137 |
} |
138 |
|
139 |
src_install() { |
140 |
@@ -102,17 +91,7 @@ src_install() { |
141 |
dosym ${sysroot}/lib/${ldso} ${sysroot}/usr/bin/ldd |
142 |
|
143 |
if [[ ${CATEGORY} != cross-* ]] ; then |
144 |
- # TODO: We may be able to simplify this code by obtianing the arch name with |
145 |
- # /usr/lib/libc.so 2>&1 | sed -n 's/^.*(\(.*\))$/\1/;1p' |
146 |
- local target=$(tc-arch) arch |
147 |
- local endian=$(musl_endian) |
148 |
- case ${target} in |
149 |
- amd64) arch="x86_64";; |
150 |
- arm) arch="armhf";; # We only have hardfloat right now |
151 |
- mips) arch="mips${endian}";; |
152 |
- ppc) arch="powerpc";; |
153 |
- x86) arch="i386";; |
154 |
- esac |
155 |
+ local arch=$("${D}"usr/lib/libc.so 2>&1 | sed -n '1s/^musl libc (\(.*\))$/\1/p') |
156 |
cp "${FILESDIR}"/ldconfig.in "${T}" || die |
157 |
sed -e "s|@@ARCH@@|${arch}|" "${T}"/ldconfig.in > "${T}"/ldconfig || die |
158 |
into / |
159 |
@@ -131,7 +110,7 @@ pkg_postinst() { |
160 |
|
161 |
[ "${ROOT}" != "/" ] && return 0 |
162 |
|
163 |
- ldconfig |
164 |
+ ldconfig || die |
165 |
# reload init ... |
166 |
/sbin/telinit U 2>/dev/null |
167 |
} |