[packages/libacpi] Rel 3

arekm arekm at pld-linux.org
Mon Mar 9 23:53:03 CET 2026


commit de51db047634f34ada1ad7bffae3980cfb72d327
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Mon Mar 9 23:52:51 2026 +0100

    Rel 3

 globals-single-definition.patch | 36 ++++++++++++++++++++++++++++++++++++
 libacpi.spec                    |  4 +++-
 2 files changed, 39 insertions(+), 1 deletion(-)
---
diff --git a/libacpi.spec b/libacpi.spec
index c37b9fe..73f6b87 100644
--- a/libacpi.spec
+++ b/libacpi.spec
@@ -2,12 +2,13 @@ Summary:	A library for programs gathering ACPI data
 Summary(pl.UTF-8):	Biblioteka dla programów pobierających dane ACPI
 Name:		libacpi
 Version:	0.2
-Release:	2
+Release:	3
 License:	MIT
 Group:		Libraries
 Source0:	http://www.ngolde.de/download/%{name}-%{version}.tar.gz
 # Source0-md5:	05b53dd7bead66dda35fec502b91066c
 Patch0:		%{name}-Makefile.patch
+Patch1:		globals-single-definition.patch
 URL:		http://www.ngolde.de/libacpi.html
 ExclusiveArch:	%{ix86} %{x8664} x32 ia64
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -45,6 +46,7 @@ Statyczna biblioteka libacpi.
 %prep
 %setup -q
 %patch -P0 -p1
+%patch -P1 -p1
 
 %build
 %{__make} \
diff --git a/globals-single-definition.patch b/globals-single-definition.patch
new file mode 100644
index 0000000..24c177c
--- /dev/null
+++ b/globals-single-definition.patch
@@ -0,0 +1,36 @@
+--- libacpi-0.2/libacpi.h.orig	2007-07-27 10:46:28.000000000 +0200
++++ libacpi-0.2/libacpi.h	2026-03-10 00:02:00.000000000 +0100
+@@ -183,17 +183,17 @@
+  * Array for existing batteries, loop until
+  * globals->battery_count
+  */
+-battery_t batteries[MAX_ITEMS];
++extern battery_t batteries[MAX_ITEMS];
+ /**
+  * Array for existing thermal zones, loop until
+  * globals->thermal_count
+  */
+-thermal_t thermals[MAX_ITEMS];
++extern thermal_t thermals[MAX_ITEMS];
+ /**
+  * Array for existing fans, loop until
+  * globals->fan_count
+  */
+-fan_t fans[MAX_ITEMS];
++extern fan_t fans[MAX_ITEMS];
+ /**
+  * Finds existing batteries and fills the
+  * corresponding batteries structures with the paths
+--- libacpi-0.2/libacpi.c.orig	2007-07-27 10:46:28.000000000 +0200
++++ libacpi-0.2/libacpi.c	2026-03-10 00:02:00.000000000 +0100
+@@ -12,6 +12,10 @@
+ #include "libacpi.h"
+ #include "list.h"
+ 
++battery_t batteries[MAX_ITEMS];
++thermal_t thermals[MAX_ITEMS];
++fan_t fans[MAX_ITEMS];
++
+ static int read_acpi_battinfo(const int num);
+ static int read_acpi_battalarm(const int num);
+ static int read_acpi_battstate(const int num);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libacpi.git/commitdiff/de51db047634f34ada1ad7bffae3980cfb72d327



More information about the pld-cvs-commit mailing list