Diff kmod-26-r6 with a kmod-27-r2

/usr/portage/sys-apps/kmod/kmod-27-r2.ebuild 2021-04-29 22:39:00.000000000 +0300
1
# Copyright 1999-2020 Gentoo Authors
1
# Copyright 1999-2021 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=6
4
EAPI=7
5 5

  
6
PYTHON_COMPAT=( python3_{6,7} )
6
PYTHON_COMPAT=( python3_{7,8,9} )
7 7

  
8
inherit bash-completion-r1 multilib python-r1
8
inherit autotools bash-completion-r1 multilib python-r1
9 9

  
10 10
if [[ ${PV} == 9999* ]]; then
11 11
	EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/kernel/${PN}/${PN}.git"
12
	inherit autotools git-r3
12
	inherit git-r3
13 13
else
14 14
	SRC_URI="https://www.kernel.org/pub/linux/utils/kernel/kmod/${P}.tar.xz"
15
	KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86"
16
	inherit libtool
15
	KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
16
	#inherit libtool
17 17
fi
18 18

  
19 19
DESCRIPTION="library and tools for managing linux kernel modules"
......
21 21

  
22 22
LICENSE="LGPL-2"
23 23
SLOT="0"
24
IUSE="debug doc libressl lzma pkcs7 python static-libs +tools zlib zstd"
24
IUSE="debug doc +lzma pkcs7 python static-libs +tools +zlib"
25 25

  
26 26
# Upstream does not support running the test suite with custom configure flags.
27 27
# I was also told that the test suite is intended for kmod developers.
......
35 35
	!<sys-apps/openrc-0.13.8
36 36
	!<sys-apps/systemd-216-r3
37 37
	lzma? ( >=app-arch/xz-utils-5.0.4-r1 )
38
	zstd? ( >=app-arch/zstd-1.4.0 )
39 38
	python? ( ${PYTHON_DEPS} )
40
	pkcs7? (
41
		!libressl? ( >=dev-libs/openssl-1.1.0:0= )
42
		libressl? ( dev-libs/libressl:0= )
43
	)
39
	pkcs7? ( >=dev-libs/openssl-1.1.0:0= )
44 40
	zlib? ( >=sys-libs/zlib-1.2.6 )" #427130
45
DEPEND="${RDEPEND}
46
	doc? ( dev-util/gtk-doc )
41
DEPEND="${RDEPEND}"
42
BDEPEND="
43
	doc? (
44
		dev-util/gtk-doc
45
		dev-util/gtk-doc-am
46
	)
47 47
	lzma? ( virtual/pkgconfig )
48 48
	python? (
49 49
		dev-python/cython[${PYTHON_USEDEP}]
50 50
		virtual/pkgconfig
51 51
		)
52
	zlib? ( virtual/pkgconfig )"
52
	zlib? ( virtual/pkgconfig )
53
"
53 54
if [[ ${PV} == 9999* ]]; then
54 55
	DEPEND="${DEPEND}
55 56
		dev-libs/libxslt"
......
59 60

  
60 61
DOCS="NEWS README TODO"
61 62

  
62
PATCHES=(
63
	"${FILESDIR}/${P}-libressl.patch" # bug 677960
64
	"${FILESDIR}/zstd-support.patch"
65
)
63
PATCHES=( "${FILESDIR}"/${P}-depmod-do-not-output-.bin-to-stdout.patch )
66 64

  
67 65
src_prepare() {
68 66
	default
69 67

  
70
	if [[ ! -e configure ]] ; then
68
	if [[ ! -e configure ]] || use doc ; then
71 69
		if use doc; then
70
			cp "${BROOT}"/usr/share/aclocal/gtk-doc.m4 m4 || die
72 71
			gtkdocize --copy --docdir libkmod/docs || die
73 72
		else
74 73
			touch libkmod/docs/gtk-doc.make
......
91 90
		--with-bashcompletiondir="$(get_bashcompdir)"
92 91
		--with-rootlibdir="${EPREFIX}/$(get_libdir)"
93 92
		$(use_enable debug)
94
		$(use_enable doc gtk-doc)
93
		$(usex doc '--enable-gtk-doc' '')
95 94
		$(use_enable static-libs static)
96 95
		$(use_enable tools)
97 96
		$(use_with lzma xz)
98 97
		$(use_with pkcs7 openssl)
99 98
		$(use_with zlib)
100
		$(use_with zstd)
101 99
	)
102 100

  
103 101
	local ECONF_SOURCE="${S}"
......
151 149
		python_foreach_impl python_install
152 150
	fi
153 151

  
154
	find "${ED}" -name "*.la" -delete || die
152
	find "${ED}" -type f -name "*.la" -delete || die
155 153

  
156 154
	if use tools; then
157 155
		local cmd
......
177 175
}
178 176

  
179 177
pkg_postinst() {
180
	if [[ -L ${EROOT%/}/etc/runlevels/boot/static-nodes ]]; then
178
	if [[ -L ${EROOT}/etc/runlevels/boot/static-nodes ]]; then
181 179
		ewarn "Removing old conflicting static-nodes init script from the boot runlevel"
182
		rm -f "${EROOT%/}"/etc/runlevels/boot/static-nodes
180
		rm -f "${EROOT}"/etc/runlevels/boot/static-nodes
183 181
	fi
184 182

  
185 183
	# Add kmod to the runlevel automatically if this is the first install of this package.
186 184
	if [[ -z ${REPLACING_VERSIONS} ]]; then
187
		if [[ ! -d ${EROOT%/}/etc/runlevels/sysinit ]]; then
188
			mkdir -p "${EROOT%/}"/etc/runlevels/sysinit
185
		if [[ ! -d ${EROOT}/etc/runlevels/sysinit ]]; then
186
			mkdir -p "${EROOT}"/etc/runlevels/sysinit
189 187
		fi
190
		if [[ -x ${EROOT%/}/etc/init.d/kmod-static-nodes ]]; then
191
			ln -s /etc/init.d/kmod-static-nodes "${EROOT%/}"/etc/runlevels/sysinit/kmod-static-nodes
188
		if [[ -x ${EROOT}/etc/init.d/kmod-static-nodes ]]; then
189
			ln -s /etc/init.d/kmod-static-nodes "${EROOT}"/etc/runlevels/sysinit/kmod-static-nodes
192 190
		fi
193 191
	fi
194 192

  
195
	if [[ -e ${EROOT%/}/etc/runlevels/sysinit ]]; then
196
		if [[ ! -e ${EROOT%/}/etc/runlevels/sysinit/kmod-static-nodes ]]; then
193
	if [[ -e ${EROOT}/etc/runlevels/sysinit ]]; then
194
		if ! has_version sys-apps/systemd && [[ ! -e ${EROOT}/etc/runlevels/sysinit/kmod-static-nodes ]]; then
197 195
			ewarn
198 196
			ewarn "You need to add kmod-static-nodes to the sysinit runlevel for"
199 197
			ewarn "kernel modules to have required static nodes!"
Thank you!