pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
enlightenment-current: enable battery module with upower
Module Name: pkgsrc-wip
Committed By: kikadf <kikadf.01%gmail.com@localhost>
Pushed By: kikadf
Date: Wed Jun 10 09:49:50 2020 +0200
Changeset: f638c14362d26277276cd518376110ced109e321
Modified Files:
enlightenment-current/Makefile
enlightenment-current/PLIST
enlightenment-current/TODO
enlightenment-current/distinfo
Added Files:
enlightenment-current/patches/patch-src_modules_battery_e__mod__main.c
enlightenment-current/patches/patch-src_modules_battery_e__mod__main.h
enlightenment-current/patches/patch-src_modules_battery_e__mod__sysctl.c
enlightenment-current/patches/patch-src_modules_battery_e__mod__upower.c
Log Message:
enlightenment-current: enable battery module with upower
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=f638c14362d26277276cd518376110ced109e321
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
enlightenment-current/Makefile | 4 +-
enlightenment-current/PLIST | 4 ++
enlightenment-current/TODO | 4 +-
enlightenment-current/distinfo | 4 ++
.../patch-src_modules_battery_e__mod__main.c | 43 ++++++++++++++
.../patch-src_modules_battery_e__mod__main.h | 40 +++++++++++++
.../patch-src_modules_battery_e__mod__sysctl.c | 67 ++++++++++++++++++++++
.../patch-src_modules_battery_e__mod__upower.c | 16 ++++++
8 files changed, 179 insertions(+), 3 deletions(-)
diffs:
diff --git a/enlightenment-current/Makefile b/enlightenment-current/Makefile
index 920583e73f..53178fec0b 100644
--- a/enlightenment-current/Makefile
+++ b/enlightenment-current/Makefile
@@ -10,6 +10,7 @@ HOMEPAGE= https://www.enlightenment.org/
COMMENT= The Enlightenment window manager
LICENSE= 2-clause-bsd
+USE_LIBTOOL= yes
USE_TOOLS+= pkg-config
PKGCONFIG_OVERRIDE+= src/modules/everything/everything.pc.in
@@ -31,7 +32,7 @@ MAKE_DIRS+= ${PKG_SYSCONFBASE}/xdg/menus
MESON_ARGS+= -Dsystemd=false
MESON_ARGS+= -Ddevice-udev=false
-MESON_ARGS+= -Dbattery=false
+#MESON_ARGS+= -Dbattery=false
MESON_ARGS+= -Dcpufreq=false
MESON_ARGS+= -Dsysinfo=false
MESON_ARGS+= -Dtemperature=false
@@ -45,6 +46,7 @@ CPPFLAGS+= -DPKGSRC_X11BASE=\"${X11BASE:Q}\"
.include "../../devel/meson/build.mk"
.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
.include "../../sysutils/desktop-file-utils/desktopdb.mk"
+.include "../../sysutils/upower/buildlink3.mk"
.include "../../wip/efl-current/buildlink3.mk"
.include "../../x11/xcb-util-keysyms/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/enlightenment-current/PLIST b/enlightenment-current/PLIST
index 1e4b3a70aa..e144712b9f 100644
--- a/enlightenment-current/PLIST
+++ b/enlightenment-current/PLIST
@@ -180,6 +180,10 @@ lib/enlightenment/modules/appmenu/netbsd-x86_64-${PKGVERSION}/module.so
lib/enlightenment/modules/backlight/e-module-backlight.edj
lib/enlightenment/modules/backlight/module.desktop
lib/enlightenment/modules/backlight/netbsd-x86_64-${PKGVERSION}/module.so
+lib/enlightenment/modules/battery/e-module-battery.edj
+lib/enlightenment/modules/battery/module.desktop
+lib/enlightenment/modules/battery/netbsd-x86_64-${PKGVERSION}/batget
+lib/enlightenment/modules/battery/netbsd-x86_64-${PKGVERSION}/module.so
lib/enlightenment/modules/bluez5/e-module-bluez5.edj
lib/enlightenment/modules/bluez5/module.desktop
lib/enlightenment/modules/bluez5/netbsd-x86_64-${PKGVERSION}/module.so
diff --git a/enlightenment-current/TODO b/enlightenment-current/TODO
index 2be20c5ef8..2b390c9f79 100644
--- a/enlightenment-current/TODO
+++ b/enlightenment-current/TODO
@@ -27,6 +27,6 @@ MESON_ARGS+= -Dtemperature=false
>> src/modules/temperature/e_mod_main.c
:: Plan
-1. Test, optimize dependencies
-2. Try to enbale battery with upower
+1. Test, optimize dependencies << opengl issue
+2. Try to enbale battery with upower << enabled, test
3. Add another OS support
diff --git a/enlightenment-current/distinfo b/enlightenment-current/distinfo
index 4ea9c9b015..4578a17cc2 100644
--- a/enlightenment-current/distinfo
+++ b/enlightenment-current/distinfo
@@ -5,6 +5,10 @@ RMD160 (enlightenment-0.24.1.tar.xz) = 29e61075bb25a60a21a23695a1c075fff5673f70
SHA512 (enlightenment-0.24.1.tar.xz) = 3835d898f1fdb96ab6539543e9af910b4a9078372af5cfd90abb33c0d5ecb41496499629c54613e3fec4c230233b69bf1abde68f3ffba4996c69979a526da418
Size (enlightenment-0.24.1.tar.xz) = 28713452 bytes
SHA1 (patch-data_etc_meson.build) = 164a5ebd5b046381f46226d05d0cb17fcd7edbd7
+SHA1 (patch-src_modules_battery_e__mod__main.c) = 40383429a6e9e7c1cee7daba36dca895b8397a16
+SHA1 (patch-src_modules_battery_e__mod__main.h) = f5768702af131931b972e82bcc15c9946b9787ba
+SHA1 (patch-src_modules_battery_e__mod__sysctl.c) = 4b1548a168212b0734e29a9e173e9faa016c20e9
+SHA1 (patch-src_modules_battery_e__mod__upower.c) = 27d8a02084f7cf016ec46b524c8b697e880c7ddc
SHA1 (patch-src_modules_wizard_page__011.c) = a588344a09fef8abc007743518b39d76c415e549
SHA1 (patch-src_modules_wizard_page__120.c) = 6a3b89f1a60da6f67cc65acc6d3dd1e9ef29f882
SHA1 (patch-src_modules_xkbswitch_e__mod__parse.c) = 64f8ab82dc37340f7a5572438c88f4ac3a257b22
diff --git a/enlightenment-current/patches/patch-src_modules_battery_e__mod__main.c b/enlightenment-current/patches/patch-src_modules_battery_e__mod__main.c
new file mode 100644
index 0000000000..da4441723a
--- /dev/null
+++ b/enlightenment-current/patches/patch-src_modules_battery_e__mod__main.c
@@ -0,0 +1,43 @@
+$NetBSD$
+
+* NetBSD's sysctl is different than in other BSD's,
+* use upower backend
+
+--- src/modules/battery/e_mod_main.c.orig 2020-05-31 18:22:37.502253800 +0000
++++ src/modules/battery/e_mod_main.c
+@@ -366,7 +366,7 @@ _battery_config_updated(void)
+ {
+ #ifdef HAVE_EEZE
+ ok = _battery_udev_start();
+-#elif defined __OpenBSD__ || defined __DragonFly__ || defined __FreeBSD__ || defined __NetBSD__
++#elif defined __OpenBSD__ || defined __DragonFly__ || defined __FreeBSD__
+ ok = _battery_sysctl_start();
+ #else
+ ok = _battery_upower_start();
+@@ -736,7 +736,7 @@ e_modapi_init(E_Module *m)
+ E_CONFIG_VAL(D, T, alert_timeout, INT);
+ E_CONFIG_VAL(D, T, suspend_below, INT);
+ E_CONFIG_VAL(D, T, force_mode, INT);
+-#if defined HAVE_EEZE || defined __OpenBSD__ || defined __NetBSD__
++#if defined HAVE_EEZE || defined __OpenBSD__
+ E_CONFIG_VAL(D, T, fuzzy, INT);
+ #endif
+ E_CONFIG_VAL(D, T, desktop_notifications, INT);
+@@ -751,7 +751,7 @@ e_modapi_init(E_Module *m)
+ battery_config->alert_timeout = 0;
+ battery_config->suspend_below = 0;
+ battery_config->force_mode = 0;
+-#if defined HAVE_EEZE || defined __OpenBSD__ || defined __NetBSD__
++#if defined HAVE_EEZE || defined __OpenBSD__
+ battery_config->fuzzy = 0;
+ #endif
+ battery_config->desktop_notifications = 0;
+@@ -824,7 +824,7 @@ e_modapi_shutdown(E_Module *m EINA_UNUSE
+
+ #ifdef HAVE_EEZE
+ _battery_udev_stop();
+-#elif defined (__OpenBSD__) || defined (__DragonFly__) || defined (__FreeBSD__) || defined (__NetBSD__)
++#elif defined (__OpenBSD__) || defined (__DragonFly__) || defined (__FreeBSD__)
+ _battery_sysctl_stop();
+ #else
+ _battery_upower_stop();
diff --git a/enlightenment-current/patches/patch-src_modules_battery_e__mod__main.h b/enlightenment-current/patches/patch-src_modules_battery_e__mod__main.h
new file mode 100644
index 0000000000..19ebf36e33
--- /dev/null
+++ b/enlightenment-current/patches/patch-src_modules_battery_e__mod__main.h
@@ -0,0 +1,40 @@
+$NetBSD$
+
+* NetBSD's sysctl is different than in other BSD's,
+* use upower backend
+
+--- src/modules/battery/e_mod_main.h.orig 2020-05-31 18:22:37.502253800 +0000
++++ src/modules/battery/e_mod_main.h
+@@ -53,7 +53,7 @@ struct _Config
+ Eeze_Udev_Watch *acwatch;
+ Eeze_Udev_Watch *batwatch;
+ #endif
+-#if defined HAVE_EEZE || defined __OpenBSD__ || defined __NetBSD__
++#if defined HAVE_EEZE || defined __OpenBSD__
+ Eina_Bool fuzzy;
+ int fuzzcount;
+ #endif
+@@ -65,12 +65,12 @@ typedef struct _Ac_Adapter Ac_Adapter;
+ struct _Battery
+ {
+ const char *udi;
+-#if defined HAVE_EEZE || defined __OpenBSD__ || defined __DragonFly__ || defined __FreeBSD__ || defined __NetBSD__
++#if defined HAVE_EEZE || defined __OpenBSD__ || defined __DragonFly__ || defined __FreeBSD__
+ Ecore_Poller *poll;
+ #endif
+ Eina_Bool present E_BITFIELD;
+ Eina_Bool charging E_BITFIELD;
+-#if defined HAVE_EEZE || defined __OpenBSD__ || defined __DragonFly__ || defined __FreeBSD__ || defined __NetBSD__
++#if defined HAVE_EEZE || defined __OpenBSD__ || defined __DragonFly__ || defined __FreeBSD__
+ double last_update;
+ double percent;
+ double current_charge;
+@@ -122,7 +122,7 @@ void _battery_device_update(void);
+ int _battery_udev_start(void);
+ void _battery_udev_stop(void);
+ /* end e_mod_udev.c */
+-#elif !defined __OpenBSD__ && !defined __DragonFly__ && !defined __FreeBSD__ && !defined __NetBSD__
++#elif !defined __OpenBSD__ && !defined __DragonFly__ && !defined __FreeBSD__
+ /* in e_mod_dbus.c */
+ int _battery_upower_start(void);
+ void _battery_upower_stop(void);
diff --git a/enlightenment-current/patches/patch-src_modules_battery_e__mod__sysctl.c b/enlightenment-current/patches/patch-src_modules_battery_e__mod__sysctl.c
new file mode 100644
index 0000000000..e50d5993c7
--- /dev/null
+++ b/enlightenment-current/patches/patch-src_modules_battery_e__mod__sysctl.c
@@ -0,0 +1,67 @@
+$NetBSD$
+
+* NetBSD's sysctl is different than in other BSD's,
+* use upower backend
+
+--- src/modules/battery/e_mod_sysctl.c.orig 2020-05-31 18:22:37.502253800 +0000
++++ src/modules/battery/e_mod_sysctl.c
+@@ -1,12 +1,12 @@
+ #include "e.h"
+ #include "e_mod_main.h"
+
+-#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
++#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
+ # include <err.h>
+ # include <sys/types.h>
+ # include <sys/sysctl.h>
+
+-#if defined(__OpenBSD__) || defined(__NetBSD__)
++#if defined(__OpenBSD__)
+ # include <sys/param.h>
+ # include <sys/sensors.h>
+ #endif
+@@ -24,7 +24,7 @@ static Battery *bat = NULL;
+ int
+ _battery_sysctl_start(void)
+ {
+-# if defined(__OpenBSD__) || defined(__NetBSD__)
++# if defined(__OpenBSD__)
+ int mib[] = {CTL_HW, HW_SENSORS, 0, 0, 0};
+ int devn;
+ struct sensordev snsrdev;
+@@ -33,7 +33,7 @@ _battery_sysctl_start(void)
+ size_t len;
+ # endif
+
+-# if defined(__OpenBSD__) || defined(__NetBSD__)
++# if defined(__OpenBSD__)
+ for (devn = 0;; devn++) {
+ mib[2] = devn;
+ if (sysctl(mib, 3, &snsrdev, &sdlen, NULL, 0) == -1)
+@@ -170,7 +170,7 @@ static int
+ _battery_sysctl_battery_update()
+ {
+ double _time;
+-# if defined(__OpenBSD__) || defined(__NetBSD__)
++# if defined(__OpenBSD__)
+ double charge;
+ struct sensor s;
+ size_t slen = sizeof(struct sensor);
+@@ -184,7 +184,7 @@ _battery_sysctl_battery_update()
+ /* update the poller interval */
+ ecore_poller_poller_interval_set(bat->poll,
+ battery_config->poll_interval);
+-# if defined(__OpenBSD__) || defined(__NetBSD__)
++# if defined(__OpenBSD__)
+ charge = 0;
+
+ /* last full capacity */
+@@ -313,7 +313,7 @@ _battery_sysctl_battery_update()
+
+ if (ac)
+ {
+-# if defined(__OpenBSD__) || defined(__NetBSD__)
++# if defined(__OpenBSD__)
+ /* AC State */
+ ac->mib[3] = 9;
+ ac->mib[4] = 0;
diff --git a/enlightenment-current/patches/patch-src_modules_battery_e__mod__upower.c b/enlightenment-current/patches/patch-src_modules_battery_e__mod__upower.c
new file mode 100644
index 0000000000..0be08c5a05
--- /dev/null
+++ b/enlightenment-current/patches/patch-src_modules_battery_e__mod__upower.c
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* NetBSD's sysctl is different than in other BSD's,
+* use upower backend
+
+--- src/modules/battery/e_mod_upower.c.orig 2020-05-31 18:22:37.502253800 +0000
++++ src/modules/battery/e_mod_upower.c
+@@ -1,7 +1,7 @@
+ #include "e.h"
+ #include "e_mod_main.h"
+
+-#if !(defined(HAVE_EEZE) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__))
++#if !(defined(HAVE_EEZE) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__FreeBSD__))
+
+ # define BUS "org.freedesktop.UPower"
+ # define PATH "/org/freedesktop/UPower"
Home |
Main Index |
Thread Index |
Old Index