diff options
author | Bernard Cafarelli <voyageur@gentoo.org> | 2020-01-29 19:22:48 +0100 |
---|---|---|
committer | Bernard Cafarelli <voyageur@gentoo.org> | 2020-01-29 19:27:00 +0100 |
commit | f5291a8c09ea41b32a46c42349dcb9bfedf3ab77 (patch) | |
tree | 4439d25cc55328f906edba19caf5e6212901d288 /x11-plugins/wmpower | |
parent | x11-plugins/wmix: fix build with -fno-common (diff) | |
download | gentoo-f5291a8c09ea41b32a46c42349dcb9bfedf3ab77.tar.gz gentoo-f5291a8c09ea41b32a46c42349dcb9bfedf3ab77.tar.bz2 gentoo-f5291a8c09ea41b32a46c42349dcb9bfedf3ab77.zip |
x11-plugins/wmpower: fix build with -fno-common
Closes: https://bugs.gentoo.org/706754
Package-Manager: Portage-2.3.86, Repoman-2.3.20
Signed-off-by: Bernard Cafarelli <voyageur@gentoo.org>
Diffstat (limited to 'x11-plugins/wmpower')
-rw-r--r-- | x11-plugins/wmpower/files/wmpower-0.4.3-gcc-10.patch | 148 | ||||
-rw-r--r-- | x11-plugins/wmpower/wmpower-0.4.3-r1.ebuild | 4 |
2 files changed, 151 insertions, 1 deletions
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 new file mode 100644 index 000000000000..bdc28a16341e --- /dev/null +++ b/x11-plugins/wmpower/files/wmpower-0.4.3-gcc-10.patch @@ -0,0 +1,148 @@ +diff -Naur wmpower-0.4.3.orig/src/dockapp/dockapp.c wmpower-0.4.3/src/dockapp/dockapp.c +--- wmpower-0.4.3.orig/src/dockapp/dockapp.c 2003-09-18 18:53:27.000000000 +0200 ++++ wmpower-0.4.3/src/dockapp/dockapp.c 2020-01-29 19:15:58.062434728 +0100 +@@ -50,6 +50,7 @@ + GC NormalGC; + XpmIcon wmgen; + Pixmap pixmask; ++Display *display; + + /*****************/ + /* Mouse Regions */ +diff -Naur wmpower-0.4.3.orig/src/dockapp/dockapp.h wmpower-0.4.3/src/dockapp/dockapp.h +--- wmpower-0.4.3.orig/src/dockapp/dockapp.h 2003-09-18 18:29:17.000000000 +0200 ++++ wmpower-0.4.3/src/dockapp/dockapp.h 2020-01-29 19:15:58.062434728 +0100 +@@ -28,7 +28,7 @@ + /* Global variable */ + /*******************/ + +-Display *display; ++extern Display *display; + + /***********************/ + /* Function Prototypes */ +diff -Naur wmpower-0.4.3.orig/src/power_management/acpi/libacpi.c wmpower-0.4.3/src/power_management/acpi/libacpi.c +--- wmpower-0.4.3.orig/src/power_management/acpi/libacpi.c 2005-09-06 12:09:10.000000000 +0200 ++++ wmpower-0.4.3/src/power_management/acpi/libacpi.c 2020-01-29 19:20:44.031452047 +0100 +@@ -46,6 +46,8 @@ + #include "power_management.h" + #include "lib_utils.h" + ++char battery_type; ++int batt_count; + + /* here we put temp stuff read from proc files */ + char buf[512]; +diff -Naur wmpower-0.4.3.orig/src/power_management/acpi/libacpi.h wmpower-0.4.3/src/power_management/acpi/libacpi.h +--- wmpower-0.4.3.orig/src/power_management/acpi/libacpi.h 2004-07-16 20:13:19.000000000 +0200 ++++ wmpower-0.4.3/src/power_management/acpi/libacpi.h 2020-01-29 19:20:48.717452334 +0100 +@@ -67,7 +67,7 @@ + } + ACPIinfo; + +-char battery_type; ++extern char battery_type; + + typedef struct + { +@@ -76,7 +76,7 @@ + ACADstate; + + /* number of batteries detected */ +-int batt_count; ++extern int batt_count; + + int check_acpi (void); + void read_acad_state (ACADstate *acadstate); +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 +--- wmpower-0.4.3.orig/src/power_management/compal/compal_lib.c 2005-09-12 18:13:32.000000000 +0200 ++++ wmpower-0.4.3/src/power_management/compal/compal_lib.c 2020-01-29 19:21:14.455453915 +0100 +@@ -40,6 +40,7 @@ + #include "lib_utils.h" + #include "power_management.h" + ++char compal_model[COMPAL_MAX_MODEL_INFO]; + + + /* gets a value from a strtok-ed buffer; for reading from /proc */ +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 +--- wmpower-0.4.3.orig/src/power_management/compal/compal_lib.h 2005-09-12 18:13:23.000000000 +0200 ++++ wmpower-0.4.3/src/power_management/compal/compal_lib.h 2020-01-29 19:21:09.180453591 +0100 +@@ -44,7 +44,7 @@ + #define COMPAL_PROC_FILE_BATT "/proc/omnibook/battery" + + +-char compal_model[COMPAL_MAX_MODEL_INFO]; ++extern char compal_model[COMPAL_MAX_MODEL_INFO]; + + char *getvaluefromhash (char *key, char *hash); + +diff -Naur wmpower-0.4.3.orig/src/power_management/power_management.c wmpower-0.4.3/src/power_management/power_management.c +--- wmpower-0.4.3.orig/src/power_management/power_management.c 2005-12-15 12:54:59.000000000 +0100 ++++ wmpower-0.4.3/src/power_management/power_management.c 2020-01-29 19:18:36.031444239 +0100 +@@ -55,6 +55,13 @@ + int use_noflushd=1; + int use_cpufreq=1; + ++kernel_versions kernel_version; ++int minBrightness; ++int maxBrightness; ++int waittime; /* /proc polling time */ ++char *cpufreq_online_governor; ++char *cpufreq_offline_governor; ++ + /* Battery to monitor */ + int Battery; + +diff -Naur wmpower-0.4.3.orig/src/power_management/power_management.h wmpower-0.4.3/src/power_management/power_management.h +--- wmpower-0.4.3.orig/src/power_management/power_management.h 2005-12-15 12:54:12.000000000 +0100 ++++ wmpower-0.4.3/src/power_management/power_management.h 2020-01-29 19:18:29.941443870 +0100 +@@ -34,7 +34,7 @@ + IS_2_6 = 0, + IS_OTHER + } kernel_versions; +-kernel_versions kernel_version; ++extern kernel_versions kernel_version; + + typedef struct + { +@@ -49,11 +49,11 @@ + + } pm_status; + +-int minBrightness; +-int maxBrightness; +-int waittime; /* /proc polling time */ +-char *cpufreq_online_governor; +-char *cpufreq_offline_governor; ++extern int minBrightness; ++extern int maxBrightness; ++extern int waittime; /* /proc polling time */ ++extern char *cpufreq_online_governor; ++extern char *cpufreq_offline_governor; + + int pm_support(int which_battery); + void get_power_status(pm_status *power_status); +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 +--- wmpower-0.4.3.orig/src/power_management/toshiba/toshiba_lib.c 2005-09-02 11:46:16.000000000 +0200 ++++ wmpower-0.4.3/src/power_management/toshiba/toshiba_lib.c 2020-01-29 19:19:47.112448563 +0100 +@@ -57,6 +57,7 @@ + #include "lib_utils.h" + #include "power_management.h" + ++char toshiba_model[255]; + + void UglyHack(void); + int Get_Fan_Status(void); +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 +--- wmpower-0.4.3.orig/src/power_management/toshiba/toshiba_lib.h 2005-09-02 11:34:04.000000000 +0200 ++++ wmpower-0.4.3/src/power_management/toshiba/toshiba_lib.h 2020-01-29 19:19:38.749448053 +0100 +@@ -34,7 +34,7 @@ + #define TOSHIBA_LCD_MED 1 + #define TOSHIBA_LCD_MAX 2 + +-char toshiba_model[255]; ++extern char toshiba_model[255]; + + int machine_is_toshiba(int *use_toshiba_hardware); + int toshiba_get_fan_status(int use_toshiba_hardware); diff --git a/x11-plugins/wmpower/wmpower-0.4.3-r1.ebuild b/x11-plugins/wmpower/wmpower-0.4.3-r1.ebuild index d161fd1e3b51..0f828dab5809 100644 --- a/x11-plugins/wmpower/wmpower-0.4.3-r1.ebuild +++ b/x11-plugins/wmpower/wmpower-0.4.3-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -18,6 +18,8 @@ RDEPEND="x11-libs/libX11 DEPEND="${RDEPEND} x11-base/xorg-proto" +PATCHES=( "${FILESDIR}"/${P}-gcc-10.patch ) + DOCS=( AUTHORS BUGS ChangeLog LEGGIMI NEWS README README.compal THANKS TODO ) src_configure() { |