1 |
commit: 10dfd4f8df338fbdeb51af8b0fd54c413bf43558 |
2 |
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Sep 24 19:29:53 2020 +0000 |
4 |
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 24 19:29:53 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10dfd4f8 |
7 |
|
8 |
sys-apps/linux-misc-apps: bump for EAPI7 |
9 |
|
10 |
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org> |
11 |
|
12 |
sys-apps/linux-misc-apps/Manifest | 1 + |
13 |
.../linux-misc-apps/linux-misc-apps-5.8.ebuild | 228 +++++++++++++++++++++ |
14 |
2 files changed, 229 insertions(+) |
15 |
|
16 |
diff --git a/sys-apps/linux-misc-apps/Manifest b/sys-apps/linux-misc-apps/Manifest |
17 |
index 00e921a143d..3b9ccbdccf4 100644 |
18 |
--- a/sys-apps/linux-misc-apps/Manifest |
19 |
+++ b/sys-apps/linux-misc-apps/Manifest |
20 |
@@ -3,3 +3,4 @@ DIST linux-3.6.tar.bz2 82296001 BLAKE2B 454e1c86dd5b7d2f9ff8ba777feda3743b620ecf |
21 |
DIST linux-4.19.tar.xz 103117552 BLAKE2B 1dbf16cf410867412d17568fe42bc1e90c034183b654d270b650621ff7664a321950943d0639205bc1ee7ef6210be170c1f2c785a042ed8a4ec5e3a486d890e0 SHA512 ab67cc746b375a8b135e8b23e35e1d6787930d19b3c26b2679787d62951cbdbc3bb66f8ededeb9b890e5008b2459397f9018f1a6772fdef67780b06a4cb9f6f4 |
22 |
DIST linux-4.4.tar.xz 87295988 BLAKE2B f260f1858994f5d481fd078c86e51bddbc958f7c5d1586f60dced772e1b1107ecf3aae0558c3e6f39c36f7d3aa1e6cd1e5c64ec9d6f2218f47b98413da6466fb SHA512 13c8459933a8b80608e226a1398e3d1848352ace84bcfb7e6a4a33cb230bbe1ab719d4b58e067283df91ce5311be6d2d595fc8c19e2ae6ecc652499415614b3e |
23 |
DIST linux-5.6.tar.xz 111785252 BLAKE2B 8dbe02a8ca7fd3dcf512a15c5d8098c1e7f94257e65173fed43fcc45480e4ab790df8cd39bbbb4e2a21dc9a00385bc9bbe98215a31e7f7e1d9c8f21cd8ace69e SHA512 80846fe2b4e4a7ff471d2dde28a8216ae807a3209f959e93d39ea4fc9a189ea28ec3db9d303b3fe15a28c2cb90e7446876678e93e23353c2d6f262e364a06bc9 |
24 |
+DIST linux-5.8.tar.xz 114459324 BLAKE2B 7bd97f8fa4527840754434414c07283e89731dc8ebb1e95fa5bc1469a60af1122582c0d3b6e262e77882f023190068df3537bd8b65964b3caa820bb2c8e579c7 SHA512 45a53ecf351096ef6e98242cca4228b8da9b9139ecc6963695791ea6fb7a9484a4e1c19dcca7ce7cbfdfa49de0451b70973bb078f12bdae9cbaddbc3f8092556 |
25 |
|
26 |
diff --git a/sys-apps/linux-misc-apps/linux-misc-apps-5.8.ebuild b/sys-apps/linux-misc-apps/linux-misc-apps-5.8.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000000..c64dce76d29 |
29 |
--- /dev/null |
30 |
+++ b/sys-apps/linux-misc-apps/linux-misc-apps-5.8.ebuild |
31 |
@@ -0,0 +1,228 @@ |
32 |
+# Copyright 1999-2020 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=7 |
36 |
+ |
37 |
+inherit eutils toolchain-funcs linux-info autotools flag-o-matic |
38 |
+ |
39 |
+DESCRIPTION="Misc tools bundled with kernel sources" |
40 |
+HOMEPAGE="https://kernel.org/" |
41 |
+ |
42 |
+LICENSE="GPL-2" |
43 |
+SLOT="0" |
44 |
+KEYWORDS="~amd64 ~ppc ~x86" |
45 |
+IUSE="static-libs tcpd usbip" |
46 |
+ |
47 |
+MY_PV="${PV/_/-}" |
48 |
+MY_PV="${MY_PV/-pre/-git}" |
49 |
+ |
50 |
+LINUX_V=$(ver_cut 1-2) |
51 |
+ |
52 |
+get_version_component_count() { |
53 |
+ local cnt=( $(ver_rs 1- ' ') ) |
54 |
+ echo ${#cnt[@]} || die |
55 |
+} |
56 |
+ |
57 |
+if [ ${PV/_rc} != ${PV} ]; then |
58 |
+ LINUX_VER=$(ver_cut 1-2).$(($(ver_cut 3)-1)) |
59 |
+ PATCH_VERSION=$(ver_cut 1-3) |
60 |
+ LINUX_PATCH=patch-${PV//_/-}.xz |
61 |
+ SRC_URI="https://www.kernel.org/pub/linux/kernel/v3.x/testing/${LINUX_PATCH} |
62 |
+ https://www.kernel.org/pub/linux/kernel/v3.x/testing/v${PATCH_VERSION}/${LINUX_PATCH}" |
63 |
+elif [ $(get_version_component_count) == 4 ]; then |
64 |
+ # stable-release series |
65 |
+ LINUX_VER=$(ver_cut 1-3) |
66 |
+ LINUX_PATCH=patch-${PV}.xz |
67 |
+ SRC_URI="https://www.kernel.org/pub/linux/kernel/v3.x/${LINUX_PATCH}" |
68 |
+else |
69 |
+ LINUX_VER=${PV} |
70 |
+fi |
71 |
+ |
72 |
+LINUX_SOURCES=linux-${LINUX_VER}.tar.xz |
73 |
+SRC_URI="${SRC_URI} https://www.kernel.org/pub/linux/kernel/v3.x/${LINUX_SOURCES}" |
74 |
+ |
75 |
+# pmtools also provides turbostat |
76 |
+# usbip available in seperate package now |
77 |
+RDEPEND="sys-apps/hwids |
78 |
+ >=dev-libs/glib-2.6 |
79 |
+ >=sys-kernel/linux-headers-${LINUX_V} |
80 |
+ usbip? ( |
81 |
+ !net-misc/usbip |
82 |
+ tcpd? ( sys-apps/tcp-wrappers ) |
83 |
+ virtual/libudev |
84 |
+ ) |
85 |
+ !sys-power/pmtools" |
86 |
+DEPEND="${RDEPEND} |
87 |
+ virtual/pkgconfig" |
88 |
+ |
89 |
+S="${WORKDIR}/linux-${LINUX_VER}" |
90 |
+ |
91 |
+# All of these are integrated with the kernel build system, |
92 |
+# No make install, and ideally build with with the root Makefile |
93 |
+TARGETS_SIMPLE=( |
94 |
+ samples/watchdog/watchdog-simple.c |
95 |
+ tools/accounting/getdelays.c |
96 |
+ tools/cgroup/cgroup_event_listener.c |
97 |
+ tools/laptop/freefall/freefall.c |
98 |
+ tools/testing/selftests/net/timestamping.c |
99 |
+ tools/vm/slabinfo.c |
100 |
+ usr/gen_init_cpio.c |
101 |
+ # Broken: |
102 |
+ #tools/lguest/lguest.c # fails to compile |
103 |
+ #tools/vm/page-types.c # page-types.c:(.text+0xe2b): undefined reference to `debugfs__mount', not defined anywhere |
104 |
+ #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 |
105 |
+) |
106 |
+# tools/vm/page-types.c - broken, header path issue |
107 |
+# tools/hv/hv_kvp_daemon.c - broken in 3.7 by missing linux/hyperv.h userspace |
108 |
+# Documentation/networking/ifenslave.c - obsolete |
109 |
+# Documentation/ptp/testptp.c - pending linux-headers-3.0 |
110 |
+ |
111 |
+# These have a broken make install, no DESTDIR |
112 |
+TARGET_MAKE_SIMPLE=( |
113 |
+ samples/mei:mei-amt-version |
114 |
+ tools/firewire:nosy-dump |
115 |
+ tools/iio:iio_event_monitor |
116 |
+ tools/iio:iio_generic_buffer |
117 |
+ tools/iio:lsiio |
118 |
+ tools/laptop/dslm:dslm |
119 |
+ tools/power/x86/turbostat:turbostat |
120 |
+ tools/power/x86/x86_energy_perf_policy:x86_energy_perf_policy |
121 |
+ tools/thermal/tmon:tmon |
122 |
+) |
123 |
+# tools/perf - covered by dev-utils/perf |
124 |
+# tools/usb - testcases only |
125 |
+# tools/virtio - testcaes only |
126 |
+ |
127 |
+ #for _pattern in {Documentation,scripts,tools,usr,include,lib,"arch/*/include",Makefile,Kbuild,Kconfig}; do |
128 |
+src_unpack() { |
129 |
+ unpack ${LINUX_SOURCES} |
130 |
+ |
131 |
+ MY_A= |
132 |
+ for _AFILE in ${A}; do |
133 |
+ [[ ${_AFILE} == ${LINUX_SOURCES} ]] && continue |
134 |
+ [[ ${_AFILE} == ${LINUX_PATCH} ]] && continue |
135 |
+ MY_A="${MY_A} ${_AFILE}" |
136 |
+ done |
137 |
+ [[ -n ${MY_A} ]] && unpack ${MY_A} |
138 |
+} |
139 |
+ |
140 |
+src_prepare() { |
141 |
+ if [[ -n ${LINUX_PATCH} ]]; then |
142 |
+ epatch "${DISTDIR}"/${LINUX_PATCH} |
143 |
+ fi |
144 |
+ |
145 |
+ pushd tools/usb/usbip/ >/dev/null && |
146 |
+ sed -i 's/-Werror[^ ]* //g' configure.ac && |
147 |
+ eautoreconf -i -f -v && |
148 |
+ popd >/dev/null || die "usbip" |
149 |
+ |
150 |
+ sed -i \ |
151 |
+ -e '/^nosy-dump.*LDFLAGS/d' \ |
152 |
+ -e '/^nosy-dump.*CFLAGS/d' \ |
153 |
+ -e '/^nosy-dump.*CPPFLAGS/s,CPPFLAGS =,CPPFLAGS +=,g' \ |
154 |
+ "${S}"/tools/firewire/Makefile |
155 |
+ |
156 |
+ eapply_user |
157 |
+} |
158 |
+ |
159 |
+kernel_asm_arch() { |
160 |
+ a="${1:${ARCH}}" |
161 |
+ case ${a} in |
162 |
+ # Merged arches |
163 |
+ x86|amd64) echo x86 ;; |
164 |
+ ppc*) echo powerpc ;; |
165 |
+ # Non-merged |
166 |
+ alpha|arm|ia64|m68k|mips|sh|sparc*) echo ${1} ;; |
167 |
+ *) die "TODO: Update the code for your asm-ARCH symlink" ;; |
168 |
+ esac |
169 |
+} |
170 |
+ |
171 |
+src_configure() { |
172 |
+ if use usbip; then |
173 |
+ pushd tools/usb/usbip/ || die |
174 |
+ econf \ |
175 |
+ $(use_enable static-libs static) \ |
176 |
+ $(use tcpd || echo --without-tcp-wrappers) \ |
177 |
+ --with-usbids-dir=/usr/share/misc |
178 |
+ popd |
179 |
+ fi |
180 |
+} |
181 |
+ |
182 |
+src_compile() { |
183 |
+ local karch=$(kernel_asm_arch "${ARCH}") |
184 |
+ # This is the minimal amount needed to start building host binaries. |
185 |
+ #emake allmodconfig ARCH=${karch} |
186 |
+ #emake prepare modules_prepare ARCH=${karch} |
187 |
+ #touch Module.symvers |
188 |
+ |
189 |
+ # Now we can start building |
190 |
+ append-cflags -I./tools/lib |
191 |
+ for s in ${TARGETS_SIMPLE[@]} ; do |
192 |
+ dir=$(dirname $s) src=$(basename $s) bin=${src%.c} |
193 |
+ einfo "Building $s => $bin" |
194 |
+ emake -f /dev/null M=${dir} ARCH=${karch} ${s%.c} |
195 |
+ done |
196 |
+ |
197 |
+ for t in ${TARGET_MAKE_SIMPLE[@]} ; do |
198 |
+ dir=${t/:*} target_binfile=${t#*:} |
199 |
+ target=${target_binfile/:*} binfile=${target_binfile/*:} |
200 |
+ [ -z "${binfile}" ] && binfile=$target |
201 |
+ einfo "Building $dir => $binfile (via emake $target)" |
202 |
+ emake -C $dir ARCH=${karch} $target |
203 |
+ done |
204 |
+ |
205 |
+ if use usbip; then |
206 |
+ emake -C tools/usb/usbip |
207 |
+ fi |
208 |
+} |
209 |
+ |
210 |
+src_install() { |
211 |
+ into /usr |
212 |
+ for s in ${TARGETS_SIMPLE[@]} ; do |
213 |
+ dir=$(dirname $s) src=$(basename $s) bin=${src%.c} |
214 |
+ einfo "Installing $s => $bin" |
215 |
+ dosbin ${dir}/${bin} |
216 |
+ done |
217 |
+ |
218 |
+ for t in ${TARGET_MAKE_SIMPLE[@]} ; do |
219 |
+ dir=${t/:*} target_binfile=${t#*:} |
220 |
+ target=${target_binfile/:*} binfile=${target_binfile/*:} |
221 |
+ [ -z "${binfile}" ] && binfile=$target |
222 |
+ einfo "Installing $dir => $binfile" |
223 |
+ dosbin ${dir}/${binfile} |
224 |
+ done |
225 |
+ |
226 |
+ if use usbip; then |
227 |
+ pushd tools/usb/usbip/ >/dev/null || die "usbip" |
228 |
+ emake DESTDIR="${D}" install |
229 |
+ newdoc README README.usbip |
230 |
+ newdoc AUTHORS AUTHORS.usbip |
231 |
+ popd >/dev/null |
232 |
+ dodoc Documentation/usb/usbip_protocol.rst |
233 |
+ find "${D}" -name 'libusbip*.la' -delete || die |
234 |
+ fi |
235 |
+ |
236 |
+ # At one point upstream it was moved, but be generic to detect if it's |
237 |
+ # happened already |
238 |
+ if [[ -f "${D}"/usr/sbin/generic_buffer ]] && \ |
239 |
+ [[ ! -f "${D}"/usr/sbin/iio_generic_buffer ]]; then |
240 |
+ mv -f "${D}"/usr/sbin/{,iio_}generic_buffer || die |
241 |
+ fi |
242 |
+ |
243 |
+ newconfd "${FILESDIR}"/freefall.confd freefall |
244 |
+ newinitd "${FILESDIR}"/freefall.initd freefall |
245 |
+} |
246 |
+ |
247 |
+pkg_postinst() { |
248 |
+ echo |
249 |
+ elog "The cpupower utility is maintained separately at sys-power/cpupower" |
250 |
+ elog "The lguest utility no longer builds, and has been dropped." |
251 |
+ elog "The hpfall tool has been renamed by upstream to freefall; update your config if needed" |
252 |
+ if find "${ROOT}"/etc/runlevels/ -name hpfall ; then |
253 |
+ ewarn "You must change hpfall to freefall in your runlevels!" |
254 |
+ fi |
255 |
+ if use usbip; then |
256 |
+ elog "For using USB/IP you need to enable USBIP_VHCI_HCD in the client" |
257 |
+ elog "machine's kernel config and USBIP_HOST on the server." |
258 |
+ fi |
259 |
+} |