diff options
author | jkim <jkim@FreeBSD.org> | 2009-02-03 06:33:22 +0800 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2009-02-03 06:33:22 +0800 |
commit | 88bdd2afaf1b2ef95cf2580028367cb597d2de46 (patch) | |
tree | 7cec39422704989b97a3ce62ca3379451d5168cf /sysutils/hal | |
parent | 53c23358106b4962cdf9d124365e59b9caddc187 (diff) | |
download | freebsd-ports-gnome-88bdd2afaf1b2ef95cf2580028367cb597d2de46.tar.gz freebsd-ports-gnome-88bdd2afaf1b2ef95cf2580028367cb597d2de46.tar.zst freebsd-ports-gnome-88bdd2afaf1b2ef95cf2580028367cb597d2de46.zip |
- Do not search for Linux-specific hald-addon-acpi module.
- Remove unnecessary ioctl calls for battery on non-laptops.
- Do not use model-specific sysctl if it is not available.
- Always provide frequencies of BSP as we do not export APs' yet.
Reviewed by: marcus
Diffstat (limited to 'sysutils/hal')
-rw-r--r-- | sysutils/hal/Makefile | 2 | ||||
-rw-r--r-- | sysutils/hal/files/patch-fdi_policy_10osvendor_10-power-mgmt-policy.fdi | 13 | ||||
-rw-r--r-- | sysutils/hal/files/patch-hald_freebsd_hf-acpi.c | 31 | ||||
-rw-r--r-- | sysutils/hal/files/patch-hald_freebsd_hf-devtree.c | 32 |
4 files changed, 73 insertions, 5 deletions
diff --git a/sysutils/hal/Makefile b/sysutils/hal/Makefile index 875f439bfef4..97d0b3a43b80 100644 --- a/sysutils/hal/Makefile +++ b/sysutils/hal/Makefile @@ -8,7 +8,7 @@ PORTNAME= hal DISTVERSION= 0.5.11 -PORTREVISION= 15 +PORTREVISION= 16 CATEGORIES= sysutils MASTER_SITES= http://hal.freedesktop.org/releases/ diff --git a/sysutils/hal/files/patch-fdi_policy_10osvendor_10-power-mgmt-policy.fdi b/sysutils/hal/files/patch-fdi_policy_10osvendor_10-power-mgmt-policy.fdi new file mode 100644 index 000000000000..1391709f8f0c --- /dev/null +++ b/sysutils/hal/files/patch-fdi_policy_10osvendor_10-power-mgmt-policy.fdi @@ -0,0 +1,13 @@ +--- fdi/policy/10osvendor/10-power-mgmt-policy.fdi.orig 2008-05-07 19:21:15.000000000 -0400 ++++ fdi/policy/10osvendor/10-power-mgmt-policy.fdi 2009-01-30 17:41:05.000000000 -0500 +@@ -10,7 +10,9 @@ + + <device> + <match key="power_management.type" string="acpi"> +- <append key="info.addons" type="strlist">hald-addon-acpi</append> ++ <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" string="Linux"> ++ <append key="info.addons" type="strlist">hald-addon-acpi</append> ++ </match> + </match> + </device> + diff --git a/sysutils/hal/files/patch-hald_freebsd_hf-acpi.c b/sysutils/hal/files/patch-hald_freebsd_hf-acpi.c new file mode 100644 index 000000000000..e7dae7a9a63d --- /dev/null +++ b/sysutils/hal/files/patch-hald_freebsd_hf-acpi.c @@ -0,0 +1,31 @@ +--- hald/freebsd/hf-acpi.c.orig 2008-05-07 19:23:59.000000000 -0400 ++++ hald/freebsd/hf-acpi.c 2009-01-30 15:53:14.000000000 -0500 +@@ -105,6 +105,9 @@ hf_acpi_poll_batt (HalDevice *device) + gboolean ispresent; + union acpi_battery_ioctl_arg battif, battst, battinfo; + ++ if (! hf_has_sysctl("hw.acpi.battery")) ++ return; ++ + battif.unit = battst.unit = battinfo.unit = + hal_device_property_get_int(device, "freebsd.unit"); + +@@ -504,6 +507,8 @@ hf_acpi_laptop_panel_new (HalDevice *par + + g_return_val_if_fail(HAL_IS_DEVICE(parent), NULL); + ++ if (! hf_has_sysctl("hw.acpi.%s", access)) ++ return NULL; + device = hf_device_new(parent); + + hf_device_property_set_string_printf(device, "info.product", "Laptop Panel (%s)", name); +@@ -597,7 +602,8 @@ hf_acpi_probe (void) + laptop_panel_types[i].max_sysctl, + laptop_panel_types[i].access, + laptop_panel_types[i].name); +- hf_device_preprobe_and_add(panel_device); ++ if (panel_device) ++ hf_device_preprobe_and_add(panel_device); + } + } + } diff --git a/sysutils/hal/files/patch-hald_freebsd_hf-devtree.c b/sysutils/hal/files/patch-hald_freebsd_hf-devtree.c index ff41705faf6a..083e9e40b2bd 100644 --- a/sysutils/hal/files/patch-hald_freebsd_hf-devtree.c +++ b/sysutils/hal/files/patch-hald_freebsd_hf-devtree.c @@ -1,6 +1,30 @@ --- hald/freebsd/hf-devtree.c.orig 2008-05-07 19:24:03.000000000 -0400 -+++ hald/freebsd/hf-devtree.c 2009-01-25 17:17:02.000000000 -0500 -@@ -426,7 +426,13 @@ hf_devtree_probe (void) ++++ hald/freebsd/hf-devtree.c 2009-01-30 14:30:57.000000000 -0500 +@@ -86,7 +86,11 @@ hf_devtree_cpu_can_throttle (int cpu) + gboolean can = FALSE; + char *levels; + ++#ifdef notyet + levels = hf_get_string_sysctl(NULL, "dev.cpu.%i.freq_levels", cpu); ++#else ++ levels = hf_get_string_sysctl(NULL, "dev.cpu.0.freq_levels"); ++#endif + if (levels) + { + char **toks; +@@ -109,7 +113,11 @@ hf_devtree_cpu_get_maxfreq (int cpu) + char *levels; + int freq = -1; + ++#ifdef notyet + levels = hf_get_string_sysctl(NULL, "dev.cpu.%i.freq_levels", cpu); ++#else ++ levels = hf_get_string_sysctl(NULL, "dev.cpu.0.freq_levels"); ++#endif + if (levels) + { + sscanf(levels, "%i/", &freq); +@@ -426,7 +434,13 @@ hf_devtree_probe (void) HalDevice *device; device = hf_devtree_device_new(parent, info->handler, info->unit); @@ -15,7 +39,7 @@ } devices = g_slist_delete_link(devices, root); -@@ -434,6 +440,17 @@ hf_devtree_probe (void) +@@ -434,6 +448,17 @@ hf_devtree_probe (void) } } @@ -33,7 +57,7 @@ HalDevice * hf_devtree_find_from_name (HalDeviceStore *store, const char *name) { -@@ -597,5 +614,6 @@ hf_devtree_is_driver (const char *name, +@@ -597,5 +622,6 @@ hf_devtree_is_driver (const char *name, } HFHandler hf_devtree_handler = { |