summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2020-09-24 12:29:53 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2020-09-24 12:29:53 -0700
commit10dfd4f8df338fbdeb51af8b0fd54c413bf43558 (patch)
treee257bf22bc8e126cdc347d15211468355639fefd /sys-apps
parentsys-block/megacli: cleanup (diff)
downloadgentoo-10dfd4f8df338fbdeb51af8b0fd54c413bf43558.tar.gz
gentoo-10dfd4f8df338fbdeb51af8b0fd54c413bf43558.tar.bz2
gentoo-10dfd4f8df338fbdeb51af8b0fd54c413bf43558.zip
sys-apps/linux-misc-apps: bump for EAPI7
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/linux-misc-apps/Manifest1
-rw-r--r--sys-apps/linux-misc-apps/linux-misc-apps-5.8.ebuild228
2 files changed, 229 insertions, 0 deletions
diff --git a/sys-apps/linux-misc-apps/Manifest b/sys-apps/linux-misc-apps/Manifest
index 00e921a143d0..3b9ccbdccf45 100644
--- a/sys-apps/linux-misc-apps/Manifest
+++ b/sys-apps/linux-misc-apps/Manifest
@@ -3,3 +3,4 @@ DIST linux-3.6.tar.bz2 82296001 BLAKE2B 454e1c86dd5b7d2f9ff8ba777feda3743b620ecf
DIST linux-4.19.tar.xz 103117552 BLAKE2B 1dbf16cf410867412d17568fe42bc1e90c034183b654d270b650621ff7664a321950943d0639205bc1ee7ef6210be170c1f2c785a042ed8a4ec5e3a486d890e0 SHA512 ab67cc746b375a8b135e8b23e35e1d6787930d19b3c26b2679787d62951cbdbc3bb66f8ededeb9b890e5008b2459397f9018f1a6772fdef67780b06a4cb9f6f4
DIST linux-4.4.tar.xz 87295988 BLAKE2B f260f1858994f5d481fd078c86e51bddbc958f7c5d1586f60dced772e1b1107ecf3aae0558c3e6f39c36f7d3aa1e6cd1e5c64ec9d6f2218f47b98413da6466fb SHA512 13c8459933a8b80608e226a1398e3d1848352ace84bcfb7e6a4a33cb230bbe1ab719d4b58e067283df91ce5311be6d2d595fc8c19e2ae6ecc652499415614b3e
DIST linux-5.6.tar.xz 111785252 BLAKE2B 8dbe02a8ca7fd3dcf512a15c5d8098c1e7f94257e65173fed43fcc45480e4ab790df8cd39bbbb4e2a21dc9a00385bc9bbe98215a31e7f7e1d9c8f21cd8ace69e SHA512 80846fe2b4e4a7ff471d2dde28a8216ae807a3209f959e93d39ea4fc9a189ea28ec3db9d303b3fe15a28c2cb90e7446876678e93e23353c2d6f262e364a06bc9
+DIST linux-5.8.tar.xz 114459324 BLAKE2B 7bd97f8fa4527840754434414c07283e89731dc8ebb1e95fa5bc1469a60af1122582c0d3b6e262e77882f023190068df3537bd8b65964b3caa820bb2c8e579c7 SHA512 45a53ecf351096ef6e98242cca4228b8da9b9139ecc6963695791ea6fb7a9484a4e1c19dcca7ce7cbfdfa49de0451b70973bb078f12bdae9cbaddbc3f8092556
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
new file mode 100644
index 000000000000..c64dce76d292
--- /dev/null
+++ b/sys-apps/linux-misc-apps/linux-misc-apps-5.8.ebuild
@@ -0,0 +1,228 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit eutils toolchain-funcs linux-info autotools flag-o-matic
+
+DESCRIPTION="Misc tools bundled with kernel sources"
+HOMEPAGE="https://kernel.org/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="static-libs tcpd usbip"
+
+MY_PV="${PV/_/-}"
+MY_PV="${MY_PV/-pre/-git}"
+
+LINUX_V=$(ver_cut 1-2)
+
+get_version_component_count() {
+ local cnt=( $(ver_rs 1- ' ') )
+ echo ${#cnt[@]} || die
+}
+
+if [ ${PV/_rc} != ${PV} ]; then
+ LINUX_VER=$(ver_cut 1-2).$(($(ver_cut 3)-1))
+ PATCH_VERSION=$(ver_cut 1-3)
+ LINUX_PATCH=patch-${PV//_/-}.xz
+ SRC_URI="https://www.kernel.org/pub/linux/kernel/v3.x/testing/${LINUX_PATCH}
+ https://www.kernel.org/pub/linux/kernel/v3.x/testing/v${PATCH_VERSION}/${LINUX_PATCH}"
+elif [ $(get_version_component_count) == 4 ]; then
+ # stable-release series
+ LINUX_VER=$(ver_cut 1-3)
+ LINUX_PATCH=patch-${PV}.xz
+ SRC_URI="https://www.kernel.org/pub/linux/kernel/v3.x/${LINUX_PATCH}"
+else
+ LINUX_VER=${PV}
+fi
+
+LINUX_SOURCES=linux-${LINUX_VER}.tar.xz
+SRC_URI="${SRC_URI} https://www.kernel.org/pub/linux/kernel/v3.x/${LINUX_SOURCES}"
+
+# pmtools also provides turbostat
+# usbip available in seperate package now
+RDEPEND="sys-apps/hwids
+ >=dev-libs/glib-2.6
+ >=sys-kernel/linux-headers-${LINUX_V}
+ usbip? (
+ !net-misc/usbip
+ tcpd? ( sys-apps/tcp-wrappers )
+ virtual/libudev
+ )
+ !sys-power/pmtools"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}/linux-${LINUX_VER}"
+
+# All of these are integrated with the kernel build system,
+# No make install, and ideally build with with the root Makefile
+TARGETS_SIMPLE=(
+ samples/watchdog/watchdog-simple.c
+ tools/accounting/getdelays.c
+ tools/cgroup/cgroup_event_listener.c
+ tools/laptop/freefall/freefall.c
+ tools/testing/selftests/net/timestamping.c
+ tools/vm/slabinfo.c
+ usr/gen_init_cpio.c
+ # Broken:
+ #tools/lguest/lguest.c # fails to compile
+ #tools/vm/page-types.c # page-types.c:(.text+0xe2b): undefined reference to `debugfs__mount', not defined anywhere
+ #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
+)
+# tools/vm/page-types.c - broken, header path issue
+# tools/hv/hv_kvp_daemon.c - broken in 3.7 by missing linux/hyperv.h userspace
+# Documentation/networking/ifenslave.c - obsolete
+# Documentation/ptp/testptp.c - pending linux-headers-3.0
+
+# These have a broken make install, no DESTDIR
+TARGET_MAKE_SIMPLE=(
+ samples/mei:mei-amt-version
+ tools/firewire:nosy-dump
+ tools/iio:iio_event_monitor
+ tools/iio:iio_generic_buffer
+ tools/iio:lsiio
+ tools/laptop/dslm:dslm
+ tools/power/x86/turbostat:turbostat
+ tools/power/x86/x86_energy_perf_policy:x86_energy_perf_policy
+ tools/thermal/tmon:tmon
+)
+# tools/perf - covered by dev-utils/perf
+# tools/usb - testcases only
+# tools/virtio - testcaes only
+
+ #for _pattern in {Documentation,scripts,tools,usr,include,lib,"arch/*/include",Makefile,Kbuild,Kconfig}; do
+src_unpack() {
+ unpack ${LINUX_SOURCES}
+
+ MY_A=
+ for _AFILE in ${A}; do
+ [[ ${_AFILE} == ${LINUX_SOURCES} ]] && continue
+ [[ ${_AFILE} == ${LINUX_PATCH} ]] && continue
+ MY_A="${MY_A} ${_AFILE}"
+ done
+ [[ -n ${MY_A} ]] && unpack ${MY_A}
+}
+
+src_prepare() {
+ if [[ -n ${LINUX_PATCH} ]]; then
+ epatch "${DISTDIR}"/${LINUX_PATCH}
+ fi
+
+ pushd tools/usb/usbip/ >/dev/null &&
+ sed -i 's/-Werror[^ ]* //g' configure.ac &&
+ eautoreconf -i -f -v &&
+ popd >/dev/null || die "usbip"
+
+ sed -i \
+ -e '/^nosy-dump.*LDFLAGS/d' \
+ -e '/^nosy-dump.*CFLAGS/d' \
+ -e '/^nosy-dump.*CPPFLAGS/s,CPPFLAGS =,CPPFLAGS +=,g' \
+ "${S}"/tools/firewire/Makefile
+
+ eapply_user
+}
+
+kernel_asm_arch() {
+ a="${1:${ARCH}}"
+ case ${a} in
+ # Merged arches
+ x86|amd64) echo x86 ;;
+ ppc*) echo powerpc ;;
+ # Non-merged
+ alpha|arm|ia64|m68k|mips|sh|sparc*) echo ${1} ;;
+ *) die "TODO: Update the code for your asm-ARCH symlink" ;;
+ esac
+}
+
+src_configure() {
+ if use usbip; then
+ pushd tools/usb/usbip/ || die
+ econf \
+ $(use_enable static-libs static) \
+ $(use tcpd || echo --without-tcp-wrappers) \
+ --with-usbids-dir=/usr/share/misc
+ popd
+ fi
+}
+
+src_compile() {
+ local karch=$(kernel_asm_arch "${ARCH}")
+ # This is the minimal amount needed to start building host binaries.
+ #emake allmodconfig ARCH=${karch}
+ #emake prepare modules_prepare ARCH=${karch}
+ #touch Module.symvers
+
+ # Now we can start building
+ append-cflags -I./tools/lib
+ for s in ${TARGETS_SIMPLE[@]} ; do
+ dir=$(dirname $s) src=$(basename $s) bin=${src%.c}
+ einfo "Building $s => $bin"
+ emake -f /dev/null M=${dir} ARCH=${karch} ${s%.c}
+ done
+
+ for t in ${TARGET_MAKE_SIMPLE[@]} ; do
+ dir=${t/:*} target_binfile=${t#*:}
+ target=${target_binfile/:*} binfile=${target_binfile/*:}
+ [ -z "${binfile}" ] && binfile=$target
+ einfo "Building $dir => $binfile (via emake $target)"
+ emake -C $dir ARCH=${karch} $target
+ done
+
+ if use usbip; then
+ emake -C tools/usb/usbip
+ fi
+}
+
+src_install() {
+ into /usr
+ for s in ${TARGETS_SIMPLE[@]} ; do
+ dir=$(dirname $s) src=$(basename $s) bin=${src%.c}
+ einfo "Installing $s => $bin"
+ dosbin ${dir}/${bin}
+ done
+
+ for t in ${TARGET_MAKE_SIMPLE[@]} ; do
+ dir=${t/:*} target_binfile=${t#*:}
+ target=${target_binfile/:*} binfile=${target_binfile/*:}
+ [ -z "${binfile}" ] && binfile=$target
+ einfo "Installing $dir => $binfile"
+ dosbin ${dir}/${binfile}
+ done
+
+ if use usbip; then
+ pushd tools/usb/usbip/ >/dev/null || die "usbip"
+ emake DESTDIR="${D}" install
+ newdoc README README.usbip
+ newdoc AUTHORS AUTHORS.usbip
+ popd >/dev/null
+ dodoc Documentation/usb/usbip_protocol.rst
+ find "${D}" -name 'libusbip*.la' -delete || die
+ fi
+
+ # At one point upstream it was moved, but be generic to detect if it's
+ # happened already
+ if [[ -f "${D}"/usr/sbin/generic_buffer ]] && \
+ [[ ! -f "${D}"/usr/sbin/iio_generic_buffer ]]; then
+ mv -f "${D}"/usr/sbin/{,iio_}generic_buffer || die
+ fi
+
+ newconfd "${FILESDIR}"/freefall.confd freefall
+ newinitd "${FILESDIR}"/freefall.initd freefall
+}
+
+pkg_postinst() {
+ echo
+ elog "The cpupower utility is maintained separately at sys-power/cpupower"
+ elog "The lguest utility no longer builds, and has been dropped."
+ elog "The hpfall tool has been renamed by upstream to freefall; update your config if needed"
+ if find "${ROOT}"/etc/runlevels/ -name hpfall ; then
+ ewarn "You must change hpfall to freefall in your runlevels!"
+ fi
+ if use usbip; then
+ elog "For using USB/IP you need to enable USBIP_VHCI_HCD in the client"
+ elog "machine's kernel config and USBIP_HOST on the server."
+ fi
+}