From ada486e00eebe1576248acb75cac4f6878678b0f Mon Sep 17 00:00:00 2001 From: marcus Date: Sat, 23 May 2009 21:27:00 +0000 Subject: Sync with FreeBSD ports. git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@12321 df743ca5-7f9a-e211-a948-0013205c9059 --- sysutils/hal/Makefile | 3 +- sysutils/hal/files/patch-configure | 2 +- sysutils/hal/files/patch-configure.in | 2 +- .../patch-hald_freebsd_probing_probe-usb2-device.c | 11 +++--- sysutils/hal/files/patch-hald_hf-storage.c | 45 ++++++++++++---------- 5 files changed, 35 insertions(+), 28 deletions(-) diff --git a/sysutils/hal/Makefile b/sysutils/hal/Makefile index a649d3dfb..22b4d59cf 100644 --- a/sysutils/hal/Makefile +++ b/sysutils/hal/Makefile @@ -3,11 +3,12 @@ # Whom: Joe Marcus Clarke # # $FreeBSD$ -# $MCom: ports/sysutils/hal/Makefile,v 1.54 2008/12/21 06:20:19 marcus Exp $ +# $MCom: ports/sysutils/hal/Makefile,v 1.56 2009/05/17 05:02:47 marcus Exp $ # PORTNAME= hal DISTVERSION= 0.5.12 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= http://hal.freedesktop.org/releases/ diff --git a/sysutils/hal/files/patch-configure b/sysutils/hal/files/patch-configure index 3a509e06b..fec2eb698 100644 --- a/sysutils/hal/files/patch-configure +++ b/sysutils/hal/files/patch-configure @@ -345,7 +345,7 @@ +if test "x$ac_cv_lib_usb_libusb20_dev_get_info" = x""yes; then + USE_LIBUSB=yes +else -+ USE_LIBUSB=np ++ USE_LIBUSB=no +fi + +fi diff --git a/sysutils/hal/files/patch-configure.in b/sysutils/hal/files/patch-configure.in index 27866ecee..84e12d187 100644 --- a/sysutils/hal/files/patch-configure.in +++ b/sysutils/hal/files/patch-configure.in @@ -26,7 +26,7 @@ + AC_CHECK_LIB([usb20], [libusb20_dev_get_info], [USE_LIBUSB20=yes], [USE_LIBUSB20=no]) +fi +if test "x$USE_LIBUSB20" = "xno"; then -+ AC_CHECK_LIB([usb], [libusb20_dev_get_info], [USE_LIBUSB=yes], [USE_LIBUSB=np]) ++ AC_CHECK_LIB([usb], [libusb20_dev_get_info], [USE_LIBUSB=yes], [USE_LIBUSB=no]) +fi +AM_CONDITIONAL([HAVE_LIBUSB20],[test "x$USE_LIBUSB20" = "xyes"]) +AM_CONDITIONAL([HAVE_LIBUSB20],[test "x$USE_LIBUSB" = "xyes"]) diff --git a/sysutils/hal/files/patch-hald_freebsd_probing_probe-usb2-device.c b/sysutils/hal/files/patch-hald_freebsd_probing_probe-usb2-device.c index 7099e5689..19276ba81 100644 --- a/sysutils/hal/files/patch-hald_freebsd_probing_probe-usb2-device.c +++ b/sysutils/hal/files/patch-hald_freebsd_probing_probe-usb2-device.c @@ -1,8 +1,8 @@ ---- hald/freebsd/probing/probe-usb2-device.c.orig 2009-02-24 00:36:27.000000000 -0500 -+++ hald/freebsd/probing/probe-usb2-device.c 2009-02-24 00:39:54.000000000 -0500 -@@ -0,0 +1,203 @@ +--- hald/freebsd/probing/probe-usb2-device.c.orig 2009-05-23 15:56:54.000000000 -0400 ++++ hald/freebsd/probing/probe-usb2-device.c 2009-05-23 17:14:06.000000000 -0400 +@@ -0,0 +1,204 @@ +/*************************************************************************** -+ * CVSID: $Id: patch-hald_freebsd_probing_probe-usb2-device.c,v 1.1 2009-05-17 05:02:48 marcus Exp $ ++ * CVSID: $Id: patch-hald_freebsd_probing_probe-usb2-device.c,v 1.2 2009-05-23 21:27:00 marcus Exp $ + * + * probe-usb2-device.c : USB2 Device poller + * @@ -96,7 +96,7 @@ + pcfg = libusb20_dev_alloc_config(pdev, curr_config); + cdesc = &(pcfg->desc); + -+ if (libusb20_dev_get_info(pdev, &di)) ++ if (pcfg == NULL || libusb20_dev_get_info(pdev, &di)) + { + free(pcfg); + continue; @@ -196,6 +196,7 @@ + libhal_device_set_property_string(hfp_ctx, hfp_udi, + "info.vendor", di.udi_vendor, &hfp_error); + ++ libusb20_dev_close(pdev); + free(pcfg); + } +end: diff --git a/sysutils/hal/files/patch-hald_hf-storage.c b/sysutils/hal/files/patch-hald_hf-storage.c index 58d00a896..cfe7e2023 100644 --- a/sysutils/hal/files/patch-hald_hf-storage.c +++ b/sysutils/hal/files/patch-hald_hf-storage.c @@ -1,5 +1,5 @@ --- hald/freebsd/hf-storage.c.orig 2008-05-07 19:23:57.000000000 -0400 -+++ hald/freebsd/hf-storage.c 2009-02-25 16:38:35.000000000 -0500 ++++ hald/freebsd/hf-storage.c 2009-05-23 17:07:00.000000000 -0400 @@ -30,6 +30,7 @@ #include #include @@ -50,15 +50,7 @@ return FALSE; } -@@ -146,6 +152,7 @@ hf_storage_geom_is_swap (const Geom_Obje - - return (! strcmp(geom_obj->class, "BSD") && geom_obj->type == FS_SWAP) - || ((! strcmp(geom_obj->class, "MBR") || -+ ! strcmp(geom_obj->class, "PART") || - ! strcmp(geom_obj->class, "MBREXT")) - && (geom_obj->type == 0x18 /* AST Windows swapfile */ - || geom_obj->type == 0x42 /* SFS or Linux swap */ -@@ -294,7 +301,7 @@ hf_storage_device_probe (HalDevice *devi +@@ -294,7 +300,7 @@ hf_storage_device_probe (HalDevice *devi { g_return_if_fail(HAL_IS_DEVICE(device)); @@ -67,12 +59,13 @@ if (hf_runner_run_sync(device, 0, "hald-probe-storage", "HF_HAS_CHILDREN", HF_BOOL_TO_STRING(hf_storage_device_has_partitions(device)), -@@ -433,6 +440,29 @@ hf_storage_parse_conftxt (const char *co +@@ -433,11 +439,42 @@ hf_storage_parse_conftxt (const char *co if (! strcmp (geom_obj->class, "GPT") || ! strcmp (geom_obj->class, "APPLE")) geom_obj->str_type = g_strdup(fields[10]); + else if (! strcmp (geom_obj->class, "PART")) + { ++ geom_obj->str_type = g_strdup(fields[10]); + if (g_strv_length(fields) >= 15) + { + if (! strcmp(fields[13], "xt")) @@ -97,7 +90,19 @@ else geom_obj->type = atoi(fields[10]); } -@@ -541,15 +571,20 @@ hf_storage_device_rescan_real (HalDevice + } + ++ if (g_hash_table_lookup(table, GUINT_TO_POINTER(hash)) != NULL) ++ { ++ hf_storage_geom_free(geom_obj); ++ curr_depth = depth; ++ continue; ++ } ++ + g_hash_table_insert (table, GUINT_TO_POINTER(hash), geom_obj); + + if (depth > curr_depth) +@@ -541,15 +578,20 @@ hf_storage_device_rescan_real (HalDevice } static gboolean @@ -121,7 +126,7 @@ conftxt = hf_get_string_sysctl(NULL, "kern.geom.conftxt"); new_disks = hf_storage_parse_conftxt(conftxt); -@@ -572,6 +607,7 @@ hf_storage_conftxt_timeout_cb (gpointer +@@ -572,6 +614,7 @@ hf_storage_conftxt_timeout_cb (gpointer if (! hf_storage_find_disk(disks, disk->name)) { osspec_probe(); /* catch new disk(s) */ @@ -129,7 +134,7 @@ break; } } -@@ -593,7 +629,10 @@ hf_storage_conftxt_timeout_cb (gpointer +@@ -593,7 +636,10 @@ hf_storage_conftxt_timeout_cb (gpointer device = hf_devtree_find_from_name(hald_get_gdl(), disk->name); if (device && hal_device_has_capability(device, "storage") && ! hf_storage_device_has_addon(device)) @@ -141,7 +146,7 @@ } } else -@@ -601,7 +640,10 @@ hf_storage_conftxt_timeout_cb (gpointer +@@ -601,7 +647,10 @@ hf_storage_conftxt_timeout_cb (gpointer /* disk removed */ device = hf_devtree_find_from_name(hald_get_gdl(), disk->name); if (device && hal_device_has_capability(device, "storage")) @@ -153,7 +158,7 @@ } } } -@@ -610,17 +652,30 @@ hf_storage_conftxt_timeout_cb (gpointer +@@ -610,17 +659,30 @@ hf_storage_conftxt_timeout_cb (gpointer g_slist_free(disks); disks = new_disks; @@ -186,7 +191,7 @@ return; conftxt = hf_get_string_sysctl(NULL, "kern.geom.conftxt"); -@@ -636,8 +691,10 @@ hf_storage_init_geom (void) +@@ -636,8 +698,10 @@ hf_storage_init_geom (void) static void hf_storage_init (void) { @@ -198,7 +203,7 @@ } void -@@ -720,8 +777,6 @@ hf_storage_device_add (HalDevice *device +@@ -720,8 +784,6 @@ hf_storage_device_add (HalDevice *device { g_return_if_fail(HAL_IS_DEVICE(device)); @@ -207,7 +212,7 @@ if (hf_device_preprobe(device)) { hf_storage_device_probe(device, FALSE); -@@ -739,7 +794,7 @@ hf_storage_get_geoms (const char *devnam +@@ -739,7 +801,7 @@ hf_storage_get_geoms (const char *devnam g_return_val_if_fail(devname != NULL, NULL); @@ -216,7 +221,7 @@ hash = g_str_hash(devname); node = g_node_find(hf_storage_geom_tree, G_PRE_ORDER, G_TRAVERSE_ALL, -@@ -802,3 +857,7 @@ HFHandler hf_storage_handler = { +@@ -802,3 +864,7 @@ HFHandler hf_storage_handler = { .probe = hf_storage_probe, .device_rescan = hf_storage_device_rescan }; -- cgit v1.2.3