summaryrefslogtreecommitdiffstats
path: root/x11/gnome-applets/files
diff options
context:
space:
mode:
Diffstat (limited to 'x11/gnome-applets/files')
-rw-r--r--x11/gnome-applets/files/patch-aa95
-rw-r--r--x11/gnome-applets/files/patch-battstat_acpi-freebsd.c152
-rw-r--r--x11/gnome-applets/files/patch-battstat_acpi-freebsd.h78
-rw-r--r--x11/gnome-applets/files/patch-battstat_battstat_applet.c21
-rw-r--r--x11/gnome-applets/files/patch-battstat_power-management.c123
-rw-r--r--x11/gnome-applets/files/patch-cpufreq-freebsd436
-rw-r--r--x11/gnome-applets/files/patch-cpufreq-selector-freebsd218
-rw-r--r--x11/gnome-applets/files/patch-invest-applet_invest_invest-applet.py13
-rw-r--r--x11/gnome-applets/files/patch-invest-applet_invest_invest-chart13
-rw-r--r--x11/gnome-applets/files/patch-stickynotes_stickynotes.ui20
10 files changed, 1169 insertions, 0 deletions
diff --git a/x11/gnome-applets/files/patch-aa b/x11/gnome-applets/files/patch-aa
new file mode 100644
index 000000000..8a9822d48
--- /dev/null
+++ b/x11/gnome-applets/files/patch-aa
@@ -0,0 +1,95 @@
+--- configure.orig 2008-12-20 14:46:11.000000000 -0500
++++ configure 2008-12-20 14:54:57.000000000 -0500
+@@ -17150,7 +17150,7 @@ _ACEOF
+
+ test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+- ac_define_dir=`eval echo $"${datadir}/locale"`
++ ac_define_dir=`eval echo "${datadir}/locale"`
+ ac_define_dir=`eval echo $ac_define_dir`
+ GNOMELOCALEDIR="$ac_define_dir"
+
+@@ -19097,8 +19097,8 @@ fi
+
+ ;;
+ # list of supported OS cores that do not use libapm
+- i386-*-freebsd*|*-*-netbsd*|*-*-openbsd*|*-*kfreebsd*-gnu)
+- if -n "${OS_SYS}" ; then
++ i386-*-freebsd*|amd64-*-freebsd*|*-*-netbsd*|*-*-openbsd*|*-*kfreebsd*-gnu)
++ if test -n "${OS_SYS}" ; then
+ ACPIINC="-I${OS_SYS}"
+ else
+ ACPIINC="-I/usr/src/sys"
+@@ -20023,6 +20023,9 @@ if test x$disable_cpufreq = xno; then
+ *linux*)
+ build_cpufreq_applet=yes
+ ;;
++ i386-*-freebsd*|amd64-*-freebsd*)
++ build_cpufreq_applet=yes
++ ;;
+ *)
+ { echo "$as_me:$LINENO: WARNING: ${host} is not supported by cpufreq applet, not building" >&5
+ echo "$as_me: WARNING: ${host} is not supported by cpufreq applet, not building" >&2;}
+@@ -20591,7 +20594,7 @@ builderdir="${pkgdatadir}/builder"
+
+ test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+- ac_define_dir=`eval echo $"${iconsdir}"`
++ ac_define_dir=`eval echo "${iconsdir}"`
+ ac_define_dir=`eval echo $ac_define_dir`
+ GNOME_ICONDIR="$ac_define_dir"
+
+@@ -20604,7 +20607,7 @@ _ACEOF
+
+ test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+- ac_define_dir=`eval echo $"${pixmapsdir}"`
++ ac_define_dir=`eval echo "${pixmapsdir}"`
+ ac_define_dir=`eval echo $ac_define_dir`
+ GNOME_PIXMAPSDIR="$ac_define_dir"
+
+@@ -20617,7 +20620,7 @@ _ACEOF
+
+ test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+- ac_define_dir=`eval echo $"${builderdir}"`
++ ac_define_dir=`eval echo "${builderdir}"`
+ ac_define_dir=`eval echo $ac_define_dir`
+ GTK_BUILDERDIR="$ac_define_dir"
+
+@@ -20630,7 +20633,7 @@ _ACEOF
+
+ test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+- ac_define_dir=`eval echo $"${datadir}"`
++ ac_define_dir=`eval echo "${datadir}"`
+ ac_define_dir=`eval echo $ac_define_dir`
+ DATADIR="$ac_define_dir"
+
+@@ -20643,7 +20646,7 @@ _ACEOF
+
+ test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+- ac_define_dir=`eval echo $"${sysconfdir}"`
++ ac_define_dir=`eval echo "${sysconfdir}"`
+ ac_define_dir=`eval echo $ac_define_dir`
+ SYSCONFDIR="$ac_define_dir"
+
+@@ -20656,7 +20659,7 @@ _ACEOF
+
+ test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+- ac_define_dir=`eval echo $"${libdir}"`
++ ac_define_dir=`eval echo "${libdir}"`
+ ac_define_dir=`eval echo $ac_define_dir`
+ LIBDIR="$ac_define_dir"
+
+@@ -20669,7 +20672,7 @@ _ACEOF
+
+ test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+- ac_define_dir=`eval echo $"$prefix"`
++ ac_define_dir=`eval echo "$prefix"`
+ ac_define_dir=`eval echo $ac_define_dir`
+ PREFIX="$ac_define_dir"
+
diff --git a/x11/gnome-applets/files/patch-battstat_acpi-freebsd.c b/x11/gnome-applets/files/patch-battstat_acpi-freebsd.c
new file mode 100644
index 000000000..48746fa03
--- /dev/null
+++ b/x11/gnome-applets/files/patch-battstat_acpi-freebsd.c
@@ -0,0 +1,152 @@
+--- battstat/acpi-freebsd.c.orig Sun Jul 3 16:41:26 2005
++++ battstat/acpi-freebsd.c Sun Jul 3 16:49:55 2005
+@@ -31,9 +31,13 @@
+
+ #include <stdio.h>
+ #include <sys/types.h>
++#include <sys/socket.h>
+ #include <sys/sysctl.h>
++#include <sys/un.h>
+ #include <sys/ioctl.h>
++#if defined(__i386__)
+ #include <machine/apm_bios.h>
++#endif
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <unistd.h>
+@@ -92,16 +96,36 @@ gboolean
+ acpi_freebsd_init(struct acpi_info * acpiinfo)
+ {
+ int acpi_fd;
++ int event_fd;
+
+ g_assert(acpiinfo);
+
+- acpi_fd = open(ACPIDEV, O_RDONLY);
+- if (acpi_fd >= 0) {
+- acpiinfo->acpifd = acpi_fd;
++ if (acpiinfo->acpifd == -1) {
++ acpi_fd = open(ACPIDEV, O_RDONLY);
++ if (acpi_fd >= 0) {
++ acpiinfo->acpifd = acpi_fd;
++ }
++ else {
++ acpiinfo->acpifd = -1;
++ return FALSE;
++ }
+ }
+- else {
+- acpiinfo->acpifd = -1;
+- return FALSE;
++
++ event_fd = socket(PF_UNIX, SOCK_STREAM, 0);
++ if (event_fd >= 0) {
++ struct sockaddr_un addr;
++ addr.sun_family = AF_UNIX;
++ strcpy(addr.sun_path, "/var/run/devd.pipe");
++ if (connect(event_fd, (struct sockaddr *) &addr, sizeof(addr)) == 0) {
++ acpiinfo->event_fd = event_fd;
++ acpiinfo->event_inited = TRUE;
++ acpiinfo->channel = g_io_channel_unix_new(event_fd);
++ }
++ else {
++ close(event_fd);
++ acpiinfo->event_fd = -1;
++ acpiinfo->event_inited = FALSE;
++ }
+ }
+
+ update_battery_info(acpiinfo);
+@@ -110,6 +134,65 @@ acpi_freebsd_init(struct acpi_info * acp
+ return TRUE;
+ }
+
++#define ACPI_EVENT_IGNORE 0
++#define ACPI_EVENT_AC 1
++#define ACPI_EVENT_BATTERY_INFO 2
++
++static int parse_acpi_event(GString *buffer)
++{
++ if (strstr(buffer->str, "system=ACPI")) {
++ if (strstr(buffer->str, "subsystem=ACAD"))
++ return ACPI_EVENT_AC;
++ if (strstr(buffer->str, "subsystem=CMBAT"))
++ return ACPI_EVENT_BATTERY_INFO;
++ }
++
++ return ACPI_EVENT_IGNORE;
++}
++
++void acpi_freebsd_update(struct acpi_info *acpiinfo)
++{
++ /* XXX This is needed for systems where devd does not have permissions
++ * to allow for event-driven updates.
++ */
++ update_ac_info(acpiinfo);
++ update_battery_info(acpiinfo);
++}
++
++gboolean acpi_process_event(struct acpi_info *acpiinfo, gboolean *read_error)
++{
++ gsize i;
++ int evt;
++ gboolean result = FALSE;
++ GString *buffer;
++ GIOStatus stat;
++ buffer = g_string_new(NULL);
++
++ *read_error = FALSE;
++ stat = g_io_channel_read_line_string(acpiinfo->channel, buffer, &i, NULL);
++
++ if (stat == G_IO_STATUS_ERROR || stat == G_IO_STATUS_EOF) {
++ *read_error = TRUE;
++ g_string_free(buffer, TRUE);
++ return FALSE;
++ }
++
++ evt = parse_acpi_event(buffer);
++ switch (evt) {
++ case ACPI_EVENT_AC:
++ update_ac_info(acpiinfo);
++ result = TRUE;
++ break;
++ case ACPI_EVENT_BATTERY_INFO:
++ update_battery_info(acpiinfo);
++ result = TRUE;
++ break;
++ }
++
++ g_string_free(buffer, TRUE);
++ return result;
++}
++
+ void
+ acpi_freebsd_cleanup(struct acpi_info * acpiinfo)
+ {
+@@ -119,21 +202,12 @@ acpi_freebsd_cleanup(struct acpi_info *
+ close(acpiinfo->acpifd);
+ acpiinfo->acpifd = -1;
+ }
+-}
+
+-/* XXX This is a hack since user-land applications can't get ACPI events yet.
+- * Devd provides this (or supposedly provides this), but you need to be
+- * root to access devd.
+- */
+-gboolean
+-acpi_process_event(struct acpi_info * acpiinfo)
+-{
+- g_assert(acpiinfo);
+-
+- update_ac_info(acpiinfo);
+- update_battery_info(acpiinfo);
+-
+- return TRUE;
++ if (acpiinfo->event_fd >= 0) {
++ g_io_channel_unref(acpiinfo->channel);
++ close(acpiinfo->event_fd);
++ acpiinfo->event_fd = -1;
++ }
+ }
+
+ gboolean
diff --git a/x11/gnome-applets/files/patch-battstat_acpi-freebsd.h b/x11/gnome-applets/files/patch-battstat_acpi-freebsd.h
new file mode 100644
index 000000000..918cd59eb
--- /dev/null
+++ b/x11/gnome-applets/files/patch-battstat_acpi-freebsd.h
@@ -0,0 +1,78 @@
+--- battstat/acpi-freebsd.h.orig Sun Jul 3 16:50:22 2005
++++ battstat/acpi-freebsd.h Sun Jul 3 16:54:14 2005
+@@ -29,61 +29,31 @@
+ #define ACPI_LIFE "hw.acpi.battery.life"
+ #define ACPI_STATE "hw.acpi.battery.state"
+
+-struct acpi_info {
+- gboolean ac_online;
+- int acpifd;
+- int max_capacity;
+- int low_capacity;
+- int critical_capacity;
++/* XXX: AMD64 does not have machine/apm_bios.h. */
++#if !defined(__i386__)
++struct apm_info {
++ guint ai_acline;
++ guint ai_batt_stat;
++ guint ai_batt_life;
++ int ai_batt_time;
++ guint ai_status;
+ };
+-
+-gboolean acpi_freebsd_read(struct apm_info *apminfo, struct acpi_info * acpiinfo);
+-gboolean acpi_process_event(struct acpi_info * acpiinfo);
+-gboolean acpi_freebsd_init(struct acpi_info * acpiinfo);
+-void acpi_freebsd_cleanup(struct acpi_info * acpiinfo);
+-
+-#endif /* __ACPI_FREEBSD_H__ */
+-/*
+- * Copyright (C) 2004 by Joe Marcus Clarke <marcus@FreeBSD.org>
+- *
+- * This program 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 program 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 program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
+- */
+-
+-#ifndef __ACPI_FREEBSD_H__
+-#define __ACPI_FREEBSD_H__
+-
+-#define ACPIDEV "/dev/acpi"
+-
+-#define BATT_MIN 0
+-#define BATT_MAX 64
+-
+-#define ACPI_ACLINE "hw.acpi.acline"
+-#define ACPI_TIME "hw.acpi.battery.time"
+-#define ACPI_LIFE "hw.acpi.battery.life"
+-#define ACPI_STATE "hw.acpi.battery.state"
++#endif
+
+ struct acpi_info {
+ gboolean ac_online;
++ gboolean event_inited;
+ int acpifd;
++ int event_fd;
+ int max_capacity;
+ int low_capacity;
+ int critical_capacity;
++ GIOChannel * channel;
+ };
+
+ gboolean acpi_freebsd_read(struct apm_info *apminfo, struct acpi_info * acpiinfo);
+-gboolean acpi_process_event(struct acpi_info * acpiinfo);
++void acpi_freebsd_update(struct acpi_info * acpiinfo);
++gboolean acpi_process_event(struct acpi_info * acpiinfo, gboolean *read_error);
+ gboolean acpi_freebsd_init(struct acpi_info * acpiinfo);
+ void acpi_freebsd_cleanup(struct acpi_info * acpiinfo);
+
diff --git a/x11/gnome-applets/files/patch-battstat_battstat_applet.c b/x11/gnome-applets/files/patch-battstat_battstat_applet.c
new file mode 100644
index 000000000..a95b7b569
--- /dev/null
+++ b/x11/gnome-applets/files/patch-battstat_battstat_applet.c
@@ -0,0 +1,21 @@
+--- battstat/battstat_applet.c.orig Fri Aug 19 22:13:49 2005
++++ battstat/battstat_applet.c Tue Aug 23 20:37:13 2005
+@@ -430,14 +430,14 @@ battery_full_notify (GtkWidget *applet)
+ static void
+ battery_full_dialog (GtkWidget *applet)
+ {
+- /* first attempt to use libnotify */
+- if (battery_full_notify (applet))
+- return;
+-
+ GtkWidget *dialog, *hbox, *image, *label;
+ GdkPixbuf *pixbuf;
+
+ gchar *new_label;
++ /* first attempt to use libnotify */
++ if (battery_full_notify (applet))
++ return;
++
+ dialog = gtk_dialog_new_with_buttons (
+ _("Battery Notice"),
+ NULL,
diff --git a/x11/gnome-applets/files/patch-battstat_power-management.c b/x11/gnome-applets/files/patch-battstat_power-management.c
new file mode 100644
index 000000000..9cea2d65b
--- /dev/null
+++ b/x11/gnome-applets/files/patch-battstat_power-management.c
@@ -0,0 +1,123 @@
+--- battstat/power-management.c.orig Thu Aug 25 23:45:47 2005
++++ battstat/power-management.c Tue Aug 30 01:28:40 2005
+@@ -61,9 +61,7 @@
+
+ static const char *apm_readinfo (BatteryStatus *status);
+ static int pm_initialised;
+-#ifdef HAVE_HAL
+-static int using_hal;
+-#endif
++static int using_hal = FALSE;
+
+ /*
+ * What follows is a series of platform-specific apm_readinfo functions
+@@ -173,16 +171,40 @@ apm_readinfo (BatteryStatus *status)
+
+ #elif __FreeBSD__
+
++#if defined(__i386__)
+ #include <machine/apm_bios.h>
++#endif
+ #include "acpi-freebsd.h"
+
+ static struct acpi_info acpiinfo;
+ static gboolean using_acpi;
+ static int acpi_count;
++static int acpiwatch;
+ static struct apm_info apminfo;
+
++gboolean acpi_freebsd_read(struct apm_info *apminfo, struct acpi_info *acpiinfo);
++
+ #define APMDEVICE "/dev/apm"
+
++static gboolean acpi_callback (GIOChannel * chan, GIOCondition cond, gpointer data)
++{
++ gboolean read_error;
++ if (cond & (G_IO_ERR | G_IO_HUP)) {
++ acpi_freebsd_cleanup(&acpiinfo);
++ return FALSE;
++ }
++
++ if (acpi_process_event(&acpiinfo, &read_error)) {
++ acpi_freebsd_read(&apminfo, &acpiinfo);
++ }
++ else if (read_error) {
++ acpi_freebsd_cleanup(&acpiinfo);
++ return FALSE;
++ }
++
++ return TRUE;
++}
++
+ static const char *
+ apm_readinfo (BatteryStatus *status)
+ {
+@@ -190,21 +212,27 @@ apm_readinfo (BatteryStatus *status)
+
+ if (DEBUG) g_print("apm_readinfo() (FreeBSD)\n");
+
+- if (using_acpi) {
++ if (using_acpi && (!acpiinfo.event_inited || acpiinfo.event_fd >= 0)) {
+ if (acpi_count <= 0) {
+ acpi_count = 30;
+- acpi_process_event(&acpiinfo);
++ if (!acpiinfo.event_inited) {
++ acpi_freebsd_update(&acpiinfo);
++ }
+ if (acpi_freebsd_read(&apminfo, &acpiinfo) == FALSE)
+ return ERR_FREEBSD_ACPI;
+ }
+ acpi_count--;
+ }
+- else
+- {
+- /* This is how I read the information from the APM subsystem under
+- FreeBSD. Each time this functions is called (once every second)
+- the APM device is opened, read from and then closed.
+- */
++ else if (using_acpi && acpiinfo.event_inited) {
++ if (acpi_freebsd_init(&acpiinfo)) {
++ acpiwatch = g_io_add_watch (acpiinfo.channel,
++ G_IO_IN | G_IO_ERR | G_IO_HUP,
++ acpi_callback, NULL);
++ acpi_freebsd_read(&apminfo, &acpiinfo);
++ }
++ }
++ else {
++#if defined(__i386__)
+ fd = open(APMDEVICE, O_RDONLY);
+ if (fd == -1) {
+ return ERR_OPEN_APMDEV;
+@@ -217,6 +245,9 @@ apm_readinfo (BatteryStatus *status)
+
+ if(apminfo.ai_status == 0)
+ return ERR_APM_E;
++#else
++ return ERR_OPEN_APMDEV;
++#endif
+ }
+
+ status->present = TRUE;
+@@ -480,6 +511,12 @@ power_management_initialise( int no_hal
+ }
+ else
+ using_acpi = FALSE;
++
++ if (using_acpi && acpiinfo.event_fd >= 0) {
++ acpiwatch = g_io_add_watch (acpiinfo.channel,
++ G_IO_IN | G_IO_ERR | G_IO_HUP,
++ acpi_callback, NULL);
++ }
+ #endif
+ pm_initialised = 1;
+
+@@ -513,6 +550,9 @@ power_management_cleanup( void )
+ }
+ #elif defined(__FreeBSD__)
+ if (using_acpi) {
++ if (acpiwatch != 0)
++ g_source_remove(acpiwatch);
++ acpiwatch = 0;
+ acpi_freebsd_cleanup(&acpiinfo);
+ }
+ #endif
diff --git a/x11/gnome-applets/files/patch-cpufreq-freebsd b/x11/gnome-applets/files/patch-cpufreq-freebsd
new file mode 100644
index 000000000..a597e6725
--- /dev/null
+++ b/x11/gnome-applets/files/patch-cpufreq-freebsd
@@ -0,0 +1,436 @@
+--- cpufreq/src/cpufreq-monitor-cpuinfo.c.orig Thu Jun 15 01:01:54 2006
++++ cpufreq/src/cpufreq-monitor-cpuinfo.c Sat Jun 17 13:48:19 2006
+@@ -22,6 +22,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>
+
+@@ -59,15 +63,20 @@ 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 (!g_file_get_contents (file, &buffer, NULL, &error)) {
+ g_warning (error->message);
+@@ -112,6 +121,12 @@ cpufreq_monitor_cpuinfo_run (CPUFreqMoni
+
+ 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;
+--- cpufreq/src/cpufreq-applet.c.orig Thu Jun 15 01:01:53 2006
++++ cpufreq/src/cpufreq-applet.c Sat Jun 17 13:42:50 2006
+@@ -17,6 +17,7 @@
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Authors : Carlos García Campos <carlosgc@gnome.org>
++ * Joe Marcus Clarke <marcus@FreeBSD.org>
+ */
+
+ #ifdef HAVE_CONFIG_H
+@@ -519,6 +524,7 @@ cpufreq_applet_about_cb (BonoboUICompone
+ {
+ static const gchar *const authors[] = {
+ "Carlos Garcia Campos <carlosgc@gnome.org>",
++ "Joe Marcus Clarke <marcus@FreeBSD.org> (FreeBSD support)",
+ NULL
+ };
+ static const gchar *const documenters[] = {
+--- cpufreq/src/cpufreq-monitor-sysctl.h.orig Sat Jun 17 14:05:37 2006
++++ cpufreq/src/cpufreq-monitor-sysctl.h Sat Jun 17 14:14:13 2006
+@@ -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-monitor-factory.c.orig Sat Jun 17 06:28:02 2006
++++ cpufreq/src/cpufreq-monitor-factory.c Sat Jun 24 01:45:54 2006
+@@ -17,6 +17,7 @@
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Authors : Carlos García Campos <carlosgc@gnome.org>
++ * Joe Marcus Clarke <marcus@FreeBSD.org>
+ */
+
+ #ifdef HAVE_CONFIG_H
+@@ -25,11 +26,18 @@
+
+ #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"
+ #include "cpufreq-monitor-sysfs.h"
+ #include "cpufreq-monitor-procfs.h"
++#ifdef __FreeBSD__
++#include "cpufreq-monitor-sysctl.h"
++#endif /* __FreeBSD__ */
+ #include "cpufreq-monitor-cpuinfo.h"
+ #ifdef HAVE_LIBCPUFREQ
+ #include "cpufreq-monitor-libcpufreq.h"
+@@ -40,6 +48,7 @@ CPUFreqMonitor *
+ cpufreq_monitor_factory_create_monitor (guint cpu)
+ {
+ CPUFreqMonitor *monitor = NULL;
++#ifndef __FreeBSD__
+
+ #ifdef HAVE_LIBCPUFREQ
+ monitor = cpufreq_monitor_libcpufreq_new (cpu);
+@@ -63,6 +72,19 @@ cpufreq_monitor_factory_create_monitor (
+
+ 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;
+ }
+--- cpufreq/src/cpufreq-utils.c.orig Sat Aug 12 21:26:50 2006
++++ cpufreq/src/cpufreq-utils.c Tue Aug 22 11:07:32 2006
+@@ -22,6 +22,9 @@
+ #include <glib.h>
+ #include <gtk/gtkmessagedialog.h>
+ #include <sys/types.h>
++#ifdef __FreeBSD__
++#include <sys/sysctl.h>
++#endif
+ #include <sys/stat.h>
+ #include <fcntl.h>
+ #include <unistd.h>
+@@ -30,6 +33,24 @@
+
+ #include "cpufreq-utils.h"
+
++#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)
+ {
+@@ -72,6 +93,7 @@ cpufreq_utils_get_n_cpus (void)
+
+ return 1;
+ }
++#endif /* __FreeBSD__ */
+
+ void
+ cpufreq_utils_display_error (const gchar *message,
+--- cpufreq/src/cpufreq-monitor-sysctl.c.orig Wed Feb 28 14:03:58 2007
++++ cpufreq/src/cpufreq-monitor-sysctl.c Wed Feb 28 14:28:47 2007
+@@ -0,0 +1,176 @@
++/*
++ * 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_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);
++
++ 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)
++ 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/Makefile.in.orig 2007-07-30 21:06:58.000000000 -0400
++++ cpufreq/src/Makefile.in 2007-07-30 21:06:58.000000000 -0400
+@@ -61,7 +61,8 @@ am__cpufreq_applet_SOURCES_DIST = cpufre
+ cpufreq-monitor-procfs.h cpufreq-monitor-sysfs.c \
+ cpufreq-monitor-sysfs.h cpufreq-monitor-libcpufreq.c \
+ cpufreq-monitor-libcpufreq.h cpufreq-monitor-cpuinfo.c \
+- cpufreq-monitor-cpuinfo.h
++ cpufreq-monitor-cpuinfo.h cpufreq-monitor-sysctl.c \
++ cpufreq-monitor-sysctl.h
+ @HAVE_LIBCPUFREQ_TRUE@am__objects_1 = \
+ @HAVE_LIBCPUFREQ_TRUE@ cpufreq-monitor-libcpufreq.$(OBJEXT)
+ am_cpufreq_applet_OBJECTS = cpufreq-applet.$(OBJEXT) \
+@@ -70,7 +71,8 @@ am_cpufreq_applet_OBJECTS = cpufreq-appl
+ cpufreq-monitor-factory.$(OBJEXT) \
+ cpufreq-monitor-procfs.$(OBJEXT) \
+ cpufreq-monitor-sysfs.$(OBJEXT) $(am__objects_1) \
+- cpufreq-monitor-cpuinfo.$(OBJEXT)
++ cpufreq-monitor-cpuinfo.$(OBJEXT) \
++ cpufreq-monitor-sysctl.$(OBJEXT)
+ cpufreq_applet_OBJECTS = $(am_cpufreq_applet_OBJECTS)
+ am__DEPENDENCIES_1 =
+ cpufreq_applet_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+@@ -402,6 +404,7 @@ cpufreq_applet_SOURCES = \
+ cpufreq-monitor.c cpufreq-monitor.h \
+ cpufreq-monitor-factory.c cpufreq-monitor-factory.h \
+ cpufreq-monitor-procfs.c cpufreq-monitor-procfs.h \
++ cpufreq-monitor-sysctl.c cpufreq-monitor-sysctl.h \
+ cpufreq-monitor-sysfs.c cpufreq-monitor-sysfs.h \
+ $(cpufreq_files) \
+ cpufreq-monitor-cpuinfo.c cpufreq-monitor-cpuinfo.h
+@@ -487,6 +490,7 @@ distclean-compile:
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpufreq-monitor-factory.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpufreq-monitor-libcpufreq.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpufreq-monitor-procfs.Po@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpufreq-monitor-sysctl.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpufreq-monitor-sysfs.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpufreq-monitor.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpufreq-popup.Po@am__quote@
diff --git a/x11/gnome-applets/files/patch-cpufreq-selector-freebsd b/x11/gnome-applets/files/patch-cpufreq-selector-freebsd
new file mode 100644
index 000000000..5cca16dd4
--- /dev/null
+++ b/x11/gnome-applets/files/patch-cpufreq-selector-freebsd
@@ -0,0 +1,218 @@
+--- cpufreq/src/cpufreq-selector/cpufreq-selector-sysctl.h.orig Sat Jun 24 01:52:35 2006
++++ cpufreq/src/cpufreq-selector/cpufreq-selector-sysctl.h Sat Jun 24 02:13:05 2006
+@@ -0,0 +1,53 @@
++/*
++ * 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_SELECTOR_SYSCTL_H__
++#define __CPUFREQ_SELECTOR_SYSCTL_H__
++
++#include <glib-object.h>
++
++#include "cpufreq-selector.h"
++
++G_BEGIN_DECLS
++
++#define CPUFREQ_TYPE_SELECTOR_SYSCTL (cpufreq_selector_sysctl_get_type ())
++#define CPUFREQ_SELECTOR_SYSCTL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CPUFREQ_TYPE_SELECTOR_SYSCTL, CPUFreqSelectorProcfs))
++#define CPUFREQ_SELECTOR_SYSCTL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), CPUFREQ_TYPE_SELECTOR_SYSCTL, CPUFreqSelectorProcfsClass))
++#define CPUFREQ_IS_SELECTOR_SYSCTL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CPUFREQ_TYPE_SELECTOR_SYSCTL))
++#define CPUFREQ_IS_SELECTOR_SYSCTL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CPUFREQ_TYPE_SELECTOR_SYSCTL))
++#define CPUFREQ_SELECTOR_SYSCTL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CPUFREQ_TYPE_SELECTOR_SYSCTL, CPUFreqSelectorProcfsClass))
++
++typedef struct _CPUFreqSelectorSysctl CPUFreqSelectorSysctl;
++typedef struct _CPUFreqSelectorSysctlClass CPUFreqSelectorSysctlClass;
++
++struct _CPUFreqSelectorSysctl {
++ CPUFreqSelector parent;
++};
++
++struct _CPUFreqSelectorSysctlClass {
++ CPUFreqSelectorClass parent_class;
++};
++
++GType cpufreq_selector_sysctl_get_type (void) G_GNUC_CONST;
++CPUFreqSelector *cpufreq_selector_sysctl_new (guint cpu);
++
++G_END_DECLS
++
++#endif /* __CPUFREQ_SELECTOR_SYSCTL_H__ */
+--- cpufreq/src/cpufreq-selector/cpufreq-selector-sysctl.c.orig Wed Jul 26 01:34:18 2006
++++ cpufreq/src/cpufreq-selector/cpufreq-selector-sysctl.c Wed Jul 26 01:42:00 2006
+@@ -0,0 +1,87 @@
++/*
++ * 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 <stdio.h>
++#include <stdlib.h>
++
++#ifdef __FreeBSD__
++#include <sys/types.h>
++#include <sys/sysctl.h>
++#endif /* __FreeBSD__ */
++
++#include "cpufreq-selector-sysctl.h"
++
++static void cpufreq_selector_sysctl_init (CPUFreqSelectorSysctl *selector);
++static void cpufreq_selector_sysctl_class_init (CPUFreqSelectorSysctlClass *klass);
++
++static gboolean cpufreq_selector_sysctl_set_frequency (CPUFreqSelector *selector, guint frequency, GError **error);
++static gboolean cpufreq_selector_sysctl_set_governor (CPUFreqSelector *selector, const gchar *governor, GError **error);
++
++G_DEFINE_TYPE (CPUFreqSelectorSysctl, cpufreq_selector_sysctl, CPUFREQ_TYPE_SELECTOR)
++
++static void
++cpufreq_selector_sysctl_init (CPUFreqSelectorSysctl *selector)
++{
++}
++
++static void
++cpufreq_selector_sysctl_class_init (CPUFreqSelectorSysctlClass *klass)
++{
++ CPUFreqSelectorClass *selector_class = CPUFREQ_SELECTOR_CLASS (klass);
++
++ selector_class->set_frequency = cpufreq_selector_sysctl_set_frequency;
++ selector_class->set_governor = cpufreq_selector_sysctl_set_governor;
++}
++
++CPUFreqSelector *
++cpufreq_selector_sysctl_new (guint cpu)
++{
++ CPUFreqSelector *selector;
++
++ selector = CPUFREQ_SELECTOR (g_object_new (CPUFREQ_TYPE_SELECTOR_SYSCTL,
++ "cpu", cpu, NULL));
++
++ return selector;
++}
++
++static gboolean
++cpufreq_selector_sysctl_set_governor (CPUFreqSelector *selector, const gchar *governor, GError **error)
++{
++ return TRUE;
++}
++
++static gboolean
++cpufreq_selector_sysctl_set_frequency (CPUFreqSelector *selector, guint frequency, GError **error)
++{
++ guint cpu, i;
++ size_t len;
++ gchar *freq_oid;
++
++ g_object_get (G_OBJECT (selector), "cpu", &cpu, NULL);
++
++ frequency = (guint) ((gdouble) frequency / 1000); /* Convert back to MHz*/
++ freq_oid = g_strdup_printf ("dev.cpu.%d.freq", (gint) 0);
++
++ sysctlbyname (freq_oid, NULL, &len, &frequency, sizeof (frequency));
++ g_free (freq_oid);
++
++ return TRUE;
++}
+--- cpufreq/src/cpufreq-selector/cpufreq-selector-factory.c.orig 2008-06-16 14:33:25.000000000 -0400
++++ cpufreq/src/cpufreq-selector/cpufreq-selector-factory.c 2008-06-16 14:35:28.000000000 -0400
+@@ -27,20 +27,32 @@
+ #ifdef HAVE_LIBCPUFREQ
+ #include "cpufreq-selector-libcpufreq.h"
+ #endif
++#ifdef __FreeBSD__
++#include "cpufreq-selector-sysctl.h"
++#endif /* __FreeBSD__ */
+
+ CPUFreqSelector *
+ cpufreq_selector_factory_create_selector (guint cpu)
+ {
+ CPUFreqSelector *selector = NULL;
++#ifdef __FreeBSD__
++ size_t len;
++#endif
+
+ #ifdef HAVE_LIBCPUFREQ
+ selector = cpufreq_selector_libcpufreq_new (cpu);
+ #else
++#ifndef __FreeBSD__
+ if (g_file_test ("/sys/devices/system/cpu/cpu0/cpufreq", G_FILE_TEST_EXISTS)) { /* 2.6 kernel */
+ selector = cpufreq_selector_sysfs_new (cpu);
+ } else if (g_file_test ("/proc/cpufreq", G_FILE_TEST_EXISTS)) { /* 2.4 kernel */
+ selector = cpufreq_selector_procfs_new (cpu);
+ }
++#else
++ if (sysctlbyname ("dev.cpu.0.freq", NULL, &len, NULL, 0) == 0) {
++ selector = cpufreq_selector_sysctl_new (cpu);
++ }
++#endif /* __FreeBSD__ */
+ #endif /* HAVE_LIBCPUFREQ */
+
+ return selector;
+--- cpufreq/src/cpufreq-selector/Makefile.in.orig 2008-06-16 14:26:07.000000000 -0400
++++ cpufreq/src/cpufreq-selector/Makefile.in 2008-06-16 14:38:15.000000000 -0400
+@@ -65,7 +65,7 @@ am__cpufreq_selector_SOURCES_DIST = cpuf
+ cpufreq-selector-libcpufreq.h cpufreq-selector-service.c \
+ cpufreq-selector-service.h cpufreq-selector-factory.c \
+ cpufreq-selector-factory.h cpufreq-selector-service-glue.h \
+- main.c
++ main.c cpufreq-selector-sysctl.c cpufreq-selector-sysctl.h
+ @HAVE_LIBCPUFREQ_TRUE@am__objects_1 = \
+ @HAVE_LIBCPUFREQ_TRUE@ cpufreq-selector-libcpufreq.$(OBJEXT)
+ @HAVE_POLKIT_TRUE@am__objects_2 = cpufreq-selector-service.$(OBJEXT)
+@@ -74,7 +74,8 @@ am_cpufreq_selector_OBJECTS = cpufreq-se
+ cpufreq-selector-sysfs.$(OBJEXT) \
+ cpufreq-selector-procfs.$(OBJEXT) $(am__objects_1) \
+ $(am__objects_2) cpufreq-selector-factory.$(OBJEXT) \
+- $(am__objects_3) main.$(OBJEXT)
++ $(am__objects_3) main.$(OBJEXT) \
++ cpufreq-selector-sysctl.$(OBJEXT)
+ cpufreq_selector_OBJECTS = $(am_cpufreq_selector_OBJECTS)
+ am__DEPENDENCIES_1 =
+ @HAVE_POLKIT_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) \
+@@ -371,6 +372,7 @@ cpufreq_selector_SOURCES = \
+ cpufreq-selector.c cpufreq-selector.h \
+ cpufreq-selector-sysfs.c cpufreq-selector-sysfs.h \
+ cpufreq-selector-procfs.c cpufreq-selector-procfs.h \
++ cpufreq-selector-sysctl.c cpufreq-selector-sysctl.h \
+ $(cpufreq_files) \
+ $(service_files) \
+ cpufreq-selector-factory.c cpufreq-selector-factory.h \
+@@ -480,6 +482,7 @@ distclean-compile:
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpufreq-selector-procfs.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpufreq-selector-service.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpufreq-selector-sysfs.Po@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpufreq-selector-sysctl.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpufreq-selector.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
+
diff --git a/x11/gnome-applets/files/patch-invest-applet_invest_invest-applet.py b/x11/gnome-applets/files/patch-invest-applet_invest_invest-applet.py
new file mode 100644
index 000000000..7ddb583de
--- /dev/null
+++ b/x11/gnome-applets/files/patch-invest-applet_invest_invest-applet.py
@@ -0,0 +1,13 @@
+--- invest-applet/invest/invest-applet.py.orig 2008-03-15 19:39:32.000000000 -0400
++++ invest-applet/invest/invest-applet.py 2008-04-28 13:27:46.000000000 -0400
+@@ -26,8 +26,8 @@ import invest, invest.applet, invest.def
+ import gettext, locale
+ gettext.bindtextdomain(invest.defs.GETTEXT_PACKAGE, invest.defs.GNOMELOCALEDIR)
+ gettext.textdomain(invest.defs.GETTEXT_PACKAGE)
+-locale.bindtextdomain(invest.defs.GETTEXT_PACKAGE, invest.defs.GNOMELOCALEDIR)
+-locale.textdomain(invest.defs.GETTEXT_PACKAGE)
++#locale.bindtextdomain(invest.defs.GETTEXT_PACKAGE, invest.defs.GNOMELOCALEDIR)
++#locale.textdomain(invest.defs.GETTEXT_PACKAGE)
+
+ from gettext import gettext as _
+
diff --git a/x11/gnome-applets/files/patch-invest-applet_invest_invest-chart b/x11/gnome-applets/files/patch-invest-applet_invest_invest-chart
new file mode 100644
index 000000000..aa763c16c
--- /dev/null
+++ b/x11/gnome-applets/files/patch-invest-applet_invest_invest-chart
@@ -0,0 +1,13 @@
+--- invest-applet/invest/invest-chart.orig 2008-03-15 16:34:50.000000000 -0400
++++ invest-applet/invest/invest-chart 2008-04-28 13:29:13.000000000 -0400
+@@ -6,8 +6,8 @@ import sys, invest.chart, gtk
+ import gettext, locale
+ gettext.bindtextdomain(invest.defs.GETTEXT_PACKAGE, invest.defs.GNOMELOCALEDIR)
+ gettext.textdomain(invest.defs.GETTEXT_PACKAGE)
+-locale.bindtextdomain(invest.defs.GETTEXT_PACKAGE, invest.defs.GNOMELOCALEDIR)
+-locale.textdomain(invest.defs.GETTEXT_PACKAGE)
++#locale.bindtextdomain(invest.defs.GETTEXT_PACKAGE, invest.defs.GNOMELOCALEDIR)
++#locale.textdomain(invest.defs.GETTEXT_PACKAGE)
+
+ if __name__ == "__main__":
+ win = invest.chart.show_chart(sys.argv[1:])
diff --git a/x11/gnome-applets/files/patch-stickynotes_stickynotes.ui b/x11/gnome-applets/files/patch-stickynotes_stickynotes.ui
new file mode 100644
index 000000000..8323a6dd3
--- /dev/null
+++ b/x11/gnome-applets/files/patch-stickynotes_stickynotes.ui
@@ -0,0 +1,20 @@
+--- stickynotes/stickynotes.ui.orig 2009-11-13 13:13:28.000000000 +0800
++++ stickynotes/stickynotes.ui 2009-11-13 13:15:23.000000000 +0800
+@@ -593,7 +593,7 @@
+ </packing>
+ </child>
+ <child>
+- <object class="GtkVBox" id="vbox1">
++ <object class="GtkVBox" id="vbox3">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <child>
+@@ -613,7 +613,7 @@
+ </packing>
+ </child>
+ <child>
+- <object class="GtkLabel" id="label1">
++ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">This cannot be undone.</property>