Fix turbostat build & install.
authorRobin H. Johnson <robbat2@gentoo.org>
Sat, 22 Aug 2015 20:27:46 +0000 (13:27 -0700)
committerRobin H. Johnson <robbat2@gentoo.org>
Sat, 22 Aug 2015 20:41:12 +0000 (13:41 -0700)
Package-Manager: portage-2.2.18

sys-apps/linux-misc-apps/linux-misc-apps-3.18.ebuild

index be86d16228a7a05a7069b09841819abae8b4f4be..43f20ad32a27d92655a67571963abb3712cdbae3 100644 (file)
@@ -4,7 +4,7 @@
 
 EAPI=5
 
-inherit versionator eutils toolchain-funcs linux-info autotools flag-o-matic
+inherit versionator eutils toolchain-funcs linux-info flag-o-matic
 
 DESCRIPTION="Misc tools bundled with kernel sources"
 HOMEPAGE="http://kernel.org/"
@@ -69,7 +69,7 @@ TARGETS_SIMPLE=(
 # 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:../../../../turbostat
        tools/power/x86/x86_energy_perf_policy:x86_energy_perf_policy
        Documentation/misc-devices/mei:mei-amt-version
 )
@@ -133,8 +133,10 @@ src_compile() {
        done
 
        for t in ${TARGET_MAKE_SIMPLE[@]} ; do
-               dir=${t/:*} target=${t/*:}
-               einfo "Building $dir => $target"
+               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
 }
@@ -148,9 +150,11 @@ src_install() {
        done
 
        for t in ${TARGET_MAKE_SIMPLE[@]} ; do
-               dir=${t/:*} target=${t/*:}
-               einfo "Installing $dir => $target"
-               dosbin ${dir}/${target}
+               dir=${t/:*} target_binfile=${t#*:}
+               target=${target_binfile/:*} binfile=${target_binfile/*:}
+               [ -z "${binfile}" ] && binfile=$target
+               einfo "Installing $dir => $binfile"
+               dosbin ${dir}/${binfile}
        done
 
        newconfd "${FILESDIR}"/freefall.confd freefall