Diff bash-completion-2.15.0 with a bash-completion-9999

/usr/portage/app-shells/bash-completion/bash-completion-9999.ebuild 2024-08-08 10:48:51.184781932 +0300
1
# Copyright 1999-2025 Gentoo Authors
1
# Copyright 1999-2024 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4 4
EAPI=8
5 5

  
6
BASHCOMP_P=bashcomp-2.0.3
7 6
PYTHON_COMPAT=( python3_{10..13} )
8 7

  
9
inherit python-any-r1
8
inherit autotools git-r3 python-any-r1
10 9

  
11 10
DESCRIPTION="Programmable Completion for bash"
12 11
HOMEPAGE="https://github.com/scop/bash-completion"
13
SRC_URI="
14
	https://github.com/scop/bash-completion/releases/download/${PV}/${P}.tar.xz
15
	eselect? (
16
		https://github.com/projg2/bashcomp2/releases/download/v${BASHCOMP_P#*-}/${BASHCOMP_P}.tar.gz
17
	)
18
"
12
EGIT_REPO_URI="https://github.com/scop/bash-completion"
19 13

  
20 14
LICENSE="GPL-2+"
21 15
SLOT="0"
22
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
23 16
IUSE="+eselect test"
24 17
RESTRICT="!test? ( test )"
25 18

  
......
63 56

  
64 57
		# Now-dead symlinks to deprecated completions
65 58
		hd ncal
66

  
67
		# For GNU mailman, which isn't packaged. If mailman isn't installed,
68
		# it triggers a QA warning.
69
		arch
70 59
	)
71 60

  
72
	local file
73
	for file in "${strip_completions[@]}"; do
74
		rm "${ED}"/usr/share/bash-completion/completions/${file} ||
75
			die "stripping ${file} failed"
76
	done
61
	rm -v "${strip_completions[@]/#/${ED}/usr/share/bash-completion/completions/}" || die
77 62

  
78 63
	# remove deprecated completions (moved to other packages)
79 64
	rm "${ED}"/usr/share/bash-completion/completions/_* || die
......
89 74
	use test && python-any-r1_pkg_setup
90 75
}
91 76

  
77
src_unpack() {
78
	use eselect && git-r3_fetch https://github.com/projg2/bashcomp2
79
	git-r3_fetch
80

  
81
	use eselect && git-r3_checkout https://github.com/projg2/bashcomp2 \
82
		"${WORKDIR}"/bashcomp2
83
	git-r3_checkout
84
}
85

  
92 86
src_prepare() {
93 87
	if use eselect; then
94
		eapply "${WORKDIR}/${BASHCOMP_P}/bash-completion-blacklist-support.patch"
88
		# generate and apply patch
89
		emake -C "${WORKDIR}"/bashcomp2 bash-completion-blacklist-support.patch
90
		eapply "${WORKDIR}"/bashcomp2/bash-completion-blacklist-support.patch
95 91
	fi
96 92

  
97 93
	default
94
	eautoreconf
98 95
}
99 96

  
100 97
src_test() {
......
107 104
		test/t/test_vi.py::TestVi::test_2
108 105
		test/t/test_xmlwf.py::TestXmlwf::test_2 #bug 886159
109 106
		test/t/test_xrandr.py::TestXrandr::test_output_filter
110
		test/t/unit/test_unit_dequote.py
111
		test/t/test_sudo.py::TestSudo::test_1 #bug 935400
112
		test/t/test_xfreerdp.py::TestXfreerdp::test_6 #bug 935400
113
		test/t/unit/test_unit_command_offset.py::TestUnitCommandOffset::test_cmd_quoted #bug 931744
114
		test/t/test_make.py::TestMake::test_6 #bug 931744
115 107
	)
116 108
	local EPYTEST_IGNORE=(
117 109
		# stupid test that async tests work
......
150 142

  
151 143
	# install the eselect module
152 144
	if use eselect; then
153
		insinto /usr/share/eselect/modules
154
		doins "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect"
155
		doman "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect.5"
145
		emake -C "${WORKDIR}"/bashcomp2 DESTDIR="${D}" \
146
			PREFIX="${EPREFIX}/usr" install
156 147
	fi
157 148
}
158 149

  
Thank you!