pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

enlightenment-current: fix power settings in NetBSD



Module Name:	pkgsrc-wip
Committed By:	kikadf <kikadf.01%gmail.com@localhost>
Pushed By:	kikadf
Date:		Thu Jun 25 17:25:40 2020 +0200
Changeset:	f179b4a0df08f1b461e059a2d5b9916e2480aac6

Modified Files:
	enlightenment-current/Makefile
	enlightenment-current/TODO
	enlightenment-current/distinfo
Added Files:
	enlightenment-current/patches/patch-src_bin_system_e__system__power.c

Log Message:
enlightenment-current: fix power settings in NetBSD

* halt: /sbin/shutdown -p now
* reboot: /sbin/shutdown -r now (not changed)
* suspend: sysctl -w hw.acpi.sleep.state=3
* hibernate: sysctl -w hw.acpi.sleep.state=4
(suspend/hibernate based on the xfce4-power-manager patch)

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=f179b4a0df08f1b461e059a2d5b9916e2480aac6

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 enlightenment-current/Makefile                     |  2 +-
 enlightenment-current/TODO                         | 26 ----------
 enlightenment-current/distinfo                     |  1 +
 .../patch-src_bin_system_e__system__power.c        | 58 ++++++++++++++++++++++
 4 files changed, 60 insertions(+), 27 deletions(-)

diffs:
diff --git a/enlightenment-current/Makefile b/enlightenment-current/Makefile
index e5bc5e5830..c9033d8f74 100644
--- a/enlightenment-current/Makefile
+++ b/enlightenment-current/Makefile
@@ -2,7 +2,7 @@
 
 DISTNAME=	enlightenment-0.24.1
 CATEGORIES=	wm
-PKGREVISION=	1
+PKGREVISION=	2
 MASTER_SITES=	https://download.enlightenment.org/rel/apps/enlightenment/
 EXTRACT_SUFX=	.tar.xz
 
diff --git a/enlightenment-current/TODO b/enlightenment-current/TODO
index 2b390c9f79..84350316c1 100644
--- a/enlightenment-current/TODO
+++ b/enlightenment-current/TODO
@@ -1,31 +1,5 @@
 :: NetBSD 9.0_STABLE amd64, pkgsrc-current 2020-06-06 >> build&run OK
 
-MESON_ARGS+=    -Dbattery=false
->> modules/battery/e_mod_sysctl.c
-MESON_ARGS+=    -Dcpufreq=false
->> src/modules/cpufreq/e_mod_main.c
-MESON_ARGS+=    -Dsysinfo=false
->> src/modules/sysinfo/batman/batman.c
->> src/modules/sysinfo/batman/batman_sysctl.c
->> src/modules/sysinfo/cpuclock/cpuclock.c
->> src/modules/sysinfo/cpuclock/cpuclock_config.c
->> src/modules/sysinfo/cpuclock/cpuclock_sysctl.c
->> src/modules/sysinfo/cpumonitor/cpumonitor.c
->> src/modules/sysinfo/cpumonitor/cpumonitor_sysctl.c
->> src/modules/sysinfo/memusage/memusage_sysctl.c
->> src/modules/sysinfo/memusage/memusage.c
->> src/modules/sysinfo/mod.c
->> src/modules/sysinfo/netstatus/netstatus_sysctl.c
->> src/modules/sysinfo/netstatus/netstatus.c:
->> src/modules/sysinfo/sysinfo.c
->> src/modules/sysinfo/sysinfo.h
->> src/modules/sysinfo/thermal/thermal.c
->> src/modules/sysinfo/thermal/thermal.h
->> src/modules/sysinfo/thermal/thermal_sysctl.c
-MESON_ARGS+=    -Dtemperature=false
->> src/modules/temperature/e_mod_tempget.c
->> src/modules/temperature/e_mod_main.c
-
 :: Plan
 1. Test, optimize dependencies << opengl issue
 2. Try to enbale battery with upower << enabled, test
diff --git a/enlightenment-current/distinfo b/enlightenment-current/distinfo
index 4578a17cc2..dd75358b28 100644
--- a/enlightenment-current/distinfo
+++ b/enlightenment-current/distinfo
@@ -5,6 +5,7 @@ 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_bin_system_e__system__power.c) = 93ba369fa12421cb1022a90e510a1044056724c3
 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
diff --git a/enlightenment-current/patches/patch-src_bin_system_e__system__power.c b/enlightenment-current/patches/patch-src_bin_system_e__system__power.c
new file mode 100644
index 0000000000..c9cd23a9e4
--- /dev/null
+++ b/enlightenment-current/patches/patch-src_bin_system_e__system__power.c
@@ -0,0 +1,58 @@
+$NetBSD$
+
+* Add NetBSD support
+
+--- src/bin/system/e_system_power.c.orig	2020-05-31 18:22:37.498920400 +0000
++++ src/bin/system/e_system_power.c
+@@ -32,7 +32,7 @@ _cb_power_hibernate(void *data EINA_UNUS
+ static void
+ _power_halt_init(void)
+ {
+-#if defined (__FreeBSD__) || defined (__OpenBSD__)
++#if defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__)
+    _cmd_halt = strdup("shutdown -p now");
+ #else
+    if (ecore_file_app_installed("systemctl"))
+@@ -41,7 +41,7 @@ _power_halt_init(void)
+      _cmd_halt = strdup("shutdown -h now");
+ #endif
+    // linux systemd: PATH/systemctl poweroff
+-   //           bsd: /sbin/shutdown -p no
++   //           bsd: /sbin/shutdown -p now
+    // *            : /sbin/shutdown -h now
+ }
+ 
+@@ -66,6 +66,8 @@ _power_suspend_init(void)
+ #if defined (__FreeBSD__) || defined (__OpenBSD__)
+    if (ecore_file_app_installed("zzz"))
+      _cmd_suspend = strdup("zzz");
++#elif defined (__NetBSD__)
++     _cmd_suspend = strdup("sysctl -w hw.acpi.sleep.state=3");
+ #else
+    if (ecore_file_app_installed("systemctl"))
+      _cmd_suspend = strdup("systemctl suspend");
+@@ -80,6 +82,7 @@ _power_suspend_init(void)
+ #endif
+    // linux systemd: PATH/systemctl suspend
+    //           bsd: /usr/sbin/zzz
++   //        NetBSD: sysctl
+    //             *:
+    //    PATH/sleep.sh
+    //    /etc/acpi/sleep.sh force
+@@ -93,6 +96,8 @@ _power_hibernate_init(void)
+ #if defined (__FreeBSD__) || defined (__OpenBSD__)
+    if (ecore_file_app_installed("acpiconf"))
+      _cmd_hibernate = strdup("acpiconf -s4");
++#elif defined (__NetBSD__)
++     _cmd_hibernate = strdup("sysctl -w hw.acpi.sleep.state=4");
+ #else
+    if (ecore_file_app_installed("systemctl"))
+      _cmd_hibernate = strdup("systemctl hibernate");
+@@ -107,6 +112,7 @@ _power_hibernate_init(void)
+ #endif
+    // linux systemd: PATH/systemctl hibernate
+    // bsd: acpiconf -s4
++   //        NetBSD: sysctl
+    // if exist:
+    //    PATH/hibernate.sh
+    //    /etc/acpi/hibernate.sh force


Home | Main Index | Thread Index | Old Index