summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2008-04-20 08:46:23 +0000
committerMike Frysinger <vapier@gentoo.org>2008-04-20 08:46:23 +0000
commit1ecdb97cbc11b230d0c6a02dec1e2753f428d521 (patch)
treefbbda053fe704a38da93d3038e7bd01ce2cf8df2 /sys-power
parentold (diff)
downloadhistorical-1ecdb97cbc11b230d0c6a02dec1e2753f428d521.tar.gz
historical-1ecdb97cbc11b230d0c6a02dec1e2753f428d521.tar.bz2
historical-1ecdb97cbc11b230d0c6a02dec1e2753f428d521.zip
Fix from Fedora for building with gcc-4.3 #214171 by Peter Alfredsen.
Package-Manager: portage-2.2_pre5
Diffstat (limited to 'sys-power')
-rw-r--r--sys-power/acpitool/ChangeLog6
-rw-r--r--sys-power/acpitool/Manifest13
-rw-r--r--sys-power/acpitool/acpitool-0.4.7-r1.ebuild5
-rw-r--r--sys-power/acpitool/files/acpitool-0.4.7-gcc43.patch300
4 files changed, 314 insertions, 10 deletions
diff --git a/sys-power/acpitool/ChangeLog b/sys-power/acpitool/ChangeLog
index 4a0a7a6a8e64..1c5c4fb2024b 100644
--- a/sys-power/acpitool/ChangeLog
+++ b/sys-power/acpitool/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-power/acpitool
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/acpitool/ChangeLog,v 1.10 2008/03/14 14:18:57 phreak Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-power/acpitool/ChangeLog,v 1.11 2008/04/20 08:46:22 vapier Exp $
+
+ 20 Apr 2008; Mike Frysinger <vapier@gentoo.org>
+ +files/acpitool-0.4.7-gcc43.patch, acpitool-0.4.7-r1.ebuild:
+ Fix from Fedora for building with gcc-4.3 #214171 by Peter Alfredsen.
14 Mar 2008; Christian Heim <phreak@gentoo.org> acpitool-0.4.7-r1.ebuild:
Fixing some minor syntax errors.
diff --git a/sys-power/acpitool/Manifest b/sys-power/acpitool/Manifest
index a9412c9f0a57..ea1f0e57bcdf 100644
--- a/sys-power/acpitool/Manifest
+++ b/sys-power/acpitool/Manifest
@@ -1,17 +1,16 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
+AUX acpitool-0.4.7-gcc43.patch 9307 RMD160 22d7f2b66efc0337df1179376ecd8d731c88628d SHA1 6a9b203b9022acfcc466b420ea3d4e23c6d51272 SHA256 6549caaab5a5f224a8d38fe6cfb273679caed5eca3939f28e19393bd7c2ede98
AUX acpitool-0.4.7-proc_acpi_info_move.patch 1925 RMD160 f5c5751032161855f2ac2af78626aefb670907bb SHA1 89852d30509209be6ecf077726318852765f114f SHA256 360aa177ecf11e0ec22bc6bbebab8d865de61d15d965c6cf47063ca6215ad177
-DIST acpitool-0.4.6.tar.bz2 101920 RMD160 b2bd2c2684bd2e792ab6fc695683743fb7b444d7 SHA1 59a44a48fab17916b77f4923f85d85d2d06ce671 SHA256 6964522c943540dd5672643de99ebea96fc579edccea9d6e20f9a8fcd59685cb
DIST acpitool-0.4.7.tar.bz2 105943 RMD160 82385c84d94cdcbf272b2b54d8df3b05afc73cdd SHA1 203ed12250d88eb5bc5a4ab4bb837317c9222ca0 SHA256 6908261eb226edd397e43fb6e0d0f673b7cfcd1635dd0948a280e284d96b6b8c
-EBUILD acpitool-0.4.6.ebuild 600 RMD160 e94b937f8469b6bf2e845a334808d45bec7d495b SHA1 ef8e08e0bdf64b30227a0ff6ad55dfb92c985dcc SHA256 6b9ed0af67eded0f3e57e637534e4e5e47f551dd095208ad29ab620360d0a462
-EBUILD acpitool-0.4.7-r1.ebuild 710 RMD160 c84e0d780309893df6eeb88d3e8edd0939aaad52 SHA1 0f56151e2fd739f7421483077311d7b81db18c7c SHA256 e4d4c2f43cfccd37e6c26d219041f6ed8bb8b7b6eb639dec00805a3877903aa5
-MISC ChangeLog 3549 RMD160 4b218b38863add2ac0f3c1189acc470f880396d4 SHA1 929009b52920bb68f73180f003e15a4990780004 SHA256 7be851c6f9706d5992de0f935bd6872d2a2b5c42d584c921694d80da556b341a
+EBUILD acpitool-0.4.7-r1.ebuild 765 RMD160 404deb6fd7557d414bca000ee403ce2168a3a4f4 SHA1 35b691c2a595bbbfc4a116b7533f4e4322710243 SHA256 ba9603041c07b1c6450bdb0a8ca57d49e6ba30f2970ebe8f267edbd718feba0b
+MISC ChangeLog 3735 RMD160 49311ceea3f0960f6b6329a3ac79d8649105b06f SHA1 b1dc8a87cce1d09f97dcbb42393f175fcdbc2dcc SHA256 602b9ae6dcfa946676934d09a02ee588998a84cc5626d2833afbbd6eac75302c
MISC metadata.xml 160 RMD160 8521c3bd3ae0fb2bfddce5edb33fd31e223747e1 SHA1 194b7194f38673fe427e5893a42cd4c1506ce846 SHA256 b13062a43e40469b137e1206494a44b45755ea69511b64e5373cb1ce30bbb160
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
-iD8DBQFH2olYyuNVb5qfaOYRAlJhAJ4rtNjdRISlqG4CrxPVmRcfkC8tygCfRuf4
-Pk1gaGCxFz40whu0Gv3yyUw=
-=3A+L
+iD8DBQFICwLkj9hvisErhMIRAjQjAJ94ybXfd2IgDhnDVTRYd0hyQ9DiSQCdFxYV
+AUUyu2hp53NF9EylYxG8lWU=
+=UuN5
-----END PGP SIGNATURE-----
diff --git a/sys-power/acpitool/acpitool-0.4.7-r1.ebuild b/sys-power/acpitool/acpitool-0.4.7-r1.ebuild
index 908ceba26640..a6673132c90d 100644
--- a/sys-power/acpitool/acpitool-0.4.7-r1.ebuild
+++ b/sys-power/acpitool/acpitool-0.4.7-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2008 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-r1.ebuild,v 1.4 2008/03/14 14:18:57 phreak Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-power/acpitool/acpitool-0.4.7-r1.ebuild,v 1.5 2008/04/20 08:46:22 vapier Exp $
inherit eutils
@@ -16,9 +16,10 @@ IUSE=""
src_unpack() {
unpack ${A}
epatch "${FILESDIR}"/${PN}-0.4.7-proc_acpi_info_move.patch
+ epatch "${FILESDIR}"/${PN}-0.4.7-gcc43.patch #214171
}
src_install() {
- make DESTDIR="${D}" install || die "make install failed"
+ emake DESTDIR="${D}" install || die "make install failed"
dodoc AUTHORS ChangeLog README TODO
}
diff --git a/sys-power/acpitool/files/acpitool-0.4.7-gcc43.patch b/sys-power/acpitool/files/acpitool-0.4.7-gcc43.patch
new file mode 100644
index 000000000000..08067d7a0571
--- /dev/null
+++ b/sys-power/acpitool/files/acpitool-0.4.7-gcc43.patch
@@ -0,0 +1,300 @@
+sniped from Fedora
+
+http://bugs.gentoo.org/214171
+
+--- acpitool-0.4.7/src/cpu.cpp.gcc43
++++ acpitool-0.4.7/src/cpu.cpp
+@@ -27,6 +27,8 @@
+ #include <config.h>
+ #endif
+
++#include <cstdlib>
++#include <cstring>
+ #include <iostream>
+ #include <iomanip>
+ #include <fstream>
+@@ -57,7 +59,7 @@ int Show_CPU_Info()
+ {
+ for(int t=0; t<4; t++) fgets(str, 299, cpuinfo_fp); // skip 4 lines //
+ fgets(str, 299, cpuinfo_fp);
+- bzero(temp, 130); // use sscanf to extract what we need : //
++ memset(temp, '\0', 130); // use sscanf to extract what we need : //
+ sscanf(str, "%*[^:] %*s %[^\n]",temp); // ignore all up till :, then ignore the :, then use what's left //
+ printf(" CPU type : %s \n", temp); // till the newline char //
+ fgets(str, 299, cpuinfo_fp);
+@@ -67,13 +69,13 @@ int Show_CPU_Info()
+ Show_Freq_Info(); // show freq scaling info if we have it //
+ else
+ {
+- bzero(temp, 130);
++ memset(temp, '\0', 130);
+ sscanf(str, "%*[^:] %*s %s",temp); // ignore all up till :, then ignore the :, then use what's left //
+ printf(" CPU speed : %s MHz \n", temp);
+ }
+
+ fgets(str, 299, cpuinfo_fp);
+- bzero(temp, 130);
++ memset(temp, '\0', 130);
+ sscanf(str, "%*[^:] %*s %s",temp);
+ printf(" Cache size : %s KB\n", temp);
+
+@@ -82,7 +84,7 @@ int Show_CPU_Info()
+ while(!feof(cpuinfo_fp)) // Run loop until Bogomips line is found //
+ { // Need this generic aproach: the bogomips location is //
+ fgets(str, 299, cpuinfo_fp); // different for Amd64, Opteron, Core Duo, P4 with Ht, ... //
+- bzero(temp, 130);
++ memset(temp, '\0', 130);
+ if(strncmp(str,"bogo",4)==0)
+ {
+ sscanf(str, "%*[^:] %*s %s",temp);
+@@ -153,23 +155,23 @@ int Show_CPU_Info()
+ if(file_in)
+ {
+ file_in.getline(str, 90); // processor id
+- bzero(temp, 130);
++ memset(temp, '\0', 130);
+ strncpy(temp, str+25, 5);
+ cout<<" Processor ID : "<<temp<<endl;
+
+ file_in.getline(str, 100); // acpi id
+ file_in.getline(str, 100); // bus mastering control
+- bzero(temp, 130);
++ memset(temp, '\0', 130);
+ strncpy(temp, str+25, 5);
+ cout<<" Bus mastering control : "<<temp<<endl;
+
+ file_in.getline(str, 100); // power management
+- bzero(temp, 130);
++ memset(temp, '\0', 130);
+ strncpy(temp, str+25, 5);
+ cout<<" Power management : "<<temp<<endl;
+
+ file_in.getline(str, 100); // throttling control
+- bzero(temp, 130);
++ memset(temp, '\0', 130);
+ strncpy(temp, str+25, 5);
+ cout<<" Throttling control : "<<temp<<endl;
+ if(strncmp(temp,"yes",3)==0)
+@@ -177,7 +179,7 @@ int Show_CPU_Info()
+
+ file_in.getline(str, 100); // limit interface (beware: on linux2.4
+ // this line yields "perf mgmt")
+- bzero(temp, 130);
++ memset(temp, '\0', 130);
+ strncpy(temp, str+25, 5);
+ cout<<" Limit interface : "<<temp<<endl;
+
+@@ -196,7 +198,7 @@ int Show_CPU_Info()
+ if(power_fp)
+ {
+ fgets(str, 100, power_fp); // active state
+- bzero(temp, 80);
++ memset(temp, '\0', 80);
+ strncpy(temp, str+25, 5);
+ cout<<" Active C-state : "<<temp;
+
+@@ -268,11 +270,11 @@ int Show_CPU_Info()
+ if(throt_fp)
+ {
+ fgets(str, 100, throt_fp); // active state
+- bzero(temp, 80);
++ memset(temp, '\0', 80);
+ strncpy(temp, str+25, 5);
+ cout<<" T-state count : "<<temp; // number of throttling states //
+ fgets(str, 100, throt_fp);
+- bzero(temp, 80);
++ memset(temp, '\0', 80);
+ strncpy(temp, str+25, 5);
+ cout<<" Active T-state : "<<temp<<endl;
+ fclose(throt_fp);
+--- acpitool-0.4.7/src/main.cpp.gcc43
++++ acpitool-0.4.7/src/main.cpp
+@@ -27,6 +27,7 @@
+ #include <config.h>
+ #endif
+
++#include <cstdlib>
+ #include <iostream>
+ #include <iomanip>
+ #include <fstream>
+--- acpitool-0.4.7/src/toshiba.cpp.gcc43
++++ acpitool-0.4.7/src/toshiba.cpp
+@@ -28,6 +28,7 @@
+ #include <config.h>
+ #endif
+
++#include <cstring>
+ #include <iostream>
+ #include <iomanip>
+ #include <fstream>
+--- acpitool-0.4.7/src/battery.cpp.gcc43
++++ acpitool-0.4.7/src/battery.cpp
+@@ -27,6 +27,8 @@
+ #include <config.h>
+ #endif
+
++#include <cstdlib>
++#include <cstring>
+ #include <iostream>
+ #include <iomanip>
+ #include <fstream>
+@@ -69,15 +71,15 @@ int Do_Battery_Stuff(int show_empty, int
+ Batt_Info[i] = new Battery_Info;
+
+ Batt_Info[i]->Battery_Present = 0;
+- bzero(Batt_Info[i]->Remaining_Cap, 10);
+- bzero(Batt_Info[i]->Design_Cap, 10);
+- bzero(Batt_Info[i]->LastFull_Cap, 10);
+- bzero(Batt_Info[i]->Present_Rate, 10);
+- bzero(Batt_Info[i]->Charging_State, 12);
+- bzero(Batt_Info[i]->Technology, 13);
+- bzero(Batt_Info[i]->Model, 13);
+- bzero(Batt_Info[i]->Serial, 13);
+- bzero(Batt_Info[i]->Bat_Type, 13);
++ memset(Batt_Info[i]->Remaining_Cap, '\0', 10);
++ memset(Batt_Info[i]->Design_Cap, '\0', 10);
++ memset(Batt_Info[i]->LastFull_Cap, '\0', 10);
++ memset(Batt_Info[i]->Present_Rate, '\0', 10);
++ memset(Batt_Info[i]->Charging_State, '\0', 12);
++ memset(Batt_Info[i]->Technology, '\0', 13);
++ memset(Batt_Info[i]->Model, '\0', 13);
++ memset(Batt_Info[i]->Serial, '\0', 13);
++ memset(Batt_Info[i]->Bat_Type, '\0', 13);
+ // initialize all struct members to blanks --> avoid rubbish in output //
+
+ Get_Battery_Info(Bat_Nr, Batt_Info[i], verbose);
+--- acpitool-0.4.7/src/thinkpad.cpp.gcc43
++++ acpitool-0.4.7/src/thinkpad.cpp
+@@ -1,5 +1,7 @@
+ /* support for IBM Thinkpad acpi driver */
+
++#include <cstdlib>
++#include <cstring>
+ #include <iomanip>
+ #include <iostream>
+ #include <fstream>
+--- acpitool-0.4.7/src/freq.cpp.gcc43
++++ acpitool-0.4.7/src/freq.cpp
+@@ -27,6 +27,8 @@
+ #include <config.h>
+ #endif
+
++#include <cstdlib>
++#include <cstring>
+ #include <iostream>
+ #include <iomanip>
+ #include <fstream>
+@@ -86,7 +88,7 @@ int Get_Min_Freq()
+
+ if(freqinfo_fp)
+ {
+- bzero(str, 300);
++ memset(str, '\0', 300);
+ fscanf(freqinfo_fp, "%s", str);
+ min_freq = atoi(str);
+ fclose(freqinfo_fp);
+@@ -110,7 +112,7 @@ int Get_Max_Freq()
+
+ if(freqinfo_fp)
+ {
+- bzero(str, 300);
++ memset(str, '\0', 300);
+ fscanf(freqinfo_fp, "%s", str);
+ max_freq = atoi(str);
+ fclose(freqinfo_fp);
+@@ -133,7 +135,7 @@ int Get_Current_Freq()
+
+ if(freqinfo_fp)
+ {
+- bzero(str, 300);
++ memset(str, '\0', 300);
+ fscanf(freqinfo_fp, "%s", str);
+ cur_freq = atoi(str);
+ fclose(freqinfo_fp);
+@@ -155,7 +157,7 @@ int Get_Governor(char *c)
+
+ if(freqinfo_fp)
+ {
+- bzero(str, 300);
++ memset(str, '\0', 300);
+ fscanf(freqinfo_fp, "%s", str);
+ if (strlen(str)>0)
+ strcpy(c, str);
+@@ -178,7 +180,7 @@ int Get_Driver(char *c)
+
+ if(freqinfo_fp)
+ {
+- bzero(str, 300);
++ memset(str, '\0', 300);
+ fscanf(freqinfo_fp, "%s", str);
+ if (strlen(str)>0)
+ strcpy(c, str);
+--- acpitool-0.4.7/src/acpitool.cpp.gcc43
++++ acpitool-0.4.7/src/acpitool.cpp
+@@ -28,6 +28,8 @@
+ #include <config.h>
+ #endif
+
++#include <cstring>
++#include <cstdlib>
+ #include <iostream>
+ #include <iomanip>
+ #include <fstream>
+@@ -158,8 +160,8 @@ int Do_SysVersion_Info(int verbose)
+ {
+ char Acpi_Version[10], Kernel_Version[15];
+
+- bzero(Acpi_Version, 10);
+- bzero(Kernel_Version, 15);
++ memset(Acpi_Version, '\0', 10);
++ memset(Kernel_Version, '\0', 15);
+
+ Get_Kernel_Version(Kernel_Version, verbose);
+ Get_ACPI_Version(Acpi_Version, verbose);
+@@ -214,8 +216,8 @@ int Do_Thermal_Info(const int show_trip,
+ char *name;
+ char Temperature[5], State[5];
+
+- bzero(Temperature, 5);
+- bzero(State, 5);
++ memset(Temperature, '\0', 5);
++ memset(State, '\0', 5);
+
+ dirname = "/proc/acpi/thermal_zone/";
+ thermal_dir = opendir(dirname);
+@@ -299,7 +301,7 @@ int Do_Thermal_Info(const int show_trip,
+ while(!feof(fp))
+ {
+ /* fscanf(fp, "%s", str); */
+- bzero(str, 120);
++ memset(str, '\0', 120);
+ fgets(str, 120, fp);
+ if (strlen(str)!=0)
+ cout<<" "<<str; /* avoid printing empty line */
+@@ -328,7 +330,7 @@ int Do_AC_Info(int verbose)
+ char *name;
+ char AC_Status[9];
+
+- bzero(AC_Status, 9); // avoid rubbish in output //
++ memset(AC_Status, '\0', 9); // avoid rubbish in output //
+
+ dirname = "/proc/acpi/ac_adapter/";
+ ac_dir = opendir(dirname);
+@@ -402,7 +404,7 @@ int Do_Fan_Info(int verbose)
+ return 0;
+ }
+
+- bzero(FAN_Status, 9); // avoid rubbish in output //
++ memset(FAN_Status, '\0', 9); // avoid rubbish in output //
+
+ dirname = "/proc/acpi/fan/";
+ fan_dir = opendir(dirname);
+@@ -531,7 +533,7 @@ int Toggle_WakeUp_Device(const int Devic
+ file_in.getline(str, 50);
+ if(strlen(str)!=0) // avoid empty last line //
+ {
+- bzero(Name[index], 5);
++ memset(Name[index], '\0', 5);
+ strncpy(Name[index], str, 4);
+ index++;
+ }