pkgsrc-Changes archive

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

CVS commit: pkgsrc/sysutils/mate-power-manager



Module Name:    pkgsrc
Committed By:   youri
Date:           Mon Jan 21 13:12:32 UTC 2019

Modified Files:
        pkgsrc/sysutils/mate-power-manager: Makefile distinfo
Added Files:
        pkgsrc/sysutils/mate-power-manager/patches:
            patch-src_gpm-backlight-helper.c patch-src_gpm-load.c

Log Message:
2 Fixes for NetBSD, OpenBSD, FreeBSD:
- Add cpu times calculations
- Disable backlight handling, it is linux-only.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 pkgsrc/sysutils/mate-power-manager/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/sysutils/mate-power-manager/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/sysutils/mate-power-manager/patches/patch-src_gpm-backlight-helper.c \
    pkgsrc/sysutils/mate-power-manager/patches/patch-src_gpm-load.c

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

Modified files:

Index: pkgsrc/sysutils/mate-power-manager/Makefile
diff -u pkgsrc/sysutils/mate-power-manager/Makefile:1.13 pkgsrc/sysutils/mate-power-manager/Makefile:1.14
--- pkgsrc/sysutils/mate-power-manager/Makefile:1.13    Wed Jan 16 18:09:52 2019
+++ pkgsrc/sysutils/mate-power-manager/Makefile Mon Jan 21 13:12:32 2019
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.13 2019/01/16 18:09:52 youri Exp $
+# $NetBSD: Makefile,v 1.14 2019/01/21 13:12:32 youri Exp $
 
 .include "../../meta-pkgs/mate/Makefile.common"
 
 DISTNAME=      mate-power-manager-${VERSION:R}.1
+PKGREVISION=   1
 CATEGORIES=    sysutils
 
 COMMENT=       Power manager for MATE

Index: pkgsrc/sysutils/mate-power-manager/distinfo
diff -u pkgsrc/sysutils/mate-power-manager/distinfo:1.4 pkgsrc/sysutils/mate-power-manager/distinfo:1.5
--- pkgsrc/sysutils/mate-power-manager/distinfo:1.4     Wed Jan 16 18:09:52 2019
+++ pkgsrc/sysutils/mate-power-manager/distinfo Mon Jan 21 13:12:32 2019
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.4 2019/01/16 18:09:52 youri Exp $
+$NetBSD: distinfo,v 1.5 2019/01/21 13:12:32 youri Exp $
 
 SHA1 (mate-power-manager-1.21.1.tar.xz) = e6094ab906de5dbde508359705e92f859537f0f5
 RMD160 (mate-power-manager-1.21.1.tar.xz) = 91aa1d44262affcc039c90074f7b41c1eb405ebf
 SHA512 (mate-power-manager-1.21.1.tar.xz) = e7a63e5693f70f233b44983261837b5224c956720340ad70f500fef44e7f9fdb15c1a183bc23a2f28d0f423c2163c23178d346c2ac5d0ac46fdbcc2b334721ae
 Size (mate-power-manager-1.21.1.tar.xz) = 3214980 bytes
+SHA1 (patch-src_gpm-backlight-helper.c) = 01c6549805efa557ec6a219c99bf2b6fb77d6fb8
+SHA1 (patch-src_gpm-load.c) = 86b3189f77cf64f05631ddc72fd56acafadc1714

Added files:

Index: pkgsrc/sysutils/mate-power-manager/patches/patch-src_gpm-backlight-helper.c
diff -u /dev/null pkgsrc/sysutils/mate-power-manager/patches/patch-src_gpm-backlight-helper.c:1.1
--- /dev/null   Mon Jan 21 13:12:32 2019
+++ pkgsrc/sysutils/mate-power-manager/patches/patch-src_gpm-backlight-helper.c Mon Jan 21 13:12:32 2019
@@ -0,0 +1,16 @@
+$NetBSD: patch-src_gpm-backlight-helper.c,v 1.1 2019/01/21 13:12:32 youri Exp $
+
+Disable backlight helper for non linux.
+
+--- src/gpm-backlight-helper.c.orig    2018-01-29 14:50:11.000000000 +0000
++++ src/gpm-backlight-helper.c
+@@ -146,6 +146,9 @@ out:
+ gint
+ main (gint argc, gchar *argv[])
+ {
++#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
++      return GCM_BACKLIGHT_HELPER_EXIT_CODE_FAILED;
++#endif
+       GOptionContext *context;
+       gint uid;
+       gint euid;
Index: pkgsrc/sysutils/mate-power-manager/patches/patch-src_gpm-load.c
diff -u /dev/null pkgsrc/sysutils/mate-power-manager/patches/patch-src_gpm-load.c:1.1
--- /dev/null   Mon Jan 21 13:12:32 2019
+++ pkgsrc/sysutils/mate-power-manager/patches/patch-src_gpm-load.c     Mon Jan 21 13:12:32 2019
@@ -0,0 +1,40 @@
+$NetBSD: patch-src_gpm-load.c,v 1.1 2019/01/21 13:12:32 youri Exp $
+
+Add cpu times calculations for *BSD.
+
+--- src/gpm-load.c.orig        2018-01-29 14:50:11.000000000 +0000
++++ src/gpm-load.c
+@@ -151,6 +151,33 @@ out:
+       return FALSE;
+ }
+ 
++#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
++
++/**
++ * gpm_load_get_cpu_values:
++ * @cpu_idle: The idle time reported by the CPU
++ * @cpu_total: The total time reported by the CPU
++ * Return value: Success of reading of the kern.cp_time sysctl.
++ **/
++static gboolean
++gpm_load_get_cpu_values (long unsigned *cpu_idle, long unsigned *cpu_total)
++{
++      long cpts[CPUSTATES];
++      size_t length;
++
++      length = sizeof (cpts);
++      if (sysctlbyname ("kern.cp_time", cpts, &length, NULL, 0)) {
++              return FALSE;
++      }
++
++      *cpu_idle = (unsigned long) cpts[CP_IDLE];
++      *cpu_total = (unsigned long) (cpts[CP_USER] + cpts[CP_NICE] + \
++                      cpts[CP_SYS] + cpts[CP_IDLE] + cpts[CP_INTR]);
++
++      return TRUE;
++}
++
++
+ #else
+ 
+ /**



Home | Main Index | Thread Index | Old Index