summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-power/pmtools
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-power/pmtools')
-rw-r--r--sys-power/pmtools/Manifest2
-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-20071116-cflags-ldflags.patch38
-rw-r--r--sys-power/pmtools/files/pmtools-20100123-acpixtract-pmtools.patch42
-rw-r--r--sys-power/pmtools/files/pmtools-20100123-cflags-ldflags.patch52
-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.ebuild52
-rw-r--r--sys-power/pmtools/pmtools-20110323-r1.ebuild55
-rw-r--r--sys-power/pmtools/pmtools-20110323.ebuild58
12 files changed, 465 insertions, 0 deletions
diff --git a/sys-power/pmtools/Manifest b/sys-power/pmtools/Manifest
new file mode 100644
index 000000000000..d2731b946ec0
--- /dev/null
+++ b/sys-power/pmtools/Manifest
@@ -0,0 +1,2 @@
+DIST pmtools-20071116.tar.gz 51566 SHA256 91751774976e39f6237efd0326eb35196a9346220b92ad35894a33283e872748
+DIST pmtools-20110323.tar.gz 62002 SHA256 192ee6623ecb96cdcf20c73d8b93eadce003a343b3bab10f08a950ef3667a77a SHA512 81108c011b45c58c02013a3653c2d00bc2a9a9d80bf85438a193a4fed04a3fd2890d9cd4d64ab455e3e9c1613d35a6be59698395d9a27ca0a858e3935439bafd WHIRLPOOL 047828586a2e28af69be39b77b6a95766d7ac8040bf434d8e5d1064d3abe50e318c9ce352ae580f0c29a486208e4697d99eabddfd10a797b744d05ac6e1b3585
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-20071116-cflags-ldflags.patch b/sys-power/pmtools/files/pmtools-20071116-cflags-ldflags.patch
new file mode 100644
index 000000000000..1d55e6a81b96
--- /dev/null
+++ b/sys-power/pmtools/files/pmtools-20071116-cflags-ldflags.patch
@@ -0,0 +1,38 @@
+--- acpidump/Makefile.orig
++++ acpidump/Makefile
+@@ -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)
+
+--- acpixtract/Makefile.orig
++++ acpixtract/Makefile
+@@ -6,7 +6,7 @@
+ all: $(PROG)
+
+ $(PROG) : $(SRCS)
+- $(CC) $(CFLAGS) $(SRCS) -o $(PROG)
++ $(CC) $(CFLAGS) $(LDFLAGS) $(SRCS) -o $(PROG)
+
+ CLEANFILES= $(PROG)
+
+--- madt/Makefile.orig
++++ madt/Makefile
+@@ -3,7 +3,7 @@
+
+ all: madt
+ $(PROG) : $(SRCS)
+- $(CC) $(CFLAGS) $(SRCS) -o $(PROG)
++ $(CC) $(CFLAGS) $(LDFLAGS) $(SRCS) -o $(PROG)
+
+ test: madt
+ ./madt < example.APIC.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-cflags-ldflags.patch b/sys-power/pmtools/files/pmtools-20100123-cflags-ldflags.patch
new file mode 100644
index 000000000000..57642abacfe6
--- /dev/null
+++ b/sys-power/pmtools/files/pmtools-20100123-cflags-ldflags.patch
@@ -0,0 +1,52 @@
+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
+diff -Nuar pmtools-20100123.orig/turbostat/Makefile pmtools-20100123/turbostat/Makefile
+--- pmtools-20100123.orig/turbostat/Makefile 2010-01-23 19:19:32.000000000 +0100
++++ pmtools-20100123/turbostat/Makefile 2010-03-07 14:26:10.473010923 +0100
+@@ -4,7 +4,7 @@
+ all: turbostat
+
+ $(PROG) : $(SRCS)
+- $(CC) $(CFLAGS) $(SRCS) -o $(PROG)
++ $(CC) $(CFLAGS) $(LDFLAGS) $(SRCS) -o $(PROG)
+
+ CLEANFILES= $(PROG)
+
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..59c25fcc789f
--- /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>
+ <email>robbat2@gentoo.org</email>
+ </maintainer>
+ <maintainer>
+ <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..74fa42b6439d
--- /dev/null
+++ b/sys-power/pmtools/pmtools-20071116.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..4b1e0a63d4fd
--- /dev/null
+++ b/sys-power/pmtools/pmtools-20110323-r1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 ~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..9527a52a2f37
--- /dev/null
+++ b/sys-power/pmtools/pmtools-20110323.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="ACPI disassembler tools, including acpidump"
+HOMEPAGE="http://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/"
+SRC_URI="http://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."
+}