3 |
3 |
|
4 |
4 |
EAPI=7
|
5 |
5 |
|
6 |
|
PYTHON_COMPAT=( python3_{9..10} )
|
|
6 |
# Try to keep an eye on Fedora's packaging: https://src.fedoraproject.org/rpms/coreutils
|
|
7 |
# The upstream coreutils maintainers also maintain the package in Fedora and may
|
|
8 |
# backport fixes which we want to pick up.
|
|
9 |
|
|
10 |
PYTHON_COMPAT=( python3_{9..11} )
|
|
11 |
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/coreutils.asc
|
|
12 |
inherit flag-o-matic python-any-r1 toolchain-funcs verify-sig
|
7 |
13 |
|
8 |
|
inherit flag-o-matic python-any-r1 toolchain-funcs
|
9 |
|
|
10 |
|
PATCH="${PN}-8.30-patches-01"
|
|
14 |
MY_PATCH="${PN}-9.0_p20220409-patches-01"
|
11 |
15 |
DESCRIPTION="Standard GNU utilities (chmod, cp, dd, ls, sort, tr, head, wc, who,...)"
|
12 |
16 |
HOMEPAGE="https://www.gnu.org/software/coreutils/"
|
13 |
|
SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
|
14 |
|
!vanilla? (
|
15 |
|
mirror://gentoo/${PATCH}.tar.xz
|
16 |
|
https://dev.gentoo.org/~polynomial-c/dist/${PATCH}.tar.xz
|
17 |
|
)
|
18 |
|
"
|
|
17 |
|
|
18 |
if [[ ${PV} == *_p* ]] ; then
|
|
19 |
# Note: could put this in devspace, but if it's gone, we don't want
|
|
20 |
# it in tree anyway. It's just for testing.
|
|
21 |
MY_SNAPSHOT="$(ver_cut 1-2).193-54bec"
|
|
22 |
SRC_URI="https://www.pixelbeat.org/cu/coreutils-${MY_SNAPSHOT}.tar.xz -> ${P}.tar.xz"
|
|
23 |
SRC_URI+=" verify-sig? ( https://www.pixelbeat.org/cu/coreutils-${MY_SNAPSHOT}.tar.xz.sig -> ${P}.tar.xz.sig )"
|
|
24 |
S="${WORKDIR}"/${PN}-${MY_SNAPSHOT}
|
|
25 |
else
|
|
26 |
SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
|
|
27 |
verify-sig? ( mirror://gnu/${PN}/${P}.tar.xz.sig )"
|
|
28 |
|
|
29 |
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x86-linux"
|
|
30 |
fi
|
|
31 |
|
|
32 |
SRC_URI+=" !vanilla? ( https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${MY_PATCH}.tar.xz )"
|
19 |
33 |
|
20 |
34 |
LICENSE="GPL-3+"
|
21 |
35 |
SLOT="0"
|
22 |
|
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x86-linux"
|
23 |
|
IUSE="acl caps gmp hostname kill multicall nls selinux +split-usr static test vanilla xattr"
|
|
36 |
IUSE="acl caps gmp hostname kill multicall nls +openssl selinux +split-usr static test vanilla xattr"
|
24 |
37 |
RESTRICT="!test? ( test )"
|
25 |
38 |
|
26 |
39 |
LIB_DEPEND="acl? ( sys-apps/acl[static-libs] )
|
27 |
40 |
caps? ( sys-libs/libcap )
|
28 |
41 |
gmp? ( dev-libs/gmp:=[static-libs] )
|
|
42 |
openssl? ( dev-libs/openssl:=[static-libs] )
|
29 |
43 |
xattr? ( sys-apps/attr[static-libs] )"
|
30 |
44 |
RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs]} )
|
31 |
45 |
selinux? ( sys-libs/libselinux )
|
... | ... | |
43 |
57 |
dev-util/strace
|
44 |
58 |
${PYTHON_DEPS}
|
45 |
59 |
)
|
|
60 |
verify-sig? ( sec-keys/openpgp-keys-coreutils )
|
46 |
61 |
"
|
47 |
62 |
RDEPEND+="
|
48 |
63 |
hostname? ( !sys-apps/net-tools[hostname] )
|
... | ... | |
65 |
80 |
fi
|
66 |
81 |
}
|
67 |
82 |
|
|
83 |
src_unpack() {
|
|
84 |
if use verify-sig ; then
|
|
85 |
# Needed for downloaded patch (which is unsigned, which is fine)
|
|
86 |
verify-sig_verify_detached "${DISTDIR}"/${P}.tar.xz{,.sig}
|
|
87 |
fi
|
|
88 |
|
|
89 |
default
|
|
90 |
}
|
|
91 |
|
68 |
92 |
src_prepare() {
|
69 |
93 |
local PATCHES=(
|
70 |
|
"${FILESDIR}"/coreutils-8.32-ls-restore-8.31-behavior.patch
|
|
94 |
# Upstream patches
|
|
95 |
"${FILESDIR}"/${P}-fix-rename-simple-backups.patch
|
71 |
96 |
)
|
72 |
97 |
|
73 |
98 |
if ! use vanilla ; then
|
74 |
99 |
PATCHES+=( "${WORKDIR}"/patch )
|
75 |
|
PATCHES+=( "${FILESDIR}"/${PN}-8.32-sandbox-env-test.patch )
|
76 |
100 |
fi
|
77 |
101 |
|
78 |
102 |
default
|
... | ... | |
109 |
133 |
$(use_enable acl)
|
110 |
134 |
$(use_enable multicall single-binary)
|
111 |
135 |
$(use_enable xattr)
|
112 |
|
$(use_with gmp)
|
|
136 |
$(use_with gmp libgmp)
|
|
137 |
$(use_with openssl)
|
113 |
138 |
)
|
114 |
139 |
|
|
140 |
if use gmp ; then
|
|
141 |
myconf+=( --with-libgmp-prefix="${ESYSROOT}"/usr )
|
|
142 |
fi
|
|
143 |
|
115 |
144 |
if tc-is-cross-compiler && [[ ${CHOST} == *linux* ]] ; then
|
116 |
145 |
# bug #311569
|
117 |
146 |
export fu_cv_sys_stat_statfs2_bsize=yes
|
... | ... | |
172 |
201 |
addwrite /dev/full
|
173 |
202 |
#export RUN_EXPENSIVE_TESTS="yes"
|
174 |
203 |
#export COREUTILS_GROUPS="portage wheel"
|
175 |
|
env PATH="${T}/mount-wrappers:${PATH}" \
|
176 |
|
emake -j1 -k check
|
|
204 |
env PATH="${T}/mount-wrappers:${PATH}" emake -k check VERBOSE=yes
|
177 |
205 |
}
|
178 |
206 |
|
179 |
207 |
src_install() {
|