Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/musl/
Date: Mon, 01 Jan 2018 09:59:55
Message-Id: 1514800773.f8952fa97a5120a8d02b4e565e5a48d6f314e534.blueness@gentoo
1 commit: f8952fa97a5120a8d02b4e565e5a48d6f314e534
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 1 09:56:45 2018 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 1 09:59:33 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8952fa9
7
8 Revert "sys-libs/musl: prefixify build"
9
10 This reverts commit 0fcf2e327095c1329a4044950cadfda036db8245.
11
12 More testing is required before we commit to this.
13
14 sys-libs/musl/musl-1.1.18-r1.ebuild | 118 ------------------------------------
15 sys-libs/musl/musl-9999.ebuild | 4 +-
16 2 files changed, 2 insertions(+), 120 deletions(-)
17
18 diff --git a/sys-libs/musl/musl-1.1.18-r1.ebuild b/sys-libs/musl/musl-1.1.18-r1.ebuild
19 deleted file mode 100644
20 index c4a1c90aaf5..00000000000
21 --- a/sys-libs/musl/musl-1.1.18-r1.ebuild
22 +++ /dev/null
23 @@ -1,118 +0,0 @@
24 -# Copyright 1999-2017 Gentoo Foundation
25 -# Distributed under the terms of the GNU General Public License v2
26 -
27 -EAPI=6
28 -
29 -inherit eutils flag-o-matic multilib toolchain-funcs
30 -if [[ ${PV} == "9999" ]] ; then
31 - EGIT_REPO_URI="git://git.musl-libc.org/musl"
32 - inherit git-r3
33 - SRC_URI="
34 - https://dev.gentoo.org/~blueness/musl-misc/getconf.c
35 - https://dev.gentoo.org/~blueness/musl-misc/getent.c
36 - https://dev.gentoo.org/~blueness/musl-misc/iconv.c"
37 - KEYWORDS=""
38 -else
39 - SRC_URI="http://www.musl-libc.org/releases/${P}.tar.gz
40 - https://dev.gentoo.org/~blueness/musl-misc/getconf.c
41 - https://dev.gentoo.org/~blueness/musl-misc/getent.c
42 - https://dev.gentoo.org/~blueness/musl-misc/iconv.c"
43 - KEYWORDS="-* ~amd64 ~arm ~mips ~ppc ~x86"
44 -fi
45 -
46 -export CBUILD=${CBUILD:-${CHOST}}
47 -export CTARGET=${CTARGET:-${CHOST}}
48 -if [[ ${CTARGET} == ${CHOST} ]] ; then
49 - if [[ ${CATEGORY} == cross-* ]] ; then
50 - export CTARGET=${CATEGORY#cross-}
51 - fi
52 -fi
53 -
54 -DESCRIPTION="Light, fast and simple C library focused on standards-conformance and safety"
55 -HOMEPAGE="http://www.musl-libc.org/"
56 -LICENSE="MIT LGPL-2 GPL-2"
57 -SLOT="0"
58 -IUSE="crosscompile_opts_headers-only"
59 -
60 -QA_SONAME="/usr/lib/libc.so"
61 -QA_DT_NEEDED="/usr/lib/libc.so"
62 -
63 -is_crosscompile() {
64 - [[ ${CHOST} != ${CTARGET} ]]
65 -}
66 -
67 -just_headers() {
68 - use crosscompile_opts_headers-only && is_crosscompile
69 -}
70 -
71 -pkg_setup() {
72 - if [ ${CTARGET} == ${CHOST} ] ; then
73 - case ${CHOST} in
74 - *-musl*) ;;
75 - *) die "Use sys-devel/crossdev to build a musl toolchain" ;;
76 - esac
77 - fi
78 -}
79 -
80 -src_configure() {
81 - tc-getCC ${CTARGET}
82 - just_headers && export CC=true
83 -
84 - local sysroot
85 - is_crosscompile && sysroot="${EPREFIX}"/usr/${CTARGET}
86 - ./configure \
87 - --target=${CTARGET} \
88 - --prefix=${sysroot}/usr \
89 - --syslibdir=${sysroot}/lib \
90 - --disable-gcc-wrapper || die
91 -}
92 -
93 -src_compile() {
94 - emake obj/include/bits/alltypes.h
95 - just_headers && return 0
96 -
97 - emake
98 - if [[ ${CATEGORY} != cross-* ]] ; then
99 - $(tc-getCC) ${CFLAGS} "${DISTDIR}"/getconf.c -o "${T}"/getconf || die
100 - $(tc-getCC) ${CFLAGS} "${DISTDIR}"/getent.c -o "${T}"/getent || die
101 - $(tc-getCC) ${CFLAGS} "${DISTDIR}"/iconv.c -o "${T}"/iconv || die
102 - fi
103 -}
104 -
105 -src_install() {
106 - local target="install"
107 - just_headers && target="install-headers"
108 - emake DESTDIR="${D}" ${target}
109 - just_headers && return 0
110 -
111 - # musl provides ldd via a sym link to its ld.so
112 - local sysroot
113 - is_crosscompile && sysroot=/usr/${CTARGET}
114 - local ldso=$(basename "${ED}"${sysroot}/lib/ld-musl-*)
115 - dosym ${sysroot}/lib/${ldso} ${sysroot}/usr/bin/ldd
116 -
117 - if [[ ${CATEGORY} != cross-* ]] ; then
118 - local arch=$("${D}"usr/lib/libc.so 2>&1 | sed -n '1s/^musl libc (\(.*\))$/\1/p')
119 - [[ -e "${D}"/lib/ld-musl-${arch}.so.1 ]] || die
120 - cp "${FILESDIR}"/ldconfig.in "${T}" || die
121 - sed -e "s|@@ARCH@@|${arch}|" "${T}"/ldconfig.in > "${T}"/ldconfig || die
122 - into /
123 - dosbin "${T}"/ldconfig
124 - into /usr
125 - dobin "${T}"/getconf
126 - dobin "${T}"/getent
127 - dobin "${T}"/iconv
128 - echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00musl || die
129 - doenvd "${T}"/00musl || die
130 - fi
131 -}
132 -
133 -pkg_postinst() {
134 - is_crosscompile && return 0
135 -
136 - [ "${ROOT}" != "/" ] && return 0
137 -
138 - ldconfig || die
139 - # reload init ...
140 - /sbin/telinit U 2>/dev/null
141 -}
142
143 diff --git a/sys-libs/musl/musl-9999.ebuild b/sys-libs/musl/musl-9999.ebuild
144 index c4a1c90aaf5..9e0e184d656 100644
145 --- a/sys-libs/musl/musl-9999.ebuild
146 +++ b/sys-libs/musl/musl-9999.ebuild
147 @@ -59,7 +59,7 @@ src_configure() {
148 just_headers && export CC=true
149
150 local sysroot
151 - is_crosscompile && sysroot="${EPREFIX}"/usr/${CTARGET}
152 + is_crosscompile && sysroot=/usr/${CTARGET}
153 ./configure \
154 --target=${CTARGET} \
155 --prefix=${sysroot}/usr \
156 @@ -88,7 +88,7 @@ src_install() {
157 # musl provides ldd via a sym link to its ld.so
158 local sysroot
159 is_crosscompile && sysroot=/usr/${CTARGET}
160 - local ldso=$(basename "${ED}"${sysroot}/lib/ld-musl-*)
161 + local ldso=$(basename "${D}"${sysroot}/lib/ld-musl-*)
162 dosym ${sysroot}/lib/${ldso} ${sysroot}/usr/bin/ldd
163
164 if [[ ${CATEGORY} != cross-* ]] ; then