xfce4-battery-plugin: update to 1.1.2: 1.1.2 (2019/01/13): =================== * Listen for UPower events for power source changes (Bug #14978, thanks to Alexander Butenko) * Reset averages when a battery is removed/added (Bug #14930, thanks to John Lindgren) * Re-detect battery presence every 30 seconds (Bug #14930, thanks to John Lindgren) * Fix null pointer dereference with no battery present (Bug #14930, thanks to John Lindgren) * Remove deprecated /proc/acpi support in favor of sysfs. (Thanks to John Lindgren) * Remove APM support on FreeBSD as well, it doesn't even build. (Thanks to John Lindgren) * Remove historical APM support for Linux, support ACPI only. (Thanks to John Lindgren) * Initially show/hide widgets according to user config (Bug #9594, thanks to John Lindgren) 1.1.1 (2018/09/22): =================== * Avoid memory leaks * Bump to minimal Gtk to 3.16 * Only set progressbar width or height depending on the orientation (Bug #12942) * Create a single GtkCssProvider in setup_battmon() (Bug #12975) * Improved spacing and layout in dialogs (Bug #14659)diff -r1.49 -r1.50 pkgsrc/sysutils/xfce4-battery-plugin/Makefile
(youri)
@@ -1,16 +1,15 @@ | @@ -1,16 +1,15 @@ | |||
1 | # $NetBSD: Makefile,v 1.49 2018/11/25 20:55:41 martin Exp $ | 1 | # $NetBSD: Makefile,v 1.50 2019/01/18 17:53:27 youri Exp $ | |
2 | 2 | |||
3 | PKGREVISION= 7 | |||
4 | .include "../../meta-pkgs/xfce4/Makefile.common" | 3 | .include "../../meta-pkgs/xfce4/Makefile.common" | |
5 | 4 | |||
6 | VERSION= 1.1.0 | 5 | VERSION= 1.1.2 | |
7 | DISTNAME= xfce4-battery-plugin-${VERSION} | 6 | DISTNAME= xfce4-battery-plugin-${VERSION} | |
8 | CATEGORIES= sysutils | 7 | CATEGORIES= sysutils | |
9 | MASTER_SITES= http://archive.xfce.org/src/panel-plugins/xfce4-battery-plugin/1.1/ | 8 | MASTER_SITES= http://archive.xfce.org/src/panel-plugins/xfce4-battery-plugin/1.1/ | |
10 | 9 | |||
11 | HOMEPAGE= http://goodies.xfce.org/projects/panel-plugins/xfce4-battery-plugin | 10 | HOMEPAGE= http://goodies.xfce.org/projects/panel-plugins/xfce4-battery-plugin | |
12 | COMMENT= Xfce battery monitor plugin | 11 | COMMENT= Xfce battery monitor plugin | |
13 | 12 | |||
14 | .include "../../graphics/hicolor-icon-theme/buildlink3.mk" | 13 | .include "../../graphics/hicolor-icon-theme/buildlink3.mk" | |
15 | .include "../../x11/xfce4-panel/buildlink3.mk" | 14 | .include "../../x11/xfce4-panel/buildlink3.mk" | |
16 | .include "../../mk/bsd.pkg.mk" | 15 | .include "../../mk/bsd.pkg.mk" |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | @comment $NetBSD: PLIST,v 1.4 2016/06/09 09:38:23 youri Exp $ | 1 | @comment $NetBSD: PLIST,v 1.5 2019/01/18 17:53:27 youri Exp $ | |
2 | lib/xfce4/panel/plugins/libbattery.la | 2 | lib/xfce4/panel/plugins/libbattery.la | |
3 | share/icons/hicolor/16x16/apps/xfce4-battery-critical-charging.png | 3 | share/icons/hicolor/16x16/apps/xfce4-battery-critical-charging.png | |
4 | share/icons/hicolor/16x16/apps/xfce4-battery-critical.png | 4 | share/icons/hicolor/16x16/apps/xfce4-battery-critical.png | |
5 | share/icons/hicolor/16x16/apps/xfce4-battery-full-charging.png | 5 | share/icons/hicolor/16x16/apps/xfce4-battery-full-charging.png | |
6 | share/icons/hicolor/16x16/apps/xfce4-battery-full.png | 6 | share/icons/hicolor/16x16/apps/xfce4-battery-full.png | |
7 | share/icons/hicolor/16x16/apps/xfce4-battery-low-charging.png | 7 | share/icons/hicolor/16x16/apps/xfce4-battery-low-charging.png | |
8 | share/icons/hicolor/16x16/apps/xfce4-battery-low.png | 8 | share/icons/hicolor/16x16/apps/xfce4-battery-low.png | |
9 | share/icons/hicolor/16x16/apps/xfce4-battery-missing.png | 9 | share/icons/hicolor/16x16/apps/xfce4-battery-missing.png | |
10 | share/icons/hicolor/16x16/apps/xfce4-battery-ok-charging.png | 10 | share/icons/hicolor/16x16/apps/xfce4-battery-ok-charging.png | |
11 | share/icons/hicolor/16x16/apps/xfce4-battery-ok.png | 11 | share/icons/hicolor/16x16/apps/xfce4-battery-ok.png | |
12 | share/icons/hicolor/16x16/apps/xfce4-battery-plugin.png | 12 | share/icons/hicolor/16x16/apps/xfce4-battery-plugin.png | |
13 | share/icons/hicolor/22x22/apps/xfce4-battery-critical-charging.png | 13 | share/icons/hicolor/22x22/apps/xfce4-battery-critical-charging.png | |
14 | share/icons/hicolor/22x22/apps/xfce4-battery-critical.png | 14 | share/icons/hicolor/22x22/apps/xfce4-battery-critical.png | |
@@ -33,26 +33,27 @@ share/icons/hicolor/24x24/apps/xfce4-bat | @@ -33,26 +33,27 @@ share/icons/hicolor/24x24/apps/xfce4-bat | |||
33 | share/icons/hicolor/32x32/apps/xfce4-battery-plugin.png | 33 | share/icons/hicolor/32x32/apps/xfce4-battery-plugin.png | |
34 | share/icons/hicolor/scalable/apps/xfce4-battery-critical-charging.svg | 34 | share/icons/hicolor/scalable/apps/xfce4-battery-critical-charging.svg | |
35 | share/icons/hicolor/scalable/apps/xfce4-battery-critical.svg | 35 | share/icons/hicolor/scalable/apps/xfce4-battery-critical.svg | |
36 | share/icons/hicolor/scalable/apps/xfce4-battery-full-charging.svg | 36 | share/icons/hicolor/scalable/apps/xfce4-battery-full-charging.svg | |
37 | share/icons/hicolor/scalable/apps/xfce4-battery-full.svg | 37 | share/icons/hicolor/scalable/apps/xfce4-battery-full.svg | |
38 | share/icons/hicolor/scalable/apps/xfce4-battery-low-charging.svg | 38 | share/icons/hicolor/scalable/apps/xfce4-battery-low-charging.svg | |
39 | share/icons/hicolor/scalable/apps/xfce4-battery-low.svg | 39 | share/icons/hicolor/scalable/apps/xfce4-battery-low.svg | |
40 | share/icons/hicolor/scalable/apps/xfce4-battery-missing.svg | 40 | share/icons/hicolor/scalable/apps/xfce4-battery-missing.svg | |
41 | share/icons/hicolor/scalable/apps/xfce4-battery-ok-charging.svg | 41 | share/icons/hicolor/scalable/apps/xfce4-battery-ok-charging.svg | |
42 | share/icons/hicolor/scalable/apps/xfce4-battery-ok.svg | 42 | share/icons/hicolor/scalable/apps/xfce4-battery-ok.svg | |
43 | share/icons/hicolor/scalable/apps/xfce4-battery-plugin.svg | 43 | share/icons/hicolor/scalable/apps/xfce4-battery-plugin.svg | |
44 | share/locale/ar/LC_MESSAGES/xfce4-battery-plugin.mo | 44 | share/locale/ar/LC_MESSAGES/xfce4-battery-plugin.mo | |
45 | share/locale/ast/LC_MESSAGES/xfce4-battery-plugin.mo | 45 | share/locale/ast/LC_MESSAGES/xfce4-battery-plugin.mo | |
46 | share/locale/be/LC_MESSAGES/xfce4-battery-plugin.mo | |||
46 | share/locale/bg/LC_MESSAGES/xfce4-battery-plugin.mo | 47 | share/locale/bg/LC_MESSAGES/xfce4-battery-plugin.mo | |
47 | share/locale/ca/LC_MESSAGES/xfce4-battery-plugin.mo | 48 | share/locale/ca/LC_MESSAGES/xfce4-battery-plugin.mo | |
48 | share/locale/cs/LC_MESSAGES/xfce4-battery-plugin.mo | 49 | share/locale/cs/LC_MESSAGES/xfce4-battery-plugin.mo | |
49 | share/locale/da/LC_MESSAGES/xfce4-battery-plugin.mo | 50 | share/locale/da/LC_MESSAGES/xfce4-battery-plugin.mo | |
50 | share/locale/de/LC_MESSAGES/xfce4-battery-plugin.mo | 51 | share/locale/de/LC_MESSAGES/xfce4-battery-plugin.mo | |
51 | share/locale/el/LC_MESSAGES/xfce4-battery-plugin.mo | 52 | share/locale/el/LC_MESSAGES/xfce4-battery-plugin.mo | |
52 | share/locale/en_AU/LC_MESSAGES/xfce4-battery-plugin.mo | 53 | share/locale/en_AU/LC_MESSAGES/xfce4-battery-plugin.mo | |
53 | share/locale/en_GB/LC_MESSAGES/xfce4-battery-plugin.mo | 54 | share/locale/en_GB/LC_MESSAGES/xfce4-battery-plugin.mo | |
54 | share/locale/es/LC_MESSAGES/xfce4-battery-plugin.mo | 55 | share/locale/es/LC_MESSAGES/xfce4-battery-plugin.mo | |
55 | share/locale/eu/LC_MESSAGES/xfce4-battery-plugin.mo | 56 | share/locale/eu/LC_MESSAGES/xfce4-battery-plugin.mo | |
56 | share/locale/fi/LC_MESSAGES/xfce4-battery-plugin.mo | 57 | share/locale/fi/LC_MESSAGES/xfce4-battery-plugin.mo | |
57 | share/locale/fr/LC_MESSAGES/xfce4-battery-plugin.mo | 58 | share/locale/fr/LC_MESSAGES/xfce4-battery-plugin.mo | |
58 | share/locale/gl/LC_MESSAGES/xfce4-battery-plugin.mo | 59 | share/locale/gl/LC_MESSAGES/xfce4-battery-plugin.mo |
@@ -1,7 +1,7 @@ | @@ -1,7 +1,7 @@ | |||
1 | $NetBSD: distinfo,v 1.13 2018/11/25 20:55:41 martin Exp $ | 1 | $NetBSD: distinfo,v 1.14 2019/01/18 17:53:27 youri Exp $ | |
2 | 2 | |||
3 | SHA1 (xfce4-battery-plugin-1.1.0.tar.bz2) = 60e341cbac086b774024372f18ccee09473f52df | 3 | SHA1 (xfce4-battery-plugin-1.1.2.tar.bz2) = 5f6d397968dd69893a754e58efd90f129a9a8355 | |
4 | RMD160 (xfce4-battery-plugin-1.1.0.tar.bz2) = 024ed07993b8bdf8c6d8831170e43205794de7c4 | 4 | RMD160 (xfce4-battery-plugin-1.1.2.tar.bz2) = ef66fac089e5dcfe324236009220d696f2dd8ea2 | |
5 | SHA512 (xfce4-battery-plugin-1.1.0.tar.bz2) = d3f5b6d3657abfba2c4c5cb3ab8ddc87f4862f24eb614cb91af48332b3082c3dce7f32eb2e3cb8a9d501ddb01c6259c4fbfbab8ed9c221633e47eb17c623cf09 | 5 | SHA512 (xfce4-battery-plugin-1.1.2.tar.bz2) = 51778d00c34c41bdad234893c4a91f3bd562481df343d811e266719cb7903f60e1d56ba39f64f14ab882ce6419d0f0f4010aa112e9d0059133e7e4d30470f491 | |
6 | Size (xfce4-battery-plugin-1.1.0.tar.bz2) = 398621 bytes | 6 | Size (xfce4-battery-plugin-1.1.2.tar.bz2) = 464077 bytes | |
7 | SHA1 (patch-panel-plugin_battery.c) = 65a4b74fd3a59aea6e2adc00a8a9010410dd76b0 | 7 | SHA1 (patch-panel-plugin_battery.c) = 04c911099f96443439a0bab99ce608e32a2f6dc0 |
@@ -1,78 +1,44 @@ | @@ -1,78 +1,44 @@ | |||
1 | $NetBSD: patch-panel-plugin_battery.c,v 1.3 2018/11/25 20:55:42 martin Exp $ | 1 | $NetBSD: patch-panel-plugin_battery.c,v 1.4 2019/01/18 17:53:27 youri Exp $ | |
2 | 2 | |||
3 | Fix for NetBSD. | 3 | Fix for NetBSD. | |
4 | 4 | |||
5 | --- panel-plugin/battery.c.orig 2016-10-29 08:37:38.000000000 +0200 | 5 | --- panel-plugin/battery.c.orig 2019-01-18 17:56:56.433182652 +0000 | |
6 | +++ panel-plugin/battery.c 2018-11-25 21:49:59.741230700 +0100 | 6 | +++ panel-plugin/battery.c | |
7 | @@ -26,13 +26,28 @@ | 7 | @@ -26,13 +26,32 @@ | |
8 | #include <config.h> | 8 | #include <config.h> | |
9 | #endif | 9 | #endif | |
10 | 10 | |||
11 | -#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) && (defined(i386) || defined(__i386__)) | 11 | -#if (defined(__OpenBSD__) || defined(__NetBSD__)) | |
12 | +#ifdef __NetBSD__ | 12 | -#include <sys/param.h> | |
13 | +#include <sys/param.h> | 13 | -#include <sys/ioctl.h> | |
14 | +#include <sys/ioctl.h> | 14 | -#include <machine/apmvar.h> | |
15 | +#include <dev/apm/apmbios.h> | 15 | -#define APMDEVICE "/dev/apm" | |
16 | +#include <dev/apm/apmio.h> | |||
17 | +#define APMDEVICE "/dev/apm" | |||
18 | +#define _ACPI_APM_BATT_UNKNOWN 0xffff /* from sys/dev/acpi/acpi_apm.c */ | |||
19 | +#elif (defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) && (defined(i386) || defined(__i386__)) | |||
20 | #include <machine/apm_bios.h> | |||
21 | -#elif (defined(__OpenBSD__) || defined(__NetBSD__)) | |||
22 | +#elif (defined(__OpenBSD__) | |||
23 | #include <sys/param.h> | |||
24 | #include <sys/ioctl.h> | |||
25 | +#if defined(__sparc64__) | |||
26 | +#include <sparc/apmvar.h> | |||
27 | +#elif defined(__x86_64__) | |||
28 | +#include <dev/apm/apmbios.h> | |||
29 | +#include <dev/apm/apmio.h> | |||
30 | +#else | |||
31 | #include <machine/apmvar.h> | |||
32 | +#endif | |||
33 | #define APMDEVICE "/dev/apm" | |||
34 | +#define _ACPI_APM_BATT_UNKNOWN 0xffff /* from sys/dev/acpi/acpi_apm.c */ | |||
35 | #elif __linux__ | |||
36 | #include <libapm.h> | |||
37 | #endif | |||
38 | @@ -162,7 +177,7 @@ init_options(t_battmon_options *options) | |||
39 | gboolean | |||
40 | detect_battery_info(t_battmon *battmon) | |||
41 | { | |||
42 | -#ifdef __FreeBSD__ | |||
43 | +#if defined(__FreeBSD__) || defined(__DragonFly__) | |||
44 | /* This is how I read the information from the APM subsystem under | |||
45 | FreeBSD. Each time this functions is called (once every second) | |||
46 | the APM device is opened, read from and then closed. | |||
47 | @@ -401,7 +416,7 @@ update_apm_status(t_battmon *battmon) | |||
48 | acline = apm.ac_line_status ? TRUE : FALSE; | |||
49 | ||||
50 | } | |||
51 | -#elif __FreeBSD__ | |||
52 | +#elif defined(__FreeBSD__) || defined(__DragonFly__) | |||
53 | else { | |||
54 | /* This is how I read the information from the APM subsystem under | |||
55 | FreeBSD. Each time this functions is called (once every second) | |||
56 | @@ -500,6 +515,11 @@ battmon.c:241: for each function it appe | |||
57 | if(battmon->options.display_percentage && charge > 0 && !(battmon->options.hide_when_full && acline && charge >= 99)){ | |||
58 | gtk_widget_show(GTK_WIDGET(battmon->charge)); | |||
59 | gtk_widget_show(GTK_WIDGET(battmon->timechargealignment)); | |||
60 | +#if defined(__NetBSD__) || defined(__OpenBSD__) | |||
61 | + if (apm.battery_state == APM_BATT_ABSENT) | |||
62 | + g_snprintf(buffer, sizeof(buffer), "--%%"); | |||
63 | + else | |||
64 | +#endif | |||
65 | g_snprintf(buffer, sizeof(buffer),"%d%% ", charge); | |||
66 | gtk_label_set_text(battmon->charge,buffer); | |||
67 | } else { | |||
68 | @@ -509,6 +529,10 @@ battmon.c:241: for each function it appe | |||
69 | if (battmon->options.display_time && time_remaining > 0 && !(battmon->options.hide_when_full && acline && charge >= 99 )){ | |||
70 | gtk_widget_show(GTK_WIDGET(battmon->rtime)); | |||
71 | gtk_widget_show(GTK_WIDGET(battmon->timechargealignment)); | |||
72 | +#if defined(__NetBSD__) | 16 | +#if defined(__NetBSD__) | |
73 | + if (acline || time_remaining == _ACPI_APM_BATT_UNKNOWN) | 17 | + #include <sys/param.h> | |
74 | + g_snprintf(buffer, sizeof(buffer), "--:--"); | 18 | + #include <sys/ioctl.h> | |
75 | +#endif | 19 | + #include <dev/apm/apmbios.h> | |
76 | g_snprintf(buffer, sizeof(buffer),"%02d:%02d ",time_remaining/60,time_remaining%60); | 20 | + #include <dev/apm/apmio.h> | |
77 | gtk_label_set_text(battmon->rtime,buffer); | 21 | + #define APMDEVICE "dev/apm" | |
22 | + #define _ACPI_APM_BATT_UNKNOWN 0xffff /* from sys/dev/apci/acpi_apm.c */ | |||
23 | +#elif (defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) && \ | |||
24 | + (defined(i386) || defined(__i386__)) | |||
25 | + #include <machine/apm_bios.h> | |||
26 | +#elif defined(__OpenBSD__) | |||
27 | + #include <sys/param.h> | |||
28 | + #include <sys/ioctl.h> | |||
29 | + #if defined(__sparc64__) | |||
30 | + #include <sparc/apmvar.h> | |||
31 | + #elif defined(__x86_64__) | |||
32 | + #include <dev/apm/apmbios.h> | |||
33 | + #include <dev/apm/apmio.h> | |||
34 | + #else | |||
35 | + #include <machine/apmvar.h> | |||
36 | + #endif | |||
37 | + #define APMDEVICE "/dev/apm" | |||
38 | + #define _ACPI_APM_BATT_UNKNOWN 0xffff /* from sys/dev/apci/acpi_apm.c */ | |||
39 | #endif | |||
78 | 40 | |||
41 | + | |||
42 | #include <sys/stat.h> | |||
43 | #include <sys/types.h> | |||
44 | #include <fcntl.h> |