Hi,
SUNWgnome-gvfs from JDS gnome 2.22.1 wants some additional
libhal_ps_* functions:
pkgbuild: /opt/SunStudio12/SUNWspro/bin/cc -i -xO4 -xspace -xstrconst -xpentium
-mr -xregs=no%frameptr -g -xdebugformat=stabs -xtarget=opteron
-xregs=no%frameptr -D_XPG4_2 -D__EXTENSIONS__ -I/usr/sfw/include
-DDBUS_API_SUBJECT_TO_CHANGE=1 -Wl,-zignore -Wl,-zcombreloc -Wl,-Bdirect -o
.libs/gvfsd-cdda gvfsd_cdda-gvfsbackendcdda.o gvfsd_cdda-daemon-main.o
gvfsd_cdda-daemon-main-generic.o -L/usr/sfw/lib ./.libs/libdaemon.a
../common/.libs/libgvfscommon.so -lxml2 -lgthread-2.0 -lpthread -lthread -lrt
-lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lgnome-keyring -lglib-2.0
-lcdio_paranoia -lcdio_cdda -lcdio -lhal -ldbus-1 -lsocket -R/usr/sfw/lib
pkgbuild: Undefined first referenced
pkgbuild: symbol in file
pkgbuild: libhal_ps_get_bool gvfsd_cdda-gvfsbackendcdda.o
pkgbuild: libhal_ps_get_uint64 gvfsd_cdda-gvfsbackendcdda.o
pkgbuild: ld: fatal: Symbol referencing errors. No output written to
.libs/gvfsd-cdda
pkgbuild: make[3]: *** [gvfsd-cdda] Error 1
pkgbuild: make[3]: Leaving directory
`/h/goanna/2/os_5.10/cbe/BUILD/SUNWgnome-gvfs-2.22.1/gvfs-0.2.4/daemon'
pkgbuild: make[2]: *** [all] Error 2
pkgbuild: make[2]: Leaving directory
`/h/goanna/2/os_5.10/cbe/BUILD/SUNWgnome-gvfs-2.22.1/gvfs-0.2.4/daemon'
pkgbuild: make[1]: *** [all-recursive] Error 1
pkgbuild: make[1]: Leaving directory
`/h/goanna/2/os_5.10/cbe/BUILD/SUNWgnome-gvfs-2.22.1/gvfs-0.2.4'
pkgbuild: make: *** [all] Error 2
pkgbuild: Bad exit status from /var/tmp/pkgbuild-mwright/pkgbuild-tmp-2.19490
(%build)
--- command output ends --- finished at Fri Jun 6 11:32:13 EST 2008
These diffs add them:
Index: Dude/HAL/0.5.9.1/libhal/libhal.h
===================================================================
--- Dude/HAL/0.5.9.1/libhal/libhal.h (revision 2062)
+++ Dude/HAL/0.5.9.1/libhal/libhal.h (working copy)
@@ -497,6 +497,28 @@
/* Get the number of properties in a property set. */
unsigned int libhal_property_set_get_num_elems (LibHalPropertySet *set);
+/* Get type of property. */
+LibHalPropertyType libhal_ps_get_type (const LibHalPropertySet *set, const
char *key);
+
+/* Get the value of a property of type string. */
+const char *libhal_ps_get_string (const LibHalPropertySet *set, const char
*key);
+
+/* Get the value of a property of type signed integer. */
+dbus_int32_t libhal_ps_get_int32 (const LibHalPropertySet *set, const char
*key);
+
+/* Get the value of a property of type unsigned integer. */
+dbus_uint64_t libhal_ps_get_uint64 (const LibHalPropertySet *set, const char
*key);
+
+/* Get the value of a property of type double. */
+double libhal_ps_get_double (const LibHalPropertySet *set, const char *key);
+
+/* Get the value of a property of type bool. */
+dbus_bool_t libhal_ps_get_bool (const LibHalPropertySet *set, const char *key);
+
+
+/* Get the value of a property of type string list. */
+const char * const *libhal_ps_get_strlist (const LibHalPropertySet *set, const
char *key);
+
/**
* LibHalPropertySetIterator:
*
Index: Dude/HAL/0.5.9.1/libhal/libhal.c
===================================================================
--- Dude/HAL/0.5.9.1/libhal/libhal.c (revision 2062)
+++ Dude/HAL/0.5.9.1/libhal/libhal.c (working copy)
@@ -616,7 +616,185 @@
return num_elems;
}
+static LibHalProperty *
+property_set_lookup (const LibHalPropertySet *set, const char *key)
+{
+ LibHalProperty *p;
+ LIBHAL_CHECK_PARAM_VALID(set, "*set", NULL);
+ LIBHAL_CHECK_PARAM_VALID(key, "*key", NULL);
+
+ for (p = set->properties_head; p != NULL; p = p->next)
+ if (strcmp (key, p->key) == 0)
+ return p;
+
+ return NULL;
+}
+
+/**
+ * libhal_ps_get_type:
+ * @set: property set
+ * @key: name of property to inspect
+ *
+ * Get the type of a given property.
+ *
+ * Returns: the #LibHalPropertyType of the given property,
+ * LIBHAL_PROPERTY_TYPE_INVALID if property is not in the set
+ */
+LibHalPropertyType
+libhal_ps_get_type (const LibHalPropertySet *set, const char *key)
+{
+ LibHalProperty *p = property_set_lookup (set, key);
+
+ LIBHAL_CHECK_PARAM_VALID(set, "*set", LIBHAL_PROPERTY_TYPE_INVALID);
+ LIBHAL_CHECK_PARAM_VALID(key, "*key", LIBHAL_PROPERTY_TYPE_INVALID);
+
+ p = property_set_lookup (set, key);
+ if (p) return p->type;
+ else return LIBHAL_PROPERTY_TYPE_INVALID;
+}
+
+/**
+ * libhal_ps_get_string:
+ * @set: property set
+ * @key: name of property to inspect
+ *
+ * Get the value of a property of type string.
+ *
+ * Returns: UTF8 nul-terminated string. This pointer is only valid
+ * until libhal_free_property_set() is invoked on the property set
+ * this property belongs to. NULL if property is not in the set or not a string
+ */
+const char *
+libhal_ps_get_string (const LibHalPropertySet *set, const char *key)
+{
+ LibHalProperty *p;
+
+ LIBHAL_CHECK_PARAM_VALID(set, "*set", NULL);
+ LIBHAL_CHECK_PARAM_VALID(key, "*key", NULL);
+
+ p = property_set_lookup (set, key);
+ if (p && p->type == LIBHAL_PROPERTY_TYPE_STRING)
+ return p->v.str_value;
+ else return NULL;
+}
+
+/**
+ * libhal_ps_get_int:
+ * @set: property set
+ * @key: name of property to inspect
+ *
+ * Get the value of a property of type signed integer.
+ *
+ * Returns: property value (32-bit signed integer)
+ */
+dbus_int32_t
+libhal_ps_get_int32 (const LibHalPropertySet *set, const char *key)
+{
+ LibHalProperty *p;
+
+ LIBHAL_CHECK_PARAM_VALID(set, "*set", 0);
+ LIBHAL_CHECK_PARAM_VALID(key, "*key", 0);
+
+ p = property_set_lookup (set, key);
+ if (p && p->type == LIBHAL_PROPERTY_TYPE_INT32)
+ return p->v.int_value;
+ else return 0;
+}
+
+/**
+ * libhal_ps_get_uint64:
+ * @set: property set
+ * @key: name of property to inspect
+ *
+ * Get the value of a property of type unsigned integer.
+ *
+ * Returns: property value (64-bit unsigned integer)
+ */
+dbus_uint64_t
+libhal_ps_get_uint64 (const LibHalPropertySet *set, const char *key)
+{
+ LibHalProperty *p;
+
+ LIBHAL_CHECK_PARAM_VALID(set, "*set", 0);
+ LIBHAL_CHECK_PARAM_VALID(key, "*key", 0);
+
+ p = property_set_lookup (set, key);
+ if (p && p->type == LIBHAL_PROPERTY_TYPE_UINT64)
+ return p->v.uint64_value;
+ else return 0;
+}
+
+/**
+ * libhal_ps_get_double:
+ * @set: property set
+ * @key: name of property to inspect
+ *
+ * Get the value of a property of type double.
+ *
+ * Returns: property value (IEEE754 double precision float)
+ */
+double
+libhal_ps_get_double (const LibHalPropertySet *set, const char *key)
+{
+ LibHalProperty *p;
+
+ LIBHAL_CHECK_PARAM_VALID(set, "*set", 0.0);
+ LIBHAL_CHECK_PARAM_VALID(key, "*key", 0.0);
+
+ p = property_set_lookup (set, key);
+ if (p && p->type == LIBHAL_PROPERTY_TYPE_DOUBLE)
+ return p->v.double_value;
+ else return 0.0;
+}
+
+/**
+ * libhal_ps_get_bool:
+ * @set: property set
+ * @key: name of property to inspect
+ *
+ * Get the value of a property of type bool.
+ *
+ * Returns: property value (bool)
+ */
+dbus_bool_t
+libhal_ps_get_bool (const LibHalPropertySet *set, const char *key)
+{
+ LibHalProperty *p;
+
+ LIBHAL_CHECK_PARAM_VALID(set, "*set", FALSE);
+ LIBHAL_CHECK_PARAM_VALID(key, "*key", FALSE);
+
+ p = property_set_lookup (set, key);
+ if (p && p->type == LIBHAL_PROPERTY_TYPE_BOOLEAN)
+ return p->v.bool_value;
+ else return FALSE;
+}
+
+/**
+ * libhal_ps_get_strlist:
+ * @set: property set
+ * @key: name of property to inspect
+ *
+ * Get the value of a property of type string list.
+ *
+ * Returns: pointer to array of strings, this is owned by the property set
+ */
+const char *const *
+libhal_ps_get_strlist (const LibHalPropertySet *set, const char *key)
+{
+ LibHalProperty *p;
+
+ LIBHAL_CHECK_PARAM_VALID(set, "*set", NULL);
+ LIBHAL_CHECK_PARAM_VALID(key, "*key", NULL);
+
+ p = property_set_lookup (set, key);
+ if (p && p->type == LIBHAL_PROPERTY_TYPE_STRLIST)
+ return (const char *const *) p->v.strlist_value;
+ else return NULL;
+}
+
+
/**
* libhal_psi_init:
* @iter: iterator object
Then I compiled it as SUNWhal like:
goanna% rm /h/goanna/2/os_5.10/cbe/SOURCES/HAL-0.5.9.1.tar.gz
goanna% rm FOSShal.spec
goanna% perl Respect.pl --with-all --without-upload --without-build hal.pspc
Respect: Reading pspc file hal ...
Respect: Reading pspc file hal ...
Respect: 64-bit build enabled.
Respect: Creating spec file hal.spec ...
Respect: Checking consistency ...
Respect: Creating spec file hal.spec ...
Respect: Installing replacement libtool ...
Respect: Creating source tarball ...
Respect: Disabling manual copy of source tarball ...
Respect: Skipping installation of tarball in packages/SOURCES.
Respect: Use --with-copy to enable.
Respect: Skipping upload of tarball.
Respect: Use --with-upload to enable.
Respect: Skipping package build.
Respect: Use --with-build to enable.
goanna% cp -p FOSShal.spec SUNWhal.spec
goanna% sed -i -e "s/FOSShal/SUNWhal/g" SUNWhal.spec
goanna% pkgtool build SUNWhal.spec
INFO: Copying %use'd or %include'd spec files to SPECS directory
INFO: Processing spec files
INFO: Finding sources
INFO: Running pkgbuild -ba [...] SUNWhal.spec (SUNWhal)
INFO: SUNWhal PASSED
INFO: Installing SUNWhal
Summary:
package | status | details
---------------------------------+-------------+-------------------------------
SUNWhal | PASSED |
goanna%
Then did:
# svcadm -v enable hal
while logged into CDE and recompiling SUNWgnome-gvfs
on sol10u5, at this point the box froze for about 5
seconds so, the mouse would not move and I was a little
worried for a second, but then it came back and hal
is running:
# svcadm -v enable hal
svc:/system/hal:default enabled.
# svcs -vx hal
svc:/system/hal:default (Hardware Abstraction Layer daemon)
State: online since Fri Jun 06 13:53:07 2008
See: man -M /usr/man -s 1M hal
See: /var/svc/log/system-hal:default.log
Impact: None.
#
And SUNWgnome-gvfs compiles fine.
Thanks, Mark
--
This message posted from opensolaris.org