Diff coreutils-9.1-r2 with a coreutils-9.3-r2

/usr/portage/sys-apps/coreutils/coreutils-9.3-r2.ebuild 2023-10-09 14:52:35.348368498 +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 6
# Try to keep an eye on Fedora's packaging: https://src.fedoraproject.org/rpms/coreutils
7 7
# The upstream coreutils maintainers also maintain the package in Fedora and may
8 8
# backport fixes which we want to pick up.
9
#
10
# Also recommend subscribing to the coreutils and bug-coreutils MLs.
9 11

  
10 12
PYTHON_COMPAT=( python3_{9..11} )
11 13
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/coreutils.asc
......
15 17
DESCRIPTION="Standard GNU utilities (chmod, cp, dd, ls, sort, tr, head, wc, who,...)"
16 18
HOMEPAGE="https://www.gnu.org/software/coreutils/"
17 19

  
18
if [[ ${PV} == *_p* ]] ; then
20
if [[ ${PV} == 9999 ]] ; then
21
	EGIT_REPO_URI="https://git.savannah.gnu.org/git/coreutils.git"
22
	inherit git-r3
23
elif [[ ${PV} == *_p* ]] ; then
19 24
	# Note: could put this in devspace, but if it's gone, we don't want
20 25
	# it in tree anyway. It's just for testing.
21
	MY_SNAPSHOT="$(ver_cut 1-2).193-54bec"
26
	MY_SNAPSHOT="$(ver_cut 1-2).18-ffd62"
22 27
	SRC_URI="https://www.pixelbeat.org/cu/coreutils-${MY_SNAPSHOT}.tar.xz -> ${P}.tar.xz"
23 28
	SRC_URI+=" verify-sig? ( https://www.pixelbeat.org/cu/coreutils-${MY_SNAPSHOT}.tar.xz.sig -> ${P}.tar.xz.sig )"
24 29
	S="${WORKDIR}"/${PN}-${MY_SNAPSHOT}
25 30
else
26
	SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
27
		verify-sig? ( mirror://gnu/${PN}/${P}.tar.xz.sig )"
31
	SRC_URI="
32
		mirror://gnu/${PN}/${P}.tar.xz
33
		verify-sig? ( mirror://gnu/${PN}/${P}.tar.xz.sig )
34
	"
28 35

  
29 36
	KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x86-linux"
30 37
fi
......
36 43
IUSE="acl caps gmp hostname kill multicall nls +openssl selinux +split-usr static test vanilla xattr"
37 44
RESTRICT="!test? ( test )"
38 45

  
39
LIB_DEPEND="acl? ( sys-apps/acl[static-libs] )
46
LIB_DEPEND="
47
	acl? ( sys-apps/acl[static-libs] )
40 48
	caps? ( sys-libs/libcap )
41 49
	gmp? ( dev-libs/gmp:=[static-libs] )
42 50
	openssl? ( dev-libs/openssl:=[static-libs] )
43
	xattr? ( sys-apps/attr[static-libs] )"
44
RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs]} )
51
	xattr? ( sys-apps/attr[static-libs] )
52
"
53
RDEPEND="
54
	!static? ( ${LIB_DEPEND//\[static-libs]} )
45 55
	selinux? ( sys-libs/libselinux )
46
	nls? ( virtual/libintl )"
56
	nls? ( virtual/libintl )
57
"
47 58
DEPEND="
48 59
	${RDEPEND}
49 60
	static? ( ${LIB_DEPEND} )
......
81 92
}
82 93

  
83 94
src_unpack() {
84
	if use verify-sig ; then
95
	if [[ ${PV} == 9999 ]] ; then
96
		git-r3_src_unpack
97

  
98
		cd "${S}" || die
99
		./bootstrap || die
100

  
101
		sed -i -e "s:submodule-checks ?= no-submodule-changes public-submodule-commit:submodule-checks ?= no-submodule-changes:" gnulib/top/maint.mk || die
102
	elif use verify-sig ; then
85 103
		# Needed for downloaded patch (which is unsigned, which is fine)
86 104
		verify-sig_verify_detached "${DISTDIR}"/${P}.tar.xz{,.sig}
87 105
	fi
......
92 110
src_prepare() {
93 111
	local PATCHES=(
94 112
		# Upstream patches
95
		"${FILESDIR}"/${P}-fix-rename-simple-backups.patch
113
		"${FILESDIR}"/${P}-cp-parents-preserve-permissions.patch
114
		"${FILESDIR}"/${P}-old-kernel-copy_file_range.patch
96 115
	)
97 116

  
98
	if ! use vanilla ; then
117
	if ! use vanilla && [[ -d "${WORKDIR}"/patch ]] ; then
99 118
		PATCHES+=( "${WORKDIR}"/patch )
100 119
	fi
101 120

  
102 121
	default
103 122

  
123
	# Just for ${P}-old-kernel-copy_file_range.patch
124
	touch aclocal.m4 configure.ac Makefile.in gnulib-tests/Makefile.in configure || die
125

  
104 126
	# Since we've patched many .c files, the make process will try to
105 127
	# re-build the manpages by running `./bin --help`.  When doing a
106 128
	# cross-compile, we can't do that since 'bin' isn't a native bin.
......
127 149
		# hostname    - net-tools
128 150
		--enable-install-program="arch,$(usev hostname),$(usev kill)"
129 151
		--enable-no-install-program="groups,$(usev !hostname),$(usev !kill),su,uptime"
130
		--enable-largefile
131 152
		$(usex caps '' --disable-libcap)
132 153
		$(use_enable nls)
133 154
		$(use_enable acl)
......
201 222
	addwrite /dev/full
202 223
	#export RUN_EXPENSIVE_TESTS="yes"
203 224
	#export COREUTILS_GROUPS="portage wheel"
204
	env PATH="${T}/mount-wrappers:${PATH}" emake -k check VERBOSE=yes
225
	env PATH="${T}/mount-wrappers:${PATH}" gl_public_submodule_commit= \
226
		emake -k check VERBOSE=yes
205 227
}
206 228

  
207 229
src_install() {
Thank you!