1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-18 00:10:04 +00:00

x11/mate-applets: Updated to 1.28.0

This commit is contained in:
Eric Turgeon 2024-04-02 17:45:28 -03:00
parent 7e835b3be5
commit 70a0e110af
6 changed files with 189 additions and 467 deletions

View File

@ -1,6 +1,5 @@
PORTNAME= mate-applets
PORTVERSION= 1.26.0
PORTREVISION= 5
PORTVERSION= 1.28.0
CATEGORIES= x11 mate
MASTER_SITES= MATE
DIST_SUBDIR= mate
@ -30,7 +29,7 @@ USE_CSTD= c11
USE_MATE= libmateweather panel
USE_XORG= ice sm x11
USE_GNOME= cairo gtk30 gtksourceview3 intltool libwnck3 libxml2
USE_GNOME= cairo gtk30 gtksourceview4 intltool libwnck3 libxml2
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
GNU_CONFIGURE_MANPREFIX=${PREFIX}/share

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1633998272
SHA256 (mate/mate-applets-1.26.0.tar.xz) = b7e0439b4e0c754233c2988644faa3f6ab6270970061b7a0c635d68d236fc977
SIZE (mate/mate-applets-1.26.0.tar.xz) = 8442720
TIMESTAMP = 1712017097
SHA256 (mate/mate-applets-1.28.0.tar.xz) = 1b6bef6bd5d326fb9dc828ff910e4b1b9294b4660c311dc1c90310fd9c356686
SIZE (mate/mate-applets-1.28.0.tar.xz) = 8465116

View File

@ -1,17 +1,6 @@
--- battstat/power-management.c.orig 2021-08-07 11:25:17 UTC
--- battstat/power-management.c.orig 2024-02-21 23:15:11 UTC
+++ battstat/power-management.c
@@ -63,6 +63,10 @@
static const char *apm_readinfo (BatteryStatus *status);
static int pm_initialised;
+#ifdef HAVE_HAL
+static int using_hal;
+#endif
+static int using_hal = FALSE;
#ifdef HAVE_UPOWER
static int using_upower;
#endif
@@ -174,38 +178,69 @@ apm_readinfo (BatteryStatus *status)
@@ -172,38 +172,69 @@ apm_readinfo (BatteryStatus *status)
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
@ -91,7 +80,7 @@
fd = open (APMDEVICE, O_RDONLY);
if (fd == -1) {
return ERR_OPEN_APMDEV;
@@ -218,6 +253,9 @@ apm_readinfo (BatteryStatus *status)
@@ -216,6 +247,9 @@ apm_readinfo (BatteryStatus *status)
if (apminfo.ai_status == 0)
return ERR_APM_E;
@ -101,7 +90,7 @@
}
status->present = TRUE;
@@ -484,6 +522,12 @@ power_management_initialise (void (*callback) (void))
@@ -482,6 +516,12 @@ power_management_initialise (void (*callback) (void))
}
else
using_acpi = FALSE;
@ -112,9 +101,9 @@
+ acpi_callback, NULL);
+ }
#endif
pm_initialised = 1;
pm_initialised = TRUE;
@@ -517,6 +561,9 @@ power_management_cleanup (void)
@@ -515,6 +555,9 @@ power_management_cleanup (void)
}
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
if (using_acpi) {

View File

@ -1,6 +1,6 @@
--- configure.orig 2021-08-07 11:28:45 UTC
--- configure.orig 2024-02-21 23:17:55 UTC
+++ configure
@@ -9534,7 +9534,7 @@ $as_echo_n "checking whether the $compiler linker ($LD
@@ -10229,7 +10229,7 @@ printf %s "checking whether the $compiler linker ($LD)
hardcode_minus_L=no
hardcode_shlibpath_var=unsupported
inherit_rpath=no
@ -9,7 +9,7 @@
module_cmds=
module_expsym_cmds=
old_archive_from_new_cmds=
@@ -9833,7 +9833,7 @@ _LT_EOF
@@ -10529,7 +10529,7 @@ _LT_EOF
wlarc=
else
archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
@ -18,7 +18,7 @@
fi
;;
@@ -9852,7 +9852,7 @@ _LT_EOF
@@ -10548,7 +10548,7 @@ _LT_EOF
_LT_EOF
elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
@ -27,7 +27,7 @@
else
ld_shlibs=no
fi
@@ -9881,7 +9881,7 @@ _LT_EOF
@@ -10577,7 +10577,7 @@ _LT_EOF
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
@ -36,7 +36,7 @@
else
ld_shlibs=no
fi
@@ -9899,7 +9899,7 @@ _LT_EOF
@@ -10595,7 +10595,7 @@ _LT_EOF
*)
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
@ -45,7 +45,7 @@
else
ld_shlibs=no
fi
@@ -10547,7 +10547,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
@@ -11250,7 +11250,7 @@ printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
hardcode_direct_absolute=yes
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
@ -54,7 +54,7 @@
hardcode_libdir_flag_spec='$wl-rpath,$libdir'
export_dynamic_flag_spec='$wl-E'
else
@@ -11396,7 +11396,7 @@ freebsd* | dragonfly*)
@@ -12101,7 +12101,7 @@ freebsd* | dragonfly* | midnightbsd*)
version_type=freebsd-$objformat
case $version_type in
freebsd-elf*)
@ -63,16 +63,7 @@
soname_spec='$libname$release$shared_ext$major'
need_version=no
need_lib_prefix=no
@@ -12531,7 +12531,7 @@ striplib=
old_striplib=
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
$as_echo_n "checking whether stripping libraries is possible... " >&6; }
-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "strip" >/dev/null; then
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -17173,7 +17173,7 @@ _ACEOF
@@ -18234,7 +18234,7 @@ printf "%s\n" "#define GETTEXT_PACKAGE \"$GETTEXT_PACK
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
@ -81,7 +72,7 @@
ac_define_dir=`eval echo $ac_define_dir`
MATELOCALEDIR="$ac_define_dir"
@@ -17595,7 +17595,7 @@ fi
@@ -18623,7 +18623,7 @@ fi
;;
# list of supported OS cores that do not use libapm
@ -90,7 +81,7 @@
if test -n "${OS_SYS}"; then
ACPIINC="-I${OS_SYS}"
else
@@ -18421,7 +18421,7 @@ pkgdatadir="${datadir}/mate-applets"
@@ -19586,7 +19586,7 @@ pkgdatadir="${datadir}/mate-applets"
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
@ -99,7 +90,7 @@
ac_define_dir=`eval echo $ac_define_dir`
MATE_PIXMAPSDIR="$ac_define_dir"
@@ -18434,7 +18434,7 @@ _ACEOF
@@ -19597,7 +19597,7 @@ printf "%s\n" "#define MATE_PIXMAPSDIR \"$ac_define_di
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
@ -108,7 +99,7 @@
ac_define_dir=`eval echo $ac_define_dir`
PKGDATADIR="$ac_define_dir"
@@ -18447,7 +18447,7 @@ _ACEOF
@@ -19608,7 +19608,7 @@ printf "%s\n" "#define PKGDATADIR \"$ac_define_dir\""
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
@ -117,7 +108,7 @@
ac_define_dir=`eval echo $ac_define_dir`
DATADIR="$ac_define_dir"
@@ -18460,7 +18460,7 @@ _ACEOF
@@ -19619,7 +19619,7 @@ printf "%s\n" "#define DATADIR \"$ac_define_dir\"" >>c
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
@ -126,7 +117,7 @@
ac_define_dir=`eval echo $ac_define_dir`
PKG_DATA_DIR="$ac_define_dir"
@@ -18473,7 +18473,7 @@ _ACEOF
@@ -19630,7 +19630,7 @@ printf "%s\n" "#define PKG_DATA_DIR \"$ac_define_dir\"
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
@ -135,7 +126,7 @@
ac_define_dir=`eval echo $ac_define_dir`
SYSCONFDIR="$ac_define_dir"
@@ -18486,7 +18486,7 @@ _ACEOF
@@ -19641,7 +19641,7 @@ printf "%s\n" "#define SYSCONFDIR \"$ac_define_dir\""
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
@ -144,7 +135,7 @@
ac_define_dir=`eval echo $ac_define_dir`
LIBDIR="$ac_define_dir"
@@ -18499,7 +18499,7 @@ _ACEOF
@@ -19652,7 +19652,7 @@ printf "%s\n" "#define LIBDIR \"$ac_define_dir\"" >>co
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
@ -153,7 +144,7 @@
ac_define_dir=`eval echo $ac_define_dir`
PREFIX="$ac_define_dir"
@@ -18512,7 +18512,7 @@ _ACEOF
@@ -19663,7 +19663,7 @@ printf "%s\n" "#define PREFIX \"$ac_define_dir\"" >>co
EXP_VAR=DATADIR

View File

@ -1,410 +0,0 @@
--- cpufreq/src/Makefile.am.orig 2021-08-07 11:25:17 UTC
+++ cpufreq/src/Makefile.am
@@ -33,6 +33,8 @@ else
mate_cpufreq_applet_SOURCES += \
cpufreq-monitor-cpuinfo.c \
cpufreq-monitor-cpuinfo.h \
+ cpufreq-monitor-sysctl.c \
+ cpufreq-monitor-sysctl.h \
cpufreq-monitor-sysfs.c \
cpufreq-monitor-sysfs.h
endif
--- cpufreq/src/cpufreq-monitor-cpuinfo.c.orig 2021-08-07 11:25:17 UTC
+++ cpufreq/src/cpufreq-monitor-cpuinfo.c
@@ -16,7 +16,7 @@
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * Authors : Carlos García Campos <carlosgc@gnome.org>
+ * Authors : Carlos Garcia Campos <carlosgc@gnome.org>
*/
#ifdef HAVE_CONFIG_H
@@ -26,6 +26,10 @@
#include <glib.h>
#include <glib/gi18n.h>
+#ifdef __FreeBSD__
+#include <sys/types.h>
+#include <sys/sysctl.h>
+#endif /* __FreeBSD__ */
#include <string.h>
#include <stdio.h>
@@ -62,15 +66,19 @@ cpufreq_monitor_cpuinfo_new (guint cpu)
static gboolean
cpufreq_monitor_cpuinfo_run (CPUFreqMonitor *monitor)
{
+#ifndef __FreeBSD__
gchar *file;
gchar **lines;
gchar *buffer = NULL;
gchar *p;
+#else
+ size_t len;
+#endif /* __FreeBSD__ */
gint cpu, i;
gint cur_freq, max_freq;
gchar *governor;
GError *error = NULL;
-
+#ifndef __FreeBSD__
file = g_strdup ("/proc/cpuinfo");
if (!cpufreq_file_get_contents (file, &buffer, NULL, &error)) {
g_warning ("%s", error->message);
@@ -115,7 +123,12 @@ cpufreq_monitor_cpuinfo_run (CPUFreqMonitor *monitor)
g_strfreev (lines);
g_free (buffer);
+#else
+ len = sizeof (cpu);
+ if (sysctlbyname ("hw.clockrate", &cpu, &len, NULL, 0) == -1)
+ return FALSE;
+#endif /* __FreeBSD__ */
governor = g_strdup (_("Frequency Scaling Unsupported"));
cur_freq = cpu * 1000;
max_freq = cur_freq;
--- cpufreq/src/cpufreq-monitor-factory.c.orig 2021-08-07 11:25:17 UTC
+++ cpufreq/src/cpufreq-monitor-factory.c
@@ -17,6 +17,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Authors : Carlos García Campos <carlosgc@gnome.org>
+ * Joe Marcus Clarke <marcus@FreeBSD.org>
*/
#ifdef HAVE_CONFIG_H
@@ -26,8 +27,16 @@
#include <glib.h>
#include <glib/gi18n.h>
+#ifdef __FreeBSD__
+#include <sys/types.h>
+#include <sys/sysctl.h>
+#endif /* __FreeBSD__ */
+
#include "cpufreq-applet.h"
#include "cpufreq-utils.h"
+#ifdef __FreeBSD__
+#include "cpufreq-monitor-sysctl.h"
+#endif /* __FreeBSD__ */
#include "cpufreq-monitor-factory.h"
#ifdef HAVE_LIBCPUFREQ
#include "cpufreq-monitor-libcpufreq.h"
@@ -43,7 +52,7 @@ cpufreq_monitor_factory_create_monitor (guint cpu)
return cpufreq_monitor_libcpufreq_new (cpu);
#else
CPUFreqMonitor *monitor = NULL;
-
+#ifndef __FreeBSD__
if (g_file_test ("/sys/devices/system/cpu/cpu0/cpufreq", G_FILE_TEST_EXISTS)) {
monitor = cpufreq_monitor_sysfs_new (cpu);
} else if (g_file_test ("/proc/cpuinfo", G_FILE_TEST_EXISTS)) {
@@ -59,7 +68,19 @@ cpufreq_monitor_factory_create_monitor (guint cpu)
monitor = cpufreq_monitor_cpuinfo_new (cpu);
}
+#else
+ size_t len;
+ if (sysctlbyname ("dev.cpu.0.freq", NULL, &len, NULL, 0) == 0) {
+ monitor = cpufreq_monitor_sysctl_new (cpu);
+ } else {
+ cpufreq_utils_display_error (_("CPU frequency scaling unsupported"),
+ ("You will not be able to modify the frequency of your machine. "
+ "Your machine may be misconfigured or not have hardware support "
+ "for CPU frequency scaling."));
+ monitor = cpufreq_monitor_cpuinfo_new (cpu);
+ }
+#endif /* __FreeBSD__ */
return monitor;
#endif
}
--- cpufreq/src/cpufreq-monitor-sysctl.c.orig 2021-10-12 00:51:41 UTC
+++ cpufreq/src/cpufreq-monitor-sysctl.c
@@ -0,0 +1,184 @@
+/*
+ * Copyright (C) 2001, 2002 Free Software Foundation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Authors : Joe Marcus Clarke <marcus@FreeBSD.org>
+ */
+
+#include <glib.h>
+#include <glib/gi18n.h>
+
+#include <string.h>
+
+#ifdef __FreeBSD__
+#include <sys/types.h>
+#include <sys/sysctl.h>
+
+#include "cpufreq-monitor-sysctl.h"
+
+#define PARENT_TYPE TYPE_CPUFREQ_MONITOR
+
+#define CPUFREQ_MONITOR_GET_PROTECTED(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), PARENT_TYPE, CPUFreqMonitorProtected))
+
+static void cpufreq_monitor_sysctl_class_init (CPUFreqMonitorSysctlClass *klass);
+
+static gboolean cpufreq_monitor_sysctl_run (CPUFreqMonitor *monitor);
+static GList *cpufreq_monitor_sysctl_get_available_frequencies (CPUFreqMonitor *monitor);
+static GList *cpufreq_monitor_sysctl_get_available_governors (CPUFreqMonitor *monitor);
+
+static gboolean cpufreq_monitor_sysctl_get (gpointer gdata);
+
+G_DEFINE_TYPE (CPUFreqMonitorSysctl, cpufreq_monitor_sysctl, CPUFREQ_TYPE_MONITOR)
+
+static void
+cpufreq_monitor_sysctl_init (CPUFreqMonitorSysctl *monitor)
+{
+}
+
+static void
+cpufreq_monitor_sysctl_class_init (CPUFreqMonitorSysctlClass *klass)
+{
+ CPUFreqMonitorClass *monitor_class = CPUFREQ_MONITOR_CLASS (klass);
+
+ monitor_class->run = cpufreq_monitor_sysctl_run;
+ monitor_class->get_available_frequencies = cpufreq_monitor_sysctl_get_available_frequencies;
+ monitor_class->get_available_governors = cpufreq_monitor_sysctl_get_available_governors;
+}
+
+CPUFreqMonitor *
+cpufreq_monitor_sysctl_new (guint cpu)
+{
+ CPUFreqMonitorSysctl *monitor;
+
+ monitor = g_object_new (TYPE_CPUFREQ_MONITOR_SYSCTL, "cpu", cpu, NULL);
+
+ return CPUFREQ_MONITOR (monitor);
+}
+
+static gboolean
+cpufreq_monitor_sysctl_run (CPUFreqMonitor *monitor)
+{
+ gint fmax, fmin, ifreq;
+ gchar *governor;
+ size_t len;
+ gchar *freq_oid;
+ guint mon_cpu;
+ GList *list;
+
+ list = cpufreq_monitor_sysctl_get_available_frequencies (CPUFREQ_MONITOR (monitor));
+
+ fmax = atoi ((gchar *) list->data);
+ fmin = atoi ((gchar *) g_list_nth_data (list, (g_list_length (list) - 1)));
+
+ g_list_foreach (list, (GFunc) g_free, NULL);
+ g_list_free (list);
+
+ g_object_get (G_OBJECT (monitor), "cpu", &mon_cpu, NULL);
+ len = sizeof (ifreq);
+ freq_oid = g_strdup_printf ("dev.cpu.%d.freq", 0);
+
+ if (sysctlbyname (freq_oid, &ifreq, &len, NULL, 0) == -1) {
+ g_free (freq_oid);
+ return FALSE;
+ }
+
+ ifreq *= 1000;
+
+ if (ifreq == fmax)
+ governor = g_strdup ("performance");
+ else if (ifreq == fmin)
+ governor = g_strdup ("economy");
+ else
+ governor = g_strdup ("userspace");
+
+ g_object_set (G_OBJECT (monitor),
+ "online", TRUE,
+ "governor", governor,
+ "frequency", ifreq,
+ "max-frequency", fmax,
+ NULL);
+
+ g_free (governor);
+
+ return TRUE;
+}
+
+static GList *
+cpufreq_monitor_sysctl_get_available_frequencies (CPUFreqMonitor *monitor)
+{
+ gchar *levels_oid, *levels;
+ gchar **levelsp, **l;
+ GList *list = NULL;
+ gint mib[4];
+ guint mon_cpu;
+ size_t len;
+
+ g_object_get (G_OBJECT (monitor), "cpu", &mon_cpu, NULL);
+
+ levels_oid = g_strdup_printf ("dev.cpu.%d.freq_levels",
+ 0);
+ len = 4;
+ sysctlnametomib (levels_oid, mib, &len);
+ len = sizeof (levels);
+ g_free (levels_oid);
+
+ if (sysctl (mib, 4, NULL, &len, NULL, 0) == -1)
+ return NULL;
+
+ levels = g_malloc (len);
+ if (sysctl (mib, 4, levels, &len, NULL, 0) == -1)
+ {
+ g_free(levels);
+ return NULL;
+ }
+
+ levelsp = g_strsplit (levels, " ", 0);
+ g_free (levels);
+
+ for (l = levelsp; l && *l; l++) {
+ gchar **frpr;
+
+ frpr = g_strsplit (*l, "/", 0);
+ if (frpr && frpr[0] != NULL) {
+ /* sysctl format is %d/%d where the
+ * first %d is the frequency, and
+ * the second is the power used in
+ * mW.
+ */
+ int freq = atoi (frpr[0]);
+ list =
+ g_list_append (list, g_strdup_printf ("%d", freq * 1000));
+ }
+ g_strfreev (frpr);
+ }
+
+ g_strfreev (levelsp);
+
+ return (list);
+}
+
+static GList *
+cpufreq_monitor_sysctl_get_available_governors (CPUFreqMonitor *monitor)
+{
+ GList *list = NULL;
+
+ list = g_list_prepend (list, g_strdup ("performance"));
+ list = g_list_prepend (list, g_strdup ("userspace"));
+ list = g_list_prepend (list, g_strdup ("economy"));
+
+ return list;
+}
+#endif /* __FreeBSD__ */
--- cpufreq/src/cpufreq-monitor-sysctl.h.orig 2021-10-12 00:51:41 UTC
+++ cpufreq/src/cpufreq-monitor-sysctl.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2001, 2002 Free Software Foundation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Authors : Joe Marcus Clarke <marcus@FreeBSD.org>
+ */
+
+#ifndef __CPUFREQ_MONITOR_SYSCTL_H__
+#define __CPUFREQ_MONITOR_SYSCTL_H__
+
+#include <glib-object.h>
+
+#include "cpufreq-monitor.h"
+
+#define TYPE_CPUFREQ_MONITOR_SYSCTL (cpufreq_monitor_sysctl_get_type ())
+#define CPUFREQ_MONITOR_SYSCTL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CPUFREQ_MONITOR_SYSCTL, CPUFreqMonitorSysctl))
+#define CPUFREQ_MONITOR_SYSCTL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), TYPE_CPUFREQ_MONITOR_SYSCTL, CPUFreqMonitorSysctlClass))
+#define IS_CPUFREQ_MONITOR_SYSCTL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CPUFREQ_MONITOR_SYSCTL))
+#define IS_CPUFREQ_MONITOR_SYSCTL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CPUFREQ_MONITOR_SYSCTL))
+#define CPUFREQ_MONITOR_SYSCTL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CPUFREQ_MONITOR_SYSCTL, CPUFreqMonitorSysctlClass))
+
+typedef struct _CPUFreqMonitorSysctl CPUFreqMonitorSysctl;
+typedef struct _CPUFreqMonitorSysctlClass CPUFreqMonitorSysctlClass;
+
+struct _CPUFreqMonitorSysctl {
+ CPUFreqMonitor parent;
+};
+
+struct _CPUFreqMonitorSysctlClass {
+ CPUFreqMonitorClass parent_class;
+};
+
+GType cpufreq_monitor_sysctl_get_type (void) G_GNUC_CONST;
+CPUFreqMonitor *cpufreq_monitor_sysctl_new (guint cpu);
+
+#endif /* __CPUFREQ_MONITOR_SYSCTL_H__ */
--- cpufreq/src/cpufreq-utils.c.orig 2021-08-07 11:25:17 UTC
+++ cpufreq/src/cpufreq-utils.c
@@ -24,6 +24,9 @@
#include <glib.h>
#include <gtk/gtk.h>
#include <sys/types.h>
+#ifdef __FreeBSD__
+#include <sys/sysctl.h>
+#endif
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
@@ -36,9 +39,27 @@
#include <gio/gio.h>
#endif /* HAVE_POLKIT */
+#ifdef __FreeBSD__
guint
cpufreq_utils_get_n_cpus (void)
{
+ size_t len;
+ static guint n_cpus = 0;
+
+ if (n_cpus > 0)
+ return n_cpus;
+
+ len = sizeof (n_cpus);
+ if (sysctlbyname ("hw.ncpu", &n_cpus, &len, NULL, 0) == -1) {
+ return 1;
+ }
+
+ return n_cpus;
+}
+#else
+guint
+cpufreq_utils_get_n_cpus (void)
+{
gint mcpu = -1;
gchar *file = NULL;
static guint n_cpus = 0;
@@ -78,6 +99,7 @@ cpufreq_utils_get_n_cpus (void)
return 1;
}
+#endif /* __FreeBSD__ */
void
cpufreq_utils_display_error (const gchar *message,

View File

@ -11,12 +11,6 @@ libexec/mateweather-applet
libexec/stickynotes-applet
libexec/timer-applet
libexec/trashapplet
share/man/man1/mate-charpick-applet.1.gz
share/man/man1/mate-cpufreq-selector.1.gz
share/man/man1/mate-drivemount-applet.1.gz
share/man/man1/mate-geyes-applet.1.gz
share/man/man1/mate-multiload-applet.1.gz
share/man/man1/mateweather.1.gz
share/dbus-1/services/org.mate.panel.applet.AccessxStatusAppletFactory.service
%%BATTERY%%share/dbus-1/services/org.mate.panel.applet.BattstatAppletFactory.service
share/dbus-1/services/org.mate.panel.applet.CharpickerAppletFactory.service
@ -3146,7 +3140,7 @@ share/help/eu/mate-accessx-status/legal.xml
%%BATTERY%%share/help/eu/mate-battstat/figures/context-menu.png
%%BATTERY%%share/help/eu/mate-battstat/index.docbook
%%BATTERY%%share/help/eu/mate-battstat/legal.xml
%%BATTERY%%share/help/eu/mate-char-palette/figures/charpalette_applet.png
share/help/eu/mate-char-palette/figures/charpalette_applet.png
share/help/eu/mate-char-palette/figures/charpick-preferences.png
share/help/eu/mate-char-palette/figures/charpick_characters.png
share/help/eu/mate-char-palette/index.docbook
@ -5325,6 +5319,18 @@ share/help/ku/mateweather/figures/stock_weather-storm.png
share/help/ku/mateweather/figures/stock_weather-sunny.png
share/help/ku/mateweather/index.docbook
share/help/ku/mateweather/legal.xml
share/help/ku_IQ/mate-accessx-status/figures/accessx-status-applet.png
share/help/ku_IQ/mate-accessx-status/figures/accessx-status-disabled.png
share/help/ku_IQ/mate-accessx-status/figures/accessx_bounce-keys.png
share/help/ku_IQ/mate-accessx-status/figures/accessx_mouse-keys.png
share/help/ku_IQ/mate-accessx-status/figures/accessx_slow-keys.png
share/help/ku_IQ/mate-accessx-status/figures/accessx_sticky-altGr-key.png
share/help/ku_IQ/mate-accessx-status/figures/accessx_sticky-keys.png
share/help/ku_IQ/mate-accessx-status/figures/accessx_sticky-meta-key.png
share/help/ku_IQ/mate-accessx-status/figures/accessx_sticky-shift-key.png
share/help/ku_IQ/mate-accessx-status/figures/accessx_sticky-windows-key.png
share/help/ku_IQ/mate-accessx-status/index.docbook
share/help/ku_IQ/mate-accessx-status/legal.xml
%%BATTERY%%share/help/ku_IQ/mate-battstat/figures/battstat-applet-expanded.png
%%BATTERY%%share/help/ku_IQ/mate-battstat/figures/battstat-applet.png
%%BATTERY%%share/help/ku_IQ/mate-battstat/figures/battstat-credits-hal.png
@ -5332,9 +5338,25 @@ share/help/ku/mateweather/legal.xml
%%BATTERY%%share/help/ku_IQ/mate-battstat/figures/context-menu.png
%%BATTERY%%share/help/ku_IQ/mate-battstat/index.docbook
%%BATTERY%%share/help/ku_IQ/mate-battstat/legal.xml
share/help/ku_IQ/mate-char-palette/figures/charpalette_applet.png
share/help/ku_IQ/mate-char-palette/figures/charpick-preferences.png
share/help/ku_IQ/mate-char-palette/figures/charpick_characters.png
share/help/ku_IQ/mate-char-palette/index.docbook
share/help/ku_IQ/mate-char-palette/legal.xml
share/help/ku_IQ/mate-drivemount/figures/drivemount-applet_eject.png
share/help/ku_IQ/mate-drivemount/figures/drivemount-applet_example.png
share/help/ku_IQ/mate-drivemount/figures/drivemount-applet_mount.png
share/help/ku_IQ/mate-drivemount/figures/drivemount-applet_open.png
share/help/ku_IQ/mate-drivemount/figures/drivemount-applet_status.png
share/help/ku_IQ/mate-drivemount/index.docbook
share/help/ku_IQ/mate-drivemount/legal.xml
share/help/ku_IQ/mate-geyes/figures/geyes_applet.png
share/help/ku_IQ/mate-geyes/index.docbook
share/help/ku_IQ/mate-geyes/legal.xml
share/help/ku_IQ/mate-multiload/figures/multiload-preferences.png
share/help/ku_IQ/mate-multiload/figures/system-monitor-applet_window.png
share/help/ku_IQ/mate-multiload/index.docbook
share/help/ku_IQ/mate-multiload/legal.xml
share/help/ku_IQ/mate-netspeed-applet/figures/details.png
share/help/ku_IQ/mate-netspeed-applet/figures/eth_sum_48.png
share/help/ku_IQ/mate-netspeed-applet/figures/ethernet.png
@ -5447,6 +5469,18 @@ share/help/ky/mateweather/figures/stock_weather-storm.png
share/help/ky/mateweather/figures/stock_weather-sunny.png
share/help/ky/mateweather/index.docbook
share/help/ky/mateweather/legal.xml
share/help/la/mate-accessx-status/figures/accessx-status-applet.png
share/help/la/mate-accessx-status/figures/accessx-status-disabled.png
share/help/la/mate-accessx-status/figures/accessx_bounce-keys.png
share/help/la/mate-accessx-status/figures/accessx_mouse-keys.png
share/help/la/mate-accessx-status/figures/accessx_slow-keys.png
share/help/la/mate-accessx-status/figures/accessx_sticky-altGr-key.png
share/help/la/mate-accessx-status/figures/accessx_sticky-keys.png
share/help/la/mate-accessx-status/figures/accessx_sticky-meta-key.png
share/help/la/mate-accessx-status/figures/accessx_sticky-shift-key.png
share/help/la/mate-accessx-status/figures/accessx_sticky-windows-key.png
share/help/la/mate-accessx-status/index.docbook
share/help/la/mate-accessx-status/legal.xml
%%BATTERY%%share/help/la/mate-battstat/figures/battstat-applet-expanded.png
%%BATTERY%%share/help/la/mate-battstat/figures/battstat-applet.png
%%BATTERY%%share/help/la/mate-battstat/figures/battstat-credits-hal.png
@ -5473,6 +5507,17 @@ share/help/la/mate-multiload/figures/multiload-preferences.png
share/help/la/mate-multiload/figures/system-monitor-applet_window.png
share/help/la/mate-multiload/index.docbook
share/help/la/mate-multiload/legal.xml
share/help/la/mate-netspeed-applet/figures/details.png
share/help/la/mate-netspeed-applet/figures/eth_sum_48.png
share/help/la/mate-netspeed-applet/figures/ethernet.png
share/help/la/mate-netspeed-applet/figures/loopback.png
share/help/la/mate-netspeed-applet/figures/netspeed_applet.png
share/help/la/mate-netspeed-applet/figures/plip.png
share/help/la/mate-netspeed-applet/figures/ppp.png
share/help/la/mate-netspeed-applet/figures/settings.png
share/help/la/mate-netspeed-applet/figures/wavelan.png
share/help/la/mate-netspeed-applet/index.docbook
share/help/la/mate-netspeed-applet/legal.xml
share/help/la/mate-stickynotes-applet/figures/stickynote-right-menu-lock.png
share/help/la/mate-stickynotes-applet/figures/stickynote-right-menu-new.png
share/help/la/mate-stickynotes-applet/figures/stickynotes-note-prefs.png
@ -6267,6 +6312,63 @@ share/help/ms/mateweather/legal.xml
share/help/my/mate-geyes/figures/geyes_applet.png
share/help/my/mate-geyes/index.docbook
share/help/my/mate-geyes/legal.xml
share/help/nan/mate-accessx-status/figures/accessx-status-applet.png
share/help/nan/mate-accessx-status/figures/accessx-status-disabled.png
share/help/nan/mate-accessx-status/figures/accessx_bounce-keys.png
share/help/nan/mate-accessx-status/figures/accessx_mouse-keys.png
share/help/nan/mate-accessx-status/figures/accessx_slow-keys.png
share/help/nan/mate-accessx-status/figures/accessx_sticky-altGr-key.png
share/help/nan/mate-accessx-status/figures/accessx_sticky-keys.png
share/help/nan/mate-accessx-status/figures/accessx_sticky-meta-key.png
share/help/nan/mate-accessx-status/figures/accessx_sticky-shift-key.png
share/help/nan/mate-accessx-status/figures/accessx_sticky-windows-key.png
share/help/nan/mate-accessx-status/index.docbook
share/help/nan/mate-accessx-status/legal.xml
share/help/nan/mate-char-palette/figures/charpalette_applet.png
share/help/nan/mate-char-palette/figures/charpick-preferences.png
share/help/nan/mate-char-palette/figures/charpick_characters.png
share/help/nan/mate-char-palette/index.docbook
share/help/nan/mate-char-palette/legal.xml
share/help/nan/mate-drivemount/figures/drivemount-applet_eject.png
share/help/nan/mate-drivemount/figures/drivemount-applet_example.png
share/help/nan/mate-drivemount/figures/drivemount-applet_mount.png
share/help/nan/mate-drivemount/figures/drivemount-applet_open.png
share/help/nan/mate-drivemount/figures/drivemount-applet_status.png
share/help/nan/mate-drivemount/index.docbook
share/help/nan/mate-drivemount/legal.xml
share/help/nan/mate-geyes/figures/geyes_applet.png
share/help/nan/mate-geyes/index.docbook
share/help/nan/mate-geyes/legal.xml
share/help/nan/mate-netspeed-applet/figures/details.png
share/help/nan/mate-netspeed-applet/figures/eth_sum_48.png
share/help/nan/mate-netspeed-applet/figures/ethernet.png
share/help/nan/mate-netspeed-applet/figures/loopback.png
share/help/nan/mate-netspeed-applet/figures/netspeed_applet.png
share/help/nan/mate-netspeed-applet/figures/plip.png
share/help/nan/mate-netspeed-applet/figures/ppp.png
share/help/nan/mate-netspeed-applet/figures/settings.png
share/help/nan/mate-netspeed-applet/figures/wavelan.png
share/help/nan/mate-netspeed-applet/index.docbook
share/help/nan/mate-netspeed-applet/legal.xml
share/help/nan/mate-trashapplet/figures/trash-applet.png
share/help/nan/mate-trashapplet/index.docbook
share/help/nan/mate-trashapplet/legal.xml
share/help/nan/mateweather/figures/mateweather-details.png
share/help/nan/mateweather/figures/mateweather-menu-prefs.png
share/help/nan/mateweather/figures/mateweather-prefs-general.png
share/help/nan/mateweather/figures/mateweather-prefs-locations.png
share/help/nan/mateweather/figures/mateweather_applet.png
share/help/nan/mateweather/figures/stock_weather-cloudy.png
share/help/nan/mateweather/figures/stock_weather-few-clouds.png
share/help/nan/mateweather/figures/stock_weather-fog.png
share/help/nan/mateweather/figures/stock_weather-night-clear.png
share/help/nan/mateweather/figures/stock_weather-night-few-clouds.png
share/help/nan/mateweather/figures/stock_weather-showers.png
share/help/nan/mateweather/figures/stock_weather-snow.png
share/help/nan/mateweather/figures/stock_weather-storm.png
share/help/nan/mateweather/figures/stock_weather-sunny.png
share/help/nan/mateweather/index.docbook
share/help/nan/mateweather/legal.xml
share/help/nb/mate-accessx-status/figures/accessx-status-applet.png
share/help/nb/mate-accessx-status/figures/accessx-status-disabled.png
share/help/nb/mate-accessx-status/figures/accessx_bounce-keys.png
@ -8930,6 +9032,13 @@ share/help/zh-Hans/mate-accessx-status/figures/accessx_sticky-shift-key.png
share/help/zh-Hans/mate-accessx-status/figures/accessx_sticky-windows-key.png
share/help/zh-Hans/mate-accessx-status/index.docbook
share/help/zh-Hans/mate-accessx-status/legal.xml
%%BATTERY%%share/help/zh-Hans/mate-battstat/figures/battstat-applet-expanded.png
%%BATTERY%%share/help/zh-Hans/mate-battstat/figures/battstat-applet.png
%%BATTERY%%share/help/zh-Hans/mate-battstat/figures/battstat-credits-hal.png
%%BATTERY%%share/help/zh-Hans/mate-battstat/figures/battstat-preferences.png
%%BATTERY%%share/help/zh-Hans/mate-battstat/figures/context-menu.png
%%BATTERY%%share/help/zh-Hans/mate-battstat/index.docbook
%%BATTERY%%share/help/zh-Hans/mate-battstat/legal.xml
share/help/zh-Hans/mate-char-palette/figures/charpalette_applet.png
share/help/zh-Hans/mate-char-palette/figures/charpick-preferences.png
share/help/zh-Hans/mate-char-palette/figures/charpick_characters.png
@ -8945,9 +9054,47 @@ share/help/zh-Hans/mate-drivemount/legal.xml
share/help/zh-Hans/mate-geyes/figures/geyes_applet.png
share/help/zh-Hans/mate-geyes/index.docbook
share/help/zh-Hans/mate-geyes/legal.xml
share/help/zh-Hans/mate-multiload/figures/multiload-preferences.png
share/help/zh-Hans/mate-multiload/figures/system-monitor-applet_window.png
share/help/zh-Hans/mate-multiload/index.docbook
share/help/zh-Hans/mate-multiload/legal.xml
share/help/zh-Hans/mate-netspeed-applet/figures/details.png
share/help/zh-Hans/mate-netspeed-applet/figures/eth_sum_48.png
share/help/zh-Hans/mate-netspeed-applet/figures/ethernet.png
share/help/zh-Hans/mate-netspeed-applet/figures/loopback.png
share/help/zh-Hans/mate-netspeed-applet/figures/netspeed_applet.png
share/help/zh-Hans/mate-netspeed-applet/figures/plip.png
share/help/zh-Hans/mate-netspeed-applet/figures/ppp.png
share/help/zh-Hans/mate-netspeed-applet/figures/settings.png
share/help/zh-Hans/mate-netspeed-applet/figures/wavelan.png
share/help/zh-Hans/mate-netspeed-applet/index.docbook
share/help/zh-Hans/mate-netspeed-applet/legal.xml
share/help/zh-Hans/mate-stickynotes-applet/figures/stickynote-right-menu-lock.png
share/help/zh-Hans/mate-stickynotes-applet/figures/stickynote-right-menu-new.png
share/help/zh-Hans/mate-stickynotes-applet/figures/stickynotes-note-prefs.png
share/help/zh-Hans/mate-stickynotes-applet/figures/stickynotes-prefs.png
share/help/zh-Hans/mate-stickynotes-applet/figures/stickynotes_applet.png
share/help/zh-Hans/mate-stickynotes-applet/index.docbook
share/help/zh-Hans/mate-stickynotes-applet/legal.xml
share/help/zh-Hans/mate-trashapplet/figures/trash-applet.png
share/help/zh-Hans/mate-trashapplet/index.docbook
share/help/zh-Hans/mate-trashapplet/legal.xml
share/help/zh-Hans/mateweather/figures/mateweather-details.png
share/help/zh-Hans/mateweather/figures/mateweather-menu-prefs.png
share/help/zh-Hans/mateweather/figures/mateweather-prefs-general.png
share/help/zh-Hans/mateweather/figures/mateweather-prefs-locations.png
share/help/zh-Hans/mateweather/figures/mateweather_applet.png
share/help/zh-Hans/mateweather/figures/stock_weather-cloudy.png
share/help/zh-Hans/mateweather/figures/stock_weather-few-clouds.png
share/help/zh-Hans/mateweather/figures/stock_weather-fog.png
share/help/zh-Hans/mateweather/figures/stock_weather-night-clear.png
share/help/zh-Hans/mateweather/figures/stock_weather-night-few-clouds.png
share/help/zh-Hans/mateweather/figures/stock_weather-showers.png
share/help/zh-Hans/mateweather/figures/stock_weather-snow.png
share/help/zh-Hans/mateweather/figures/stock_weather-storm.png
share/help/zh-Hans/mateweather/figures/stock_weather-sunny.png
share/help/zh-Hans/mateweather/index.docbook
share/help/zh-Hans/mateweather/legal.xml
share/help/zh_CN/mate-accessx-status/figures/accessx-status-applet.png
share/help/zh_CN/mate-accessx-status/figures/accessx-status-disabled.png
share/help/zh_CN/mate-accessx-status/figures/accessx_bounce-keys.png
@ -9544,6 +9691,12 @@ share/locale/zh_CN/LC_MESSAGES/mate-applets.mo
share/locale/zh_HK/LC_MESSAGES/mate-applets.mo
share/locale/zh_TW/LC_MESSAGES/mate-applets.mo
share/locale/zu/LC_MESSAGES/mate-applets.mo
share/man/man1/mate-charpick-applet.1.gz
share/man/man1/mate-cpufreq-selector.1.gz
share/man/man1/mate-drivemount-applet.1.gz
share/man/man1/mate-geyes-applet.1.gz
share/man/man1/mate-multiload-applet.1.gz
share/man/man1/mateweather.1.gz
%%DATADIR%%/geyes/Bizarre/Bizarre-eye.png
%%DATADIR%%/geyes/Bizarre/Bizarre-pupil.png
%%DATADIR%%/geyes/Bizarre/config