1 |
commit: ab794e8557245ff87f998795a57ac7185dd68ef8 |
2 |
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Sep 24 19:31:25 2020 +0000 |
4 |
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 24 19:31:25 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab794e85 |
7 |
|
8 |
sys-apps/linux-misc-apps: cleanup |
9 |
|
10 |
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org> |
11 |
|
12 |
sys-apps/linux-misc-apps/files/hpfall.confd | 6 - |
13 |
sys-apps/linux-misc-apps/files/hpfall.initd | 44 ----- |
14 |
.../linux-misc-apps/linux-misc-apps-3.18.ebuild | 172 ---------------- |
15 |
.../linux-misc-apps/linux-misc-apps-3.6-r2.ebuild | 184 ------------------ |
16 |
.../linux-misc-apps/linux-misc-apps-4.19.ebuild | 216 --------------------- |
17 |
.../linux-misc-apps/linux-misc-apps-4.4-r1.ebuild | 216 --------------------- |
18 |
.../linux-misc-apps/linux-misc-apps-4.4.ebuild | 183 ----------------- |
19 |
7 files changed, 1021 deletions(-) |
20 |
|
21 |
diff --git a/sys-apps/linux-misc-apps/files/hpfall.confd b/sys-apps/linux-misc-apps/files/hpfall.confd |
22 |
deleted file mode 100644 |
23 |
index 4f3451b0bff..00000000000 |
24 |
--- a/sys-apps/linux-misc-apps/files/hpfall.confd |
25 |
+++ /dev/null |
26 |
@@ -1,6 +0,0 @@ |
27 |
-# /etc/conf.d/hpfall |
28 |
- |
29 |
-# The name of the disk device that hpfall should protect. |
30 |
-# Usually this is 'sda' or 'hda' the primary master. |
31 |
- |
32 |
-DISK="sda" |
33 |
\ No newline at end of file |
34 |
|
35 |
diff --git a/sys-apps/linux-misc-apps/files/hpfall.initd b/sys-apps/linux-misc-apps/files/hpfall.initd |
36 |
deleted file mode 100644 |
37 |
index 8b4930612c4..00000000000 |
38 |
--- a/sys-apps/linux-misc-apps/files/hpfall.initd |
39 |
+++ /dev/null |
40 |
@@ -1,44 +0,0 @@ |
41 |
-#!/sbin/openrc-run |
42 |
-# Copyright 2012 Gentoo Foundation |
43 |
-# Distributed under the terms of the GNU General Public License v2 |
44 |
- |
45 |
-checkconfig() { |
46 |
- if [ -z "$DISK" ] ; then |
47 |
- eerror "You need to setup DISK in /etc/conf.d/hpfall first" |
48 |
- return 1 |
49 |
- fi |
50 |
- |
51 |
- if [ ! -b /dev/${DISK} ]; then |
52 |
- eerror "Could not find disk /dev/${DISK}!" |
53 |
- eerror "Adjust the DISK setting in /etc/conf.d/hpfall" |
54 |
- return 1 |
55 |
- fi |
56 |
- |
57 |
- if [ ! -e /sys/block/${DISK}/device/unload_heads ] ; then |
58 |
- eerror "No protect entry for ${DISK}!" |
59 |
- eerror "Kernel 2.6.28 and above is required" |
60 |
- return 1 |
61 |
- fi |
62 |
- |
63 |
- if [ ! -c /dev/freefall ]; then |
64 |
- ebegin "Loading hp_accel module" |
65 |
- modprobe hp_accel |
66 |
- eend $? || return 1 |
67 |
- fi |
68 |
-} |
69 |
- |
70 |
-start () { |
71 |
- checkconfig || return 1 |
72 |
- |
73 |
- ebegin "Starting active hard-drive protection daemon" |
74 |
- start-stop-daemon --start --quiet \ |
75 |
- --exec /usr/sbin/hpfall /dev/${DISK} |
76 |
- eend $? |
77 |
-} |
78 |
- |
79 |
-stop() { |
80 |
- ebegin "Stopping active hard-drive protection daemon" |
81 |
- start-stop-daemon --stop --quiet \ |
82 |
- --exec /usr/sbin/hpfall |
83 |
- eend $? |
84 |
-} |
85 |
|
86 |
diff --git a/sys-apps/linux-misc-apps/linux-misc-apps-3.18.ebuild b/sys-apps/linux-misc-apps/linux-misc-apps-3.18.ebuild |
87 |
deleted file mode 100644 |
88 |
index 4821b1c04c4..00000000000 |
89 |
--- a/sys-apps/linux-misc-apps/linux-misc-apps-3.18.ebuild |
90 |
+++ /dev/null |
91 |
@@ -1,172 +0,0 @@ |
92 |
-# Copyright 1999-2020 Gentoo Authors |
93 |
-# Distributed under the terms of the GNU General Public License v2 |
94 |
- |
95 |
-EAPI=5 |
96 |
- |
97 |
-inherit versionator eutils toolchain-funcs linux-info ltprune flag-o-matic |
98 |
- |
99 |
-DESCRIPTION="Misc tools bundled with kernel sources" |
100 |
-HOMEPAGE="https://kernel.org/" |
101 |
- |
102 |
-LICENSE="GPL-2" |
103 |
-SLOT="0" |
104 |
-KEYWORDS="~amd64 ~ppc ~x86" |
105 |
-IUSE="static-libs tcpd" |
106 |
- |
107 |
-MY_PV="${PV/_/-}" |
108 |
-MY_PV="${MY_PV/-pre/-git}" |
109 |
- |
110 |
-LINUX_V=$(get_version_component_range 1-2) |
111 |
- |
112 |
-if [ ${PV/_rc} != ${PV} ]; then |
113 |
- LINUX_VER=$(get_version_component_range 1-2).$(($(get_version_component_range 3)-1)) |
114 |
- PATCH_VERSION=$(get_version_component_range 1-3) |
115 |
- LINUX_PATCH=patch-${PV//_/-}.xz |
116 |
- SRC_URI="https://www.kernel.org/pub/linux/kernel/v3.x/testing/${LINUX_PATCH} |
117 |
- https://www.kernel.org/pub/linux/kernel/v3.x/testing/v${PATCH_VERSION}/${LINUX_PATCH}" |
118 |
-elif [ $(get_version_component_count) == 4 ]; then |
119 |
- # stable-release series |
120 |
- LINUX_VER=$(get_version_component_range 1-3) |
121 |
- LINUX_PATCH=patch-${PV}.xz |
122 |
- SRC_URI="https://www.kernel.org/pub/linux/kernel/v3.x/${LINUX_PATCH}" |
123 |
-else |
124 |
- LINUX_VER=${PV} |
125 |
-fi |
126 |
- |
127 |
-LINUX_SOURCES=linux-${LINUX_VER}.tar.xz |
128 |
-SRC_URI="${SRC_URI} https://www.kernel.org/pub/linux/kernel/v3.x/${LINUX_SOURCES}" |
129 |
- |
130 |
-# pmtools also provides turbostat |
131 |
-# usbip available in seperate package now |
132 |
-RDEPEND="sys-apps/hwids |
133 |
- >=dev-libs/glib-2.6 |
134 |
- tcpd? ( sys-apps/tcp-wrappers ) |
135 |
- !sys-power/pmtools" |
136 |
-DEPEND="${RDEPEND} |
137 |
- virtual/pkgconfig" |
138 |
- |
139 |
-S="${WORKDIR}/linux-${LINUX_VER}" |
140 |
- |
141 |
-# All of these are integrated with the kernel build system, |
142 |
-# No make install, and ideally build with with the root Makefile |
143 |
-TARGETS_SIMPLE=( |
144 |
- Documentation/accounting/getdelays.c |
145 |
- Documentation/laptops/dslm.c |
146 |
- Documentation/laptops/freefall.c |
147 |
- Documentation/networking/timestamping/timestamping.c |
148 |
- Documentation/watchdog/src/watchdog-simple.c |
149 |
- tools/cgroup/cgroup_event_listener.c |
150 |
- tools/lguest/lguest.c |
151 |
- tools/vm/slabinfo.c |
152 |
- usr/gen_init_cpio.c |
153 |
-) |
154 |
-# tools/vm/page-types.c - broken, header path issue |
155 |
-# tools/hv/hv_kvp_daemon.c - broken in 3.7 by missing linux/hyperv.h userspace |
156 |
-# Documentation/networking/ifenslave.c - obsolete |
157 |
-# Documentation/ptp/testptp.c - pending linux-headers-3.0 |
158 |
- |
159 |
-# These have a broken make install, no DESTDIR |
160 |
-TARGET_MAKE_SIMPLE=( |
161 |
- Documentation/misc-devices/mei:mei-amt-version |
162 |
- tools/firewire:nosy-dump |
163 |
- tools/power/x86/turbostat:turbostat:../../../../turbostat |
164 |
- tools/power/x86/x86_energy_perf_policy:x86_energy_perf_policy |
165 |
-) |
166 |
-# tools/perf - covered by dev-utils/perf |
167 |
-# tools/usb - testcases only |
168 |
-# tools/virtio - testcaes only |
169 |
- |
170 |
- #for _pattern in {Documentation,scripts,tools,usr,include,lib,"arch/*/include",Makefile,Kbuild,Kconfig}; do |
171 |
-src_unpack() { |
172 |
- unpack ${LINUX_SOURCES} |
173 |
- |
174 |
- MY_A= |
175 |
- for _AFILE in ${A}; do |
176 |
- [[ ${_AFILE} == ${LINUX_SOURCES} ]] && continue |
177 |
- [[ ${_AFILE} == ${LINUX_PATCH} ]] && continue |
178 |
- MY_A="${MY_A} ${_AFILE}" |
179 |
- done |
180 |
- [[ -n ${MY_A} ]] && unpack ${MY_A} |
181 |
-} |
182 |
- |
183 |
-src_prepare() { |
184 |
- if [[ -n ${LINUX_PATCH} ]]; then |
185 |
- epatch "${DISTDIR}"/${LINUX_PATCH} |
186 |
- fi |
187 |
- |
188 |
- sed -i \ |
189 |
- -e '/^nosy-dump.*LDFLAGS/d' \ |
190 |
- -e '/^nosy-dump.*CFLAGS/d' \ |
191 |
- -e '/^nosy-dump.*CPPFLAGS/s,CPPFLAGS =,CPPFLAGS +=,g' \ |
192 |
- "${S}"/tools/firewire/Makefile |
193 |
-} |
194 |
- |
195 |
-kernel_asm_arch() { |
196 |
- a="${1:${ARCH}}" |
197 |
- case ${a} in |
198 |
- # Merged arches |
199 |
- x86|amd64) echo x86 ;; |
200 |
- ppc*) echo powerpc ;; |
201 |
- # Non-merged |
202 |
- alpha|arm|ia64|m68k|mips|sh|sparc*) echo ${1} ;; |
203 |
- *) die "TODO: Update the code for your asm-ARCH symlink" ;; |
204 |
- esac |
205 |
-} |
206 |
- |
207 |
-src_configure() { |
208 |
- : |
209 |
-} |
210 |
- |
211 |
-src_compile() { |
212 |
- local karch=$(kernel_asm_arch "${ARCH}") |
213 |
- # This is the minimal amount needed to start building host binaries. |
214 |
- #emake allmodconfig ARCH=${karch} |
215 |
- #emake prepare modules_prepare ARCH=${karch} |
216 |
- #touch Module.symvers |
217 |
- |
218 |
- # Now we can start building |
219 |
- for s in ${TARGETS_SIMPLE[@]} ; do |
220 |
- dir=$(dirname $s) src=$(basename $s) bin=${src%.c} |
221 |
- einfo "Building $s => $bin" |
222 |
- emake -f /dev/null M=${dir} ARCH=${karch} ${s%.c} |
223 |
- done |
224 |
- |
225 |
- for t in ${TARGET_MAKE_SIMPLE[@]} ; do |
226 |
- dir=${t/:*} target_binfile=${t#*:} |
227 |
- target=${target_binfile/:*} binfile=${target_binfile/*:} |
228 |
- [ -z "${binfile}" ] && binfile=$target |
229 |
- einfo "Building $dir => $binfile (via emake $target)" |
230 |
- emake -C $dir ARCH=${karch} $target |
231 |
- done |
232 |
-} |
233 |
- |
234 |
-src_install() { |
235 |
- into /usr |
236 |
- for s in ${TARGETS_SIMPLE[@]} ; do |
237 |
- dir=$(dirname $s) src=$(basename $s) bin=${src%.c} |
238 |
- einfo "Installing $s => $bin" |
239 |
- dosbin ${dir}/${bin} |
240 |
- done |
241 |
- |
242 |
- for t in ${TARGET_MAKE_SIMPLE[@]} ; do |
243 |
- dir=${t/:*} target_binfile=${t#*:} |
244 |
- target=${target_binfile/:*} binfile=${target_binfile/*:} |
245 |
- [ -z "${binfile}" ] && binfile=$target |
246 |
- einfo "Installing $dir => $binfile" |
247 |
- dosbin ${dir}/${binfile} |
248 |
- done |
249 |
- |
250 |
- newconfd "${FILESDIR}"/freefall.confd freefall |
251 |
- newinitd "${FILESDIR}"/freefall.initd freefall |
252 |
- prune_libtool_files |
253 |
-} |
254 |
- |
255 |
-pkg_postinst() { |
256 |
- echo |
257 |
- elog "The cpupower utility is maintained separately at sys-power/cpupower" |
258 |
- elog "The usbip utility is maintained separately at net-misc/usbip" |
259 |
- elog "The hpfall tool has been renamed by upstream to freefall; update your config if needed" |
260 |
- if find /etc/runlevels/ -name hpfall ; then |
261 |
- ewarn "You must change hpfall to freefall in your runlevels!" |
262 |
- fi |
263 |
-} |
264 |
|
265 |
diff --git a/sys-apps/linux-misc-apps/linux-misc-apps-3.6-r2.ebuild b/sys-apps/linux-misc-apps/linux-misc-apps-3.6-r2.ebuild |
266 |
deleted file mode 100644 |
267 |
index 4d1f8227e84..00000000000 |
268 |
--- a/sys-apps/linux-misc-apps/linux-misc-apps-3.6-r2.ebuild |
269 |
+++ /dev/null |
270 |
@@ -1,184 +0,0 @@ |
271 |
-# Copyright 1999-2020 Gentoo Authors |
272 |
-# Distributed under the terms of the GNU General Public License v2 |
273 |
- |
274 |
-EAPI=5 |
275 |
- |
276 |
-inherit versionator eutils toolchain-funcs linux-info ltprune autotools flag-o-matic |
277 |
- |
278 |
-DESCRIPTION="Misc tools bundled with kernel sources" |
279 |
-HOMEPAGE="https://kernel.org/" |
280 |
- |
281 |
-LICENSE="GPL-2" |
282 |
-SLOT="0" |
283 |
-KEYWORDS="~amd64 ~ppc ~x86" |
284 |
-IUSE="static-libs tcpd" |
285 |
- |
286 |
-MY_PV="${PV/_/-}" |
287 |
-MY_PV="${MY_PV/-pre/-git}" |
288 |
- |
289 |
-LINUX_V=$(get_version_component_range 1-2) |
290 |
- |
291 |
-if [ ${PV/_rc} != ${PV} ]; then |
292 |
- LINUX_VER=$(get_version_component_range 1-2).$(($(get_version_component_range 3)-1)) |
293 |
- PATCH_VERSION=$(get_version_component_range 1-3) |
294 |
- LINUX_PATCH=patch-${PV//_/-}.bz2 |
295 |
- SRC_URI="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/testing/${LINUX_PATCH} |
296 |
- https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/testing/v${PATCH_VERSION}/${LINUX_PATCH}" |
297 |
-elif [ $(get_version_component_count) == 4 ]; then |
298 |
- # stable-release series |
299 |
- LINUX_VER=$(get_version_component_range 1-3) |
300 |
- LINUX_PATCH=patch-${PV}.bz2 |
301 |
- SRC_URI="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_PATCH}" |
302 |
-else |
303 |
- LINUX_VER=${PV} |
304 |
-fi |
305 |
- |
306 |
-LINUX_SOURCES=linux-${LINUX_VER}.tar.bz2 |
307 |
-SRC_URI="${SRC_URI} https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}" |
308 |
- |
309 |
-# pmtools also provides turbostat |
310 |
-# sysfsutils and glib for usbip - remove sysfsutils in 3.7 or 3.8 |
311 |
-RDEPEND="sys-apps/hwids |
312 |
- >=sys-fs/sysfsutils-2 |
313 |
- >=dev-libs/glib-2.6 |
314 |
- tcpd? ( sys-apps/tcp-wrappers ) |
315 |
- !sys-power/pmtools |
316 |
- !net-misc/usbip" |
317 |
-DEPEND="${RDEPEND} |
318 |
- virtual/pkgconfig" |
319 |
- |
320 |
-S="${WORKDIR}/linux-${LINUX_VER}" |
321 |
- |
322 |
-# All of these are integrated with the kernel build system, |
323 |
-# No make install, and ideally build with with the root Makefile |
324 |
-TARGETS_SIMPLE=( |
325 |
- Documentation/accounting/getdelays.c |
326 |
- Documentation/cgroups/cgroup_event_listener.c |
327 |
- Documentation/laptops/dslm.c |
328 |
- Documentation/laptops/hpfall.c |
329 |
- Documentation/networking/timestamping/timestamping.c |
330 |
- Documentation/watchdog/src/watchdog-simple.c |
331 |
- tools/lguest/lguest.c |
332 |
- tools/vm/page-types.c |
333 |
- tools/vm/slabinfo.c |
334 |
- usr/gen_init_cpio.c |
335 |
-) |
336 |
-# tools/hv/hv_kvp_daemon.c - broken in 3.7 by missing linux/hyperv.h userspace |
337 |
-# Documentation/networking/ifenslave.c - obsolete |
338 |
-# Documentation/ptp/testptp.c - pending linux-headers-3.0 |
339 |
- |
340 |
-# These have a broken make install, no DESTDIR |
341 |
-TARGET_MAKE_SIMPLE=( |
342 |
- tools/firewire:nosy-dump |
343 |
- tools/power/x86/turbostat:turbostat |
344 |
- tools/power/x86/x86_energy_perf_policy:x86_energy_perf_policy |
345 |
- Documentation/misc-devices/mei:mei-amt-version |
346 |
-) |
347 |
-# tools/perf - covered by dev-utils/perf |
348 |
-# tools/usb - testcases only |
349 |
-# tools/virtio - testcaes only |
350 |
- |
351 |
- #for _pattern in {Documentation,scripts,tools,usr,include,lib,"arch/*/include",Makefile,Kbuild,Kconfig}; do |
352 |
-src_unpack() { |
353 |
- unpack ${LINUX_SOURCES} |
354 |
- |
355 |
- MY_A= |
356 |
- for _AFILE in ${A}; do |
357 |
- [[ ${_AFILE} == ${LINUX_SOURCES} ]] && continue |
358 |
- [[ ${_AFILE} == ${LINUX_PATCH} ]] && continue |
359 |
- MY_A="${MY_A} ${_AFILE}" |
360 |
- done |
361 |
- [[ -n ${MY_A} ]] && unpack ${MY_A} |
362 |
-} |
363 |
- |
364 |
-src_prepare() { |
365 |
- if [[ -n ${LINUX_PATCH} ]]; then |
366 |
- epatch "${DISTDIR}"/${LINUX_PATCH} |
367 |
- fi |
368 |
- |
369 |
- pushd drivers/staging/usbip/userspace >/dev/null && |
370 |
- eautoreconf -i -f -v && |
371 |
- popd >/dev/null || die "usbip" |
372 |
- |
373 |
- sed -i \ |
374 |
- -e '/^nosy-dump.*LDFLAGS/d' \ |
375 |
- -e '/^nosy-dump.*CFLAGS/d' \ |
376 |
- -e '/^nosy-dump.*CPPFLAGS/s,CPPFLAGS =,CPPFLAGS +=,g' \ |
377 |
- "${S}"/tools/firewire/Makefile |
378 |
-} |
379 |
- |
380 |
-kernel_asm_arch() { |
381 |
- a="${1:${ARCH}}" |
382 |
- case ${a} in |
383 |
- # Merged arches |
384 |
- x86|amd64) echo x86 ;; |
385 |
- ppc*) echo powerpc ;; |
386 |
- # Non-merged |
387 |
- alpha|arm|ia64|m68k|mips|sh|sparc*) echo ${1} ;; |
388 |
- *) die "TODO: Update the code for your asm-ARCH symlink" ;; |
389 |
- esac |
390 |
-} |
391 |
- |
392 |
-src_configure() { |
393 |
- cd drivers/staging/usbip/userspace && \ |
394 |
- econf \ |
395 |
- $(use_enable static-libs static) \ |
396 |
- $(use tcpd || echo --without-tcp-wrappers) \ |
397 |
- --with-usbids-dir=/usr/share/misc |
398 |
-} |
399 |
- |
400 |
-src_compile() { |
401 |
- local karch=$(kernel_asm_arch "${ARCH}") |
402 |
- # This is the minimal amount needed to start building host binaries. |
403 |
- #emake allmodconfig ARCH=${karch} |
404 |
- #emake prepare modules_prepare ARCH=${karch} |
405 |
- #touch Module.symvers |
406 |
- |
407 |
- # Now we can start building |
408 |
- for s in ${TARGETS_SIMPLE[@]} ; do |
409 |
- dir=$(dirname $s) src=$(basename $s) bin=${src%.c} |
410 |
- einfo "Building $s => $bin" |
411 |
- emake -f /dev/null M=${dir} ARCH=${karch} ${s%.c} |
412 |
- done |
413 |
- |
414 |
- for t in ${TARGET_MAKE_SIMPLE[@]} ; do |
415 |
- dir=${t/:*} target=${t/*:} |
416 |
- einfo "Building $dir => $target" |
417 |
- emake -C $dir ARCH=${karch} $target |
418 |
- done |
419 |
- |
420 |
- emake -C drivers/staging/usbip/userspace |
421 |
-} |
422 |
- |
423 |
-src_install() { |
424 |
- into /usr |
425 |
- for s in ${TARGETS_SIMPLE[@]} ; do |
426 |
- dir=$(dirname $s) src=$(basename $s) bin=${src%.c} |
427 |
- einfo "Installing $s => $bin" |
428 |
- dosbin ${dir}/${bin} |
429 |
- done |
430 |
- |
431 |
- for t in ${TARGET_MAKE_SIMPLE[@]} ; do |
432 |
- dir=${t/:*} target=${t/*:} |
433 |
- einfo "Installing $dir => $target" |
434 |
- dosbin ${dir}/${target} |
435 |
- done |
436 |
- |
437 |
- pushd drivers/staging/usbip/userspace >/dev/null \ |
438 |
- || die "Missing usbip/userspace" |
439 |
- emake DESTDIR="${D}" install |
440 |
- |
441 |
- newdoc README README.usbip |
442 |
- newdoc AUTHORS AUTHORS.usbip |
443 |
- dodoc ../usbip_protocol.txt |
444 |
- popd >/dev/null |
445 |
- |
446 |
- newconfd "${FILESDIR}"/hpfall.confd hpfall |
447 |
- newinitd "${FILESDIR}"/hpfall.initd hpfall |
448 |
- prune_libtool_files |
449 |
-} |
450 |
- |
451 |
-pkg_postinst() { |
452 |
- echo |
453 |
- elog "The cpupower utility is maintained separately at sys-power/cpupower" |
454 |
-} |
455 |
|
456 |
diff --git a/sys-apps/linux-misc-apps/linux-misc-apps-4.19.ebuild b/sys-apps/linux-misc-apps/linux-misc-apps-4.19.ebuild |
457 |
deleted file mode 100644 |
458 |
index 45c7b3fd3bb..00000000000 |
459 |
--- a/sys-apps/linux-misc-apps/linux-misc-apps-4.19.ebuild |
460 |
+++ /dev/null |
461 |
@@ -1,216 +0,0 @@ |
462 |
-# Copyright 1999-2020 Gentoo Authors |
463 |
-# Distributed under the terms of the GNU General Public License v2 |
464 |
- |
465 |
-EAPI=5 |
466 |
- |
467 |
-inherit versionator eutils toolchain-funcs linux-info ltprune autotools flag-o-matic |
468 |
- |
469 |
-DESCRIPTION="Misc tools bundled with kernel sources" |
470 |
-HOMEPAGE="https://kernel.org/" |
471 |
- |
472 |
-LICENSE="GPL-2" |
473 |
-SLOT="0" |
474 |
-KEYWORDS="~amd64 ~ppc ~x86" |
475 |
-IUSE="static-libs tcpd usbip" |
476 |
- |
477 |
-MY_PV="${PV/_/-}" |
478 |
-MY_PV="${MY_PV/-pre/-git}" |
479 |
- |
480 |
-LINUX_V=$(get_version_component_range 1-2) |
481 |
- |
482 |
-if [ ${PV/_rc} != ${PV} ]; then |
483 |
- LINUX_VER=$(get_version_component_range 1-2).$(($(get_version_component_range 3)-1)) |
484 |
- PATCH_VERSION=$(get_version_component_range 1-3) |
485 |
- LINUX_PATCH=patch-${PV//_/-}.xz |
486 |
- SRC_URI="https://www.kernel.org/pub/linux/kernel/v3.x/testing/${LINUX_PATCH} |
487 |
- https://www.kernel.org/pub/linux/kernel/v3.x/testing/v${PATCH_VERSION}/${LINUX_PATCH}" |
488 |
-elif [ $(get_version_component_count) == 4 ]; then |
489 |
- # stable-release series |
490 |
- LINUX_VER=$(get_version_component_range 1-3) |
491 |
- LINUX_PATCH=patch-${PV}.xz |
492 |
- SRC_URI="https://www.kernel.org/pub/linux/kernel/v3.x/${LINUX_PATCH}" |
493 |
-else |
494 |
- LINUX_VER=${PV} |
495 |
-fi |
496 |
- |
497 |
-LINUX_SOURCES=linux-${LINUX_VER}.tar.xz |
498 |
-SRC_URI="${SRC_URI} https://www.kernel.org/pub/linux/kernel/v3.x/${LINUX_SOURCES}" |
499 |
- |
500 |
-# pmtools also provides turbostat |
501 |
-# usbip available in seperate package now |
502 |
-RDEPEND="sys-apps/hwids |
503 |
- >=dev-libs/glib-2.6 |
504 |
- >=sys-kernel/linux-headers-$(get_version_component_range 1-2) |
505 |
- usbip? ( |
506 |
- !net-misc/usbip |
507 |
- tcpd? ( sys-apps/tcp-wrappers ) |
508 |
- virtual/libudev |
509 |
- ) |
510 |
- !sys-power/pmtools" |
511 |
-DEPEND="${RDEPEND} |
512 |
- virtual/pkgconfig" |
513 |
- |
514 |
-S="${WORKDIR}/linux-${LINUX_VER}" |
515 |
- |
516 |
-# All of these are integrated with the kernel build system, |
517 |
-# No make install, and ideally build with with the root Makefile |
518 |
-TARGETS_SIMPLE=( |
519 |
- samples/watchdog/watchdog-simple.c |
520 |
- tools/accounting/getdelays.c |
521 |
- tools/cgroup/cgroup_event_listener.c |
522 |
- tools/laptop/freefall/freefall.c |
523 |
- tools/testing/selftests/networking/timestamping/timestamping.c |
524 |
- tools/vm/slabinfo.c |
525 |
- usr/gen_init_cpio.c |
526 |
- # Broken: |
527 |
- #tools/lguest/lguest.c # fails to compile |
528 |
- #tools/vm/page-types.c # page-types.c:(.text+0xe2b): undefined reference to `debugfs__mount', not defined anywhere |
529 |
- #tools/net/bpf_jit_disasm.c # /usr/include/x86_64-pc-linux-gnu/bfd.h:35:2: error: #error config.h must be included before this header |
530 |
-) |
531 |
-# tools/vm/page-types.c - broken, header path issue |
532 |
-# tools/hv/hv_kvp_daemon.c - broken in 3.7 by missing linux/hyperv.h userspace |
533 |
-# Documentation/networking/ifenslave.c - obsolete |
534 |
-# Documentation/ptp/testptp.c - pending linux-headers-3.0 |
535 |
- |
536 |
-# These have a broken make install, no DESTDIR |
537 |
-TARGET_MAKE_SIMPLE=( |
538 |
- samples/mei:mei-amt-version |
539 |
- tools/firewire:nosy-dump |
540 |
- tools/iio:iio_event_monitor |
541 |
- tools/iio:iio_generic_buffer |
542 |
- tools/iio:lsiio |
543 |
- tools/laptop/dslm:dslm |
544 |
- tools/power/x86/turbostat:turbostat |
545 |
- tools/power/x86/x86_energy_perf_policy:x86_energy_perf_policy |
546 |
- tools/thermal/tmon:tmon |
547 |
-) |
548 |
-# tools/perf - covered by dev-utils/perf |
549 |
-# tools/usb - testcases only |
550 |
-# tools/virtio - testcaes only |
551 |
- |
552 |
- #for _pattern in {Documentation,scripts,tools,usr,include,lib,"arch/*/include",Makefile,Kbuild,Kconfig}; do |
553 |
-src_unpack() { |
554 |
- unpack ${LINUX_SOURCES} |
555 |
- |
556 |
- MY_A= |
557 |
- for _AFILE in ${A}; do |
558 |
- [[ ${_AFILE} == ${LINUX_SOURCES} ]] && continue |
559 |
- [[ ${_AFILE} == ${LINUX_PATCH} ]] && continue |
560 |
- MY_A="${MY_A} ${_AFILE}" |
561 |
- done |
562 |
- [[ -n ${MY_A} ]] && unpack ${MY_A} |
563 |
-} |
564 |
- |
565 |
-src_prepare() { |
566 |
- if [[ -n ${LINUX_PATCH} ]]; then |
567 |
- epatch "${DISTDIR}"/${LINUX_PATCH} |
568 |
- fi |
569 |
- |
570 |
- pushd tools/usb/usbip/ >/dev/null && |
571 |
- sed -i 's/-Werror[^ ]* //g' configure.ac && |
572 |
- eautoreconf -i -f -v && |
573 |
- popd >/dev/null || die "usbip" |
574 |
- |
575 |
- sed -i \ |
576 |
- -e '/^nosy-dump.*LDFLAGS/d' \ |
577 |
- -e '/^nosy-dump.*CFLAGS/d' \ |
578 |
- -e '/^nosy-dump.*CPPFLAGS/s,CPPFLAGS =,CPPFLAGS +=,g' \ |
579 |
- "${S}"/tools/firewire/Makefile |
580 |
-} |
581 |
- |
582 |
-kernel_asm_arch() { |
583 |
- a="${1:${ARCH}}" |
584 |
- case ${a} in |
585 |
- # Merged arches |
586 |
- x86|amd64) echo x86 ;; |
587 |
- ppc*) echo powerpc ;; |
588 |
- # Non-merged |
589 |
- alpha|arm|ia64|m68k|mips|sh|sparc*) echo ${1} ;; |
590 |
- *) die "TODO: Update the code for your asm-ARCH symlink" ;; |
591 |
- esac |
592 |
-} |
593 |
- |
594 |
-src_configure() { |
595 |
- if use usbip; then |
596 |
- pushd tools/usb/usbip/ || die |
597 |
- econf \ |
598 |
- $(use_enable static-libs static) \ |
599 |
- $(use tcpd || echo --without-tcp-wrappers) \ |
600 |
- --with-usbids-dir=/usr/share/misc |
601 |
- popd |
602 |
- fi |
603 |
-} |
604 |
- |
605 |
-src_compile() { |
606 |
- local karch=$(kernel_asm_arch "${ARCH}") |
607 |
- # This is the minimal amount needed to start building host binaries. |
608 |
- #emake allmodconfig ARCH=${karch} |
609 |
- #emake prepare modules_prepare ARCH=${karch} |
610 |
- #touch Module.symvers |
611 |
- |
612 |
- # Now we can start building |
613 |
- append-cflags -I./tools/lib |
614 |
- for s in ${TARGETS_SIMPLE[@]} ; do |
615 |
- dir=$(dirname $s) src=$(basename $s) bin=${src%.c} |
616 |
- einfo "Building $s => $bin" |
617 |
- emake -f /dev/null M=${dir} ARCH=${karch} ${s%.c} |
618 |
- done |
619 |
- |
620 |
- for t in ${TARGET_MAKE_SIMPLE[@]} ; do |
621 |
- dir=${t/:*} target_binfile=${t#*:} |
622 |
- target=${target_binfile/:*} binfile=${target_binfile/*:} |
623 |
- [ -z "${binfile}" ] && binfile=$target |
624 |
- einfo "Building $dir => $binfile (via emake $target)" |
625 |
- emake -C $dir ARCH=${karch} $target |
626 |
- done |
627 |
- |
628 |
- if use usbip; then |
629 |
- emake -C tools/usb/usbip |
630 |
- fi |
631 |
-} |
632 |
- |
633 |
-src_install() { |
634 |
- into /usr |
635 |
- for s in ${TARGETS_SIMPLE[@]} ; do |
636 |
- dir=$(dirname $s) src=$(basename $s) bin=${src%.c} |
637 |
- einfo "Installing $s => $bin" |
638 |
- dosbin ${dir}/${bin} |
639 |
- done |
640 |
- |
641 |
- for t in ${TARGET_MAKE_SIMPLE[@]} ; do |
642 |
- dir=${t/:*} target_binfile=${t#*:} |
643 |
- target=${target_binfile/:*} binfile=${target_binfile/*:} |
644 |
- [ -z "${binfile}" ] && binfile=$target |
645 |
- einfo "Installing $dir => $binfile" |
646 |
- dosbin ${dir}/${binfile} |
647 |
- done |
648 |
- |
649 |
- if use usbip; then |
650 |
- pushd tools/usb/usbip/ >/dev/null || die "usbip" |
651 |
- emake DESTDIR="${D}" install |
652 |
- newdoc README README.usbip |
653 |
- newdoc AUTHORS AUTHORS.usbip |
654 |
- popd >/dev/null |
655 |
- dodoc Documentation/usb/usbip_protocol.txt |
656 |
- fi |
657 |
- |
658 |
- mv -f "${D}"/usr/sbin/{,iio_}generic_buffer |
659 |
- |
660 |
- newconfd "${FILESDIR}"/freefall.confd freefall |
661 |
- newinitd "${FILESDIR}"/freefall.initd freefall |
662 |
- prune_libtool_files |
663 |
-} |
664 |
- |
665 |
-pkg_postinst() { |
666 |
- echo |
667 |
- elog "The cpupower utility is maintained separately at sys-power/cpupower" |
668 |
- elog "The lguest utility no longer builds, and has been dropped." |
669 |
- elog "The hpfall tool has been renamed by upstream to freefall; update your config if needed" |
670 |
- if find /etc/runlevels/ -name hpfall ; then |
671 |
- ewarn "You must change hpfall to freefall in your runlevels!" |
672 |
- fi |
673 |
- if use usbip; then |
674 |
- elog "For using USB/IP you need to enable USBIP_VHCI_HCD in the client" |
675 |
- elog "machine's kernel config and USBIP_HOST on the server." |
676 |
- fi |
677 |
-} |
678 |
|
679 |
diff --git a/sys-apps/linux-misc-apps/linux-misc-apps-4.4-r1.ebuild b/sys-apps/linux-misc-apps/linux-misc-apps-4.4-r1.ebuild |
680 |
deleted file mode 100644 |
681 |
index c1ed756f443..00000000000 |
682 |
--- a/sys-apps/linux-misc-apps/linux-misc-apps-4.4-r1.ebuild |
683 |
+++ /dev/null |
684 |
@@ -1,216 +0,0 @@ |
685 |
-# Copyright 1999-2020 Gentoo Authors |
686 |
-# Distributed under the terms of the GNU General Public License v2 |
687 |
- |
688 |
-EAPI=5 |
689 |
- |
690 |
-inherit versionator eutils toolchain-funcs linux-info ltprune autotools flag-o-matic |
691 |
- |
692 |
-DESCRIPTION="Misc tools bundled with kernel sources" |
693 |
-HOMEPAGE="https://kernel.org/" |
694 |
- |
695 |
-LICENSE="GPL-2" |
696 |
-SLOT="0" |
697 |
-KEYWORDS="~amd64 ~ppc ~x86" |
698 |
-IUSE="static-libs tcpd usbip" |
699 |
- |
700 |
-MY_PV="${PV/_/-}" |
701 |
-MY_PV="${MY_PV/-pre/-git}" |
702 |
- |
703 |
-LINUX_V=$(get_version_component_range 1-2) |
704 |
- |
705 |
-if [ ${PV/_rc} != ${PV} ]; then |
706 |
- LINUX_VER=$(get_version_component_range 1-2).$(($(get_version_component_range 3)-1)) |
707 |
- PATCH_VERSION=$(get_version_component_range 1-3) |
708 |
- LINUX_PATCH=patch-${PV//_/-}.xz |
709 |
- SRC_URI="https://www.kernel.org/pub/linux/kernel/v3.x/testing/${LINUX_PATCH} |
710 |
- https://www.kernel.org/pub/linux/kernel/v3.x/testing/v${PATCH_VERSION}/${LINUX_PATCH}" |
711 |
-elif [ $(get_version_component_count) == 4 ]; then |
712 |
- # stable-release series |
713 |
- LINUX_VER=$(get_version_component_range 1-3) |
714 |
- LINUX_PATCH=patch-${PV}.xz |
715 |
- SRC_URI="https://www.kernel.org/pub/linux/kernel/v3.x/${LINUX_PATCH}" |
716 |
-else |
717 |
- LINUX_VER=${PV} |
718 |
-fi |
719 |
- |
720 |
-LINUX_SOURCES=linux-${LINUX_VER}.tar.xz |
721 |
-SRC_URI="${SRC_URI} https://www.kernel.org/pub/linux/kernel/v3.x/${LINUX_SOURCES}" |
722 |
- |
723 |
-# pmtools also provides turbostat |
724 |
-# usbip available in seperate package now |
725 |
-RDEPEND="sys-apps/hwids |
726 |
- >=dev-libs/glib-2.6 |
727 |
- >=sys-kernel/linux-headers-$(get_version_component_range 1-2) |
728 |
- usbip? ( |
729 |
- !net-misc/usbip |
730 |
- tcpd? ( sys-apps/tcp-wrappers ) |
731 |
- virtual/libudev |
732 |
- ) |
733 |
- !sys-power/pmtools" |
734 |
-DEPEND="${RDEPEND} |
735 |
- virtual/pkgconfig" |
736 |
- |
737 |
-S="${WORKDIR}/linux-${LINUX_VER}" |
738 |
- |
739 |
-# All of these are integrated with the kernel build system, |
740 |
-# No make install, and ideally build with with the root Makefile |
741 |
-TARGETS_SIMPLE=( |
742 |
- Documentation/accounting/getdelays.c |
743 |
- Documentation/laptops/dslm.c |
744 |
- Documentation/networking/timestamping/timestamping.c |
745 |
- Documentation/watchdog/src/watchdog-simple.c |
746 |
- tools/cgroup/cgroup_event_listener.c |
747 |
- tools/laptop/freefall/freefall.c |
748 |
- tools/vm/slabinfo.c |
749 |
- usr/gen_init_cpio.c |
750 |
- # Broken: |
751 |
- #tools/lguest/lguest.c # fails to compile |
752 |
- #tools/vm/page-types.c # page-types.c:(.text+0xe2b): undefined reference to `debugfs__mount', not defined anywhere |
753 |
- #tools/net/bpf_jit_disasm.c # /usr/include/x86_64-pc-linux-gnu/bfd.h:35:2: error: #error config.h must be included before this header |
754 |
-) |
755 |
-# tools/vm/page-types.c - broken, header path issue |
756 |
-# tools/hv/hv_kvp_daemon.c - broken in 3.7 by missing linux/hyperv.h userspace |
757 |
-# Documentation/networking/ifenslave.c - obsolete |
758 |
-# Documentation/ptp/testptp.c - pending linux-headers-3.0 |
759 |
- |
760 |
-# These have a broken make install, no DESTDIR |
761 |
-TARGET_MAKE_SIMPLE=( |
762 |
- Documentation/misc-devices/mei:mei-amt-version |
763 |
- tools/firewire:nosy-dump |
764 |
- tools/iio:generic_buffer |
765 |
- tools/iio:iio_event_monitor |
766 |
- tools/iio:lsiio |
767 |
- tools/power/x86/turbostat:turbostat |
768 |
- tools/power/x86/x86_energy_perf_policy:x86_energy_perf_policy |
769 |
- tools/thermal/tmon:tmon |
770 |
-) |
771 |
-# tools/perf - covered by dev-utils/perf |
772 |
-# tools/usb - testcases only |
773 |
-# tools/virtio - testcaes only |
774 |
- |
775 |
- #for _pattern in {Documentation,scripts,tools,usr,include,lib,"arch/*/include",Makefile,Kbuild,Kconfig}; do |
776 |
-src_unpack() { |
777 |
- unpack ${LINUX_SOURCES} |
778 |
- |
779 |
- MY_A= |
780 |
- for _AFILE in ${A}; do |
781 |
- [[ ${_AFILE} == ${LINUX_SOURCES} ]] && continue |
782 |
- [[ ${_AFILE} == ${LINUX_PATCH} ]] && continue |
783 |
- MY_A="${MY_A} ${_AFILE}" |
784 |
- done |
785 |
- [[ -n ${MY_A} ]] && unpack ${MY_A} |
786 |
-} |
787 |
- |
788 |
-src_prepare() { |
789 |
- if [[ -n ${LINUX_PATCH} ]]; then |
790 |
- epatch "${DISTDIR}"/${LINUX_PATCH} |
791 |
- fi |
792 |
- |
793 |
- pushd tools/usb/usbip/ >/dev/null && |
794 |
- sed -i 's/-Werror[^ ]* //g' configure.ac && |
795 |
- eautoreconf -i -f -v && |
796 |
- popd >/dev/null || die "usbip" |
797 |
- |
798 |
- sed -i \ |
799 |
- -e '/^nosy-dump.*LDFLAGS/d' \ |
800 |
- -e '/^nosy-dump.*CFLAGS/d' \ |
801 |
- -e '/^nosy-dump.*CPPFLAGS/s,CPPFLAGS =,CPPFLAGS +=,g' \ |
802 |
- "${S}"/tools/firewire/Makefile |
803 |
-} |
804 |
- |
805 |
-kernel_asm_arch() { |
806 |
- a="${1:${ARCH}}" |
807 |
- case ${a} in |
808 |
- # Merged arches |
809 |
- x86|amd64) echo x86 ;; |
810 |
- ppc*) echo powerpc ;; |
811 |
- # Non-merged |
812 |
- alpha|arm|ia64|m68k|mips|sh|sparc*) echo ${1} ;; |
813 |
- *) die "TODO: Update the code for your asm-ARCH symlink" ;; |
814 |
- esac |
815 |
-} |
816 |
- |
817 |
-src_configure() { |
818 |
- if use usbip; then |
819 |
- pushd tools/usb/usbip/ || die |
820 |
- econf \ |
821 |
- $(use_enable static-libs static) \ |
822 |
- $(use tcpd || echo --without-tcp-wrappers) \ |
823 |
- --with-usbids-dir=/usr/share/misc |
824 |
- popd |
825 |
- fi |
826 |
-} |
827 |
- |
828 |
-src_compile() { |
829 |
- local karch=$(kernel_asm_arch "${ARCH}") |
830 |
- # This is the minimal amount needed to start building host binaries. |
831 |
- #emake allmodconfig ARCH=${karch} |
832 |
- #emake prepare modules_prepare ARCH=${karch} |
833 |
- #touch Module.symvers |
834 |
- |
835 |
- # Now we can start building |
836 |
- append-cflags -I./tools/lib |
837 |
- for s in ${TARGETS_SIMPLE[@]} ; do |
838 |
- dir=$(dirname $s) src=$(basename $s) bin=${src%.c} |
839 |
- einfo "Building $s => $bin" |
840 |
- emake -f /dev/null M=${dir} ARCH=${karch} ${s%.c} |
841 |
- done |
842 |
- |
843 |
- for t in ${TARGET_MAKE_SIMPLE[@]} ; do |
844 |
- dir=${t/:*} target_binfile=${t#*:} |
845 |
- target=${target_binfile/:*} binfile=${target_binfile/*:} |
846 |
- [ -z "${binfile}" ] && binfile=$target |
847 |
- einfo "Building $dir => $binfile (via emake $target)" |
848 |
- emake -C $dir ARCH=${karch} $target |
849 |
- done |
850 |
- |
851 |
- if use usbip; then |
852 |
- emake -C tools/usb/usbip |
853 |
- fi |
854 |
-} |
855 |
- |
856 |
-src_install() { |
857 |
- into /usr |
858 |
- for s in ${TARGETS_SIMPLE[@]} ; do |
859 |
- dir=$(dirname $s) src=$(basename $s) bin=${src%.c} |
860 |
- einfo "Installing $s => $bin" |
861 |
- dosbin ${dir}/${bin} |
862 |
- done |
863 |
- |
864 |
- for t in ${TARGET_MAKE_SIMPLE[@]} ; do |
865 |
- dir=${t/:*} target_binfile=${t#*:} |
866 |
- target=${target_binfile/:*} binfile=${target_binfile/*:} |
867 |
- [ -z "${binfile}" ] && binfile=$target |
868 |
- einfo "Installing $dir => $binfile" |
869 |
- dosbin ${dir}/${binfile} |
870 |
- done |
871 |
- |
872 |
- if use usbip; then |
873 |
- pushd tools/usb/usbip/ >/dev/null || die "usbip" |
874 |
- emake DESTDIR="${D}" install |
875 |
- newdoc README README.usbip |
876 |
- newdoc AUTHORS AUTHORS.usbip |
877 |
- popd >/dev/null |
878 |
- dodoc drivers/usb/usbip/usbip_protocol.txt |
879 |
- fi |
880 |
- |
881 |
- mv -f "${D}"/usr/sbin/{,iio_}generic_buffer |
882 |
- |
883 |
- newconfd "${FILESDIR}"/freefall.confd freefall |
884 |
- newinitd "${FILESDIR}"/freefall.initd freefall |
885 |
- prune_libtool_files |
886 |
-} |
887 |
- |
888 |
-pkg_postinst() { |
889 |
- echo |
890 |
- elog "The cpupower utility is maintained separately at sys-power/cpupower" |
891 |
- elog "The lguest utility no longer builds, and has been dropped." |
892 |
- elog "The hpfall tool has been renamed by upstream to freefall; update your config if needed" |
893 |
- if find /etc/runlevels/ -name hpfall ; then |
894 |
- ewarn "You must change hpfall to freefall in your runlevels!" |
895 |
- fi |
896 |
- if use usbip; then |
897 |
- elog "For using USB/IP you need to enable USBIP_VHCI_HCD in the client" |
898 |
- elog "machine's kernel config and USBIP_HOST on the server." |
899 |
- fi |
900 |
-} |
901 |
|
902 |
diff --git a/sys-apps/linux-misc-apps/linux-misc-apps-4.4.ebuild b/sys-apps/linux-misc-apps/linux-misc-apps-4.4.ebuild |
903 |
deleted file mode 100644 |
904 |
index ad1f27593bf..00000000000 |
905 |
--- a/sys-apps/linux-misc-apps/linux-misc-apps-4.4.ebuild |
906 |
+++ /dev/null |
907 |
@@ -1,183 +0,0 @@ |
908 |
-# Copyright 1999-2020 Gentoo Authors |
909 |
-# Distributed under the terms of the GNU General Public License v2 |
910 |
- |
911 |
-EAPI=5 |
912 |
- |
913 |
-inherit versionator eutils toolchain-funcs linux-info ltprune flag-o-matic |
914 |
- |
915 |
-DESCRIPTION="Misc tools bundled with kernel sources" |
916 |
-HOMEPAGE="https://kernel.org/" |
917 |
- |
918 |
-LICENSE="GPL-2" |
919 |
-SLOT="0" |
920 |
-KEYWORDS="~amd64 ~ppc ~x86" |
921 |
-IUSE="static-libs tcpd" |
922 |
- |
923 |
-MY_PV="${PV/_/-}" |
924 |
-MY_PV="${MY_PV/-pre/-git}" |
925 |
- |
926 |
-LINUX_V=$(get_version_component_range 1-2) |
927 |
- |
928 |
-if [ ${PV/_rc} != ${PV} ]; then |
929 |
- LINUX_VER=$(get_version_component_range 1-2).$(($(get_version_component_range 3)-1)) |
930 |
- PATCH_VERSION=$(get_version_component_range 1-3) |
931 |
- LINUX_PATCH=patch-${PV//_/-}.xz |
932 |
- SRC_URI="https://www.kernel.org/pub/linux/kernel/v3.x/testing/${LINUX_PATCH} |
933 |
- https://www.kernel.org/pub/linux/kernel/v3.x/testing/v${PATCH_VERSION}/${LINUX_PATCH}" |
934 |
-elif [ $(get_version_component_count) == 4 ]; then |
935 |
- # stable-release series |
936 |
- LINUX_VER=$(get_version_component_range 1-3) |
937 |
- LINUX_PATCH=patch-${PV}.xz |
938 |
- SRC_URI="https://www.kernel.org/pub/linux/kernel/v3.x/${LINUX_PATCH}" |
939 |
-else |
940 |
- LINUX_VER=${PV} |
941 |
-fi |
942 |
- |
943 |
-LINUX_SOURCES=linux-${LINUX_VER}.tar.xz |
944 |
-SRC_URI="${SRC_URI} https://www.kernel.org/pub/linux/kernel/v3.x/${LINUX_SOURCES}" |
945 |
- |
946 |
-# pmtools also provides turbostat |
947 |
-# usbip available in seperate package now |
948 |
-RDEPEND="sys-apps/hwids |
949 |
- >=dev-libs/glib-2.6 |
950 |
- tcpd? ( sys-apps/tcp-wrappers ) |
951 |
- !sys-power/pmtools" |
952 |
-DEPEND="${RDEPEND} |
953 |
- virtual/pkgconfig" |
954 |
- |
955 |
-S="${WORKDIR}/linux-${LINUX_VER}" |
956 |
- |
957 |
-# All of these are integrated with the kernel build system, |
958 |
-# No make install, and ideally build with with the root Makefile |
959 |
-TARGETS_SIMPLE=( |
960 |
- Documentation/accounting/getdelays.c |
961 |
- Documentation/laptops/dslm.c |
962 |
- Documentation/networking/timestamping/timestamping.c |
963 |
- Documentation/watchdog/src/watchdog-simple.c |
964 |
- tools/cgroup/cgroup_event_listener.c |
965 |
- tools/laptop/freefall/freefall.c |
966 |
- tools/vm/slabinfo.c |
967 |
- usr/gen_init_cpio.c |
968 |
- # Broken: |
969 |
- #tools/lguest/lguest.c # fails to compile |
970 |
- #tools/vm/page-types.c # page-types.c:(.text+0xe2b): undefined reference to `debugfs__mount', not defined anywhere |
971 |
- #tools/net/bpf_jit_disasm.c # /usr/include/x86_64-pc-linux-gnu/bfd.h:35:2: error: #error config.h must be included before this header |
972 |
-) |
973 |
-# tools/vm/page-types.c - broken, header path issue |
974 |
-# tools/hv/hv_kvp_daemon.c - broken in 3.7 by missing linux/hyperv.h userspace |
975 |
-# Documentation/networking/ifenslave.c - obsolete |
976 |
-# Documentation/ptp/testptp.c - pending linux-headers-3.0 |
977 |
- |
978 |
-# These have a broken make install, no DESTDIR |
979 |
-TARGET_MAKE_SIMPLE=( |
980 |
- Documentation/misc-devices/mei:mei-amt-version |
981 |
- tools/firewire:nosy-dump |
982 |
- tools/iio:generic_buffer |
983 |
- tools/iio:iio_event_monitor |
984 |
- tools/iio:lsiio |
985 |
- tools/power/x86/turbostat:turbostat |
986 |
- tools/power/x86/x86_energy_perf_policy:x86_energy_perf_policy |
987 |
- tools/thermal/tmon:tmon |
988 |
-) |
989 |
-# tools/perf - covered by dev-utils/perf |
990 |
-# tools/usb - testcases only |
991 |
-# tools/virtio - testcaes only |
992 |
- |
993 |
- #for _pattern in {Documentation,scripts,tools,usr,include,lib,"arch/*/include",Makefile,Kbuild,Kconfig}; do |
994 |
-src_unpack() { |
995 |
- unpack ${LINUX_SOURCES} |
996 |
- |
997 |
- MY_A= |
998 |
- for _AFILE in ${A}; do |
999 |
- [[ ${_AFILE} == ${LINUX_SOURCES} ]] && continue |
1000 |
- [[ ${_AFILE} == ${LINUX_PATCH} ]] && continue |
1001 |
- MY_A="${MY_A} ${_AFILE}" |
1002 |
- done |
1003 |
- [[ -n ${MY_A} ]] && unpack ${MY_A} |
1004 |
-} |
1005 |
- |
1006 |
-src_prepare() { |
1007 |
- if [[ -n ${LINUX_PATCH} ]]; then |
1008 |
- epatch "${DISTDIR}"/${LINUX_PATCH} |
1009 |
- fi |
1010 |
- |
1011 |
- sed -i \ |
1012 |
- -e '/^nosy-dump.*LDFLAGS/d' \ |
1013 |
- -e '/^nosy-dump.*CFLAGS/d' \ |
1014 |
- -e '/^nosy-dump.*CPPFLAGS/s,CPPFLAGS =,CPPFLAGS +=,g' \ |
1015 |
- "${S}"/tools/firewire/Makefile |
1016 |
-} |
1017 |
- |
1018 |
-kernel_asm_arch() { |
1019 |
- a="${1:${ARCH}}" |
1020 |
- case ${a} in |
1021 |
- # Merged arches |
1022 |
- x86|amd64) echo x86 ;; |
1023 |
- ppc*) echo powerpc ;; |
1024 |
- # Non-merged |
1025 |
- alpha|arm|ia64|m68k|mips|sh|sparc*) echo ${1} ;; |
1026 |
- *) die "TODO: Update the code for your asm-ARCH symlink" ;; |
1027 |
- esac |
1028 |
-} |
1029 |
- |
1030 |
-src_configure() { |
1031 |
- : |
1032 |
-} |
1033 |
- |
1034 |
-src_compile() { |
1035 |
- local karch=$(kernel_asm_arch "${ARCH}") |
1036 |
- # This is the minimal amount needed to start building host binaries. |
1037 |
- #emake allmodconfig ARCH=${karch} |
1038 |
- #emake prepare modules_prepare ARCH=${karch} |
1039 |
- #touch Module.symvers |
1040 |
- |
1041 |
- # Now we can start building |
1042 |
- append-cflags -I./tools/lib |
1043 |
- for s in ${TARGETS_SIMPLE[@]} ; do |
1044 |
- dir=$(dirname $s) src=$(basename $s) bin=${src%.c} |
1045 |
- einfo "Building $s => $bin" |
1046 |
- emake -f /dev/null M=${dir} ARCH=${karch} ${s%.c} |
1047 |
- done |
1048 |
- |
1049 |
- for t in ${TARGET_MAKE_SIMPLE[@]} ; do |
1050 |
- dir=${t/:*} target_binfile=${t#*:} |
1051 |
- target=${target_binfile/:*} binfile=${target_binfile/*:} |
1052 |
- [ -z "${binfile}" ] && binfile=$target |
1053 |
- einfo "Building $dir => $binfile (via emake $target)" |
1054 |
- emake -C $dir ARCH=${karch} $target |
1055 |
- done |
1056 |
-} |
1057 |
- |
1058 |
-src_install() { |
1059 |
- into /usr |
1060 |
- for s in ${TARGETS_SIMPLE[@]} ; do |
1061 |
- dir=$(dirname $s) src=$(basename $s) bin=${src%.c} |
1062 |
- einfo "Installing $s => $bin" |
1063 |
- dosbin ${dir}/${bin} |
1064 |
- done |
1065 |
- |
1066 |
- for t in ${TARGET_MAKE_SIMPLE[@]} ; do |
1067 |
- dir=${t/:*} target_binfile=${t#*:} |
1068 |
- target=${target_binfile/:*} binfile=${target_binfile/*:} |
1069 |
- [ -z "${binfile}" ] && binfile=$target |
1070 |
- einfo "Installing $dir => $binfile" |
1071 |
- dosbin ${dir}/${binfile} |
1072 |
- done |
1073 |
- |
1074 |
- mv -f "${D}"/usr/sbin/{,iio_}generic_buffer |
1075 |
- |
1076 |
- newconfd "${FILESDIR}"/freefall.confd freefall |
1077 |
- newinitd "${FILESDIR}"/freefall.initd freefall |
1078 |
- prune_libtool_files |
1079 |
-} |
1080 |
- |
1081 |
-pkg_postinst() { |
1082 |
- echo |
1083 |
- elog "The cpupower utility is maintained separately at sys-power/cpupower" |
1084 |
- elog "The usbip utility is maintained separately at net-misc/usbip" |
1085 |
- elog "The lguest utility no longer builds, and has been dropped." |
1086 |
- elog "The hpfall tool has been renamed by upstream to freefall; update your config if needed" |
1087 |
- if find /etc/runlevels/ -name hpfall ; then |
1088 |
- ewarn "You must change hpfall to freefall in your runlevels!" |
1089 |
- fi |
1090 |
-} |