diff -rupN old/sys-apps/linux-misc-apps/files/linux-misc-apps-4.0-lguest-Makefile.patch new/sys-apps/linux-misc-apps/files/linux-misc-apps-4.0-lguest-Makefile.patch --- old/sys-apps/linux-misc-apps/files/linux-misc-apps-4.0-lguest-Makefile.patch 1970-01-01 01:00:00.000000000 +0100 +++ new/sys-apps/linux-misc-apps/files/linux-misc-apps-4.0-lguest-Makefile.patch 2015-05-07 01:36:30.835464183 +0200 @@ -0,0 +1,24 @@ +From 8e77d013f7b7b34d7b2c6b7cd0d4d1b9d1197f04 Mon Sep 17 00:00:00 2001 +From: Thomas D. +Date: Mon, 20 Apr 2015 13:57:25 +0200 +Subject: [PATCH] tools/lguest: Makefile: append the CFLAGS to existing ones + +Allow the user to pass custom CFLAGS. +--- + tools/lguest/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/lguest/Makefile b/tools/lguest/Makefile +index a107b5e..ee280f5 100644 +--- a/tools/lguest/Makefile ++++ b/tools/lguest/Makefile +@@ -1,5 +1,5 @@ + # This creates the demonstration utility "lguest" which runs a Linux guest. +-CFLAGS:=-m32 -Wall -Wmissing-declarations -Wmissing-prototypes -O3 -U_FORTIFY_SOURCE -Iinclude ++CFLAGS+=-m32 -Wall -Wmissing-declarations -Wmissing-prototypes -U_FORTIFY_SOURCE -Iinclude + + all: lguest + +-- +2.3.5 + diff -rupN old/sys-apps/linux-misc-apps/linux-misc-apps-3.18.ebuild new/sys-apps/linux-misc-apps/linux-misc-apps-3.18.ebuild --- old/sys-apps/linux-misc-apps/linux-misc-apps-3.18.ebuild 2014-12-29 01:12:01.000000000 +0100 +++ new/sys-apps/linux-misc-apps/linux-misc-apps-3.18.ebuild 2015-05-07 01:37:12.632807665 +0200 @@ -1,17 +1,17 @@ -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/linux-misc-apps/linux-misc-apps-3.18.ebuild,v 1.1 2014/12/29 00:12:01 robbat2 Exp $ +# $Header: $ EAPI=5 -inherit versionator eutils toolchain-funcs linux-info autotools flag-o-matic +inherit autotools versionator eutils toolchain-funcs flag-o-matic DESCRIPTION="Misc tools bundled with kernel sources" HOMEPAGE="http://kernel.org/" LICENSE="GPL-2" SLOT="0" -KEYWORDS="~amd64 ~ppc ~x86" +KEYWORDS="~amd64 ~x86" IUSE="static-libs tcpd" MY_PV="${PV/_/-}" @@ -23,19 +23,19 @@ if [ ${PV/_rc} != ${PV} ]; then LINUX_VER=$(get_version_component_range 1-2).$(($(get_version_component_range 3)-1)) PATCH_VERSION=$(get_version_component_range 1-3) LINUX_PATCH=patch-${PV//_/-}.xz - SRC_URI="mirror://kernel/linux/kernel/v3.x/testing/${LINUX_PATCH} - mirror://kernel/linux/kernel/v3.x/testing/v${PATCH_VERSION}/${LINUX_PATCH}" + SRC_URI="mirror://kernel/linux/kernel/v4.x/testing/${LINUX_PATCH} + mirror://kernel/linux/kernel/v4.x/testing/v${PATCH_VERSION}/${LINUX_PATCH}" elif [ $(get_version_component_count) == 4 ]; then # stable-release series LINUX_VER=$(get_version_component_range 1-3) LINUX_PATCH=patch-${PV}.xz - SRC_URI="mirror://kernel/linux/kernel/v3.x/${LINUX_PATCH}" + SRC_URI="mirror://kernel/linux/kernel/v4.x/${LINUX_PATCH}" else LINUX_VER=${PV} fi LINUX_SOURCES=linux-${LINUX_VER}.tar.xz -SRC_URI="${SRC_URI} mirror://kernel/linux/kernel/v3.x/${LINUX_SOURCES}" +SRC_URI="${SRC_URI} mirror://kernel/linux/kernel/v4.x/${LINUX_SOURCES}" # pmtools also provides turbostat # usbip available in seperate package now @@ -57,7 +57,6 @@ TARGETS_SIMPLE=( Documentation/laptops/freefall.c Documentation/networking/timestamping/timestamping.c Documentation/watchdog/src/watchdog-simple.c - tools/lguest/lguest.c tools/vm/slabinfo.c usr/gen_init_cpio.c ) @@ -69,15 +68,16 @@ TARGETS_SIMPLE=( # These have a broken make install, no DESTDIR TARGET_MAKE_SIMPLE=( tools/firewire:nosy-dump - tools/power/x86/turbostat:../../../../turbostat + tools/lguest:lguest + tools/power/x86/turbostat:turbostat tools/power/x86/x86_energy_perf_policy:x86_energy_perf_policy Documentation/misc-devices/mei:mei-amt-version ) # tools/perf - covered by dev-utils/perf # tools/usb - testcases only # tools/virtio - testcaes only +USBIP=tools/usb/usbip - #for _pattern in {Documentation,scripts,tools,usr,include,lib,"arch/*/include",Makefile,Kbuild,Kconfig}; do src_unpack() { unpack ${LINUX_SOURCES} @@ -95,11 +95,17 @@ src_prepare() { epatch "${DISTDIR}"/${LINUX_PATCH} fi + pushd ${USBIP} >/dev/null || die "Cannot chdir into '${USBIP}'" + eautoreconf -i -f -v + popd || die + sed -i \ -e '/^nosy-dump.*LDFLAGS/d' \ -e '/^nosy-dump.*CFLAGS/d' \ -e '/^nosy-dump.*CPPFLAGS/s,CPPFLAGS =,CPPFLAGS +=,g' \ "${S}"/tools/firewire/Makefile + + epatch "${FILESDIR}"/${PN}-4.0-lguest-Makefile.patch } kernel_asm_arch() { @@ -115,7 +121,11 @@ kernel_asm_arch() { } src_configure() { - : + cd ${USBIP} || die "Cannot chdir into '${USBIP}'" + econf \ + $(use_enable static-libs static) \ + $(use tcpd || echo --without-tcp-wrappers) \ + --with-usbids-dir=/usr/share/misc } src_compile() { @@ -137,6 +147,8 @@ src_compile() { einfo "Building $dir => $target" emake -C $dir ARCH=${karch} $target done + + emake -C ${USBIP} } src_install() { @@ -153,6 +165,14 @@ src_install() { dosbin ${dir}/${target} done + pushd ${USBIP} >/dev/null || die "Missing usbip/userspace" + emake DESTDIR="${D%/}" install + + newdoc README README.usbip + newdoc AUTHORS AUTHORS.usbip + popd >/dev/null || die + dodoc drivers/usb/usbip/usbip_protocol.txt + newconfd "${FILESDIR}"/freefall.confd freefall newinitd "${FILESDIR}"/freefall.initd freefall prune_libtool_files