summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/hal
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support/hal')
-rwxr-xr-xmeta/recipes-support/hal/files/20hal58
-rw-r--r--meta/recipes-support/hal/files/autoconf.diff11
-rw-r--r--meta/recipes-support/hal/files/hal-right-input-h.patch29
-rw-r--r--meta/recipes-support/hal/files/sg-inhibit.patch24
-rw-r--r--meta/recipes-support/hal/hal-info.inc22
-rw-r--r--meta/recipes-support/hal/hal-info_20091130.bb1
-rw-r--r--meta/recipes-support/hal/hal-info_git.bb9
-rw-r--r--meta/recipes-support/hal/hal.inc85
-rw-r--r--meta/recipes-support/hal/hal/configure_fix.patch60
-rw-r--r--meta/recipes-support/hal/hal_0.5.14.bb14
-rw-r--r--meta/recipes-support/hal/hal_git.bb12
11 files changed, 325 insertions, 0 deletions
diff --git a/meta/recipes-support/hal/files/20hal b/meta/recipes-support/hal/files/20hal
new file mode 100755
index 0000000000..5b97c4f9e6
--- /dev/null
+++ b/meta/recipes-support/hal/files/20hal
@@ -0,0 +1,58 @@
1#! /bin/sh
2#
3# hal Start the Daemon that stores device informations
4# for the Hardware abstraction layer
5#
6# Written by Martin Waitz based on skeleton code
7# written by Miquel van Smoorenburg <miquels@cistron.nl>.
8# Modified for Debian
9# by Ian Murdock <imurdock@gnu.ai.mit.edu>.
10#
11
12PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
13DAEMON=/usr/sbin/hald
14PIDDIR=/var/run/hald
15PIDFILE=$PIDDIR/hald.pid
16NAME=hald
17DAEMONUSER=haldaemon
18DESC="Hardware abstraction layer"
19
20test -x $DAEMON || exit 0
21
22set -e
23
24do_start() {
25 if [ ! -d $PIDDIR ]; then
26 mkdir -p $PIDDIR
27 chown $DAEMONUSER:$DAEMONUSER $PIDDIR
28 fi
29 echo "Starting $DESC" "$NAME"
30 start-stop-daemon --start --pidfile $PIDFILE \
31 --exec $DAEMON -- $DAEMON_OPTS
32}
33
34do_stop() {
35 echo "Stopping $DESC" "$NAME"
36 start-stop-daemon --stop --quiet --pidfile $PIDFILE \
37 --exec $DAEMON
38}
39
40case "$1" in
41 start)
42 do_start
43 ;;
44 stop)
45 do_stop
46 ;;
47 restart|force-reload)
48 do_stop
49 sleep 5
50 do_start
51 ;;
52 *)
53 echo "Usage: $0 {start|stop|restart|force-reload}" >&2
54 exit 1
55 ;;
56esac
57
58exit 0
diff --git a/meta/recipes-support/hal/files/autoconf.diff b/meta/recipes-support/hal/files/autoconf.diff
new file mode 100644
index 0000000000..eb30cccdbe
--- /dev/null
+++ b/meta/recipes-support/hal/files/autoconf.diff
@@ -0,0 +1,11 @@
1--- hal-0.5.9/configure.in~ 2007-04-03 05:36:44.000000000 +0100
2+++ hal-0.5.9/configure.in 2007-04-03 10:29:39.000000000 +0100
3@@ -6,7 +6,7 @@
4 # Patches for that is welcome.
5 #
6
7-AC_PREREQ(2.59c)
8+AC_PREREQ(2.59)
9 AC_INIT(hal, 0.5.9, david@fubar.dk)
10 AM_INIT_AUTOMAKE(hal, 0.5.9)
11 AM_CONFIG_HEADER(config.h)
diff --git a/meta/recipes-support/hal/files/hal-right-input-h.patch b/meta/recipes-support/hal/files/hal-right-input-h.patch
new file mode 100644
index 0000000000..f820b7790a
--- /dev/null
+++ b/meta/recipes-support/hal/files/hal-right-input-h.patch
@@ -0,0 +1,29 @@
1diff --git a/configure.in b/configure.in
2index e76ff51..5e8cc21 100644
3--- a/configure.in
4+++ b/configure.in
5@@ -983,6 +983,11 @@ AC_ARG_WITH([linux-input-header],
6 [Use an given Linux input.h rather than that installed on the system (<linux/input.h>)]))
7 if test "x$with_linux_input_header" != "x"; then
8 AC_DEFINE_UNQUOTED(HAL_LINUX_INPUT_HEADER_H, "$with_linux_input_header", [If set, the header to use instead of <linux/input.h>])
9+ LINUX_INPUT_H=$with_linux_input_header
10+ AC_SUBST(LINUX_INPUT_H)
11+else
12+ LINUX_INPUT_H=/usr/include/linux/input.h
13+ AC_SUBST(LINUX_INPUT_H)
14 fi
15
16 dnl
17diff --git a/tools/Makefile.am b/tools/Makefile.am
18index ae03edd..7d1cbab 100644
19--- a/tools/Makefile.am
20+++ b/tools/Makefile.am
21@@ -79,7 +79,7 @@ endif
22 if BUILD_KEYMAPS
23
24 if HAVE_GPERF
25-hal-setup-keymap-keys.txt: /usr/include/linux/input.h
26+hal-setup-keymap-keys.txt: @LINUX_INPUT_H@
27 awk '/^#define.*KEY_/ { if ($$2 != "KEY_MAX") { print substr($$2, 5) } }' < $< > $@
28
29 hal-setup-keymap-hash-name.gperf: hal-setup-keymap-keys.txt
diff --git a/meta/recipes-support/hal/files/sg-inhibit.patch b/meta/recipes-support/hal/files/sg-inhibit.patch
new file mode 100644
index 0000000000..f0cc41448a
--- /dev/null
+++ b/meta/recipes-support/hal/files/sg-inhibit.patch
@@ -0,0 +1,24 @@
1--- hal-0.5.9.1/hald/linux/probing/linux_dvd_rw_utils.c.old 2007-08-03 17:24:12.000000000 +0100
2+++ hal-0.5.9.1/hald/linux/probing/linux_dvd_rw_utils.c 2007-08-03 17:25:06.000000000 +0100
3@@ -58,6 +58,10 @@
4
5 #include "linux_dvd_rw_utils.h"
6
7+#if defined(SG_FLAG_UNUSED_LUN_INHIBIT)
8+# define SG_FLAG_LUN_INHIBIT SG_FLAG_UNUSED_LUN_INHIBIT
9+#endif
10+
11 typedef enum {
12 NONE = CGC_DATA_NONE, // 3
13 READ = CGC_DATA_READ, // 2
14@@ -153,8 +153,8 @@
15 errno = EIO;
16 ret = -1;
17 if (cmd->sg_io.masked_status & CHECK_CONDITION) {
18- CREAM_ON_ERRNO (cmd->sg_io.sbp);
19- ret = ERRCODE (cmd->sg_io.sbp);
20+ CREAM_ON_ERRNO ((char*)cmd->sg_io.sbp);
21+ ret = ERRCODE ((char*)cmd->sg_io.sbp);
22 if (ret == 0)
23 ret = -1;
24 }
diff --git a/meta/recipes-support/hal/hal-info.inc b/meta/recipes-support/hal/hal-info.inc
new file mode 100644
index 0000000000..adba83fb28
--- /dev/null
+++ b/meta/recipes-support/hal/hal-info.inc
@@ -0,0 +1,22 @@
1DESCRIPTION = "Hardware Abstraction Layer device information"
2HOMEPAGE = "http://hal.freedesktop.org/"
3BUGTRACKER = "http://bugs.freedesktop.org/buglist.cgi?product=hal"
4SECTION = "unknown"
5
6LICENSE = "GPLv2 | AFL"
7LIC_FILES_CHKSUM = "file://COPYING;md5=ae484909bad0cf11c8e2071cee6bd4dc"
8
9SRC_URI = "http://hal.freedesktop.org/releases/${PN}-${PV}.tar.gz"
10
11inherit autotools pkgconfig
12
13EXTRA_OECONF = "--disable-recall --disable-video"
14
15do_configure() {
16 gnu-configize
17 libtoolize --force
18 oe_runconf
19}
20
21PACKAGE_ARCH = "all"
22FILES_${PN} += "${datadir}/hal/"
diff --git a/meta/recipes-support/hal/hal-info_20091130.bb b/meta/recipes-support/hal/hal-info_20091130.bb
new file mode 100644
index 0000000000..e6d50e3981
--- /dev/null
+++ b/meta/recipes-support/hal/hal-info_20091130.bb
@@ -0,0 +1 @@
require hal-info.inc
diff --git a/meta/recipes-support/hal/hal-info_git.bb b/meta/recipes-support/hal/hal-info_git.bb
new file mode 100644
index 0000000000..3fff5e0a7d
--- /dev/null
+++ b/meta/recipes-support/hal/hal-info_git.bb
@@ -0,0 +1,9 @@
1require hal-info.inc
2
3PV = "${SRCDATE}+git"
4PR = "r0"
5
6SRC_URI = "git://anongit.freedesktop.org/hal-info/;protocol=git;rev=HAL_INFO_20091130"
7S = "${WORKDIR}/git"
8
9DEFAULT_PREFERENCE = "-1"
diff --git a/meta/recipes-support/hal/hal.inc b/meta/recipes-support/hal/hal.inc
new file mode 100644
index 0000000000..839dfd0652
--- /dev/null
+++ b/meta/recipes-support/hal/hal.inc
@@ -0,0 +1,85 @@
1DESCRIPTION = "Hardware Abstraction Layer"
2HOMEPAGE = "http://freedesktop.org/Software/hal"
3BUGTRACKER = "http://bugs.freedesktop.org/buglist.cgi?product=hal"
4SECTION = "unknown"
5
6LICENSE = "GPLv2+ | AFL"
7LIC_FILES_CHKSUM = "file://COPYING;md5=5b5ffd59fbb7c2fff6de76c94177af31"
8
9DEPENDS = "virtual/kernel dbus-glib udev util-linux intltool intltool-native expat libusb gperf-native"
10RDEPENDS += "udev hal-info"
11
12SRC_URI = "http://hal.freedesktop.org/releases/hal-${PV}.tar.gz \
13 file://20hal"
14
15inherit autotools pkgconfig
16
17
18LEAD_SONAME = "libhal.so"
19
20# machines with pci and acpi get a machine dependant hal
21EXTRA_OECONF = "--with-hwdata=${datadir}/hwdata \
22 --with-expat=${STAGING_LIBDIR}/.. \
23 --with-dbus-sys=${sysconfdir}/dbus-1/system.d \
24 --with-hotplug=${sysconfdir}/hotplug.d \
25 --disable-docbook-docs \
26 --disable-policy-kit \
27 --disable-pmu \
28 --disable-pnp-ids \
29 ${@base_contains('COMBINED_FEATURES', 'pci', '--enable-pci --enable-pci-ids', '--disable-pci --disable-pci-ids',d)} \
30 ${@base_contains('MACHINE_FEATURES', 'acpi', '--enable-acpi', '--disable-acpi',d)} \
31 "
32
33MY_ARCH := "${PACKAGE_ARCH}"
34PACKAGE_ARCH = "${@base_contains('MACHINE_FEATURES', 'acpi', '${MACHINE_ARCH}', '${MY_ARCH}',d)}"
35PACKAGE_ARCH = "${@base_contains('MACHINE_FEATURES', 'pci', '${MACHINE_ARCH}', '${MY_ARCH}',d)}"
36PACKAGE_ARCH_emenlow := "${PACKAGE_ARCH}"
37
38do_install_append() {
39 install -d ${D}/etc/dbus-1/event.d
40 install -m 0755 ${WORKDIR}/20hal ${D}/etc/dbus-1/event.d
41}
42
43# At the time the postinst runs, dbus might not be setup so only restart if running
44pkg_postinst_hal () {
45 # can't do this offline
46 if [ "x$D" != "x" ]; then
47 exit 1
48 fi
49
50 grep haldaemon /etc/group || addgroup haldaemon
51 grep haldaemon /etc/passwd || adduser --disabled-password --system --home /var/run/hald --no-create-home haldaemon --ingroup haldaemon -g HAL
52
53 # add volatile after new user/grp are created
54 echo "d root root 0700 /var/run/hald none" > /etc/default/volatiles/99_hal
55 echo "d haldaemon haldaemon 0755 /var/cache/hald none" >> /etc/default/volatiles/99_hal
56 /etc/init.d/populate-volatile.sh update
57
58 DBUSPID=`pidof dbus-daemon`
59
60 if [ "x$DBUSPID" != "x" ]; then
61 /etc/init.d/dbus-1 force-reload
62 fi
63}
64
65pkg_postrm_hal () {
66 deluser haldaemon || true
67 delgroup haldaemon || true
68}
69
70FILES_${PN} = "${sysconfdir} \
71 ${bindir}/lshal \
72 ${bindir}/hal-find-by-capability \
73 ${bindir}/hal-find-by-property \
74 ${bindir}/hal-device \
75 ${bindir}/hal-get-property \
76 ${bindir}/hal-set-property \
77 ${bindir}/hal-lock \
78 ${bindir}/hal-is-caller-locked-out \
79 ${sbindir} \
80 ${libdir}/libhal.so.* \
81 ${libdir}/libhal-storage.so.* \
82 ${libdir}/hal \
83 ${libexecdir} \
84 ${datadir}/hal/fdi \
85 ${datadir}/hal/scripts"
diff --git a/meta/recipes-support/hal/hal/configure_fix.patch b/meta/recipes-support/hal/hal/configure_fix.patch
new file mode 100644
index 0000000000..e8417040de
--- /dev/null
+++ b/meta/recipes-support/hal/hal/configure_fix.patch
@@ -0,0 +1,60 @@
1The AC_LANG sections upset libtool 2.2.2, as do .cpp files without a call
2to AC_PROG_CXX. Easiest solution is to patch this out for now.
3
4RP - 14/4/08
5
6Index: hal-0.5.9.1/configure.in
7===================================================================
8--- hal-0.5.9.1.orig/configure.in 2008-04-14 22:41:49.000000000 +0100
9+++ hal-0.5.9.1/configure.in 2008-04-14 22:43:13.000000000 +0100
10@@ -345,32 +345,8 @@
11 fi
12
13 dnl Check for libsmbios
14-AC_LANG_PUSH([C++])
15-AC_CHECK_LIB(smbios, SMBIOSFreeMemory, LIB_SMBIOS=yes , LIB_SMBIOS=no )
16-AC_LANG_POP([C++])
17-if test "$LIB_SMBIOS" = "yes" ; then
18- AC_MSG_CHECKING([for libsmbios >= 0.13.4])
19- AC_TRY_RUN(
20- #include <smbios/version.h>
21- int main ()
22- {
23- int major ;
24- int minor ;
25- int micro ;
26-
27- if ( sscanf( LIBSMBIOS_RELEASE_VERSION , "%d.%d.%d", &major, &minor, &micro ) == 3 ) {
28- if ((major == 0 && minor == 13 && micro >= 4) ||
29- (major >= 0 && minor > 13)) {
30- return 0;
31- }
32- }
33- return 1;
34- } , [USE_SMBIOS=yes; AC_MSG_RESULT(yes); AM_CONDITIONAL(HAVE_SMBIOS,true)],
35- [USE_SMBIOS=no; AC_MSG_RESULT(failed); AM_CONDITIONAL(HAVE_SMBIOS,false)])
36-else
37- USE_SMBIOS=no
38- AM_CONDITIONAL(HAVE_SMBIOS,false)
39-fi
40+USE_SMBIOS=no
41+AM_CONDITIONAL(HAVE_SMBIOS,false)
42
43 AC_ARG_WITH([libpci],
44 [AS_HELP_STRING([--without-libpci],
45Index: hal-0.5.9.1/hald/linux/addons/Makefile.am
46===================================================================
47--- hal-0.5.9.1.orig/hald/linux/addons/Makefile.am 2008-04-14 22:45:18.000000000 +0100
48+++ hal-0.5.9.1/hald/linux/addons/Makefile.am 2008-04-14 22:46:05.000000000 +0100
49@@ -60,11 +60,6 @@
50 hald_addon_usb_csr_LDADD = $(top_builddir)/libhal/libhal.la -lusb @GLIB_LIBS@
51 endif
52
53-if BUILD_DELL
54-libexec_PROGRAMS += hald-addon-dell-backlight
55-hald_addon_dell_backlight_SOURCES = addon-dell-backlight.cpp ../../logger.c
56-hald_addon_dell_backlight_LDADD = $(top_builddir)/libhal/libhal.la -lsmbios @GLIB_LIBS@
57-endif
58 endif
59
60 hald_addon_acpi_SOURCES = addon-acpi.c ../../logger.c ../../util_helper.c
diff --git a/meta/recipes-support/hal/hal_0.5.14.bb b/meta/recipes-support/hal/hal_0.5.14.bb
new file mode 100644
index 0000000000..a12be729cb
--- /dev/null
+++ b/meta/recipes-support/hal/hal_0.5.14.bb
@@ -0,0 +1,14 @@
1require hal.inc
2
3PR = "r2"
4
5EXTRA_OECONF += "--with-linux-input-header=${STAGING_INCDIR}/linux/input.h"
6EXTRA_OEMAKE += "-e 'udevrulesdir=$(sysconfdir)/udev/rules.d'"
7
8PACKAGES =+ "libhal libhal-storage"
9
10FILES_libhal = "${libdir}/libhal.so.*"
11FILES_libhal-storage = "${libdir}/libhal-storage.so.*"
12
13FILES_${PN} =+ "${bindir}/hal-disable-polling \
14 ${bindir}/hal-setup-keymap"
diff --git a/meta/recipes-support/hal/hal_git.bb b/meta/recipes-support/hal/hal_git.bb
new file mode 100644
index 0000000000..baed472375
--- /dev/null
+++ b/meta/recipes-support/hal/hal_git.bb
@@ -0,0 +1,12 @@
1require hal.inc
2
3PV = "0.5.9.1+git${SRCDATE}"
4PR = "r7"
5
6SRC_URI = "git://anongit.freedesktop.org/hal/;protocol=git \
7 file://20hal \
8 file://99_hal"
9
10S = "${WORKDIR}/git"
11
12DEFAULT_PREFERENCE = "-1"