diff options
-rw-r--r-- | sys-power/acpitool/ChangeLog | 11 | ||||
-rw-r--r-- | sys-power/acpitool/acpitool-0.4.7.ebuild | 24 | ||||
-rw-r--r-- | sys-power/acpitool/files/acpitool-0.4.7-proc_acpi_info_move.patch | 73 | ||||
-rw-r--r-- | sys-power/acpitool/files/digest-acpitool-0.4.7 | 3 |
4 files changed, 109 insertions, 2 deletions
diff --git a/sys-power/acpitool/ChangeLog b/sys-power/acpitool/ChangeLog index e88a3c8b7ebe..c93c7a133def 100644 --- a/sys-power/acpitool/ChangeLog +++ b/sys-power/acpitool/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-power/acpitool -# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-power/acpitool/ChangeLog,v 1.4 2006/10/28 14:03:44 swegener Exp $ +# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-power/acpitool/ChangeLog,v 1.5 2007/02/12 19:18:11 robbat2 Exp $ + +*acpitool-0.4.7 (12 Feb 2007) + + 12 Feb 2007; Robin H. Johnson <robbat2@gentoo.org> + +files/acpitool-0.4.7-proc_acpi_info_move.patch, +acpitool-0.4.7.ebuild: + Version bump, with patch for new kernels since the /proc/acpi/info file is + not present anymore. 27 Oct 2006; Piotr Jaroszyński <peper@gentoo.org> -acpitool-0.2.5.ebuild: Remove old version. diff --git a/sys-power/acpitool/acpitool-0.4.7.ebuild b/sys-power/acpitool/acpitool-0.4.7.ebuild new file mode 100644 index 000000000000..6c1407afa264 --- /dev/null +++ b/sys-power/acpitool/acpitool-0.4.7.ebuild @@ -0,0 +1,24 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-power/acpitool/acpitool-0.4.7.ebuild,v 1.1 2007/02/12 19:18:11 robbat2 Exp $ + +inherit eutils + +DESCRIPTION="A small command line application, intended to be a replacement for the apm tool" +HOMEPAGE="http://freeunix.dyndns.org:8088/site2/acpitool.shtml" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +src_unpack() { + unpack ${A} + epatch ${FILESDIR}/${PN}-0.4.7-proc_acpi_info_move.patch +} + +src_install() { + make DESTDIR="${D}" install || die "make install failed" + dodoc AUTHORS ChangeLog README TODO +} diff --git a/sys-power/acpitool/files/acpitool-0.4.7-proc_acpi_info_move.patch b/sys-power/acpitool/files/acpitool-0.4.7-proc_acpi_info_move.patch new file mode 100644 index 000000000000..5746eb1883ff --- /dev/null +++ b/sys-power/acpitool/files/acpitool-0.4.7-proc_acpi_info_move.patch @@ -0,0 +1,73 @@ +Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> + +Support the new location for the acpica version information, as /proc/acpi/info +no longers exists in 2.6.21 development tree. + +diff -Nuar acpitool-0.4.7.orig/src/acpitool.cpp acpitool-0.4.7/src/acpitool.cpp +--- acpitool-0.4.7.orig/src/acpitool.cpp 2007-02-06 12:03:02.000000000 -0800 ++++ acpitool-0.4.7/src/acpitool.cpp 2007-02-12 12:04:35.000000000 -0800 +@@ -54,15 +54,18 @@ + char *filename; + + filename = "/proc/acpi/info"; +- + file_in.open(filename); +- if (!file_in) +- return 0; +- else +- { ++ if(file_in) goto has_success; ++ filename = "/sys/module/acpi/parameters/acpica_version"; ++ file_in.open(filename); ++ if(file_in) goto has_success; ++ // failure ++ return 0; ++ ++has_success: + file_in.close(); + return 1; +- } ++ + } + + int Print_ACPI_Info(int show_ac, int show_therm, int show_trip, int show_fan, int show_batteries, int show_empty, int show_version, int show_cpu, int show_wake, int e_set, int info_level, int verbose) +@@ -96,23 +99,27 @@ + char *filename, str[50]; + + filename = "/proc/acpi/info"; +- + file_in.open(filename); +- if (!file_in) ++ if(file_in) goto version_success; ++ filename = "/sys/module/acpi/parameters/acpica_version"; ++ file_in.open(filename); ++ if(file_in) goto version_success; ++ ++ // failure ++ if(!verbose) + { +- if(!verbose) +- { + strcpy(c, "<n.a>"); +- return 0; +- } +- else +- { +- cout<<" Could not open file : "<<filename<<endl; ++ return 0; ++ } ++ else ++ { ++ cout<<" Could not open file : "<<filename<<endl; + cout<<" Make sure your kernel has ACPI support enabled."<<endl; + return -1; +- } +- } +- ++ } ++ ++version_success: ++ + file_in.getline(str, 50); + file_in.close(); + diff --git a/sys-power/acpitool/files/digest-acpitool-0.4.7 b/sys-power/acpitool/files/digest-acpitool-0.4.7 new file mode 100644 index 000000000000..ea6eb2cb6575 --- /dev/null +++ b/sys-power/acpitool/files/digest-acpitool-0.4.7 @@ -0,0 +1,3 @@ +MD5 cba416a11229e896ec2639c59b6f59c5 acpitool-0.4.7.tar.bz2 105943 +RMD160 82385c84d94cdcbf272b2b54d8df3b05afc73cdd acpitool-0.4.7.tar.bz2 105943 +SHA256 6908261eb226edd397e43fb6e0d0f673b7cfcd1635dd0948a280e284d96b6b8c acpitool-0.4.7.tar.bz2 105943 |