--- portage/sys-apps/linux-misc-apps/linux-misc-apps-3.18.ebuild.orig 2014-12-29 01:12:01.000000000 +0100 +++ portage/sys-apps/linux-misc-apps/linux-misc-apps-3.18.ebuild 2015-02-14 09:31:00.902323584 +0100 @@ -38,7 +38,6 @@ SRC_URI="${SRC_URI} mirror://kernel/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 tcpd? ( sys-apps/tcp-wrappers ) @@ -69,13 +68,14 @@ # These have a broken make install, no DESTDIR TARGET_MAKE_SIMPLE=( tools/firewire:nosy-dump - tools/power/x86/turbostat:../../../../turbostat + 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() { @@ -95,6 +95,11 @@ epatch "${DISTDIR}"/${LINUX_PATCH} fi + sed -i -e 's/\(BUILD_OUTPUT.*:= \)$(PWD)/\1./' tools/power/x86/turbostat/Makefile + pushd ${USBIP} >/dev/null && + eautoreconf -i -f -v && + popd >/dev/null || die "usbip" + sed -i \ -e '/^nosy-dump.*LDFLAGS/d' \ -e '/^nosy-dump.*CFLAGS/d' \ @@ -115,7 +120,11 @@ } src_configure() { - : + cd ${USBIP} && \ + econf \ + $(use_enable static-libs static) \ + $(use tcpd || echo --without-tcp-wrappers) \ + --with-usbids-dir=/usr/share/misc } src_compile() { @@ -137,6 +146,8 @@ einfo "Building $dir => $target" emake -C $dir ARCH=${karch} $target done + + emake -C ${USBIP} } src_install() { @@ -153,6 +164,15 @@ 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 + dodoc drivers/usb/usbip/usbip_protocol.txt + newconfd "${FILESDIR}"/freefall.confd freefall newinitd "${FILESDIR}"/freefall.initd freefall prune_libtool_files @@ -161,5 +181,4 @@ pkg_postinst() { echo elog "The cpupower utility is maintained separately at sys-power/cpupower" - elog "The usbip utility is maintained separately at net-misc/usbip" }