summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2008-06-02 14:35:35 +0000
committerKoen Kooi <koen@openembedded.org>2008-06-02 14:35:35 +0000
commit664b1d8a441fcf86278dd9b5f7b9d80b8cfb7d2b (patch)
treea6d3aad85ce7707a9f338e098eb531b1b80e3447
parent6b7431df985541e18b655540fb59ac3ab3ad26a4 (diff)
hal: sync with poky
-rw-r--r--packages/hal/files/20hal4
-rw-r--r--packages/hal/files/autoconf.diff11
-rw-r--r--packages/hal/files/sg-inhibit.patch24
-rw-r--r--packages/hal/hal-info_20070831.bb16
-rw-r--r--packages/hal/hal-info_git.bb9
-rw-r--r--packages/hal/hal/.mtn2git_empty0
-rw-r--r--packages/hal/hal/configure_fix.patch60
-rw-r--r--packages/hal/hal_0.5.9.1.bb93
-rw-r--r--packages/hal/hal_git.bb89
9 files changed, 301 insertions, 5 deletions
diff --git a/packages/hal/files/20hal b/packages/hal/files/20hal
index 834e51afc0..5b97c4f9e6 100644
--- a/packages/hal/files/20hal
+++ b/packages/hal/files/20hal
@@ -12,7 +12,7 @@
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/hald
PIDDIR=/var/run/hald
-PIDFILE=$PIDDIR/pid
+PIDFILE=$PIDDIR/hald.pid
NAME=hald
DAEMONUSER=haldaemon
DESC="Hardware abstraction layer"
@@ -33,7 +33,7 @@ do_start() {
do_stop() {
echo "Stopping $DESC" "$NAME"
- start-stop-daemon --stop --oknodo --quiet --pidfile $PIDFILE \
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE \
--exec $DAEMON
}
diff --git a/packages/hal/files/autoconf.diff b/packages/hal/files/autoconf.diff
new file mode 100644
index 0000000000..eb30cccdbe
--- /dev/null
+++ b/packages/hal/files/autoconf.diff
@@ -0,0 +1,11 @@
+--- hal-0.5.9/configure.in~ 2007-04-03 05:36:44.000000000 +0100
++++ hal-0.5.9/configure.in 2007-04-03 10:29:39.000000000 +0100
+@@ -6,7 +6,7 @@
+ # Patches for that is welcome.
+ #
+
+-AC_PREREQ(2.59c)
++AC_PREREQ(2.59)
+ AC_INIT(hal, 0.5.9, david@fubar.dk)
+ AM_INIT_AUTOMAKE(hal, 0.5.9)
+ AM_CONFIG_HEADER(config.h)
diff --git a/packages/hal/files/sg-inhibit.patch b/packages/hal/files/sg-inhibit.patch
new file mode 100644
index 0000000000..f0cc41448a
--- /dev/null
+++ b/packages/hal/files/sg-inhibit.patch
@@ -0,0 +1,24 @@
+--- hal-0.5.9.1/hald/linux/probing/linux_dvd_rw_utils.c.old 2007-08-03 17:24:12.000000000 +0100
++++ hal-0.5.9.1/hald/linux/probing/linux_dvd_rw_utils.c 2007-08-03 17:25:06.000000000 +0100
+@@ -58,6 +58,10 @@
+
+ #include "linux_dvd_rw_utils.h"
+
++#if defined(SG_FLAG_UNUSED_LUN_INHIBIT)
++# define SG_FLAG_LUN_INHIBIT SG_FLAG_UNUSED_LUN_INHIBIT
++#endif
++
+ typedef enum {
+ NONE = CGC_DATA_NONE, // 3
+ READ = CGC_DATA_READ, // 2
+@@ -153,8 +153,8 @@
+ errno = EIO;
+ ret = -1;
+ if (cmd->sg_io.masked_status & CHECK_CONDITION) {
+- CREAM_ON_ERRNO (cmd->sg_io.sbp);
+- ret = ERRCODE (cmd->sg_io.sbp);
++ CREAM_ON_ERRNO ((char*)cmd->sg_io.sbp);
++ ret = ERRCODE ((char*)cmd->sg_io.sbp);
+ if (ret == 0)
+ ret = -1;
+ }
diff --git a/packages/hal/hal-info_20070831.bb b/packages/hal/hal-info_20070831.bb
new file mode 100644
index 0000000000..a379254937
--- /dev/null
+++ b/packages/hal/hal-info_20070831.bb
@@ -0,0 +1,16 @@
+DESCRIPTION = "Hardware Abstraction Layer device information"
+HOMEPAGE = "http://freedesktop.org/Software/hal"
+SECTION = "unknown"
+LICENSE = "GPL AFL"
+DEPENDS = "hal"
+
+SRC_URI = "git://anongit.freedesktop.org/hal-info/;protocol=git;tag=HAL_INFO_${PV}"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--disable-recall --disable-video"
+
+PACKAGE_ARCH = "all"
+FILES_${PN} += "/usr/share/hal/"
diff --git a/packages/hal/hal-info_git.bb b/packages/hal/hal-info_git.bb
index 2812f19fe0..48192a8e7e 100644
--- a/packages/hal/hal-info_git.bb
+++ b/packages/hal/hal-info_git.bb
@@ -2,13 +2,13 @@ DESCRIPTION = "Hardware Abstraction Layer device information"
HOMEPAGE = "http://freedesktop.org/Software/hal"
SECTION = "unknown"
LICENSE = "GPL AFL"
+DEPENDS = "hal"
PV = "${SRCDATE}+git"
-PR = "r1"
+PR = "r2"
-DEFAULT_PREFERENCE = "-1"
-SRC_URI = "git://anongit.freedesktop.org/hal-info/;protocol=git"
+SRC_URI = "git://anongit.freedesktop.org/hal-info/;protocol=git;rev=HAL_INFO_20070831"
S = "${WORKDIR}/git"
@@ -19,3 +19,6 @@ EXTRA_OECONF = "--disable-recall --disable-video"
PACKAGE_ARCH = "all"
FILES_${PN} += "${datadir}/hal/"
+
+# By default, use the released hal-info
+DEFAULT_PREFERENCE = "-1"
diff --git a/packages/hal/hal/.mtn2git_empty b/packages/hal/hal/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/hal/hal/.mtn2git_empty
diff --git a/packages/hal/hal/configure_fix.patch b/packages/hal/hal/configure_fix.patch
new file mode 100644
index 0000000000..e8417040de
--- /dev/null
+++ b/packages/hal/hal/configure_fix.patch
@@ -0,0 +1,60 @@
+The AC_LANG sections upset libtool 2.2.2, as do .cpp files without a call
+to AC_PROG_CXX. Easiest solution is to patch this out for now.
+
+RP - 14/4/08
+
+Index: hal-0.5.9.1/configure.in
+===================================================================
+--- hal-0.5.9.1.orig/configure.in 2008-04-14 22:41:49.000000000 +0100
++++ hal-0.5.9.1/configure.in 2008-04-14 22:43:13.000000000 +0100
+@@ -345,32 +345,8 @@
+ fi
+
+ dnl Check for libsmbios
+-AC_LANG_PUSH([C++])
+-AC_CHECK_LIB(smbios, SMBIOSFreeMemory, LIB_SMBIOS=yes , LIB_SMBIOS=no )
+-AC_LANG_POP([C++])
+-if test "$LIB_SMBIOS" = "yes" ; then
+- AC_MSG_CHECKING([for libsmbios >= 0.13.4])
+- AC_TRY_RUN(
+- #include <smbios/version.h>
+- int main ()
+- {
+- int major ;
+- int minor ;
+- int micro ;
+-
+- if ( sscanf( LIBSMBIOS_RELEASE_VERSION , "%d.%d.%d", &major, &minor, &micro ) == 3 ) {
+- if ((major == 0 && minor == 13 && micro >= 4) ||
+- (major >= 0 && minor > 13)) {
+- return 0;
+- }
+- }
+- return 1;
+- } , [USE_SMBIOS=yes; AC_MSG_RESULT(yes); AM_CONDITIONAL(HAVE_SMBIOS,true)],
+- [USE_SMBIOS=no; AC_MSG_RESULT(failed); AM_CONDITIONAL(HAVE_SMBIOS,false)])
+-else
+- USE_SMBIOS=no
+- AM_CONDITIONAL(HAVE_SMBIOS,false)
+-fi
++USE_SMBIOS=no
++AM_CONDITIONAL(HAVE_SMBIOS,false)
+
+ AC_ARG_WITH([libpci],
+ [AS_HELP_STRING([--without-libpci],
+Index: hal-0.5.9.1/hald/linux/addons/Makefile.am
+===================================================================
+--- hal-0.5.9.1.orig/hald/linux/addons/Makefile.am 2008-04-14 22:45:18.000000000 +0100
++++ hal-0.5.9.1/hald/linux/addons/Makefile.am 2008-04-14 22:46:05.000000000 +0100
+@@ -60,11 +60,6 @@
+ hald_addon_usb_csr_LDADD = $(top_builddir)/libhal/libhal.la -lusb @GLIB_LIBS@
+ endif
+
+-if BUILD_DELL
+-libexec_PROGRAMS += hald-addon-dell-backlight
+-hald_addon_dell_backlight_SOURCES = addon-dell-backlight.cpp ../../logger.c
+-hald_addon_dell_backlight_LDADD = $(top_builddir)/libhal/libhal.la -lsmbios @GLIB_LIBS@
+-endif
+ endif
+
+ hald_addon_acpi_SOURCES = addon-acpi.c ../../logger.c ../../util_helper.c
diff --git a/packages/hal/hal_0.5.9.1.bb b/packages/hal/hal_0.5.9.1.bb
new file mode 100644
index 0000000000..8e4ad23937
--- /dev/null
+++ b/packages/hal/hal_0.5.9.1.bb
@@ -0,0 +1,93 @@
+DESCRIPTION = "Hardware Abstraction Layer"
+HOMEPAGE = "http://freedesktop.org/Software/hal"
+SECTION = "unknown"
+LICENSE = "GPL LGPL AFL"
+
+DEPENDS = "virtual/kernel dbus-glib udev intltool-native expat libusb"
+RDEPENDS_${PN} += "udev hal-info"
+RRECOMMENDS_${PN} += "udev-utils"
+
+PR = "r6"
+
+SRC_URI = "http://freedesktop.org/~david/dist/hal-${PV}.tar.gz \
+ file://configure_fix.patch;patch=1 \
+ file://sg-inhibit.patch;patch=1 \
+ file://20hal \
+ file://99_hal"
+
+S = "${WORKDIR}/hal-${PV}"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--with-hwdata=${datadir}/hwdata \
+ --with-expat=${STAGING_DIR_HOST}${layout_prefix} \
+ --with-dbus-sys=${sysconfdir}/dbus-1/system.d \
+ --with-hotplug=${sysconfdir}/hotplug.d \
+ --disable-docbook-docs \
+ --disable-policy-kit \
+ --disable-acpi --disable-acpi-acpid --disable-acpi-proc \
+ --disable-sonypic \
+ --disable-pmu --disable-pci \
+ --disable-pci-ids --disable-pnp-ids \
+ "
+
+do_install_append() {
+ install -d ${D}/etc/default/volatiles
+ install -m 0644 ${WORKDIR}/99_hal ${D}/etc/default/volatiles
+ install -d ${D}/etc/dbus-1/event.d
+ install -m 0755 ${WORKDIR}/20hal ${D}/etc/dbus-1/event.d
+}
+
+do_stage() {
+ autotools_stage_all
+ install -d ${STAGING_LIBDIR}
+ install -m 755 libhal/.libs/libhal.so.1.0.0 ${STAGING_LIBDIR}/libhal.so
+ install -m 755 libhal-storage/.libs/libhal-storage.so.1.0.0 ${STAGING_LIBDIR}/libhal-storage.so
+}
+
+# At the time the postinst runs, dbus might not be setup so only restart if running
+pkg_postinst_hal () {
+ # can not do this offline
+ if [ "x$D" != "x" ]; then
+ exit 1
+ fi
+
+ /etc/init.d/populate-volatile.sh update
+
+ grep haldaemon /etc/group || addgroup haldaemon
+ grep haldaemon /etc/passwd || adduser --disabled-password --system --home /var/run/hald --no-create-home haldaemon --ingroup haldaemon -g HAL
+
+ DBUSPID=`pidof dbus-daemon`
+
+ if [ "x$DBUSPID" != "x" ]; then
+ /etc/init.d/dbus-1 reload
+ fi
+}
+
+pkg_postrm_hal () {
+ deluser haldaemon || true
+ delgroup haldaemon || true
+}
+
+PACKAGES =+ "libhal libhal-storage"
+
+FILES_libhal = "${libdir}/libhal.so.*"
+FILES_libhal-storage = "${libdir}/libhal-storage.so.*"
+
+FILES_${PN} = "${sysconfdir} \
+ ${bindir}/lshal \
+ ${bindir}/hal-find-by-capability \
+ ${bindir}/hal-find-by-property \
+ ${bindir}/hal-device \
+ ${bindir}/hal-get-property \
+ ${bindir}/hal-set-property \
+ ${bindir}/hal-lock \
+ ${bindir}/hal-is-caller-locked-out \
+ ${bindir}/hal-disable-polling \
+ ${sbindir} \
+ ${libdir}/libhal.so.* \
+ ${libdir}/libhal-storage.so.* \
+ ${libdir}/hal \
+ ${libexecdir} \
+ ${datadir}/hal/fdi \
+ ${datadir}/hal/scripts"
diff --git a/packages/hal/hal_git.bb b/packages/hal/hal_git.bb
new file mode 100644
index 0000000000..0cdcafd24d
--- /dev/null
+++ b/packages/hal/hal_git.bb
@@ -0,0 +1,89 @@
+DESCRIPTION = "Hardware Abstraction Layer"
+HOMEPAGE = "http://freedesktop.org/Software/hal"
+SECTION = "unknown"
+LICENSE = "GPL LGPL AFL"
+
+DEFAULT_PREFERENCE = "-1"
+
+DEPENDS = "virtual/kernel dbus-glib udev intltool-native expat libusb"
+RDEPENDS_${PN} += "udev hal-info"
+RRECOMMENDS_${PN} += "udev-utils"
+
+SRC_URI = "git://anongit.freedesktop.org/hal/;protocol=git \
+ file://20hal \
+ file://99_hal"
+
+PV = "0.5.9.1+git${SRCDATE}"
+PR = "r4"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--with-hwdata=${datadir}/hwdata \
+ --with-expat=${STAGING_DIR_HOST}${layout_prefix} \
+ --with-dbus-sys=${sysconfdir}/dbus-1/system.d \
+ --with-hotplug=${sysconfdir}/hotplug.d \
+ --disable-docbook-docs \
+ --disable-policy-kit \
+ --disable-acpi --disable-acpi-acpid --disable-acpi-proc \
+ --disable-sonypic \
+ --disable-pmu --disable-pci \
+ --disable-pci-ids --disable-pnp-ids \
+ "
+
+do_install_append() {
+ install -d ${D}/etc/default/volatiles
+ install -m 0644 ${WORKDIR}/99_hal ${D}/etc/default/volatiles
+ install -d ${D}/etc/dbus-1/event.d
+ install -m 0755 ${WORKDIR}/20hal ${D}/etc/dbus-1/event.d
+}
+
+do_stage() {
+ autotools_stage_all
+ install -d ${STAGING_LIBDIR}
+ install -m 755 libhal/.libs/libhal.so.1.0.0 ${STAGING_LIBDIR}/libhal.so
+ install -m 755 libhal-storage/.libs/libhal-storage.so.1.0.0 ${STAGING_LIBDIR}/libhal-storage.so
+}
+
+# At the time the postinst runs, dbus might not be setup so only restart if running
+pkg_postinst_hal () {
+ # can't do this offline
+ if [ "x$D" != "x" ]; then
+ exit 1
+ fi
+
+ /etc/init.d/populate-volatile.sh update
+
+ grep haldaemon /etc/group || addgroup haldaemon
+ grep haldaemon /etc/passwd || adduser --disabled-password --system --home /var/run/hald --no-create-home haldaemon --ingroup haldaemon -g HAL
+
+ DBUSPID=`pidof dbus-daemon`
+
+ if [ "x$DBUSPID" != "x" ]; then
+ /etc/init.d/dbus-1 reload
+ fi
+}
+
+pkg_postrm_hal () {
+ deluser haldaemon || true
+ delgroup haldaemon || true
+}
+
+FILES_${PN} = "${sysconfdir} \
+ ${bindir}/lshal \
+ ${bindir}/hal-find-by-capability \
+ ${bindir}/hal-find-by-property \
+ ${bindir}/hal-device \
+ ${bindir}/hal-get-property \
+ ${bindir}/hal-set-property \
+ ${bindir}/hal-lock \
+ ${bindir}/hal-is-caller-locked-out \
+ ${bindir}/hal-disable-polling \
+ ${sbindir} \
+ ${libdir}/libhal.so.* \
+ ${libdir}/libhal-storage.so.* \
+ ${libdir}/hal \
+ ${libexecdir} \
+ ${datadir}/hal/fdi \
+ ${datadir}/hal/scripts"