1 |
commit: f5291a8c09ea41b32a46c42349dcb9bfedf3ab77 |
2 |
Author: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jan 29 18:22:48 2020 +0000 |
4 |
Commit: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jan 29 18:27:00 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f5291a8c |
7 |
|
8 |
x11-plugins/wmpower: fix build with -fno-common |
9 |
|
10 |
Closes: https://bugs.gentoo.org/706754 |
11 |
Package-Manager: Portage-2.3.86, Repoman-2.3.20 |
12 |
Signed-off-by: Bernard Cafarelli <voyageur <AT> gentoo.org> |
13 |
|
14 |
.../wmpower/files/wmpower-0.4.3-gcc-10.patch | 148 +++++++++++++++++++++ |
15 |
x11-plugins/wmpower/wmpower-0.4.3-r1.ebuild | 4 +- |
16 |
2 files changed, 151 insertions(+), 1 deletion(-) |
17 |
|
18 |
diff --git a/x11-plugins/wmpower/files/wmpower-0.4.3-gcc-10.patch b/x11-plugins/wmpower/files/wmpower-0.4.3-gcc-10.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..bdc28a16341 |
21 |
--- /dev/null |
22 |
+++ b/x11-plugins/wmpower/files/wmpower-0.4.3-gcc-10.patch |
23 |
@@ -0,0 +1,148 @@ |
24 |
+diff -Naur wmpower-0.4.3.orig/src/dockapp/dockapp.c wmpower-0.4.3/src/dockapp/dockapp.c |
25 |
+--- wmpower-0.4.3.orig/src/dockapp/dockapp.c 2003-09-18 18:53:27.000000000 +0200 |
26 |
++++ wmpower-0.4.3/src/dockapp/dockapp.c 2020-01-29 19:15:58.062434728 +0100 |
27 |
+@@ -50,6 +50,7 @@ |
28 |
+ GC NormalGC; |
29 |
+ XpmIcon wmgen; |
30 |
+ Pixmap pixmask; |
31 |
++Display *display; |
32 |
+ |
33 |
+ /*****************/ |
34 |
+ /* Mouse Regions */ |
35 |
+diff -Naur wmpower-0.4.3.orig/src/dockapp/dockapp.h wmpower-0.4.3/src/dockapp/dockapp.h |
36 |
+--- wmpower-0.4.3.orig/src/dockapp/dockapp.h 2003-09-18 18:29:17.000000000 +0200 |
37 |
++++ wmpower-0.4.3/src/dockapp/dockapp.h 2020-01-29 19:15:58.062434728 +0100 |
38 |
+@@ -28,7 +28,7 @@ |
39 |
+ /* Global variable */ |
40 |
+ /*******************/ |
41 |
+ |
42 |
+-Display *display; |
43 |
++extern Display *display; |
44 |
+ |
45 |
+ /***********************/ |
46 |
+ /* Function Prototypes */ |
47 |
+diff -Naur wmpower-0.4.3.orig/src/power_management/acpi/libacpi.c wmpower-0.4.3/src/power_management/acpi/libacpi.c |
48 |
+--- wmpower-0.4.3.orig/src/power_management/acpi/libacpi.c 2005-09-06 12:09:10.000000000 +0200 |
49 |
++++ wmpower-0.4.3/src/power_management/acpi/libacpi.c 2020-01-29 19:20:44.031452047 +0100 |
50 |
+@@ -46,6 +46,8 @@ |
51 |
+ #include "power_management.h" |
52 |
+ #include "lib_utils.h" |
53 |
+ |
54 |
++char battery_type; |
55 |
++int batt_count; |
56 |
+ |
57 |
+ /* here we put temp stuff read from proc files */ |
58 |
+ char buf[512]; |
59 |
+diff -Naur wmpower-0.4.3.orig/src/power_management/acpi/libacpi.h wmpower-0.4.3/src/power_management/acpi/libacpi.h |
60 |
+--- wmpower-0.4.3.orig/src/power_management/acpi/libacpi.h 2004-07-16 20:13:19.000000000 +0200 |
61 |
++++ wmpower-0.4.3/src/power_management/acpi/libacpi.h 2020-01-29 19:20:48.717452334 +0100 |
62 |
+@@ -67,7 +67,7 @@ |
63 |
+ } |
64 |
+ ACPIinfo; |
65 |
+ |
66 |
+-char battery_type; |
67 |
++extern char battery_type; |
68 |
+ |
69 |
+ typedef struct |
70 |
+ { |
71 |
+@@ -76,7 +76,7 @@ |
72 |
+ ACADstate; |
73 |
+ |
74 |
+ /* number of batteries detected */ |
75 |
+-int batt_count; |
76 |
++extern int batt_count; |
77 |
+ |
78 |
+ int check_acpi (void); |
79 |
+ void read_acad_state (ACADstate *acadstate); |
80 |
+diff -Naur wmpower-0.4.3.orig/src/power_management/compal/compal_lib.c wmpower-0.4.3/src/power_management/compal/compal_lib.c |
81 |
+--- wmpower-0.4.3.orig/src/power_management/compal/compal_lib.c 2005-09-12 18:13:32.000000000 +0200 |
82 |
++++ wmpower-0.4.3/src/power_management/compal/compal_lib.c 2020-01-29 19:21:14.455453915 +0100 |
83 |
+@@ -40,6 +40,7 @@ |
84 |
+ #include "lib_utils.h" |
85 |
+ #include "power_management.h" |
86 |
+ |
87 |
++char compal_model[COMPAL_MAX_MODEL_INFO]; |
88 |
+ |
89 |
+ |
90 |
+ /* gets a value from a strtok-ed buffer; for reading from /proc */ |
91 |
+diff -Naur wmpower-0.4.3.orig/src/power_management/compal/compal_lib.h wmpower-0.4.3/src/power_management/compal/compal_lib.h |
92 |
+--- wmpower-0.4.3.orig/src/power_management/compal/compal_lib.h 2005-09-12 18:13:23.000000000 +0200 |
93 |
++++ wmpower-0.4.3/src/power_management/compal/compal_lib.h 2020-01-29 19:21:09.180453591 +0100 |
94 |
+@@ -44,7 +44,7 @@ |
95 |
+ #define COMPAL_PROC_FILE_BATT "/proc/omnibook/battery" |
96 |
+ |
97 |
+ |
98 |
+-char compal_model[COMPAL_MAX_MODEL_INFO]; |
99 |
++extern char compal_model[COMPAL_MAX_MODEL_INFO]; |
100 |
+ |
101 |
+ char *getvaluefromhash (char *key, char *hash); |
102 |
+ |
103 |
+diff -Naur wmpower-0.4.3.orig/src/power_management/power_management.c wmpower-0.4.3/src/power_management/power_management.c |
104 |
+--- wmpower-0.4.3.orig/src/power_management/power_management.c 2005-12-15 12:54:59.000000000 +0100 |
105 |
++++ wmpower-0.4.3/src/power_management/power_management.c 2020-01-29 19:18:36.031444239 +0100 |
106 |
+@@ -55,6 +55,13 @@ |
107 |
+ int use_noflushd=1; |
108 |
+ int use_cpufreq=1; |
109 |
+ |
110 |
++kernel_versions kernel_version; |
111 |
++int minBrightness; |
112 |
++int maxBrightness; |
113 |
++int waittime; /* /proc polling time */ |
114 |
++char *cpufreq_online_governor; |
115 |
++char *cpufreq_offline_governor; |
116 |
++ |
117 |
+ /* Battery to monitor */ |
118 |
+ int Battery; |
119 |
+ |
120 |
+diff -Naur wmpower-0.4.3.orig/src/power_management/power_management.h wmpower-0.4.3/src/power_management/power_management.h |
121 |
+--- wmpower-0.4.3.orig/src/power_management/power_management.h 2005-12-15 12:54:12.000000000 +0100 |
122 |
++++ wmpower-0.4.3/src/power_management/power_management.h 2020-01-29 19:18:29.941443870 +0100 |
123 |
+@@ -34,7 +34,7 @@ |
124 |
+ IS_2_6 = 0, |
125 |
+ IS_OTHER |
126 |
+ } kernel_versions; |
127 |
+-kernel_versions kernel_version; |
128 |
++extern kernel_versions kernel_version; |
129 |
+ |
130 |
+ typedef struct |
131 |
+ { |
132 |
+@@ -49,11 +49,11 @@ |
133 |
+ |
134 |
+ } pm_status; |
135 |
+ |
136 |
+-int minBrightness; |
137 |
+-int maxBrightness; |
138 |
+-int waittime; /* /proc polling time */ |
139 |
+-char *cpufreq_online_governor; |
140 |
+-char *cpufreq_offline_governor; |
141 |
++extern int minBrightness; |
142 |
++extern int maxBrightness; |
143 |
++extern int waittime; /* /proc polling time */ |
144 |
++extern char *cpufreq_online_governor; |
145 |
++extern char *cpufreq_offline_governor; |
146 |
+ |
147 |
+ int pm_support(int which_battery); |
148 |
+ void get_power_status(pm_status *power_status); |
149 |
+diff -Naur wmpower-0.4.3.orig/src/power_management/toshiba/toshiba_lib.c wmpower-0.4.3/src/power_management/toshiba/toshiba_lib.c |
150 |
+--- wmpower-0.4.3.orig/src/power_management/toshiba/toshiba_lib.c 2005-09-02 11:46:16.000000000 +0200 |
151 |
++++ wmpower-0.4.3/src/power_management/toshiba/toshiba_lib.c 2020-01-29 19:19:47.112448563 +0100 |
152 |
+@@ -57,6 +57,7 @@ |
153 |
+ #include "lib_utils.h" |
154 |
+ #include "power_management.h" |
155 |
+ |
156 |
++char toshiba_model[255]; |
157 |
+ |
158 |
+ void UglyHack(void); |
159 |
+ int Get_Fan_Status(void); |
160 |
+diff -Naur wmpower-0.4.3.orig/src/power_management/toshiba/toshiba_lib.h wmpower-0.4.3/src/power_management/toshiba/toshiba_lib.h |
161 |
+--- wmpower-0.4.3.orig/src/power_management/toshiba/toshiba_lib.h 2005-09-02 11:34:04.000000000 +0200 |
162 |
++++ wmpower-0.4.3/src/power_management/toshiba/toshiba_lib.h 2020-01-29 19:19:38.749448053 +0100 |
163 |
+@@ -34,7 +34,7 @@ |
164 |
+ #define TOSHIBA_LCD_MED 1 |
165 |
+ #define TOSHIBA_LCD_MAX 2 |
166 |
+ |
167 |
+-char toshiba_model[255]; |
168 |
++extern char toshiba_model[255]; |
169 |
+ |
170 |
+ int machine_is_toshiba(int *use_toshiba_hardware); |
171 |
+ int toshiba_get_fan_status(int use_toshiba_hardware); |
172 |
|
173 |
diff --git a/x11-plugins/wmpower/wmpower-0.4.3-r1.ebuild b/x11-plugins/wmpower/wmpower-0.4.3-r1.ebuild |
174 |
index d161fd1e3b5..0f828dab580 100644 |
175 |
--- a/x11-plugins/wmpower/wmpower-0.4.3-r1.ebuild |
176 |
+++ b/x11-plugins/wmpower/wmpower-0.4.3-r1.ebuild |
177 |
@@ -1,4 +1,4 @@ |
178 |
-# Copyright 1999-2018 Gentoo Authors |
179 |
+# Copyright 1999-2020 Gentoo Authors |
180 |
# Distributed under the terms of the GNU General Public License v2 |
181 |
|
182 |
EAPI=7 |
183 |
@@ -18,6 +18,8 @@ RDEPEND="x11-libs/libX11 |
184 |
DEPEND="${RDEPEND} |
185 |
x11-base/xorg-proto" |
186 |
|
187 |
+PATCHES=( "${FILESDIR}"/${P}-gcc-10.patch ) |
188 |
+ |
189 |
DOCS=( AUTHORS BUGS ChangeLog LEGGIMI NEWS README README.compal THANKS TODO ) |
190 |
|
191 |
src_configure() { |