summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Cafarelli <voyageur@gentoo.org>2020-05-29 22:35:54 +0200
committerBernard Cafarelli <voyageur@gentoo.org>2020-05-29 22:45:51 +0200
commit08bd26cc0c8e46eb41df8e6ddb2b0b6070c6c25f (patch)
treec7692e0371f3dcd5dfb7ff37a417993fba61cd7f /x11-plugins
parentx11-wm/windowmaker: add desktop eclass (diff)
downloadgentoo-08bd26cc0c8e46eb41df8e6ddb2b0b6070c6c25f.tar.gz
gentoo-08bd26cc0c8e46eb41df8e6ddb2b0b6070c6c25f.tar.bz2
gentoo-08bd26cc0c8e46eb41df8e6ddb2b0b6070c6c25f.zip
x11-plugins/wmacpi: fix build with -fno-common
Application needed a specific fix in addition to libdockapp one Closes: https://bugs.gentoo.org/723168 Package-Manager: Portage-2.3.100, Repoman-2.3.22 Signed-off-by: Bernard Cafarelli <voyageur@gentoo.org>
Diffstat (limited to 'x11-plugins')
-rw-r--r--x11-plugins/wmacpi/files/wmacpi-2.3-fno-common.patch27
-rw-r--r--x11-plugins/wmacpi/wmacpi-2.3-r1.ebuild8
2 files changed, 33 insertions, 2 deletions
diff --git a/x11-plugins/wmacpi/files/wmacpi-2.3-fno-common.patch b/x11-plugins/wmacpi/files/wmacpi-2.3-fno-common.patch
new file mode 100644
index 000000000000..49ee8446fc44
--- /dev/null
+++ b/x11-plugins/wmacpi/files/wmacpi-2.3-fno-common.patch
@@ -0,0 +1,27 @@
+diff -Naur dockapps.orig/libacpi.c dockapps/libacpi.c
+--- dockapps.orig/libacpi.c 2015-01-12 11:24:15.000000000 +0100
++++ dockapps/libacpi.c 2020-05-29 22:33:52.526826841 +0200
+@@ -17,6 +17,9 @@
+ #define SYSFS_DATA_SOURCE 1
+ static int data_source;
+
++battery_t batteries[MAXBATT];
++int verbosity;
++
+ /* local proto */
+ int acpi_get_design_cap(int batt);
+
+diff -Naur dockapps.orig/libacpi.h dockapps/libacpi.h
+--- dockapps.orig/libacpi.h 2015-01-12 11:24:15.000000000 +0100
++++ dockapps/libacpi.h 2020-05-29 22:33:36.393811163 +0200
+@@ -128,8 +128,8 @@
+
+
+ /* Since these /are/ needed here . . . */
+-battery_t batteries[MAXBATT];
+-int verbosity;
++extern battery_t batteries[MAXBATT];
++extern int verbosity;
+
+ /* check if apm/acpi is enabled, etc */
+ int power_init(global_t *globals);
diff --git a/x11-plugins/wmacpi/wmacpi-2.3-r1.ebuild b/x11-plugins/wmacpi/wmacpi-2.3-r1.ebuild
index 5a0d2945eb42..9ee992963caf 100644
--- a/x11-plugins/wmacpi/wmacpi-2.3-r1.ebuild
+++ b/x11-plugins/wmacpi/wmacpi-2.3-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -17,9 +17,13 @@ DEPEND=">=x11-libs/libdockapp-0.7:=
S=${WORKDIR}/dockapps
+PATCHES=(
+ "${FILESDIR}"/${P}-makefile.patch
+ "${FILESDIR}"/${P}-fno-common.patch
+ )
+
src_prepare() {
default
- eapply "${FILESDIR}"/${P}-makefile.patch
sed -e 's#<dockapp.h>#<libdockapp/dockapp.h>#' -i *.c || die
}