Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 493630 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/portage/sys-apps/kmod/kmod-19.ebuild (-21 / +30 lines)
Lines 1-19 Link Here
1
# Copyright 1999-2015 Gentoo Foundation
1
# Copyright 1999-2014 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/sys-apps/kmod/kmod-19.ebuild,v 1.3 2015/01/17 03:15:26 zlogene Exp $
3
# $Header: $
4
4
5
EAPI=5
5
EAPI=5
6
6
7
PYTHON_COMPAT=( python{2_7,3_2,3_3,3_4} )
7
PYTHON_COMPAT=( python{2_7,3_2,3_3,3_4} )
8
AUTOTOOLS_AUTORECONF=yes
8
9
9
inherit bash-completion-r1 eutils multilib python-r1
10
inherit bash-completion-r1 eutils multilib python-r1 autotools-utils
10
11
11
if [[ ${PV} == 9999* ]]; then
12
if [[ ${PV} == 9999* ]]; then
12
	EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/kernel/${PN}/${PN}.git"
13
	EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/kernel/${PN}/${PN}.git"
13
	inherit autotools git-2
14
	inherit autotools git-2
14
else
15
else
15
	SRC_URI="mirror://kernel/linux/utils/kernel/kmod/${P}.tar.xz"
16
	SRC_URI="mirror://kernel/linux/utils/kernel/kmod/${P}.tar.xz"
16
	KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
17
	KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86"
17
	inherit libtool
18
	inherit libtool
18
fi
19
fi
19
20
Lines 22-28 Link Here
22
23
23
LICENSE="LGPL-2"
24
LICENSE="LGPL-2"
24
SLOT="0"
25
SLOT="0"
25
IUSE="debug doc lzma python static-libs +tools zlib"
26
IUSE="debug doc lzma python static-libs +tools zlib logging openrc"
26
27
27
# Upstream does not support running the test suite with custom configure flags.
28
# Upstream does not support running the test suite with custom configure flags.
28
# I was also told that the test suite is intended for kmod developers.
29
# I was also told that the test suite is intended for kmod developers.
Lines 30-46 Link Here
30
# See bug #408915.
31
# See bug #408915.
31
RESTRICT="test"
32
RESTRICT="test"
32
33
33
# Block systemd below 217 for -static-nodes-indicate-that-creation-of-static-nodes-.patch
34
RDEPEND="!sys-apps/module-init-tools
34
RDEPEND="!sys-apps/module-init-tools
35
	!sys-apps/modutils
35
	!sys-apps/modutils
36
	!<sys-apps/openrc-0.13
36
	openrc? ( !<sys-apps/openrc-0.13 )
37
	!<sys-apps/systemd-217
38
	lzma? ( >=app-arch/xz-utils-5.0.4-r1 )
37
	lzma? ( >=app-arch/xz-utils-5.0.4-r1 )
39
	python? ( ${PYTHON_DEPS} )
38
	python? ( ${PYTHON_DEPS} )
40
	zlib? ( >=sys-libs/zlib-1.2.6 )" #427130
39
	zlib? ( >=sys-libs/zlib-1.2.6 )" #427130
41
DEPEND="${RDEPEND}
40
DEPEND="${RDEPEND}
42
	doc? ( dev-util/gtk-doc )
41
	doc? ( dev-util/gtk-doc )
43
	lzma? ( virtual/pkgconfig )
42
	lzma? ( virtual/pkgconfig )
43
	dev-libs/libxslt
44
	python? (
44
	python? (
45
		dev-python/cython[${PYTHON_USEDEP}]
45
		dev-python/cython[${PYTHON_USEDEP}]
46
		virtual/pkgconfig
46
		virtual/pkgconfig
Lines 52-58 Link Here
52
fi
52
fi
53
53
54
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
54
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
55
56
DOCS="NEWS README TODO"
55
DOCS="NEWS README TODO"
57
56
58
src_prepare() {
57
src_prepare() {
Lines 62-82 Link Here
62
		else
61
		else
63
			touch libkmod/docs/gtk-doc.make
62
			touch libkmod/docs/gtk-doc.make
64
		fi
63
		fi
65
		eautoreconf
64
		#eautoreconf
66
	else
65
	else
67
		elibtoolize
66
		epatch "${FILESDIR}"/${PN}-19-dynamic-kmod.patch #493630
67
		#elibtoolize
68
	fi
68
	fi
69
69
70
	# Restore possibility of running --enable-static wrt #472608
70
	# Restore possibility of running --enable-static wrt #472608
71
	sed -i \
71
	sed -i \
72
		-e '/--enable-static is not supported by kmod/s:as_fn_error:echo:' \
72
		-e '/--enable-static is not supported by kmod/s:as_fn_error:echo:' \
73
		configure || die
73
		configure || die
74
75
    # regenerate aclocal.m4 to support earlier automake versions
76
    rm aclocal.m4 || die
77
78
    autotools-utils_src_prepare
74
}
79
}
75
80
81
76
src_configure() {
82
src_configure() {
77
	local myeconfargs=(
83
	local myeconfargs=(
78
		--bindir="${EPREFIX}/bin"
84
		--bindir=/sbin
79
		--with-rootlibdir="${EPREFIX}/$(get_libdir)"
85
		--with-rootlibdir="/$(get_libdir)"
80
		--enable-shared
86
		--enable-shared
81
		$(use_enable static-libs static)
87
		$(use_enable static-libs static)
82
		$(use_enable tools)
88
		$(use_enable tools)
Lines 84-89 Link Here
84
		$(use_enable doc gtk-doc)
90
		$(use_enable doc gtk-doc)
85
		$(use_with lzma xz)
91
		$(use_with lzma xz)
86
		$(use_with zlib)
92
		$(use_with zlib)
93
		$(use_enable logging)
87
		--with-bashcompletiondir="$(get_bashcompdir)"
94
		--with-bashcompletiondir="$(get_bashcompdir)"
88
	)
95
	)
89
96
Lines 103-108 Link Here
103
}
110
}
104
111
105
src_compile() {
112
src_compile() {
113
106
	emake -C "${BUILD_DIR}"
114
	emake -C "${BUILD_DIR}"
107
115
108
	if use python; then
116
	if use python; then
Lines 122-127 Link Here
122
130
123
src_install() {
131
src_install() {
124
	emake -C "${BUILD_DIR}" DESTDIR="${D}" install
132
	emake -C "${BUILD_DIR}" DESTDIR="${D}" install
133
125
	einstalldocs
134
	einstalldocs
126
135
127
	if use python; then
136
	if use python; then
Lines 141-153 Link Here
141
150
142
	if use tools; then
151
	if use tools; then
143
		local bincmd sbincmd
152
		local bincmd sbincmd
144
		for sbincmd in depmod insmod lsmod modinfo modprobe rmmod; do
153
		for sbincmd in depmod insmod modinfo modprobe rmmod; do
145
			dosym /bin/kmod /sbin/${sbincmd}
154
			dosym kmod /sbin/${sbincmd}
146
		done
155
		done
147
156
148
		# These are also usable as normal user
157
		# These are also usable as normal user
149
		for bincmd in lsmod modinfo; do
158
		for bincmd in lsmod modinfo; do
150
			dosym kmod /bin/${bincmd}
159
			dosym /sbin/kmod /bin/${bincmd}
151
		done
160
		done
152
	fi
161
	fi
153
162
Lines 156-175 Link Here
156
	softdep ohci_hcd pre: ehci_hcd
165
	softdep ohci_hcd pre: ehci_hcd
157
	EOF
166
	EOF
158
167
159
	insinto /lib/modprobe.d
168
	insinto /etc/modprobe.d
160
	doins "${T}"/usb-load-ehci-first.conf #260139
169
	doins "${T}"/usb-load-ehci-first.conf #260139
161
170
162
	newinitd "${FILESDIR}"/kmod-static-nodes-r1 kmod-static-nodes
171
	use openrc && doinitd "${FILESDIR}"/kmod-static-nodes
163
}
172
}
164
173
165
pkg_postinst() {
174
pkg_postinst() {
166
	if [[ -L ${EROOT%/}/etc/runlevels/boot/static-nodes ]]; then
175
	if use openrc && [[ -L ${EROOT%/}/etc/runlevels/boot/static-nodes ]]; then
167
		ewarn "Removing old conflicting static-nodes init script from the boot runlevel"
176
		ewarn "Removing old conflicting static-nodes init script from the boot runlevel"
168
		rm -f "${EROOT%/}"/etc/runlevels/boot/static-nodes
177
		rm -f "${EROOT%/}"/etc/runlevels/boot/static-nodes
169
	fi
178
	fi
170
179
171
	# Add kmod to the runlevel automatically if this is the first install of this package.
180
	# Add kmod to the runlevel automatically if this is the first install of this package.
172
	if [[ -z ${REPLACING_VERSIONS} ]]; then
181
	if use openrc && [[ -z ${REPLACING_VERSIONS} ]]; then
173
		if [[ ! -d ${EROOT%/}/etc/runlevels/sysinit ]]; then
182
		if [[ ! -d ${EROOT%/}/etc/runlevels/sysinit ]]; then
174
			mkdir -p "${EROOT%/}"/etc/runlevels/sysinit
183
			mkdir -p "${EROOT%/}"/etc/runlevels/sysinit
175
		fi
184
		fi
Lines 178-184 Link Here
178
		fi
187
		fi
179
	fi
188
	fi
180
189
181
	if [[ -e ${EROOT%/}/etc/runlevels/sysinit ]]; then
190
	if use openrc && [[ -e ${EROOT%/}/etc/runlevels/sysinit ]]; then
182
		if [[ ! -e ${EROOT%/}/etc/runlevels/sysinit/kmod-static-nodes ]]; then
191
		if [[ ! -e ${EROOT%/}/etc/runlevels/sysinit/kmod-static-nodes ]]; then
183
			ewarn
192
			ewarn
184
			ewarn "You need to add kmod-static-nodes to the sysinit runlevel for"
193
			ewarn "You need to add kmod-static-nodes to the sysinit runlevel for"

Return to bug 493630