Сравнение musl-1.2.3-r8 с musl-1.2.4

/usr/portage/sys-libs/musl/musl-1.2.4.ebuild 2023-10-09 14:52:35.560368503 +0300
1 1
# Copyright 1999-2023 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=7
4
EAPI=8
5 5

  
6
inherit eapi8-dosym flag-o-matic toolchain-funcs prefix
6
inherit crossdev flag-o-matic toolchain-funcs prefix
7 7
if [[ ${PV} == "9999" ]] ; then
8 8
	EGIT_REPO_URI="git://git.musl-libc.org/musl"
9 9
	inherit git-r3
......
13 13

  
14 14
	SRC_URI="https://musl.libc.org/releases/${P}.tar.gz"
15 15
	SRC_URI+=" verify-sig? ( https://musl.libc.org/releases/${P}.tar.gz.asc )"
16
	KEYWORDS="-* ~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~riscv ~x86"
16
	KEYWORDS="-* ~amd64 ~arm ~arm64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~x86"
17 17

  
18 18
	BDEPEND="verify-sig? ( sec-keys/openpgp-keys-musl )"
19 19
fi
......
25 25
	https://dev.gentoo.org/~blueness/musl-misc/iconv.c
26 26
"
27 27

  
28
export CBUILD=${CBUILD:-${CHOST}}
29
export CTARGET=${CTARGET:-${CHOST}}
30
if [[ ${CTARGET} == ${CHOST} ]] ; then
31
	if [[ ${CATEGORY} == cross-* ]] ; then
32
		export CTARGET=${CATEGORY#cross-}
33
	fi
34
fi
35

  
36 28
DESCRIPTION="Light, fast and simple C library focused on standards-conformance and safety"
37 29
HOMEPAGE="https://musl.libc.org"
38 30

  
......
49 41
# built as part as crossdev. Also, elide the blockers when in cross-*,
50 42
# as it doesn't make sense to block the normal CBUILD libxcrypt at all
51 43
# there when we're installing into /usr/${CHOST} anyway.
52
if [[ ${CATEGORY} == cross-* ]] ; then
44
if is_crosspkg ; then
53 45
	IUSE="${IUSE/crypt/+crypt}"
54 46
else
55 47
	RDEPEND="crypt? ( !sys-libs/libxcrypt[system] )"
56 48
	PDEPEND="!crypt? ( sys-libs/libxcrypt[system] )"
57 49
fi
58 50

  
59
is_crosscompile() {
60
	[[ ${CHOST} != ${CTARGET} ]]
61
}
62

  
63 51
just_headers() {
64
	use headers-only && is_crosscompile
52
	use headers-only && target_is_not_host
65 53
}
66 54

  
67 55
pkg_setup() {
......
74 62

  
75 63
	# fix for #667126, copied from glibc ebuild
76 64
	# make sure host make.conf doesn't pollute us
77
	if is_crosscompile || tc-is-cross-compiler ; then
65
	if target_is_not_host || tc-is-cross-compiler ; then
78 66
		CHOST=${CTARGET} strip-unsupported-flags
79 67
	fi
80 68
}
......
86 74
		# We only verify the release; not the additional (fixed, safe) files
87 75
		# we download.
88 76
		# (Seem to get IPC error on verifying in cross?)
89
		! is_crosscompile && verify-sig_verify_detached "${DISTDIR}"/${P}.tar.gz{,.asc}
77
		! target_is_not_host && verify-sig_verify_detached "${DISTDIR}"/${P}.tar.gz{,.asc}
90 78
	fi
91 79

  
92 80
	default
......
108 96
	just_headers && export CC=true
109 97

  
110 98
	local sysroot
111
	is_crosscompile && sysroot=/usr/${CTARGET}
99
	target_is_not_host && sysroot=/usr/${CTARGET}
112 100
	./configure \
113 101
		--target=${CTARGET} \
114 102
		--prefix="${EPREFIX}${sysroot}/usr" \
......
121 109
	just_headers && return 0
122 110

  
123 111
	emake
124
	if [[ ${CATEGORY} != cross-* ]] ; then
112
	if ! is_crosspkg ; then
125 113
		emake -C "${T}" getconf getent iconv \
126 114
			CC="$(tc-getCC)" \
127 115
			CFLAGS="${CFLAGS}" \
......
142 130

  
143 131
	# musl provides ldd via a sym link to its ld.so
144 132
	local sysroot=
145
	is_crosscompile && sysroot=/usr/${CTARGET}
133
	target_is_not_host && sysroot=/usr/${CTARGET}
146 134
	local ldso=$(basename "${ED}${sysroot}"/lib/ld-musl-*)
147
	dosym8 -r "${sysroot}/lib/${ldso}" "${sysroot}/usr/bin/ldd"
135
	dosym -r "${sysroot}/lib/${ldso}" "${sysroot}/usr/bin/ldd"
148 136

  
149 137
	if ! use crypt ; then
150 138
		# Allow sys-libs/libxcrypt[system] to provide it instead
......
152 140
		rm "${ED}/usr/$(get_libdir)/libcrypt.a" || die
153 141
	fi
154 142

  
155
	if [[ ${CATEGORY} != cross-* ]] ; then
143
	if ! is_crosspkg ; then
156 144
		# Fish out of config:
157 145
		#   ARCH = ...
158 146
		#   SUBARCH = ...
......
187 175
		doenvd "${T}"/00musl
188 176
	fi
189 177

  
190
	if is_crosscompile ; then
178
	if target_is_not_host ; then
191 179
		into /usr/${CTARGET}
192 180
		dolib.a libssp_nonshared.a
193 181
	else
......
204 192
}
205 193

  
206 194
pkg_postinst() {
207
	is_crosscompile && return 0
195
	target_is_not_host && return 0
208 196

  
209 197
	[ -n "${ROOT}" ] && return 0
210 198

  
Спасибо!