diff options
author | Matteo Bernardini <ponce@slackbuilds.org> | 2022-02-10 21:15:15 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-02-12 00:29:43 +0700 |
commit | 3745bbb499d541c6df53633eb3afba8bae60670d (patch) | |
tree | f6d22b5ca3e615ef518bab9c18518af7fe4b0ca9 /desktop/wmpower | |
parent | 7d561a6d7809f570ad70ed13d8d44e008c4e1393 (diff) |
desktop/wmpower: Patch for gcc >= 10.x (tnx gentoo!).
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'desktop/wmpower')
-rw-r--r-- | desktop/wmpower/wmpower-0.4.3-gcc-10.patch | 148 | ||||
-rw-r--r-- | desktop/wmpower/wmpower.SlackBuild | 8 |
2 files changed, 153 insertions, 3 deletions
diff --git a/desktop/wmpower/wmpower-0.4.3-gcc-10.patch b/desktop/wmpower/wmpower-0.4.3-gcc-10.patch new file mode 100644 index 0000000000000..bdc28a16341ee --- /dev/null +++ b/desktop/wmpower/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/desktop/wmpower/wmpower.SlackBuild b/desktop/wmpower/wmpower.SlackBuild index af87a43434811..c0d9af1a90710 100644 --- a/desktop/wmpower/wmpower.SlackBuild +++ b/desktop/wmpower/wmpower.SlackBuild @@ -15,7 +15,7 @@ PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -33,8 +33,8 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -62,6 +62,8 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; +patch -p1 < $CWD/wmpower-0.4.3-gcc-10.patch + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ |