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)
This commit is contained in:
parent
530fd3f899
commit
f179b4a0df
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue