diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2009-02-04 17:45:32 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2009-02-04 17:45:32 +0000 |
commit | b7914816834d7f6a9139716b7fe55279cbefcca0 (patch) | |
tree | 5e5816e1b19cfd51cef8642114fdd830cdcc16ae /sysutils/hal | |
parent | 5e844b1553c1e2fb4f95327e41571fc7b214ee9f (diff) | |
download | ports-b7914816834d7f6a9139716b7fe55279cbefcca0.tar.gz ports-b7914816834d7f6a9139716b7fe55279cbefcca0.zip |
Notes
Diffstat (limited to 'sysutils/hal')
-rw-r--r-- | sysutils/hal/Makefile | 2 | ||||
-rw-r--r-- | sysutils/hal/files/patch-hald_freebsd_hf-acpi.c | 74 | ||||
-rw-r--r-- | sysutils/hal/files/patch-hald_freebsd_probing_probe-mouse.c | 23 |
3 files changed, 80 insertions, 19 deletions
diff --git a/sysutils/hal/Makefile b/sysutils/hal/Makefile index 97d0b3a43b80..e343611248bf 100644 --- a/sysutils/hal/Makefile +++ b/sysutils/hal/Makefile @@ -8,7 +8,7 @@ PORTNAME= hal DISTVERSION= 0.5.11 -PORTREVISION= 16 +PORTREVISION= 17 CATEGORIES= sysutils MASTER_SITES= http://hal.freedesktop.org/releases/ diff --git a/sysutils/hal/files/patch-hald_freebsd_hf-acpi.c b/sysutils/hal/files/patch-hald_freebsd_hf-acpi.c index 08da6b1456be..a21095a5f339 100644 --- a/sysutils/hal/files/patch-hald_freebsd_hf-acpi.c +++ b/sysutils/hal/files/patch-hald_freebsd_hf-acpi.c @@ -1,6 +1,50 @@ --- hald/freebsd/hf-acpi.c.orig 2008-05-07 19:23:59.000000000 -0400 -+++ hald/freebsd/hf-acpi.c 2009-02-02 20:32:05.000000000 -0500 -@@ -105,6 +105,9 @@ ++++ hald/freebsd/hf-acpi.c 2009-02-04 11:32:27.000000000 -0500 +@@ -54,6 +54,7 @@ + static const struct laptop_panel_type { + char *access; + char *name; ++ char *get_sysctl; + char *max_sysctl; + int max_levels; + #define HF_ACPI_IBM_MAX_LEVELS 8 +@@ -64,17 +65,29 @@ + #define HF_ACPI_FUJITSU_MAX_LEVELS 8 + /* NOTE: Each new type must also be added to hf-devtree.c */ + } laptop_panel_types[] = { +- { "ibm", "IBM", NULL, ++ { "ibm", "IBM", ++ "dev.acpi_ibm.0.lcd_brightness", ++ NULL, + HF_ACPI_IBM_MAX_LEVELS }, +- { "toshiba", "Toshiba", NULL, ++ { "toshiba", "Toshiba", ++ "hw.acpi.toshiba.lcd_brightness", ++ NULL, + HF_ACPI_TOSHIBA_MAX_LEVELS }, +- { "sony", "Sony", NULL, ++ { "sony", "Sony", ++ "dev.acpi_sony.0.brightness", ++ NULL, + HF_ACPI_SONY_MAX_LEVELS }, +- { "panasonic", "Panasonic", "hw.acpi.panasonic.lcd_brightness_max", ++ { "panasonic", "Panasonic", ++ "hw.acpi.panasonic.lcd_brightness", ++ "hw.acpi.panasonic.lcd_brightness_max", + HF_ACPI_PANASONIC_MAX_LEVELS }, +- { "asus", "Asus", NULL, ++ { "asus", "Asus", ++ "hw.acpi.asus.lcd_brightness", ++ NULL, + HF_ACPI_ASUS_MAX_LEVELS }, +- { "fujitsu", "Fujitsu", NULL, ++ { "fujitsu", "Fujitsu", ++ "hw.acpi.fujitsu.lcd_brightness", ++ NULL, + HF_ACPI_FUJITSU_MAX_LEVELS } + }; + +@@ -105,6 +118,9 @@ gboolean ispresent; union acpi_battery_ioctl_arg battif, battst, battinfo; @@ -10,25 +54,31 @@ battif.unit = battst.unit = battinfo.unit = hal_device_property_get_int(device, "freebsd.unit"); -@@ -500,10 +503,17 @@ - const char *max_sysctl, const char *access, - const char *name) +@@ -497,13 +513,15 @@ + + static HalDevice * + hf_acpi_laptop_panel_new (HalDevice *parent, int max_levels, +- const char *max_sysctl, const char *access, +- const char *name) ++ const char *get_sysctl, const char *max_sysctl, ++ const char *access, const char *name) { -+ char *brightness; HalDevice *device; g_return_val_if_fail(HAL_IS_DEVICE(parent), NULL); -+ if (! strcmp(access, "sony")) -+ brightness = "brightness"; -+ else -+ brightness = "lcd_brightness"; -+ if (! hf_has_sysctl("hw.acpi.%s.%s", access, brightness)) ++ if (get_sysctl == NULL || ! hf_has_sysctl(get_sysctl)) + return NULL; device = hf_device_new(parent); hf_device_property_set_string_printf(device, "info.product", "Laptop Panel (%s)", name); -@@ -597,7 +607,8 @@ +@@ -593,11 +611,13 @@ + HalDevice *panel_device; + + panel_device = hf_acpi_laptop_panel_new(parent, +- laptop_panel_types[i].max_levels, ++ laptop_panel_types[i].max_levels, ++ laptop_panel_types[i].get_sysctl, laptop_panel_types[i].max_sysctl, laptop_panel_types[i].access, laptop_panel_types[i].name); diff --git a/sysutils/hal/files/patch-hald_freebsd_probing_probe-mouse.c b/sysutils/hal/files/patch-hald_freebsd_probing_probe-mouse.c index 516c5773b87f..901da9333dc1 100644 --- a/sysutils/hal/files/patch-hald_freebsd_probing_probe-mouse.c +++ b/sysutils/hal/files/patch-hald_freebsd_probing_probe-mouse.c @@ -1,6 +1,6 @@ ---- hald/freebsd/probing/probe-mouse.c.orig 2009-01-25 16:54:29.000000000 -0500 -+++ hald/freebsd/probing/probe-mouse.c 2009-01-25 18:40:04.000000000 -0500 -@@ -0,0 +1,301 @@ +--- hald/freebsd/probing/probe-mouse.c.orig 2009-02-04 11:00:00.000000000 -0500 ++++ hald/freebsd/probing/probe-mouse.c 2009-02-04 11:04:43.000000000 -0500 +@@ -0,0 +1,312 @@ +/*************************************************************************** + * CVSID: $Id$ + * @@ -227,7 +227,9 @@ +probe_mouse (const char *device_file) +{ + gboolean found; ++ char **udis; + char *driver; ++ int num_udis; + + driver = libhal_device_get_property_string(hfp_ctx, hfp_udi, + "input.x11_driver", &hfp_error); @@ -255,10 +257,19 @@ + found = device_opened_by_proc(MOUSED_DEVICE, XORG_PROC_NAME); + if (! found) + { -+ libhal_device_set_property_string(hfp_ctx, hfp_udi, -+ "input.x11_driver", -+ MOUSE_DRIVER, &hfp_error); ++ udis = libhal_manager_find_device_string_match(hfp_ctx, ++ "input.device", ++ MOUSED_DEVICE, ++ &num_udis, ++ &hfp_error); + dbus_error_free(&hfp_error); ++ if (num_udis > 0 && udis != NULL && !strcmp(udis[0], hfp_udi)) { ++ libhal_device_set_property_string(hfp_ctx, hfp_udi, ++ "input.x11_driver", ++ MOUSE_DRIVER, &hfp_error); ++ dbus_error_free(&hfp_error); ++ libhal_free_string_array(udis); ++ } + } + else if (driver) + { |