summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Gryniewicz <dang@gentoo.org>2010-03-17 13:01:02 +0000
committerDaniel Gryniewicz <dang@gentoo.org>2010-03-17 13:01:02 +0000
commit21c06513a151a25903a68b782c8f4b6e51733a12 (patch)
treec02ae08de7ea951f00439295d035858be0a14ee7 /sys-apps/hal
parentVersion bump. (diff)
downloadgentoo-2-21c06513a151a25903a68b782c8f4b6e51733a12.tar.gz
gentoo-2-21c06513a151a25903a68b782c8f4b6e51733a12.tar.bz2
gentoo-2-21c06513a151a25903a68b782c8f4b6e51733a12.zip
Add upstream patch to build on fbsd; bug #309263
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'sys-apps/hal')
-rw-r--r--sys-apps/hal/ChangeLog6
-rw-r--r--sys-apps/hal/files/hal-0.5.14-r2-fbsd.patch121
-rw-r--r--sys-apps/hal/hal-0.5.14-r2.ebuild5
3 files changed, 130 insertions, 2 deletions
diff --git a/sys-apps/hal/ChangeLog b/sys-apps/hal/ChangeLog
index 5fd7e833656c..972544decee8 100644
--- a/sys-apps/hal/ChangeLog
+++ b/sys-apps/hal/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-apps/hal
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/ChangeLog,v 1.314 2010/03/10 21:47:55 dang Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/ChangeLog,v 1.315 2010/03/17 13:01:01 dang Exp $
+
+ 17 Mar 2010; Daniel Gryniewicz <dang@gentoo.org> hal-0.5.14-r2.ebuild,
+ +files/hal-0.5.14-r2-fbsd.patch:
+ Add upstream patch to build on fbsd; bug #309263
10 Mar 2010; Daniel Gryniewicz <dang@gentoo.org> -hal-0.5.11-r9.ebuild,
-hal-0.5.12_rc1-r6.ebuild, -hal-0.5.12_rc1-r7.ebuild,
diff --git a/sys-apps/hal/files/hal-0.5.14-r2-fbsd.patch b/sys-apps/hal/files/hal-0.5.14-r2-fbsd.patch
new file mode 100644
index 000000000000..59be26dbd817
--- /dev/null
+++ b/sys-apps/hal/files/hal-0.5.14-r2-fbsd.patch
@@ -0,0 +1,121 @@
+commit a3ea9ecc75a414e35ae763a92a2c3fa05a7ca0b3
+Author: Joe Marcus Clarke <marcus@FreeBSD.org>
+Date: Fri Dec 25 11:21:23 2009 -0500
+
+ Fix (or workaround) quite a few bugs with newusb interaction
+
+ * Allow the newusb module to compile with the recent input changes from
+ kFreeBSD.
+ * Make sure usb2 devices attach properly to the device tree with the correct
+ parent.
+ * Properly detect when newusb devices are added and removed.
+
+diff --git a/hald/freebsd/hf-usb2.c b/hald/freebsd/hf-usb2.c
+index fff49e0..f1a02e2 100644
+--- a/hald/freebsd/hf-usb2.c
++++ b/hald/freebsd/hf-usb2.c
+@@ -98,10 +98,10 @@ hf_usb2_probe_interfaces(HalDevice *parent)
+ if (driver)
+ {
+ if (! strcmp(driver, "ukbd"))
+- hf_device_set_input(device, "keyboard", NULL);
+- else if (! strcmp(driver, "ums"))
++ hf_device_set_input(device, "keyboard", "keys", devname);
++ else if (! strcmp(driver, "ums") || ! strcmp(driver, "atp"))
+ {
+- hf_device_set_input(device, "mouse", devname);
++ hf_device_set_input(device, "mouse", NULL, devname);
+ hf_runner_run_sync(device, 0, "hald-probe-mouse", NULL);
+ }
+ else if (! strcmp(driver, "uhid"))
+@@ -192,11 +192,12 @@ hf_usb2_probe (void)
+ addr = libusb20_dev_get_address(pdev);
+
+ if (addr == 1)
+- parent = hf_devtree_find_parent_from_info(hald_get_gdl(), "usbus", bus);
++ parent = hf_devtree_find_from_info(hald_get_gdl(), "usbus", bus);
+ else
+ parent = hf_device_store_match(hald_get_gdl(), "usb_device.bus_number",
+ HAL_PROPERTY_TYPE_INT32, bus, "usb_device.port_number",
+- HAL_PROPERTY_TYPE_INT32, addr - 1, NULL);
++ HAL_PROPERTY_TYPE_INT32, addr - 1, "info.bus",
++ HAL_PROPERTY_TYPE_STRING, "usb_device", NULL);
+ if (! parent || hal_device_property_get_bool(parent, "info.ignore"))
+ continue;
+
+@@ -216,7 +217,13 @@ hf_usb2_devd_add (const char *name,
+ HalDevice *parent_device;
+ int bus, addr, pbus, paddr;
+
+- if (strncmp(name, "ugen", strlen("ugen")))
++ if (! parent)
++ return FALSE;
++
++ if (strncmp(name, "ugen", strlen("ugen")) &&
++ ! strncmp(parent, "uhub", strlen("uhub")))
++ return TRUE;
++ else if (strncmp(name, "ugen", strlen("ugen")))
+ return FALSE;
+ else if (strncmp(parent, "ugen", strlen("ugen")))
+ return TRUE;
+@@ -232,7 +239,8 @@ hf_usb2_devd_add (const char *name,
+
+ parent_device = hf_device_store_match(hald_get_gdl(),
+ "usb_device.bus_number", HAL_PROPERTY_TYPE_INT32, pbus,
+- "usb_device.port_number", HAL_PROPERTY_TYPE_INT32, paddr, NULL);
++ "usb_device.port_number", HAL_PROPERTY_TYPE_INT32, paddr, "info.bus",
++ HAL_PROPERTY_TYPE_STRING, "usb_device", NULL);
+
+ if (parent_device && ! hal_device_property_get_bool(parent_device,
+ "info.ignore"))
+@@ -255,8 +263,6 @@ hf_usb2_devd_remove (const char *name,
+
+ if (strncmp(name, "ugen", strlen("ugen")))
+ return FALSE;
+- else if (strncmp(parent, "ugen", strlen("ugen")))
+- return TRUE;
+
+ if (sscanf(name, "ugen%i.%i", &bus, &addr) != 2)
+ return FALSE;
+@@ -265,7 +271,8 @@ hf_usb2_devd_remove (const char *name,
+
+ device = hf_device_store_match(hald_get_gdl(), "usb_device.bus_number",
+ HAL_PROPERTY_TYPE_INT32, bus, "usb_device.port_number",
+- HAL_PROPERTY_TYPE_INT32, addr, NULL);
++ HAL_PROPERTY_TYPE_INT32, addr, "info.bus",
++ HAL_PROPERTY_TYPE_STRING, "usb_device", NULL);
+
+ if (device)
+ {
+@@ -276,6 +283,23 @@ hf_usb2_devd_remove (const char *name,
+ return FALSE;
+ }
+
++static gboolean
++hf_usb2_devd_notify (const char *system,
++ const char *subsystem,
++ const char *type,
++ const char *data)
++{
++ if (! data || strcmp(system, "DEVFS") || strcmp(subsystem, "CDEV") ||
++ (strcmp(type, "CREATE") && strcmp(type, "DESTROY")))
++ return FALSE;
++
++ if (! strncmp(data, "cdev=ugen", strlen("cdev=ugen")) ||
++ ! strncmp(data, "cdev=usb", strlen("cdev=usb")))
++ return TRUE;
++
++ return FALSE;
++}
++
+ HFHandler hf_usb2_handler = {
+ .privileged_init = hf_usb2_privileged_init,
+ .probe = hf_usb2_probe
+@@ -283,5 +307,6 @@ HFHandler hf_usb2_handler = {
+
+ HFDevdHandler hf_usb2_devd_handler = {
+ .add = hf_usb2_devd_add,
+- .remove = hf_usb2_devd_remove
++ .remove = hf_usb2_devd_remove,
++ .notify = hf_usb2_devd_notify
+ };
diff --git a/sys-apps/hal/hal-0.5.14-r2.ebuild b/sys-apps/hal/hal-0.5.14-r2.ebuild
index 2244b3e8a3e2..fb12ac426483 100644
--- a/sys-apps/hal/hal-0.5.14-r2.ebuild
+++ b/sys-apps/hal/hal-0.5.14-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/hal-0.5.14-r2.ebuild,v 1.1 2010/01/20 13:42:15 dang Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/hal-0.5.14-r2.ebuild,v 1.2 2010/03/17 13:01:01 dang Exp $
EAPI="2"
@@ -132,6 +132,9 @@ pkg_setup() {
}
src_prepare() {
+ # Patch for fbsd, Bug #309263. MOVE INTO PATCHSET FOR NEXT BUMP!
+ epatch "${FILESDIR}"/${PF}-fbsd.patch
+
# Only apply one of the policy patches. Bug #267042
if use policykit ; then
rm "${WORKDIR}/${PATCHNAME}/patches/0001-plugdev-dbus-policy.patch"