summaryrefslogtreecommitdiff
path: root/sys-power/pmtools
diff options
context:
space:
mode:
Diffstat (limited to 'sys-power/pmtools')
-rw-r--r--sys-power/pmtools/Manifest13
-rw-r--r--sys-power/pmtools/files/pmtools-20071116-64bit.patch20
-rw-r--r--sys-power/pmtools/files/pmtools-20071116-acpixtract-pmtools.patch42
-rw-r--r--sys-power/pmtools/files/pmtools-20100123-acpixtract-pmtools.patch42
-rw-r--r--sys-power/pmtools/files/pmtools-20100123-madt.patch39
-rw-r--r--sys-power/pmtools/files/pmtools-20101124-cflags-ldflags.patch48
-rw-r--r--sys-power/pmtools/metadata.xml17
-rw-r--r--sys-power/pmtools/pmtools-20071116.ebuild51
-rw-r--r--sys-power/pmtools/pmtools-20110323-r1.ebuild54
-rw-r--r--sys-power/pmtools/pmtools-20110323.ebuild57
10 files changed, 383 insertions, 0 deletions
diff --git a/sys-power/pmtools/Manifest b/sys-power/pmtools/Manifest
new file mode 100644
index 000000000000..0a41bbe80df6
--- /dev/null
+++ b/sys-power/pmtools/Manifest
@@ -0,0 +1,13 @@
+AUX pmtools-20071116-64bit.patch 674 SHA256 4c2087bf707eeac438b9d4ef0934de5531b2ab3d1e1f28fb0fddac2ac0940516 SHA512 6683f2e1c06275af9ac789a22005662ae3a9e84f5333ebd6fcc7a524d9298b2e87e4b259d0e2c2edb236821b5221180ffd2de3128fa98e4ef8dd668b7f305290 WHIRLPOOL 978f1be14e7ef0fe394a5c79cce74b07eda26a7422a8beca4e97faf2c77fe7b9d4d38771e15074cf028e6f3988bfd9c88e536002d5335a83263fbada74e49c70
+AUX pmtools-20071116-acpixtract-pmtools.patch 1909 SHA256 90d0b281563a3389ff90d2bcd3cea7492876c395c80e7050fe14a8f1f244d235 SHA512 f78c199761f5ca82433bc8cb02fcdeba9b88d58e3d2f853fecdda2682929ccbf8d25df460ae4d78dcba97ff025ce3ddd7819978f65cf68862694d8c5b93b1017 WHIRLPOOL b61969888740fd373298c6a13ac210551df90484fcc2b2feceaa8e3e52199e19058b32b5fd0eae86044746f219e0e9b1325e8cba114287d63dcb7cd165f8bcb3
+AUX pmtools-20100123-acpixtract-pmtools.patch 1822 SHA256 742d457f572fa30029f28998640ee6a4f8bc38ff12cebefd0063247bcd3bac8c SHA512 82d86c85ab481c1aca191c67e825c0a0bd3467b7ef9b92dadbb3fa58e1cc131b10f6e88431c83ca7289c96a304c8a1d65f798280a9fe3300f1b1f998baa7b2ee WHIRLPOOL c3e29eea56880d6475920b1b5fe7a4a14a48966e0f56cee25836b49f78d281f2f9a19b0d8a16ab977178341aee7cd53fd9aeac00335a441905c18edaf3f00b63
+AUX pmtools-20100123-madt.patch 1191 SHA256 eb01a911c3b4261a1d80478c88b48c1c11bde01cd1de1f4b8dc97c9fd6163bf0 SHA512 3984c4a26248a2b152009ab3703e3fd894abd8a12716aaa7f4913b8a8d922c2a60e7e987e401a0c93c56398b63c36013bcbf7b9c51d1c119f6aa7e67e2657594 WHIRLPOOL 1b9dac67d6452cd9415bbbe671681c5449aff461597cd10702c9ef518df274f63700ec738df2fbb8a43efd233d397f3f8b6c55407413557ae76fca2ff19f6c7b
+AUX pmtools-20101124-cflags-ldflags.patch 1743 SHA256 030dcbd4a327e9088f8f121e1e5a880d0564e6e28ec406a6cab23601690c8823 SHA512 63342f0f1f630eeb74dbe45eddd92b4be4794b34d93f691442bb6a761798d25967d93c73389ef0abace8a285efb91677493996948a34e981959782f493963dc0 WHIRLPOOL 89e50d41a33fbffbbad44a5a1f6a70dd90524bc9790878fb30b41c89c8c7c5f7a888f56b419fd0e8c780318a39978c870d574f734d561da820758d7bf5921609
+DIST pmtools-20071116.tar.gz 51566 SHA256 91751774976e39f6237efd0326eb35196a9346220b92ad35894a33283e872748 SHA512 119bc23c1e692591cf4f10c9a81da80de975091aa7c5d8df40b337ea127a94ac95e94eedf9676166cdc92a594ad9bb3918011056fadeca86f6808135ca26ae8b WHIRLPOOL fcb849fc37373d80798468cb461e7cfa43fce4ef42effeee2fac811cc6229de4c86630441b6477c4129cb2ccb5eed3c60ff8914f998c6831f1e20e27d04072b7
+DIST pmtools-20110323.tar.gz 62002 SHA256 192ee6623ecb96cdcf20c73d8b93eadce003a343b3bab10f08a950ef3667a77a SHA512 81108c011b45c58c02013a3653c2d00bc2a9a9d80bf85438a193a4fed04a3fd2890d9cd4d64ab455e3e9c1613d35a6be59698395d9a27ca0a858e3935439bafd WHIRLPOOL 047828586a2e28af69be39b77b6a95766d7ac8040bf434d8e5d1064d3abe50e318c9ce352ae580f0c29a486208e4697d99eabddfd10a797b744d05ac6e1b3585
+EBUILD pmtools-20071116.ebuild 1280 SHA256 d1ccee34bb8e088dac4a242d5e3f0ddcdbb9efde1eba30afc43b30ae6bb0657e SHA512 c8865ff1249b9ea9a61a4e92b47ce1562fa048ec424c7659bb285d63e0e1a560b1c3576db2f07aa39db223df69d1182c07f351db905bcf285a6ed4f380b90163 WHIRLPOOL 13c2439ab76edef74f183daca516ffb2f950be84f04f82977f6d55ca51b64755deb4bdaf0352b02d7823e9535a17c365d4a335270bfd5a08caf55f2d3ffe9dc0
+EBUILD pmtools-20110323-r1.ebuild 1319 SHA256 1bbeffa97794d7068e509ebc030213c8a49a044e0d00f7e6cdbb660ff9f7e1e7 SHA512 34be174a0d6ecf3230bc4817777f84e3d299691d106e2d4fb934670b89f1f2b04fbb8a429a37b809e5fa68a8194082da2ce571841601d2132dd690a933dade3b WHIRLPOOL 2b0df22223ae4a3ae090fa35fc971c0e31181b890aa70ed4ca4e4fea2c8bbe22033644ded5f7a016c179f20e985d55f2b4f9ac77b417a7f6d637e58f8de53d15
+EBUILD pmtools-20110323.ebuild 1513 SHA256 72d6b3b79b5898202576eafda47d41d9b53ce8c25bf45f967cc526c1cabfc36b SHA512 0b9204f0add25d778ecc00249ab94caa864a10e136a35f6cb3e8737732c355f3ddb1d2536f5ce5c400510b521e037b663cc782049337a986895e47c9d274b389 WHIRLPOOL 7599d0d1b5584e9fe7c1bdc7765b70ee2a6f1b898b7c6c593826184276f4dc21f6182b993bc0f75e869f9feb86423afbc06583f1a8392bffb986d8cb1e2bdd11
+MISC ChangeLog 3506 SHA256 e0d48e7183257580fd40c6a9b7d1059a6ac9e86da6d67ecb0a181cdde8af5a9a SHA512 18cd3633794459c9ef20051b8e7eaed4210cd4d6aa20a5596c66d5bb60ad86feb9c5f7174312e722bd450500928123e2b7d9ca8139ff8c84e7a3ca816b900748 WHIRLPOOL db7aff594a87261a87f2fd32fc1d160e77cc7f1d83fb431ba9f42f3e4821427a68273cc4260cb5ea655ce00caee4c4461f2d22253281fab6710292d4ac687ecd
+MISC ChangeLog-2015 5247 SHA256 209c69860ba8af73c161e85cba7b139fe2ef3e7fae358136d4c9b10fa3e8ac41 SHA512 cd9f3fb4103dd8d5ebb49b77864a53bc1948bc7bd9e7064800f6c1a0cdf7d68d20506fc4d6042e8a4c3968c994be23d2bec1586080ce6ece80a49ef04db2a784 WHIRLPOOL 3cc4874339bf2ea99d00f5cad4b1734fa67b41dc4ec0c9e11aca1ce48ee12da472df463a6773b3e342ce4b51b4f206f698b89935823e751f95d8a8ec2b178de6
+MISC metadata.xml 643 SHA256 29edec12cac5cc822089d9130feb50998e8ea4da32391c43de062556bc1f7d8a SHA512 b5d35fb4bc2ad9062c9d089447521adcd717dd4b88ac54a49b56cc9a334ad9c6020ea66d5c0aaeb575b25143d1714f15e0b83025fe8859fd9f010091409a48f2 WHIRLPOOL 556ebaacc778e0cfd5a6387c0bb3f383897633d6b9e73fa58bdd2a9fa2d2173884fd49fe2f44b599bcea5dee713e8b2e75741dbbbd91264b170ce73f7a520f86
diff --git a/sys-power/pmtools/files/pmtools-20071116-64bit.patch b/sys-power/pmtools/files/pmtools-20071116-64bit.patch
new file mode 100644
index 000000000000..756ac8412abe
--- /dev/null
+++ b/sys-power/pmtools/files/pmtools-20071116-64bit.patch
@@ -0,0 +1,20 @@
+--- madt/madt.c.orig
++++ madt/madt.c
+@@ -46,7 +46,7 @@
+ {
+ size_t retval;
+
+- if (verbose) printf("reading %d byte entry header\n", sizeof(acpi_table_entry_header));
++ if (verbose) printf("reading %ld byte entry header\n", sizeof(acpi_table_entry_header));
+ retval = fread((void *)entry_header, sizeof(acpi_table_entry_header), 1, stdin);
+ return retval;
+ }
+@@ -64,7 +64,7 @@
+
+ bytes_read = csum = 0;
+
+- if (verbose) printf("reading %d madt header\n", sizeof(struct acpi_table_madt));
++ if (verbose) printf("reading %ld madt header\n", sizeof(struct acpi_table_madt));
+
+ retval = fread((void *)buffer, sizeof(struct acpi_table_madt), 1, stdin);
+ if (retval != 1) {
diff --git a/sys-power/pmtools/files/pmtools-20071116-acpixtract-pmtools.patch b/sys-power/pmtools/files/pmtools-20071116-acpixtract-pmtools.patch
new file mode 100644
index 000000000000..1e733663f3ed
--- /dev/null
+++ b/sys-power/pmtools/files/pmtools-20071116-acpixtract-pmtools.patch
@@ -0,0 +1,42 @@
+diff -Nuar --exclude '*.orig' --exclude '*.rej' pmtools-20071116.orig/acpixtract/acpixtract.c pmtools-20071116/acpixtract/acpixtract.c
+--- pmtools-20071116.orig/acpixtract/acpixtract.c 2007-11-16 10:45:44.000000000 -0800
++++ pmtools-20071116/acpixtract/acpixtract.c 2008-06-06 18:28:34.203106692 -0700
+@@ -199,7 +199,7 @@
+ void)
+ {
+
+- printf ("Usage: acpixtract [option] <InputFile>\n");
++ printf ("Usage: acpixtract-pmtools [option] <InputFile>\n");
+ printf ("\nExtract binary ACPI tables from text acpidump output\n");
+ printf ("Default invocation extracts all DSDTs and SSDTs\n");
+ printf ("Version %8.8X\n\n", VERSION);
+diff -Nuar --exclude '*.orig' --exclude '*.rej' pmtools-20071116.orig/madt/README pmtools-20071116/madt/README
+--- pmtools-20071116.orig/madt/README 2007-11-16 10:39:50.000000000 -0800
++++ pmtools-20071116/madt/README 2008-06-06 18:30:18.101885794 -0700
+@@ -2,7 +2,7 @@
+ Hacked out of Linux kernel code to do the same.
+
+ # ./acpidmp > acpidump.txt
+-$ acpixtract -a acpidump.txt
++$ acpixtract-pmtools -a acpidump.txt
+ $ madt < APIC.dat
+
+ ACPI: APIC (v001 INTEL D845EBT2 0x20021021 MSFT 0x00000097) @ 0x(nil)
+diff -Nuar --exclude '*.orig' --exclude '*.rej' pmtools-20071116.orig/README pmtools-20071116/README
+--- pmtools-20071116.orig/README 2007-11-16 10:54:27.000000000 -0800
++++ pmtools-20071116/README 2008-06-06 18:29:53.513505961 -0700
+@@ -24,11 +24,11 @@
+ and it is why the output doesn't change when different
+ kernels are booted.
+
+-./acpidump/acpixtract
+---------------------
++./acpidump/acpixtract-pmtools
++-----------------------------
+ Convert ASCII acpidump output to raw binary tables:
+
+- $ acpixtract/acpixtract -a acpidump.txt
++ $ acpixtract/acpixtract-pmtools -a acpidump.txt
+ Acpi table [DSDT] - 15974 bytes written to DSDT.dat
+ Acpi table [FACS] - 64 bytes written to FACS.dat
+ Acpi table [FACP] - 116 bytes written to FACP.dat
diff --git a/sys-power/pmtools/files/pmtools-20100123-acpixtract-pmtools.patch b/sys-power/pmtools/files/pmtools-20100123-acpixtract-pmtools.patch
new file mode 100644
index 000000000000..feca654687b3
--- /dev/null
+++ b/sys-power/pmtools/files/pmtools-20100123-acpixtract-pmtools.patch
@@ -0,0 +1,42 @@
+diff -Nuar pmtools-20100123.orig/acpixtract/acpixtract.c pmtools-20100123/acpixtract/acpixtract.c
+--- pmtools-20100123.orig/acpixtract/acpixtract.c 2010-01-23 19:31:07.000000000 +0100
++++ pmtools-20100123/acpixtract/acpixtract.c 2010-03-07 14:44:32.451141841 +0100
+@@ -199,7 +199,7 @@
+ void)
+ {
+
+- printf ("Usage: acpixtract [option] <InputFile>\n");
++ printf ("Usage: acpixtract-pmtools [option] <InputFile>\n");
+ printf ("\nExtract binary ACPI tables from text acpidump output\n");
+ printf ("Default invocation extracts all DSDTs and SSDTs\n");
+ printf ("Version %8.8X\n\n", VERSION);
+diff -Nuar pmtools-20100123.orig/madt/README pmtools-20100123/madt/README
+--- pmtools-20100123.orig/madt/README 2005-11-11 18:07:04.000000000 +0100
++++ pmtools-20100123/madt/README 2010-03-07 14:45:31.818052302 +0100
+@@ -1,7 +1,7 @@
+ User utility to parse the ACPI MADT
+ Hacked out of Linux kernel code to do the same.
+
+-# ./acpidmp | ./acpixtract APIC | ./madt
++# ./acpidmp | ./acpixtract-pmtools APIC | ./madt
+
+ ACPI: APIC (v001 INTEL D845EBT2 0x20021021 MSFT 0x00000097) @ 0x(nil)
+ ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
+diff -Nuar pmtools-20100123.orig/README pmtools-20100123/README
+--- pmtools-20100123.orig/README 2010-01-23 19:31:52.000000000 +0100
++++ pmtools-20100123/README 2010-03-07 14:47:18.286017297 +0100
+@@ -17,11 +17,11 @@
+
+ # ./acpidump > acpidump.out
+
+-./acpidump/acpixtract
+---------------------
++./acpidump/acpixtract-pmtools
++-----------------------------
+ Convert ASCII acpidump output to raw binary tables:
+
+- $ acpixtract/acpixtract -a acpidump.out
++ $ acpixtract/acpixtract-pmtools -a acpidump.out
+ Acpi table [DSDT] - 15974 bytes written to DSDT.dat
+ Acpi table [FACS] - 64 bytes written to FACS.dat
+ Acpi table [FACP] - 116 bytes written to FACP.dat
diff --git a/sys-power/pmtools/files/pmtools-20100123-madt.patch b/sys-power/pmtools/files/pmtools-20100123-madt.patch
new file mode 100644
index 000000000000..49aca9f4c76c
--- /dev/null
+++ b/sys-power/pmtools/files/pmtools-20100123-madt.patch
@@ -0,0 +1,39 @@
+diff -Nuar pmtools-20100123.orig/madt/madt.c pmtools-20100123/madt/madt.c
+--- pmtools-20100123.orig/madt/madt.c 2005-11-11 18:07:04.000000000 +0100
++++ pmtools-20100123/madt/madt.c 2010-03-07 14:39:31.657017114 +0100
+@@ -26,8 +26,6 @@
+
+ #define printk printf
+
+-#include "./tables.c"
+-
+ //#define INPUT_FILE "madt.dat"
+ //#include <sys/types.h>
+ //#include <sys/stat.h>
+@@ -37,6 +35,8 @@
+ #include <stdio.h> // fread
+ #include <stdlib.h> // malloc
+
++#include "./tables.c"
++
+ int verbose = 0;
+ /*
+ /* read standard input
+diff -Nuar pmtools-20100123.orig/madt/Makefile pmtools-20100123/madt/Makefile
+--- pmtools-20100123.orig/madt/Makefile 2005-11-11 18:07:04.000000000 +0100
++++ pmtools-20100123/madt/Makefile 2010-03-07 14:34:17.486002917 +0100
+@@ -1,3 +1,5 @@
++all: madt
++
+ test: madt
+ ./madt < APIC
+ madt: madt.c acpi.h tables.c
+diff -Nuar pmtools-20100123.orig/Makefile pmtools-20100123/Makefile
+--- pmtools-20100123.orig/Makefile 2010-01-23 19:18:18.000000000 +0100
++++ pmtools-20100123/Makefile 2010-03-07 14:33:01.729955480 +0100
+@@ -1,4 +1,4 @@
+-DIRS = acpidump acpixtract turbostat
++DIRS = acpidump acpixtract madt turbostat
+
+ all:
+ for i in $(DIRS); do $(MAKE) -C $$i $@; done
diff --git a/sys-power/pmtools/files/pmtools-20101124-cflags-ldflags.patch b/sys-power/pmtools/files/pmtools-20101124-cflags-ldflags.patch
new file mode 100644
index 000000000000..0ae69e8c46d4
--- /dev/null
+++ b/sys-power/pmtools/files/pmtools-20101124-cflags-ldflags.patch
@@ -0,0 +1,48 @@
+diff -Nuar pmtools-20100123.orig/acpidump/Makefile pmtools-20100123/acpidump/Makefile
+--- pmtools-20100123.orig/acpidump/Makefile 2006-11-30 13:41:15.000000000 +0100
++++ pmtools-20100123/acpidump/Makefile 2010-03-07 14:19:12.337141824 +0100
+@@ -1,11 +1,11 @@
+ PROG= acpidump
+ SRCS= acpidump.c
+ KERNEL_INCLUDE := ../include
+-CFLAGS += -Wall -Wstrict-prototypes -Wdeclaration-after-statement -Os -s -D_LINUX -DDEFINE_ALTERNATE_TYPES -I$(KERNEL_INCLUDE)
++CFLAGS += -Wall -Wstrict-prototypes -Wdeclaration-after-statement -D_LINUX -DDEFINE_ALTERNATE_TYPES -I$(KERNEL_INCLUDE)
+
+ all: acpidump
+ $(PROG) : $(SRCS)
+- $(CC) $(CFLAGS) $(SRCS) -o $(PROG)
++ $(CC) $(CFLAGS) $(LDFLAGS) $(SRCS) -o $(PROG)
+
+ CLEANFILES= $(PROG)
+
+diff -Nuar pmtools-20100123.orig/acpixtract/Makefile pmtools-20100123/acpixtract/Makefile
+--- pmtools-20100123.orig/acpixtract/Makefile 2006-11-30 13:45:06.000000000 +0100
++++ pmtools-20100123/acpixtract/Makefile 2010-03-07 14:19:12.337141824 +0100
+@@ -6,7 +6,7 @@
+ all: $(PROG)
+
+ $(PROG) : $(SRCS)
+- $(CC) $(CFLAGS) $(SRCS) -o $(PROG)
++ $(CC) $(CFLAGS) $(LDFLAGS) $(SRCS) -o $(PROG)
+
+ CLEANFILES= $(PROG)
+
+diff -Nuar pmtools-20100123.orig/madt/Makefile pmtools-20100123/madt/Makefile
+--- pmtools-20100123.orig/madt/Makefile 2005-11-11 18:07:04.000000000 +0100
++++ pmtools-20100123/madt/Makefile 2010-03-07 14:22:15.199017246 +0100
+@@ -1,6 +1,6 @@
+ test: madt
+ ./madt < APIC
+ madt: madt.c acpi.h tables.c
+- cc -o madt madt.c
++ $(CC) $(CFLAGS) $(LDFLAGS) madt.c -o madt
+ clean:
+ rm madt
+--- pmtools-20101124.orig/turbostat/Makefile.old 2010-11-27 22:13:00.405571001 +0100
++++ pmtools-20101124/turbostat/Makefile 2010-11-27 22:16:39.070571001 +0100
+@@ -1,3 +1,5 @@
++all : turbostat
++
+ turbostat : turbostat.c
+
+ clean :
diff --git a/sys-power/pmtools/metadata.xml b/sys-power/pmtools/metadata.xml
new file mode 100644
index 000000000000..e3e4f41feaaa
--- /dev/null
+++ b/sys-power/pmtools/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>robbat2@gentoo.org</email>
+ </maintainer>
+ <maintainer type="person">
+ <email>prometheanfire@gentoo.org</email>
+ </maintainer>
+ <longdescription>This package really just provides acpidump and associated tools
+for extracting ACPI tables to edit/reload buggy BIOS tables (works with iasl).
+Useful for all ACPI-based systems (not just mobile/laptop systems).
+</longdescription>
+ <upstream>
+ <remote-id type="github">anyc/pmtools</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-power/pmtools/pmtools-20071116.ebuild b/sys-power/pmtools/pmtools-20071116.ebuild
new file mode 100644
index 000000000000..9453c5d8037f
--- /dev/null
+++ b/sys-power/pmtools/pmtools-20071116.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="ACPI disassembler tools, including acpidump"
+HOMEPAGE="http://www.lesswatts.org/projects/acpi/utilities.php"
+SRC_URI="http://www.lesswatts.org/patches/linux_acpi/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+DEPEND=""
+RDEPEND="${DEPEND}
+ dev-lang/perl
+ >=sys-power/iasl-20060512"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${PN}-20071116-acpixtract-pmtools.patch
+
+ sed -i.orig -e '/^CFLAGS/s, -s , ,' \
+ -i.orig -e "s:-Os::g" \
+ acpidump/Makefile || die "sed failed"
+
+ strip-unsupported-flags
+}
+
+src_compile() {
+ # respect user's LDFLAGS
+ emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" || die "emake failed"
+}
+
+src_install() {
+ # acpidump access the ACPI data via /dev/mem or EFI firmware in /sys
+ dosbin acpidump/acpidump
+ # the other tools only process data
+ newbin acpixtract/acpixtract acpixtract-pmtools
+ dobin madt/madt
+
+ dodoc README
+ docinto madt
+ dodoc madt/README madt/example.APIC*
+}
+
+pkg_postinst() {
+ ewarn "Please note that acpixtract is now named acpixtract-pmtools to avoid"
+ ewarn "conflicts with the new tool of the same name from the iasl package."
+}
diff --git a/sys-power/pmtools/pmtools-20110323-r1.ebuild b/sys-power/pmtools/pmtools-20110323-r1.ebuild
new file mode 100644
index 000000000000..705fa4ffcf16
--- /dev/null
+++ b/sys-power/pmtools/pmtools-20110323-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="Collection of tools for ACPI and power management"
+HOMEPAGE="https://github.com/anyc/pmtools/"
+SRC_URI="https://github.com/anyc/pmtools/tarball/${PV} -> ${P}.tar.gz"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="doc"
+DEPEND=""
+RDEPEND="${DEPEND}
+ dev-lang/perl
+ >=sys-power/iasl-20090521"
+
+S="${WORKDIR}/pmtools"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-20100123-acpixtract-pmtools.patch
+ epatch "${FILESDIR}"/${PN}-20100123-madt.patch
+ epatch "${FILESDIR}"/${PN}-20071116-64bit.patch
+ epatch "${FILESDIR}"/${PN}-20101124-cflags-ldflags.patch
+
+ # update version info
+ sed -i -e "s|20060324|20110323|" acpixtract/acpixtract.c
+
+ strip-unsupported-flags
+}
+
+src_compile() {
+ # respect user's LDFLAGS
+ emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" || die "emake failed"
+}
+
+src_install() {
+ dosbin acpidump/acpidump
+ newbin acpixtract/acpixtract acpixtract-pmtools
+ dobin madt/madt
+
+ dodoc README
+ docinto madt
+ dodoc madt/README
+ use doc && dodoc madt/APIC*
+}
+
+pkg_postinst() {
+ ewarn "Please note that acpixtract is now named acpixtract-pmtools to avoid"
+ ewarn "conflicts with the new tool of the same name from the iasl package."
+}
diff --git a/sys-power/pmtools/pmtools-20110323.ebuild b/sys-power/pmtools/pmtools-20110323.ebuild
new file mode 100644
index 000000000000..13799c368ab1
--- /dev/null
+++ b/sys-power/pmtools/pmtools-20110323.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=2
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="ACPI disassembler tools, including acpidump"
+HOMEPAGE="https://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/"
+SRC_URI="https://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/utils/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+DEPEND=""
+RDEPEND="${DEPEND}
+ dev-lang/perl
+ >=sys-power/iasl-20090521"
+
+S="${WORKDIR}/pmtools"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-20100123-acpixtract-pmtools.patch
+ epatch "${FILESDIR}"/${PN}-20100123-madt.patch
+ epatch "${FILESDIR}"/${PN}-20071116-64bit.patch
+ epatch "${FILESDIR}"/${PN}-20101124-cflags-ldflags.patch
+
+ # update version info
+ sed -i -e "s|20060324|20110323|" acpixtract/acpixtract.c
+
+ strip-unsupported-flags
+}
+
+src_compile() {
+ # respect user's LDFLAGS
+ emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" || die "emake failed"
+}
+
+src_install() {
+ # acpidump access the ACPI data via /dev/mem or EFI firmware in /sys
+ dosbin acpidump/acpidump
+ # the other tools only process data
+ newbin acpixtract/acpixtract acpixtract-pmtools
+ dobin madt/madt
+ dosbin turbostat/turbostat
+ doman turbostat/turbostat.8
+
+ dodoc README
+ docinto madt
+ dodoc madt/README
+ use doc && dodoc madt/APIC*
+}
+
+pkg_postinst() {
+ ewarn "Please note that acpixtract is now named acpixtract-pmtools to avoid"
+ ewarn "conflicts with the new tool of the same name from the iasl package."
+}