1 |
commit: ceacb5df1178ba351330a37443e8f56852739029 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jan 9 08:41:28 2018 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jan 9 08:41:28 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ceacb5df |
7 |
|
8 |
sys-apps/kmod: Bump to version 25 |
9 |
|
10 |
Package-Manager: Portage-2.3.19, Repoman-2.3.6 |
11 |
|
12 |
sys-apps/kmod/Manifest | 1 + |
13 |
sys-apps/kmod/kmod-25.ebuild | 191 +++++++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 192 insertions(+) |
15 |
|
16 |
diff --git a/sys-apps/kmod/Manifest b/sys-apps/kmod/Manifest |
17 |
index a8e4a266a63..8369826c331 100644 |
18 |
--- a/sys-apps/kmod/Manifest |
19 |
+++ b/sys-apps/kmod/Manifest |
20 |
@@ -1,2 +1,3 @@ |
21 |
DIST kmod-23.tar.xz 450376 BLAKE2B dd38b6d8853e40cb8c9939cd3c68bfe3b36e58445cac994dbdcc92790c5a2bc40eb9bef0d4188b7ea113665d297ec4fc089f8ea77ab87971c598ff6b4a17ce85 SHA512 84b18d35117b33c48fd9b732a584a9f94caef553e371bd4e68953540f46fc6c7145c8c7163df898875437ad56e1a47e89be26531314299bce0026c46da9dd3c0 |
22 |
DIST kmod-24.tar.xz 536864 BLAKE2B 2d61a4a5e598c864cc1bae4f3d2dc5e434e1df8685ceb2462315c0e5dc955b58f02ffd0504a77859b7030c3619f1b5f6a7fa3fb25ec99d90ac67f0167b1eb889 SHA512 58c8da100418b6325de1595bceee4115cbdd7151d03a028c0b1f6d5d3e6611c667e27f3a0245d29781125581849fd1e854fa8d87b63c4b8fa3f196d0a97e1779 |
23 |
+DIST kmod-25.tar.xz 545416 BLAKE2B 2ad428f70630a1ef509be888a9ebc45f164695365f0f722f5e7793e96b60c035040b4d9a27f926361cea6d665310fc6cc5599ff4aefeda0fae8571c6510a25a7 SHA512 d579cd0cea24a06362a74927b7a3c777e9e01c990306e1032e4781cd441ffe435c70f2c2c4f6ae39eb1d857e622746411d5824d0c0d8bb79f91dc9fa51956252 |
24 |
|
25 |
diff --git a/sys-apps/kmod/kmod-25.ebuild b/sys-apps/kmod/kmod-25.ebuild |
26 |
new file mode 100644 |
27 |
index 00000000000..1ffba7ee85c |
28 |
--- /dev/null |
29 |
+++ b/sys-apps/kmod/kmod-25.ebuild |
30 |
@@ -0,0 +1,191 @@ |
31 |
+# Copyright 1999-2018 Gentoo Foundation |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=6 |
35 |
+ |
36 |
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) |
37 |
+ |
38 |
+inherit bash-completion-r1 ltprune multilib python-r1 |
39 |
+ |
40 |
+if [[ ${PV} == 9999* ]]; then |
41 |
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/kernel/${PN}/${PN}.git" |
42 |
+ inherit autotools git-r3 |
43 |
+else |
44 |
+ SRC_URI="mirror://kernel/linux/utils/kernel/kmod/${P}.tar.xz" |
45 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
46 |
+ inherit libtool |
47 |
+fi |
48 |
+ |
49 |
+DESCRIPTION="library and tools for managing linux kernel modules" |
50 |
+HOMEPAGE="https://git.kernel.org/?p=utils/kernel/kmod/kmod.git" |
51 |
+ |
52 |
+LICENSE="LGPL-2" |
53 |
+SLOT="0" |
54 |
+IUSE="debug doc lzma python static-libs +tools zlib" |
55 |
+ |
56 |
+# Upstream does not support running the test suite with custom configure flags. |
57 |
+# I was also told that the test suite is intended for kmod developers. |
58 |
+# So we have to restrict it. |
59 |
+# See bug #408915. |
60 |
+RESTRICT="test" |
61 |
+ |
62 |
+# Block systemd below 217 for -static-nodes-indicate-that-creation-of-static-nodes-.patch |
63 |
+RDEPEND="!sys-apps/module-init-tools |
64 |
+ !sys-apps/modutils |
65 |
+ !<sys-apps/openrc-0.13.8 |
66 |
+ !<sys-apps/systemd-216-r3 |
67 |
+ lzma? ( >=app-arch/xz-utils-5.0.4-r1 ) |
68 |
+ python? ( ${PYTHON_DEPS} ) |
69 |
+ zlib? ( >=sys-libs/zlib-1.2.6 )" #427130 |
70 |
+DEPEND="${RDEPEND} |
71 |
+ doc? ( dev-util/gtk-doc ) |
72 |
+ lzma? ( virtual/pkgconfig ) |
73 |
+ python? ( |
74 |
+ dev-python/cython[${PYTHON_USEDEP}] |
75 |
+ virtual/pkgconfig |
76 |
+ ) |
77 |
+ zlib? ( virtual/pkgconfig )" |
78 |
+if [[ ${PV} == 9999* ]]; then |
79 |
+ DEPEND="${DEPEND} |
80 |
+ dev-libs/libxslt" |
81 |
+fi |
82 |
+ |
83 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
84 |
+ |
85 |
+DOCS="NEWS README TODO" |
86 |
+ |
87 |
+src_prepare() { |
88 |
+ default |
89 |
+ |
90 |
+ if [ ! -e configure ]; then |
91 |
+ if use doc; then |
92 |
+ gtkdocize --copy --docdir libkmod/docs || die |
93 |
+ else |
94 |
+ touch libkmod/docs/gtk-doc.make |
95 |
+ fi |
96 |
+ eautoreconf |
97 |
+ else |
98 |
+ elibtoolize |
99 |
+ fi |
100 |
+ |
101 |
+ # Restore possibility of running --enable-static wrt #472608 |
102 |
+ sed -i \ |
103 |
+ -e '/--enable-static is not supported by kmod/s:as_fn_error:echo:' \ |
104 |
+ configure || die |
105 |
+} |
106 |
+ |
107 |
+src_configure() { |
108 |
+ local myeconfargs=( |
109 |
+ --bindir="${EPREFIX}/bin" |
110 |
+ --enable-shared |
111 |
+ --with-bashcompletiondir="$(get_bashcompdir)" |
112 |
+ --with-rootlibdir="${EPREFIX}/$(get_libdir)" |
113 |
+ $(use_enable debug) |
114 |
+ $(use_enable doc gtk-doc) |
115 |
+ $(use_enable static-libs static) |
116 |
+ $(use_enable tools) |
117 |
+ $(use_with lzma xz) |
118 |
+ $(use_with zlib) |
119 |
+ ) |
120 |
+ |
121 |
+ local ECONF_SOURCE="${S}" |
122 |
+ |
123 |
+ kmod_configure() { |
124 |
+ mkdir -p "${BUILD_DIR}" || die |
125 |
+ run_in_build_dir econf "${myeconfargs[@]}" "$@" |
126 |
+ } |
127 |
+ |
128 |
+ BUILD_DIR="${WORKDIR}/build" |
129 |
+ kmod_configure --disable-python |
130 |
+ |
131 |
+ if use python; then |
132 |
+ python_foreach_impl kmod_configure --enable-python |
133 |
+ fi |
134 |
+} |
135 |
+ |
136 |
+src_compile() { |
137 |
+ emake -C "${BUILD_DIR}" |
138 |
+ |
139 |
+ if use python; then |
140 |
+ local native_builddir=${BUILD_DIR} |
141 |
+ |
142 |
+ python_compile() { |
143 |
+ emake -C "${BUILD_DIR}" -f Makefile -f - python \ |
144 |
+ VPATH="${native_builddir}:${S}" \ |
145 |
+ native_builddir="${native_builddir}" \ |
146 |
+ libkmod_python_kmod_{kmod,list,module,_util}_la_LIBADD='$(PYTHON_LIBS) $(native_builddir)/libkmod/libkmod.la' \ |
147 |
+ <<< 'python: $(pkgpyexec_LTLIBRARIES)' |
148 |
+ } |
149 |
+ |
150 |
+ python_foreach_impl python_compile |
151 |
+ fi |
152 |
+} |
153 |
+ |
154 |
+src_install() { |
155 |
+ emake -C "${BUILD_DIR}" DESTDIR="${D}" install |
156 |
+ einstalldocs |
157 |
+ |
158 |
+ if use python; then |
159 |
+ local native_builddir=${BUILD_DIR} |
160 |
+ |
161 |
+ python_install() { |
162 |
+ emake -C "${BUILD_DIR}" DESTDIR="${D}" \ |
163 |
+ VPATH="${native_builddir}:${S}" \ |
164 |
+ install-pkgpyexecLTLIBRARIES \ |
165 |
+ install-dist_pkgpyexecPYTHON |
166 |
+ } |
167 |
+ |
168 |
+ python_foreach_impl python_install |
169 |
+ fi |
170 |
+ |
171 |
+ prune_libtool_files --modules |
172 |
+ |
173 |
+ if use tools; then |
174 |
+ local bincmd sbincmd |
175 |
+ for sbincmd in depmod insmod lsmod modinfo modprobe rmmod; do |
176 |
+ dosym ../bin/kmod /sbin/${sbincmd} |
177 |
+ done |
178 |
+ |
179 |
+ # These are also usable as normal user |
180 |
+ for bincmd in lsmod modinfo; do |
181 |
+ dosym kmod /bin/${bincmd} |
182 |
+ done |
183 |
+ fi |
184 |
+ |
185 |
+ cat <<-EOF > "${T}"/usb-load-ehci-first.conf |
186 |
+ softdep uhci_hcd pre: ehci_hcd |
187 |
+ softdep ohci_hcd pre: ehci_hcd |
188 |
+ EOF |
189 |
+ |
190 |
+ insinto /lib/modprobe.d |
191 |
+ doins "${T}"/usb-load-ehci-first.conf #260139 |
192 |
+ |
193 |
+ newinitd "${FILESDIR}"/kmod-static-nodes-r1 kmod-static-nodes |
194 |
+} |
195 |
+ |
196 |
+pkg_postinst() { |
197 |
+ if [[ -L ${EROOT%/}/etc/runlevels/boot/static-nodes ]]; then |
198 |
+ ewarn "Removing old conflicting static-nodes init script from the boot runlevel" |
199 |
+ rm -f "${EROOT%/}"/etc/runlevels/boot/static-nodes |
200 |
+ fi |
201 |
+ |
202 |
+ # Add kmod to the runlevel automatically if this is the first install of this package. |
203 |
+ if [[ -z ${REPLACING_VERSIONS} ]]; then |
204 |
+ if [[ ! -d ${EROOT%/}/etc/runlevels/sysinit ]]; then |
205 |
+ mkdir -p "${EROOT%/}"/etc/runlevels/sysinit |
206 |
+ fi |
207 |
+ if [[ -x ${EROOT%/}/etc/init.d/kmod-static-nodes ]]; then |
208 |
+ ln -s /etc/init.d/kmod-static-nodes "${EROOT%/}"/etc/runlevels/sysinit/kmod-static-nodes |
209 |
+ fi |
210 |
+ fi |
211 |
+ |
212 |
+ if [[ -e ${EROOT%/}/etc/runlevels/sysinit ]]; then |
213 |
+ if [[ ! -e ${EROOT%/}/etc/runlevels/sysinit/kmod-static-nodes ]]; then |
214 |
+ ewarn |
215 |
+ ewarn "You need to add kmod-static-nodes to the sysinit runlevel for" |
216 |
+ ewarn "kernel modules to have required static nodes!" |
217 |
+ ewarn "Run this command:" |
218 |
+ ewarn "\trc-update add kmod-static-nodes sysinit" |
219 |
+ fi |
220 |
+ fi |
221 |
+} |