summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven J Newbury <steve@snewbury.org.uk>2009-05-17 11:18:06 +0100
committerSteven J Newbury <steve@snewbury.org.uk>2009-05-17 11:18:06 +0100
commit9436d8cfddf6d2f7681ce9ce8489ef904ee6d6dd (patch)
tree63b765a30b8f277cfe70dd4a2759dbf8779ae601
parentFix illegal inherits (diff)
downloadmultilib-portage-9436d8cfddf6d2f7681ce9ce8489ef904ee6d6dd.tar.gz
multilib-portage-9436d8cfddf6d2f7681ce9ce8489ef904ee6d6dd.tar.bz2
multilib-portage-9436d8cfddf6d2f7681ce9ce8489ef904ee6d6dd.zip
Synchronise with portage
-rw-r--r--dev-java/gcj-jdk/gcj-jdk-4.4.0.ebuild183
-rw-r--r--dev-libs/icu/icu-4.2.ebuild71
-rw-r--r--gnome-base/gnome-keyring/Manifest2
-rw-r--r--gnome-base/gnome-keyring/files/gnome-keyring-2.22.3-pkg-libtasn1.patch32
-rw-r--r--gnome-base/gnome-keyring/gnome-keyring-2.26.1-r1.ebuild64
-rw-r--r--media-libs/gst-plugins-base/Manifest2
-rw-r--r--media-libs/gst-plugins-base/gst-plugins-base-0.10.23.ebuild48
-rw-r--r--media-libs/gstreamer/Manifest2
-rw-r--r--media-libs/gstreamer/gstreamer-0.10.23.ebuild52
-rw-r--r--net-wireless/bluez/Manifest4
-rw-r--r--net-wireless/bluez/bluez-4.39.ebuild (renamed from net-wireless/bluez/bluez-4.37.ebuild)2
-rw-r--r--sys-apps/hal/Manifest62
-rwxr-xr-xsys-apps/hal/files/0.5-hald.rc28
-rw-r--r--sys-apps/hal/files/0.5.10-hald.rc4
-rw-r--r--sys-apps/hal/files/0.5.9-hald.conf10
-rw-r--r--sys-apps/hal/files/0.5.9-hald.rc39
-rw-r--r--sys-apps/hal/files/0.5.9/01_luks_mount_fix.patch67
-rw-r--r--sys-apps/hal/files/0.5.9/02_acpi_repeated_property_change.patch39
-rw-r--r--sys-apps/hal/files/0.5.9/03_crasher_fix_fail_to_return_value.patch19
-rw-r--r--sys-apps/hal/files/0.5.9/04_cache_regen_return_fix.patch18
-rw-r--r--sys-apps/hal/files/0.5.9/05_freebsd_partutil_make_fix.patch25
-rw-r--r--sys-apps/hal/files/0.5.9/06_freebsd_backend_fix.patch67
-rw-r--r--sys-apps/hal/files/0.5.9/07_malloc_h_for_stdlib_h.patch51
-rw-r--r--sys-apps/hal/files/0.5.9/08_contains_not_fdi_directive.patch86
-rw-r--r--sys-apps/hal/files/0.5.9/09_hald_addon_keyboard_start_one.patch34
-rw-r--r--sys-apps/hal/files/0.5.9/10_freebsd_storage_reprobe_fix.patch61
-rw-r--r--sys-apps/hal/files/0.5.9/11_hal_fix_segfault_probe_volume.patch69
-rw-r--r--sys-apps/hal/files/0.5.9/12_hal_fix-vol_label_probe_volume.patch74
-rw-r--r--sys-apps/hal/files/0.5.9/13_detect_newer_macbooks.patch41
-rw-r--r--sys-apps/hal/files/0.5.9/14_ntfs_allows_utf8.patch12
-rw-r--r--sys-apps/hal/files/0.5.9/15_spec_fdi_matching.patch200
-rw-r--r--sys-apps/hal/files/0.5.9/16_dev_root_is_mounted.patch140
-rw-r--r--sys-apps/hal/files/0.5.9/17_autoconf_cflag_cleanup.patch155
-rw-r--r--sys-apps/hal/files/0.5.9/18_hal_fix_info.category_for_laptop_panel_v2.patch70
-rw-r--r--sys-apps/hal/files/0.5.9/19_hald_runner_catch_dbus_disconnect.patch30
-rw-r--r--sys-apps/hal/files/0.5.9/20_firewire_prober_ioctls_fix.patch31
-rw-r--r--sys-apps/hal/files/0.5.9/21_pm-suspend_correct_options.patch25
-rw-r--r--sys-apps/hal/files/0.5.9/22_pm-hibernate_correct_options.patch25
-rw-r--r--sys-apps/hal/files/0.5.9/23_runner_64bit_values.patch34
-rw-r--r--sys-apps/hal/files/0.5.9/24_libparted_1_8_7.patch39
-rw-r--r--sys-apps/hal/files/0.5.9/95_gentoo_man_page.patch507
-rw-r--r--sys-apps/hal/files/0.5.9/96_plugdev_allow_send.patch42
-rw-r--r--sys-apps/hal/files/0.5.9/97_ignore_fixed_drives.patch38
-rw-r--r--sys-apps/hal/files/0.5.9/98_hald_cache_test_path.patch17
-rw-r--r--sys-apps/hal/files/0.5.9/99_sun_disklabel_ignore.patch20
-rw-r--r--sys-apps/hal/files/0.5.9/series28
-rw-r--r--sys-apps/hal/files/96_plugdev_allow_send.patch42
-rw-r--r--sys-apps/hal/files/hal-0.5.10-autotools.patch14
-rw-r--r--sys-apps/hal/files/hal-0.5.11-ppc64.patch35
-rw-r--r--sys-apps/hal/files/hal-0.5.7-hald-scripts.patch211
-rw-r--r--sys-apps/hal/files/hal-0.5.7-hibernate.patch12
-rw-r--r--sys-apps/hal/files/hal-0.5.7-ignored-volumes.patch33
-rw-r--r--sys-apps/hal/files/hal-0.5.7-part-table.patch13
-rw-r--r--sys-apps/hal/files/hal-0.5.7-plugdev-allow-send.patch17
-rw-r--r--sys-apps/hal/files/hal-0.5.7-pmu-fix.patch28
-rw-r--r--sys-apps/hal/files/hal-0.5.7-rescan-on-resume.patch16
-rw-r--r--sys-apps/hal/files/hal-0.5.7-sony-brightness.patch12
-rw-r--r--sys-apps/hal/files/hal-0.5.7-unclean-unmount-r1.patch9
-rw-r--r--sys-apps/hal/files/hal-0.5.7.1-autofs-subfs.patch94
-rw-r--r--sys-apps/hal/files/hal-0.5.7.1-ctype-fix.patch11
-rw-r--r--sys-apps/hal/files/hal-0.5.7.1-dbus-close.patch24
-rw-r--r--sys-apps/hal/files/hal-0.5.7.1-fix-dbus.patch184
-rw-r--r--sys-apps/hal/files/hal-0.5.7.1-floppies-fix.patch11
-rw-r--r--sys-apps/hal/files/hal-0.5.7.1-hald-scripts.patch217
-rw-r--r--sys-apps/hal/files/hal-0.5.7.1-hibernate-fix.patch12
-rw-r--r--sys-apps/hal/files/hal-0.5.7.1-ignored-volumes.patch65
-rw-r--r--sys-apps/hal/files/hal-0.5.7.1-indirection-fix.patch117
-rw-r--r--sys-apps/hal/files/hal-0.5.7.1-ipod-nano.patch49
-rw-r--r--sys-apps/hal/files/hal-0.5.7.1-rescan-on-resume.patch16
-rw-r--r--sys-apps/hal/files/hal-0.5.7.1-sr-driver.patch13
-rw-r--r--sys-apps/hal/files/hal-0.5.9-hide-recovery-partitions.patch14
-rw-r--r--sys-apps/hal/hal-0.5.12_rc1-r4.ebuild306
72 files changed, 4238 insertions, 6 deletions
diff --git a/dev-java/gcj-jdk/gcj-jdk-4.4.0.ebuild b/dev-java/gcj-jdk/gcj-jdk-4.4.0.ebuild
new file mode 100644
index 000000000..ba59e0077
--- /dev/null
+++ b/dev-java/gcj-jdk/gcj-jdk-4.4.0.ebuild
@@ -0,0 +1,183 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="2"
+
+inherit java-vm-2 multilib versionator multilib-native
+
+DESCRIPTION="Java wrappers around GCJ"
+HOMEPAGE="http://www.gentoo.org/"
+SRC_URI=""
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~arm"
+IUSE="nsplugin multislot"
+
+# SLOT logic from toolchain.eclass
+CTARGET=${CTARGET:-${CHOST}}
+GCC_BRANCH_VER=$(get_version_component_range 1-2 ${PV})
+GCC_CONFIG_VER=${GCC_CONFIG_VER:-$(replace_version_separator 3 '-' ${PV})}
+
+if use multislot ; then
+ SLOT="${CTARGET}-${GCC_CONFIG_VER}"
+else
+ SLOT="${GCC_BRANCH_VER}"
+fi
+
+RDEPEND="~sys-devel/gcc-${PV}[gcj,nsplugin?]
+ >=dev-java/eclipse-ecj-3.2.1
+ >=dev-java/java-config-2
+ nsplugin? ( || (
+ www-client/mozilla-firefox
+ net-libs/xulrunner
+ www-client/seamonkey
+ ) )"
+
+DEPEND="${RDEPEND}"
+PDEPEND="dev-java/gjdoc"
+
+JAVA_PROVIDE="jdbc-stdext jdbc2-stdext gnu-jaxp"
+
+pkg_setup() {
+ if use nsplugin; then
+ if ! ( built_with_use =sys-devel/gcc-${PV} gtk && built_with_use =sys-devel/gcc-${PV} nsplugin ); then
+ eerror "Using gcj as a Mozilla plugin requires that gcc was compiled";
+ eerror "with the nsplugin AND gtk USE flags.";
+ eerror "Please rebuild sys-devel/gcc-${PV} with USE=\"nsplugin gtk\"";
+ die "Rebuild sys-devel/gcc with nsplugin support"
+ else
+ einfo "Enabling gcjwebplugin"
+ fi
+ fi
+ java-vm-2_pkg_setup
+}
+
+src_unpack() {
+ mkdir -p ${S}
+}
+
+multilib-native_src_install_internal() {
+ # jre lib paths ...
+ local gccbin=$(gcc-config -B ${CTARGET}-${GCC_CONFIG_VER})
+ local libgcjpath=$(gcc-config -L ${CTARGET}-${GCC_CONFIG_VER})
+ local abi_suffix=""
+
+ [[ -x "${gccbin}"/gcj ]] || die "gcj missing for gcc-${PV}"
+
+ local libgcj_soversion=$(ls -l $(${gccbin}/gcj \
+ -print-file-name=libgcj.so) | sed -r 's#.*\.so\.([0-9]*).*$#\1#')
+ local GCJ_JAVA_HOME=/usr/"$(get_libdir)"/"${PN}"-"${SLOT}"-"${libgcj_soversion}"
+ local CP_NATIVE_TOOLS=/usr/"$(get_libdir)"/gcj-"${PV/_/-}"-"${libgcj_soversion}"
+
+ local gcj_java_version=$(LD_LIBRARY_PATH=${libgcjpath} \
+ ${gccbin}/gij -version|grep "java version" \
+ | sed -r 's#java version \"(.*)\"#\1#')
+
+ # links
+ dodir "${GCJ_JAVA_HOME}"/bin
+ dosym "${gccbin}"/gij "${GCJ_JAVA_HOME}"/bin/gij
+ dodir "${GCJ_JAVA_HOME}"/jre/bin
+ dosym "${GCJ_JAVA_HOME}"/bin/java "${GCJ_JAVA_HOME}"/jre/bin/java
+ dosym "${gccbin}"/gjar "${GCJ_JAVA_HOME}"/bin/jar
+ dosym "${gccbin}"/grmic "${GCJ_JAVA_HOME}"/bin/rmic
+ dosym "${gccbin}"/gjavah "${GCJ_JAVA_HOME}"/bin/javah
+ dosym "${gccbin}"/jcf-dump "${GCJ_JAVA_HOME}"/bin/javap
+ dosym "${gccbin}"/gappletviewer "${GCJ_JAVA_HOME}"/bin/appletviewer
+ dosym "${gccbin}"/gjarsigner "${GCJ_JAVA_HOME}"/bin/jarsigner
+ dosym "${gccbin}"/grmiregistry "${GCJ_JAVA_HOME}"/bin/rmiregistry
+ dosym "${gccbin}"/grmiregistry "${GCJ_JAVA_HOME}"/jre/bin/rmiregistry
+ dosym "${gccbin}"/gkeytool "${GCJ_JAVA_HOME}"/bin/keytool
+ dosym "${gccbin}"/gkeytool "${GCJ_JAVA_HOME}"/jre/bin/keytool
+ dodir "${GCJ_JAVA_HOME}"/jre/lib/"${ABI}"/client
+
+ for nativelibs in $(find ${CP_NATIVE_TOOLS} -name *.so*|grep -v -e 'libjvm.*'); do
+ dosym ${nativelibs} "${GCJ_JAVA_HOME}"/jre/lib/${ABI}/
+ done
+ dosym ${CP_NATIVE_TOOLS}/libjvm.so "${GCJ_JAVA_HOME}"/jre/lib/"${ABI}"/client/libjvm.so
+
+ dosym /usr/share/gcc-data/"${CTARGET}"/"${GCC_CONFIG_VER}"/java/libgcj-"${GCC_CONFIG_VER}".jar "${GCJ_JAVA_HOME}"/jre/lib/rt.jar
+ dodir "${GCJ_JAVA_HOME}"/lib
+ dosym /usr/share/gcc-data/"${CTARGET}"/"${GCC_CONFIG_VER}"/java/libgcj-tools-"${GCC_CONFIG_VER}".jar "${GCJ_JAVA_HOME}"/lib/tools.jar
+
+ # link libgcj.so into GCJ_JAVA_HOME so that linking works for each
+ # SLOT + ABI version (used for rpath in java-utils-2.eclass)
+ dodir "${GCJ_JAVA_HOME}"/lib/${ABI}
+ if is_final_abi; then
+ for gcjlibs in $(find $(echo ${libgcjpath}|sed 's#:# #g') -regex '.*\/${LIBDIR/lib}\/.*' -o \( -name libgcj*.so* -print \)); do
+ dosym ${gcjlibs} "${GCJ_JAVA_HOME}"/lib/${ABI}/
+ done
+ abi_suffix=""
+ else
+ for gcjlibs in $(find $(echo ${libgcjpath}|sed 's#:# #g') ! -regex '.*\/${LIBDIR/lib}\/.*' -o \( -name libgcj*.so* -print \)); do
+ dosym ${gcjlibs} "${GCJ_JAVA_HOME}"/lib/${ABI}/
+ done
+ abi_suffix="-${ABI}"
+ fi
+ # the /usr/bin/ecj symlink is managed by eselect-ecj
+ dosym /usr/bin/ecj "${GCJ_JAVA_HOME}"/bin/javac;
+
+ # use gjdoc for javadoc
+ dosym /usr/bin/gjdoc "${GCJ_JAVA_HOME}"/bin/javadoc
+
+ mkdir -p "${S}"
+
+ JAVA_PKG_CLASSMAP="/usr/share/java/gcj/${ABI}/${libgcj_soversion}/classmap.db"
+
+ # java wrapper
+ sed -e "s:@HOME@:${GCJ_JAVA_HOME}:g" \
+ -e "s:@JAVA_PKG_CLASSMAP@:${JAVA_PKG_CLASSMAP}:g" \
+ < "${FILESDIR}"/java.in \
+ > "${S}"/java \
+ || die "java wrapper failed"
+
+ # permissions
+ chmod 755 "${S}"/java
+
+ # rebuild-classmap-db script
+ sed -e "s:@JAVA_PKG_CLASSMAP@:${JAVA_PKG_CLASSMAP}:g" \
+ < "${FILESDIR}"/rebuild-classmap-db.in \
+ > "${S}"/rebuild-classmap-db${abi_suffix} \
+ || die "rebuild-classmap-db sed failed"
+
+ # permissions
+ chmod 755 "${S}"/rebuild-classmap-db${abi_suffix}
+
+ # environment file
+ sed -r -e "s#@GCJ_JAVA_HOME@#${GCJ_JAVA_HOME}#g" \
+ -e "s#@GCJJAVAVERSION@#${gcj_java_version}#g" \
+ -e "s#@LIBGCJPATH@#${libgcjpath}#g" \
+ < ${FILESDIR}/gcj-jdk.env.in \
+ > ${S}/gcj-jdk${abi_suffix}-${PV}.env || die gcj-jdk${abi_suffix}-"${PV}".env: sed failed
+
+ VMHANDLE=${PN}${abi_suffix}-${SLOT}
+
+ set_java_env "${S}"/gcj-jdk${abi_suffix}-"${PV}".env
+
+ # copy scripts
+ exeinto "${GCJ_JAVA_HOME}"/bin/
+ doexe "${S}"/java
+ doexe "${S}"/rebuild-classmap-db${abi_suffix}
+
+ if use nsplugin; then
+ install_mozilla_plugin "${GCJ_JAVA_HOME}/jre/lib/${ABI}/libgcjwebplugin.so"
+ fi
+}
+
+pkg_postinst() {
+
+ # Set as default VM if none exists
+ java-vm-2_pkg_postinst
+
+ ewarn "Check if gcj-jdk is set as Java SDK"
+ ewarn " # java-config -L"
+ ewarn
+ ewarn "Set gcj-jdk as Java SDK"
+ ewarn " # java-config -S ${PN}-${SLOT}"
+ ewarn
+ ewarn "Edit /etc/java-config-2/build/jdk.conf"
+ ewarn " *=${PN}-${SLOT}"
+ ewarn
+ ewarn "Install GCJ's javadoc"
+ ewarn " # emerge gjdoc"
+}
diff --git a/dev-libs/icu/icu-4.2.ebuild b/dev-libs/icu/icu-4.2.ebuild
new file mode 100644
index 000000000..9070295f7
--- /dev/null
+++ b/dev-libs/icu/icu-4.2.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/icu/icu-4.2.ebuild,v 1.1 2009/05/12 15:22:41 arfrever Exp $
+
+EAPI="2"
+
+inherit eutils versionator multilib-native
+
+DESCRIPTION="International Components for Unicode"
+HOMEPAGE="http://www.icu-project.org/ http://ibm.com/software/globalization/icu/"
+
+BASEURI="http://download.icu-project.org/files/${PN}4c/${PV}"
+DOCS_PV="$(get_version_component_range 1-2)"
+DOCS_BASEURI="http://download.icu-project.org/files/${PN}4c/${DOCS_PV}"
+DOCS_PV="${DOCS_PV/./_}"
+SRCPKG="${PN}4c-${PV//./_}-src.tgz"
+APIDOCS="${PN}4c-${DOCS_PV}-docs.zip"
+
+SRC_URI="${BASEURI}/${SRCPKG}
+ doc? ( ${DOCS_BASEURI}/${APIDOCS} )"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="debug doc examples"
+
+DEPEND="doc? ( app-arch/unzip )"
+RDEPEND=""
+
+S="${WORKDIR}/${PN}/source"
+
+src_unpack() {
+ unpack ${SRCPKG}
+ if use doc; then
+ mkdir apidocs
+ pushd apidocs > /dev/null
+ unpack ${APIDOCS}
+ popd > /dev/null
+ fi
+}
+
+multilib-native_src_prepare_internal() {
+ # Do not hardcode used CFLAGS, LDFLAGS etc. into icu-config
+ # Bug 202059
+ # http://bugs.icu-project.org/trac/ticket/6102
+ for x in ARFLAGS CFLAGS CPPFLAGS CXXFLAGS FFLAGS LDFLAGS; do
+ sed -i -e "/^${x} =.*/s:@${x}@::" "config/Makefile.inc.in" || die "sed failed"
+ done
+}
+
+multilib-native_src_configure_internal() {
+ econf \
+ --enable-static \
+ $(use_enable debug) \
+ $(use_enable examples samples)
+}
+
+src_test() {
+ emake check || die "emake check failed"
+}
+
+multilib-native_src_install_internal() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ dohtml ../readme.html
+ dodoc ../unicode-license.txt
+ if use doc; then
+ insinto /usr/share/doc/${PF}/html/apidocs
+ doins -r "${WORKDIR}"/apidocs/*
+ fi
+}
diff --git a/gnome-base/gnome-keyring/Manifest b/gnome-base/gnome-keyring/Manifest
index 88d614a8f..fb92a79bb 100644
--- a/gnome-base/gnome-keyring/Manifest
+++ b/gnome-base/gnome-keyring/Manifest
@@ -1,7 +1,9 @@
+AUX gnome-keyring-2.22.3-pkg-libtasn1.patch 1079 RMD160 8ddeb815ef69fd3a32b256fc144883c5ab9ca6f8 SHA1 84d93848fac4141aea4ddd5f221b5a3431a6774f SHA256 14332fdb39ab870bab747e148d2098f339758af5105504b9fc83c0582394303c
AUX gnome-keyring-2.22.3-warnings.patch 780 RMD160 3f3e04754189b67720f2f1e7eebb5e24b9612cd2 SHA1 95077ed5efcc493e35b64b943548c569eef1cfff SHA256 03206a46f86675ed1d2773740a23b02eaa1221c8dbbd3caea0a30a42c82a7d82
DIST gnome-keyring-2.22.3.tar.bz2 894308 RMD160 551f4a4d734e0196522be9276ae7e76110a96556 SHA1 0f52095590a684920cc683d1985ac66263702114 SHA256 1e14eed00d386763352896e540929760264885e1296ac11cfb8ca1c08dcea7f6
DIST gnome-keyring-2.24.1.tar.bz2 1125993 RMD160 17c6701ef7b35902780b6c72b79a3f0eaafe2378 SHA1 93e92e01daecd85b1c0ae9dda09d5cc808989642 SHA256 3c9eb7f45dd0026340635b9e1ee18c36a47541610aa5a7ef604ca645aa4763f9
DIST gnome-keyring-2.26.1.tar.bz2 2738687 RMD160 0975197ae8e58a8d98a2ff11c062ec6c9cf74a79 SHA1 3ff24987392b3f51109709b2c020af3557155ef8 SHA256 47a79a7963652c19d9f566289fdb49ca286bfb1bef32b7e1032eb36c49bf7926
EBUILD gnome-keyring-2.22.3-r1.ebuild 1400 RMD160 0b79a30d5ed1ae5b78d22f86ca8d49547a689529 SHA1 c550eeea0b37cc4e964b87d645bc7a49cddfcb45 SHA256 786b225f4a79abf9d046c324d77bc8f75c05051e4087954788ed8e824b43df5a
EBUILD gnome-keyring-2.24.1.ebuild 1379 RMD160 4f556a773bc9a87e732ff7356b2e42c35097fc5f SHA1 828dab19d8634a63d3963d094aea947b2f48443c SHA256 209571fc866720095a69d36a00530bc2b57bc7523fc1a6d2ae28557ac0a7baa9
+EBUILD gnome-keyring-2.26.1-r1.ebuild 1779 RMD160 0121fa6587af7e9c94d7244857e8373923e1766c SHA1 4bb497bcb6be100ea27ff5848dad72b92728c05b SHA256 04aa60e62faa9dd01d2dd08f3ebc53e80f86b4dae3e3e1d3211db9d9f7dc20e9
EBUILD gnome-keyring-2.26.1.ebuild 1582 RMD160 f7bd799050906405c96d8e59c22072db35afa391 SHA1 11ef9374c6e6d66cbfa6cc63bb36e2473d070b7d SHA256 96b1fc55cfc1afa56f6989c2296c124222f68ef38284e74aa76eff0f77ad1802
diff --git a/gnome-base/gnome-keyring/files/gnome-keyring-2.22.3-pkg-libtasn1.patch b/gnome-base/gnome-keyring/files/gnome-keyring-2.22.3-pkg-libtasn1.patch
new file mode 100644
index 000000000..5da4e9201
--- /dev/null
+++ b/gnome-base/gnome-keyring/files/gnome-keyring-2.22.3-pkg-libtasn1.patch
@@ -0,0 +1,32 @@
+# Allow configure to succeed with recent versions of libtasn1
+# Gentoo: https://bugs.gentoo.org/show_bug.cgi?id=266554
+# Gnome: https://bugzilla.gnome.org/show_bug.cgi?id=560869
+--- a/configure.in 2008-06-30 17:29:13.000000000 +0200
++++ b/configure.in 2009-04-18 12:16:56.000000000 +0200
+@@ -381,17 +381,19 @@
+
+ GKR_LIBTASN1_VERSION=0.3.4
+
+-AM_PATH_LIBTASN1($GKR_LIBTASN1_VERSION,,
+- AC_MSG_ERROR([[
+-***
+-*** LibtASN1 ${GKR_LIBTASN1_VERSION} was not found.
+-]]))
+-libtasn=yes
+-AC_DEFINE_UNQUOTED(GKR_LIBGCRYPT_VERSION, "$GKR_LIBTASN1_VERSION", [Version of libtasn1 we expect])
++PKG_CHECK_MODULES(LIBTASN1,libtasn1 >= 1.0)
++AC_SUBST([LIBTASN1_LIBS])
++AC_SUBST([LIBTASN1_CFLAGS])
+
+ DAEMON_CFLAGS="$DAEMON_CFLAGS $LIBTASN1_CFLAGS"
+ DAEMON_LIBS="$DAEMON_LIBS $LIBTASN1_LIBS"
+
++AC_PATH_PROG(ASN1PARSER, asn1Parser, no)
++if test "$ASN1PARSER" = "no" ; then
++ AC_MSG_ERROR(asn1Parser tool is not installed)
++fi
++
++
+ dnl ==========================================================================
+
+ dnl Turn on the additional warnings last, so -Werror doesn't affect other tests.
diff --git a/gnome-base/gnome-keyring/gnome-keyring-2.26.1-r1.ebuild b/gnome-base/gnome-keyring/gnome-keyring-2.26.1-r1.ebuild
new file mode 100644
index 000000000..3495c8b24
--- /dev/null
+++ b/gnome-base/gnome-keyring/gnome-keyring-2.26.1-r1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-keyring/gnome-keyring-2.26.1-r1.ebuild,v 1.1 2009/05/14 07:39:36 nirbheek Exp $
+
+EAPI="2"
+
+inherit gnome2 pam virtualx multilib-native
+
+DESCRIPTION="Password and keyring managing daemon"
+HOMEPAGE="http://www.gnome.org/"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="debug doc hal pam test"
+# USE=valgrind is probably not a good idea for the tree
+
+RDEPEND=">=dev-libs/glib-2.16[lib32?]
+ >=x11-libs/gtk+-2.6[lib32?]
+ gnome-base/gconf[lib32?]
+ >=sys-apps/dbus-1.0[lib32?]
+ hal? ( >=sys-apps/hal-0.5.7[lib32?] )
+ pam? ( virtual/pam )
+ >=dev-libs/libgcrypt-1.2.2[lib32?]
+ >=dev-libs/libtasn1-1[lib32?]"
+# valgrind? ( dev-util/valgrind )"
+DEPEND="${RDEPEND}
+ sys-devel/gettext[lib32?]
+ >=dev-util/intltool-0.35
+ >=dev-util/pkgconfig-0.9
+ doc? ( >=dev-util/gtk-doc-1.9 )"
+
+DOCS="AUTHORS ChangeLog NEWS README TODO"
+
+pkg_setup() {
+ G2CONF="${G2CONF}
+ $(use_enable debug)
+ $(use_enable hal)
+ $(use_enable test tests)
+ $(use_enable pam)
+ $(use_with pam pam-dir $(getpam_mod_dir))
+ --with-root-certs=/usr/share/ca-certificates/
+ --enable-acl-prompts
+ --enable-ssh-agent"
+# $(use_enable valgrind)
+}
+
+src_prepare() {
+ gnome2_src_prepare
+
+ # Remove silly CFLAGS
+ sed 's:CFLAGS="$CFLAGS -Werror:CFLAGS="$CFLAGS:' \
+ -i configure.in configure || die "sed failed"
+
+ # Fix intltoolize broken file, see upstream #577133
+ sed "s:'\^\$\$lang\$\$':\^\$\$lang\$\$:g" -i po/Makefile.in.in || die "sed failed"
+}
+
+src_test() {
+ unset DBUS_SESSION_BUS_ADDRESS
+ Xemake check || die "emake check failed!"
+
+ Xemake -C tests run || die "running tests failed!"
+}
diff --git a/media-libs/gst-plugins-base/Manifest b/media-libs/gst-plugins-base/Manifest
index 2daa1e465..4a15e93cd 100644
--- a/media-libs/gst-plugins-base/Manifest
+++ b/media-libs/gst-plugins-base/Manifest
@@ -3,9 +3,11 @@ AUX gst-plugins-base-0.10.22-CVE-2009-0586.patch 2813 RMD160 fd1b250c40020077679
DIST gst-plugins-base-0.10.20.tar.bz2 1986182 RMD160 2283fa2743a18630c3dab5a77d2b4eae9253eb97 SHA1 e887f071eda3128249657805dc5a42b2ad2d3bef SHA256 aa3d5ce29232ee5b24b6c032194ac1fc757309ea50ac850c0db46e45ab0a78ff
DIST gst-plugins-base-0.10.21.tar.bz2 1982446 RMD160 4fa9056c8cc5d21db30074596831ffc14f6b671b SHA1 ae83b3306f52aa3affd014dade30c6cd5c2baa66 SHA256 673f4a45a0f3aa99606a58097bde02d09ad51d7b2e702f0d68eeb6db21d47e93
DIST gst-plugins-base-0.10.22.tar.bz2 2118085 RMD160 013de77422d6e89b64cf55ff7299b0ff1e38ef8a SHA1 8e6a894858f5412234ce1591bbb773102c150cb7 SHA256 184c5aed03ebfe38a276fc03cb7d8685d9a6da5a48bf6a0565c83e11a29cd5f9
+DIST gst-plugins-base-0.10.23.tar.bz2 2126280 RMD160 3b08bdeeb5237fb0e6e918ac5d6a97064fa8fe98 SHA1 f0b66ddca22187c8011b37a5d806c7dc7e68b7f1 SHA256 1c11d98eb9a1b1bc54becf465e74c2aa4019bb57a31dd70686269af6a9b9e93b
EBUILD gst-plugins-base-0.10.20.ebuild 1421 RMD160 86ae8e6c28f1f4f8d0bb3931b1c4ede95666de02 SHA1 b610c1dacad3d0a20164bd19e13a004667801a81 SHA256 4d3ede60578176d32fb896db4226bbda89dcec0ba26c890e830b3ed866872d7b
EBUILD gst-plugins-base-0.10.21-r1.ebuild 3267 RMD160 912454a255847f9c3e2c473fbce0141632880170 SHA1 e49a041812ecc530db1cdc4cded2098d69925f06 SHA256 e46ee7782bc19c56525861bcd097454f3a76415e45be043dd3c4d6a30c4b80b7
EBUILD gst-plugins-base-0.10.21.ebuild 1526 RMD160 0b926c33ab942fd4ef7f9e462df85f7983c19888 SHA1 11a02ba229f8ea6540c386524c1a6f55e04f05f1 SHA256 f03a2793a9e9be5e46e2ffeb962b4a3664c019f6ee534bb95f6b85328c95720f
EBUILD gst-plugins-base-0.10.22.ebuild 1324 RMD160 05a14671d370597363f7acb9835d2bcddfa86cc3 SHA1 30959bdc5e2c5c129691cd3bf0af80a57bc5e170 SHA256 5b2898c9915724d61e4c14097a521e85f74798eeb4f3eb7bea24c46a40fc6b5c
+EBUILD gst-plugins-base-0.10.23.ebuild 1291 RMD160 7cb1f5af56431ad0c7430e6322935bb28e68cee3 SHA1 b8dbf87dbc459bf57849c041b95148bf946bf888 SHA256 45f9dbb22ca1c0e3f941a50e27d03f722dd90c079381060c8d36cfed78a11257
MISC ChangeLog 12521 RMD160 ce0d114f9189ccca31f70b6e2c9b4b49729498a3 SHA1 512976921d9a4f28aad7aba28490a8f931b0bf70 SHA256 114bfa92f944cc580a571d7fa6d0f04fd833d9bd475e47a808fe1ae521854dd7
MISC metadata.xml 281 RMD160 07e04e9ed3a829881972155cac9ebb38fdd5d70c SHA1 d5e60b9979d4b2dc4ffd04990a13d4a2fb142a51 SHA256 a66d0d74b7a3b46fb7485773ebc5016917f90e1f046b26def304b18133856b29
diff --git a/media-libs/gst-plugins-base/gst-plugins-base-0.10.23.ebuild b/media-libs/gst-plugins-base/gst-plugins-base-0.10.23.ebuild
new file mode 100644
index 000000000..b8c7b6960
--- /dev/null
+++ b/media-libs/gst-plugins-base/gst-plugins-base-0.10.23.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/gst-plugins-base/gst-plugins-base-0.10.23.ebuild,v 1.1 2009/05/11 03:15:30 tester Exp $
+
+EAPI=2
+
+# order is important, gnome2 after gst-plugins
+inherit gst-plugins-base gst-plugins10 gnome2 flag-o-matic eutils multilib-native
+# libtool
+
+DESCRIPTION="Basepack of plugins for gstreamer"
+HOMEPAGE="http://gstreamer.sourceforge.net"
+SRC_URI="http://gstreamer.freedesktop.org/src/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="nls"
+
+RDEPEND=">=dev-libs/glib-2.8[lib32?]
+ >=media-libs/gstreamer-0.10.23[lib32?]
+ >=dev-libs/liboil-0.3.14o[lib32?]
+ !<media-libs/gst-plugins-bad-0.10.10"
+DEPEND="${RDEPEND}
+ nls? ( >=sys-devel/gettext-0.11.5[lib32?] )
+ dev-util/pkgconfig"
+
+DOCS="AUTHORS README RELEASE"
+
+src_unpack() {
+ unpack ${A}
+}
+
+multilib-native_src_configure_internal() {
+ # gst doesnt handle opts well, last tested with 0.10.15
+ strip-flags
+ replace-flags "-O3" "-O2"
+
+ gst-plugins-base_src_configure \
+ $(use_enable nls)
+}
+
+multilib-native_src_compile_internal() {
+ emake || die "emake failed."
+}
+
+multilib-native_src_install_internal() {
+ gnome2_src_install
+}
diff --git a/media-libs/gstreamer/Manifest b/media-libs/gstreamer/Manifest
index 2f7fde749..0ec74eab8 100644
--- a/media-libs/gstreamer/Manifest
+++ b/media-libs/gstreamer/Manifest
@@ -5,9 +5,11 @@ AUX gstreamer-0.10.21-gtkdoc.patch 816 RMD160 70b89d12357dcf8fa063ead4f337ad39b3
DIST gstreamer-0.10.20.tar.bz2 2253801 RMD160 8b3fa0ebdd30071c820bd3a9f7fec2104ff51bff SHA1 a95e731ee2d377c80eecd61a700cfa1090aaae92 SHA256 c839c3872510890bdbdfb43a79fd8b5646f3b9164b637127fb550351dc147eba
DIST gstreamer-0.10.21.tar.bz2 2662621 RMD160 d801ff66390ef41880cf0be1fee6f7aebf177876 SHA1 892daa9517dd7603e80b009dc059e20f4daea66f SHA256 94c185a0452b5fcddb538f6b686ff959b7afca8340c48fdbe47c87a2a459c3d3
DIST gstreamer-0.10.22.tar.bz2 2763761 RMD160 4d052b533b17eb05d2927ea2944c2f0f513a9179 SHA1 8be3e00cafefd8bbb402b77f0c19fbe359bde998 SHA256 61489e0192b1362e6dc760154204c73c1edd9ad9d8c754535483ec00ad7e389e
+DIST gstreamer-0.10.23.tar.bz2 2871267 RMD160 7491281501adca311fd0d2cb8c92cd278e095fd2 SHA1 861af545b51be56b5782a636844f2e888ea7c90c SHA256 cf750821040102d2c9fbfed56472a86fd0d8c24ada37901c41867c88438a776d
EBUILD gstreamer-0.10.20.ebuild 1677 RMD160 1bf04a78d3b3444f5d359854b5643afc482d12f4 SHA1 012ae5198cec19412b649120e9712776dd243e94 SHA256 b53e50e61799c280894483cd9a45c9e05a4c8e202e9cd7518f07bd232b59d296
EBUILD gstreamer-0.10.21-r10.ebuild 2066 RMD160 4525256f0b9e66c047fd1d16dcc41d6fb343231c SHA1 c222d3040bb6d146d521b425a666b2e7340fdd7f SHA256 ef1a2dd3567694aaf3db8fe81e6d3d5cb00fecc044b9da43d5e34b5526d985f6
EBUILD gstreamer-0.10.21-r3.ebuild 1942 RMD160 2f8459f35de9c15f57c5dda28ccdccc940b6b58a SHA1 7e6776421f790a76210003860551c883ce06303c SHA256 7599727ac0a2eaf35fac514f28a611edc662d82863a4a2ac02a9517d5e51c234
EBUILD gstreamer-0.10.22.ebuild 1640 RMD160 3ec72020e4f2383dc770624fdf5805132150d75d SHA1 e3c200eb8815f2f8633ef736f35f45b45198e96e SHA256 d1157e22204d0bcac884fb6e76cb0cdc85d4fe72b44b3992446fd3258a4f6043
+EBUILD gstreamer-0.10.23.ebuild 1640 RMD160 3ea9896880ab67272a459ba560b10f643c72966e SHA1 e1af09cffd7c72dca7a07d4dc90bbb7e624d595f SHA256 414cbf9531b3b3793269861a28c12aaa68b347d8ceab283b26fe74fd392dc31a
MISC ChangeLog 28462 RMD160 95cc4d5dbcb7f90cad04bf0bd5c89a1fb850f4b7 SHA1 51ed6c58441d387af2ce6179d021d5c79d657506 SHA256 92c145cbdb424b2f8455dba0ebc05ab04f4d4a3d8fd53af77ba8827f94e4b53f
MISC metadata.xml 181 RMD160 51814fbdcf7f32cfe70018b3af7fc798e41ff90d SHA1 faf40c45bd66b0072b95556cf7ab097d3be19511 SHA256 22c215902ccdc7fd8cdb765750fb23ea9d9b6c9d3edb1b45325c3469f8f6ffc5
diff --git a/media-libs/gstreamer/gstreamer-0.10.23.ebuild b/media-libs/gstreamer/gstreamer-0.10.23.ebuild
new file mode 100644
index 000000000..bbb6a3a7b
--- /dev/null
+++ b/media-libs/gstreamer/gstreamer-0.10.23.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/gstreamer/gstreamer-0.10.23.ebuild,v 1.1 2009/05/11 03:15:08 tester Exp $
+
+EAPI=2
+
+inherit eutils multilib versionator multilib-native
+
+# Create a major/minor combo for our SLOT and executables suffix
+PV_MAJ_MIN=$(get_version_component_range '1-2')
+
+DESCRIPTION="Streaming media framework"
+HOMEPAGE="http://gstreamer.sourceforge.net"
+SRC_URI="http://${PN}.freedesktop.org/src/${PN}/${P}.tar.bz2"
+
+LICENSE="LGPL-2"
+SLOT=${PV_MAJ_MIN}
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="nls test"
+
+RDEPEND=">=dev-libs/glib-2.12:2[lib32?]
+ dev-libs/libxml2[lib32?]
+ >=dev-libs/check-0.9.2[lib32?]"
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig
+ nls? ( sys-devel/gettext[lib32?] )"
+
+multilib-native_src_configure_internal() {
+ # Disable static archives, dependency tracking and examples
+ # to speed up build time
+ econf \
+ --disable-static \
+ --disable-dependency-tracking \
+ $(use_enable nls) \
+ --disable-valgrind \
+ --disable-examples \
+ $(use_enable test tests) \
+ --with-package-name="GStreamer ebuild for Gentoo" \
+ --with-package-origin="http://packages.gentoo.org/package/media-libs/gstreamer"
+}
+
+multilib-native_src_install_internal() {
+ emake DESTDIR="${D}" install || die "emake install failed."
+ dodoc AUTHORS ChangeLog NEWS MAINTAINERS README RELEASE
+
+ # Remove unversioned binaries to allow SLOT installations in future
+ cd "${D}"/usr/bin
+ local gst_bins
+ for gst_bins in $(ls *-${PV_MAJ_MIN}); do
+ rm -f ${gst_bins/-${PV_MAJ_MIN}/}
+ done
+}
diff --git a/net-wireless/bluez/Manifest b/net-wireless/bluez/Manifest
index 89de213f4..aaa8e4665 100644
--- a/net-wireless/bluez/Manifest
+++ b/net-wireless/bluez/Manifest
@@ -9,11 +9,11 @@ AUX bluez-4.18-udev.rules 228 RMD160 ab9b4ce8907c62eb9d1f14406cc2ff3f5ec69a19 SH
AUX bluez-4.18-udev.script 752 RMD160 d8f60749dbe497bef7362a4c3f56b2b83ca079cb SHA1 0c39b4b4f4c57fb334daa793f89c0ffac046b956 SHA256 cb41a4eeea5137fb27d82d74f34e5e7dd725ddf8442c39ea623afe0d3c041fcf
DIST bluez-4.21.tar.gz 933080 RMD160 4a451ab0370fab0bfc8ba7750b9298f1b3700308 SHA1 d1eb361a93860b34cea5cc72a449047d6d8a5c63 SHA256 b4ca270ded5d2e9aa77d5c0e5e2bd987122751fe48fae0ebd90de42ab136de37
DIST bluez-4.28.tar.gz 956161 RMD160 a8add4666bc19d009132be0118d075da79e8cba2 SHA1 ff992e8665814f8af0568883fa54f9355865b82b SHA256 8a7ecc1a2ad5b8c46414b58dd3a3519f2979a320ffa7d27c88519a7cf8755493
-DIST bluez-4.37.tar.gz 995263 RMD160 d17f7c0f1b584b2a89418ba1f048493079fb921a SHA1 8f2f88b1340454d48d1723df2b20f5c7698200e3 SHA256 2bfc5db7703cbcaaa4be2576609136450e1dac5d4782707dd0dc81754e3c2489
DIST bluez-4.38.tar.gz 996949 RMD160 5da89c2578d81058a226b780000c5fcbb20a9fbb SHA1 af443f89f2851964dc97fa99d1024f85f37b5b45 SHA256 2841deb43405a7801c819342721bb57397dac05b5d203a773ca61cc340afae4a
+DIST bluez-4.39.tar.gz 998208 RMD160 c1a5e2dbfc44713ade22d4d669f63b98da95c899 SHA1 5fbc3316c8003df47c9fe3a0f577e4518bb18185 SHA256 924dc4b8ae78da2c8f3af9c36ab85d08ee7f8ec0ae4dfe58840ae70041580063
EBUILD bluez-4.21.ebuild 4860 RMD160 b97b2e06b7ea4913704fa143c218ea08e9e5b89a SHA1 11865b91a4264d206aec6fe60460878eb1c0eea6 SHA256 284f8dbb46ff203d466e4884e002a7cc4a3c740cc9d14d968b3572de3b2d18c6
EBUILD bluez-4.28.ebuild 4995 RMD160 c3154589335244a6583ca8c7153d6c5be11a63a1 SHA1 29377c5fdd9f3e29612e22ce445b590199e52ed7 SHA256 5a4fc4936d5f17ee6d7c447734cd0fc3538dce8dfd2ff3e1a4681145e08f2c88
-EBUILD bluez-4.37.ebuild 5193 RMD160 1904a65f19c2b4f106df4eb8c80300f306a0fea3 SHA1 571a75728724d17dd9c49562fdbcfee873ecb7d4 SHA256 1d3c47c6b0bfcbedc846c2e23f4f7f39cf2b13e79131abe8627bd5eca8a2b702
EBUILD bluez-4.38.ebuild 5193 RMD160 65b9dec5a3eaef52e02eb9b734f8d4a2b857a61b SHA1 13f245da56b9f315bf5ea2dcb951e72a3e024fec SHA256 3d232dc13afba127e2024bb7ff5a0f96bfcc29924a2e5384ee2b979cdf28218d
+EBUILD bluez-4.39.ebuild 5193 RMD160 e45a46ab013995d73fedeb2f22a6aad003c995c9 SHA1 696e6f2b46a7b858b960010d4ea8ff821b7a1269 SHA256 51c1c109af5ed1d83c1460e09859c93721ce6e2f5770dc25e303104b6d36617a
MISC ChangeLog 1472 RMD160 395bc91154f49a792a029e34831e6d99bf8653b5 SHA1 2860ff9c26e269b87c2cc99d96e44bbdcb55a21b SHA256 bc22cf773dc55e4d26c6ca7c01f2c158fa04a16cf07d721044198bb430721a01
MISC metadata.xml 514 RMD160 89fa06d58b02ddf9cf942c3e8662cbdc70e14587 SHA1 5f91b2a84e74029a5f8eb7362d6412b36518cdec SHA256 03647e723337dcd35c89f4dfcecaeeefba99883d690e6e91320804d5f8a22f9e
diff --git a/net-wireless/bluez/bluez-4.37.ebuild b/net-wireless/bluez/bluez-4.39.ebuild
index a1666ccee..60b151b05 100644
--- a/net-wireless/bluez/bluez-4.37.ebuild
+++ b/net-wireless/bluez/bluez-4.39.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-wireless/bluez/bluez-4.37.ebuild,v 1.1 2009/04/24 07:30:59 dev-zero Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/bluez/bluez-4.39.ebuild,v 1.1 2009/05/11 04:22:25 dev-zero Exp $
EAPI="2"
diff --git a/sys-apps/hal/Manifest b/sys-apps/hal/Manifest
index 7b3bf2baf..92f46570f 100644
--- a/sys-apps/hal/Manifest
+++ b/sys-apps/hal/Manifest
@@ -1,11 +1,71 @@
+AUX 0.5-hald.rc 681 RMD160 f94d4a6e4ffb3beb84eeeb8e25564fa566ecc493 SHA1 fe413a84ee58cefa923cbc922a1c961fbdb17aa6 SHA256 802f83998c50a3e030d1db2f5a8364e4bb10eebecd464683445d63cf56702161
AUX 0.5.10-hald.conf 119 RMD160 06e205ba7fa8acfb6f68e84a247845a3ad028351 SHA1 c8a62a808c7f632154dda1686fe344a4a136e28f SHA256 b19e6df9c78b6f813405a7cbff20e049714db1a000e6b71ab2eca02d372d58af
-AUX 0.5.10-hald.rc 1111 RMD160 e4b6aaf254a8b909781006151d40060990681412 SHA1 3ab3c81517ee286a6407ff7e068b1ab0e2695fe5 SHA256 6c36fb7d9c2e3f29e9f35332a7ea97ba85d977de4cdd6b355e3a7d6c2b82aca7
+AUX 0.5.10-hald.rc 1118 RMD160 bd83a5f0c5b42c7530740e487fa1766e725e8b4d SHA1 cefd7afea19e81d26f529ecba10b70dd1a9920f3 SHA256 30b5364c0cf9c1e4ebf4a9f0fb9479434e8fe03966f863db8aa7ef9736104805
+AUX 0.5.9-hald.conf 364 RMD160 4c54ac942ecc130a585e90d07078372bfc3b5d58 SHA1 ff22e1b895a511c6fc5074672bb96e954a87eb9e SHA256 efc215155f79947827735972eb97a8a460de5084c74811da615292132888d707
+AUX 0.5.9-hald.rc 1108 RMD160 80b17e888d60eb02559aa91b03fe73a165941082 SHA1 6f5284e74abcdf9786c8b8d340d93bbfb0862728 SHA256 7c6857184c856903df02aa52e9db4b8be33ea304652667196ef846ca6f54bb72
+AUX 0.5.9/01_luks_mount_fix.patch 2605 RMD160 00d6b01a0c96123ce6ee66d1762a00988c363139 SHA1 d5b0ce4140b0db59942ef384df640a4749b0c24c SHA256 f1dfdd118055efbc97163273e0f3930f8badf2be3e4f1ca327654c221faa951e
+AUX 0.5.9/02_acpi_repeated_property_change.patch 1562 RMD160 8243ebff1f2e2cba8317fdc9816f635ddcc715ca SHA1 99a28ceda34d88f41c3be147c684fac4c648ccd5 SHA256 cf452140904d9972ff7daa515afab465f0726d0852f907b77d349a8a8884e1bf
+AUX 0.5.9/03_crasher_fix_fail_to_return_value.patch 759 RMD160 02095de1648ed581202f9d5e3f697b007ebb7154 SHA1 5c0be328f55f343b61b834114f942913808fd9d4 SHA256 f6b8821c89bf2063a0cabc6d67a051e476960e17d510f9e688132b727a5e6e92
+AUX 0.5.9/04_cache_regen_return_fix.patch 740 RMD160 119c4d4714765917b8d8bc622663ee19e7a3ffd2 SHA1 1e9d5a3db8ad7ca46b964f6ef5da3a6e35d9cf3e SHA256 7deab9fcc6e1063062460e88b7d931e641b8d878b644f9e4ed53d50cdfcdfbd7
+AUX 0.5.9/05_freebsd_partutil_make_fix.patch 622 RMD160 a98ba0f5bc6a57a5534752f17146810e72c1417d SHA1 79a7ae8f660658b67626b33613afe5aea092032c SHA256 f514491ccb2152938cf0fea2ee316a37700e6f4b953421e16e047ee1a3f0a181
+AUX 0.5.9/06_freebsd_backend_fix.patch 2553 RMD160 f1e62b12ebc7f89a29bef0f63c7befea22bcbb80 SHA1 11008f69eb2a7a0d3423fe604d035c20fdbb43ff SHA256 9e1ad1d1822853c042c768e6aab76de887add189bec68539b53c9f36eff258be
+AUX 0.5.9/07_malloc_h_for_stdlib_h.patch 1401 RMD160 2e1140954fd8818d412fc07750f12b25d04f7ada SHA1 8fc34e0f1a81e89465ffbce7881aba597276121f SHA256 04749b15f3349e146523d9ed2571e5362804de5f0320f68cbcc85395debc6554
+AUX 0.5.9/08_contains_not_fdi_directive.patch 3572 RMD160 78371b05ece90cfe34abdd3c64fceeca403a93ed SHA1 019f6c9a54a860eb4cce7f4d9d078d60d43ca2c9 SHA256 ebfa47c89693685c49a6c53aacd053433a9d9b4c49ac608449b97d58c3143ad5
+AUX 0.5.9/09_hald_addon_keyboard_start_one.patch 1519 RMD160 161baddfab13ee3293092444fbb7315bafe395b8 SHA1 fcc019e63da0cc0f3c91f55cce7219d42235cc54 SHA256 697fbf2f234bb0d8f47b4086c0636e20674e00eb38181c303c02ecad3ee9bdb8
+AUX 0.5.9/10_freebsd_storage_reprobe_fix.patch 2007 RMD160 16237bf2b64ad8745304af231be93cfb21f77039 SHA1 2b04d74deff2696459cd362a09df806504892522 SHA256 a7b95e31d0a30664dd1cd4539df44fb5d00ef661d43e6035bbd7d25bf0b08af0
+AUX 0.5.9/11_hal_fix_segfault_probe_volume.patch 2628 RMD160 200f2723e9f9f4220bd14bc5273a1d8c781ca4eb SHA1 66196df64d62603f2b136447481ba7240215eff6 SHA256 95026e90f0b18fc36d5e0a34ae23bf86beb4644ca3063b5709b8b5eb6d71e840
+AUX 0.5.9/12_hal_fix-vol_label_probe_volume.patch 2720 RMD160 972107dbb7a325aeeee992454f33c860035eb755 SHA1 70ec132ada52bf39d87f11863e2a0e7d06abe24d SHA256 5e2c186ec2e24c53ec4b16921aed5ae0dfc39f7137f791341ba3dffa56d07f1a
+AUX 0.5.9/13_detect_newer_macbooks.patch 2010 RMD160 700b59c183aa18f08f795256b43921beff394b8b SHA1 a78708fc81be80454c7d24a5ff31bce502482606 SHA256 81c167bfabab5704153f0484e45fd9a574368b1ca2dd44149ce80ffd4011212c
+AUX 0.5.9/14_ntfs_allows_utf8.patch 791 RMD160 51dd2eab4d77bdc10f63500d05621650ebb58738 SHA1 cf8f08894fd33cf297d7cd7c7168a11824b534a3 SHA256 eac2b172054dc8c658428f65e2d88454cecf7a5766b359ff7b3a6744878ee65f
+AUX 0.5.9/15_spec_fdi_matching.patch 7971 RMD160 c47e82e91b4b5ee3b59147356e0f06d65cadd00c SHA1 8d7acfae24ae8b6d1585a570c5533b8a4d14900a SHA256 0f5bf01f761260a5af5955ccd6395865316841842edae2451bf8a3acdf4cdb78
+AUX 0.5.9/16_dev_root_is_mounted.patch 5417 RMD160 d66edb0a43cb579b548be40f0cdeea0bb305a90e SHA1 0e33f24a71bc91d3568cee6f9d5172db155beb63 SHA256 cd2c580d264e6d22635db3d55249ad5ef733ff0f3e4c0c45d59de643f9196dec
+AUX 0.5.9/17_autoconf_cflag_cleanup.patch 4807 RMD160 d8c53f77ec7a6d225571de2ce265229ce4aa6d4a SHA1 d29aa7c5265c4bc2162a3717e9435c57fdadfdda SHA256 60c63900e5eaadc7024dc898e8fffa51bf2aabc5ecbd8909319a59932d191568
+AUX 0.5.9/18_hal_fix_info.category_for_laptop_panel_v2.patch 4979 RMD160 d215dbb22538287adbaed59e7035f357048ad62f SHA1 1ac81c0810d283297de2fdbb5bffed367ed86a4a SHA256 8867de054071e97d1d131a07337c0c70c4d984772c2c6190fbc6dd02f3159337
+AUX 0.5.9/19_hald_runner_catch_dbus_disconnect.patch 863 RMD160 b94c71c312874c09d006ccea782c1f9a569367f6 SHA1 b36040f22d69a8dacf2f01b4ddc8c46d1aa60aa3 SHA256 38c925f0eee76dfcbe43afad2e9bf01f2f6c416e6a4efb1c373bc8f07f9e9bef
+AUX 0.5.9/20_firewire_prober_ioctls_fix.patch 1315 RMD160 eca585824dccdaf50776d12e8813f8c5c19279b5 SHA1 bd5f7f1f182f0e06a9a175cf07db613761bc5d06 SHA256 e2c93828da6c17d42f1348c04c4290d6dd54f99b598d8fb1637477995aff6df2
+AUX 0.5.9/21_pm-suspend_correct_options.patch 1608 RMD160 ea544d39efeeaac60b4bc2c4f6e10eee211ac387 SHA1 a0432e98d3d0a5d34762fce33c5b27e2e05b3280 SHA256 a2cf656ff4db17f7b2ca7398b6f5988c3b297bdc12fe20a0c36f62c72d1598f3
+AUX 0.5.9/22_pm-hibernate_correct_options.patch 1582 RMD160 456063cc7d6e026785b97d27e7d26f26988eaaed SHA1 0468cadf51c58ecbf7ab0c283ef6a368648ca99a SHA256 854b487bc46c9bf130d4d748df588a24d93820a516af1c271d6fbe83f7ba909f
+AUX 0.5.9/23_runner_64bit_values.patch 1126 RMD160 98d714a0fe977c42f9bbd0b395c0fd90e67671ab SHA1 f7487d3cc46101d0459e470f027d7af6b6baf644 SHA256 38ebff891b611e04f4d2d90e49530f7380fd648f6fcd28d6a1e735d97e9ce9f8
+AUX 0.5.9/24_libparted_1_8_7.patch 1654 RMD160 0cd030040bffd04cff8a537c62182f596104d649 SHA1 b172e03dc2aa5a698f5f3fa38dbdf0b9bf0f24da SHA256 278fda96ac36fbf93702ac6927067cded623272f5cad5d3f19fad5af897d4d3d
+AUX 0.5.9/95_gentoo_man_page.patch 18159 RMD160 cd4bf6c16e84464b11de755323ef2d0f5c1a54f9 SHA1 f9de30d705eada8e2f631e51b715b9923f732fb4 SHA256 59d81dcb273f3cdc9c7fc9f195331529642fef2c2150b3eeb3fd98ea555b1893
+AUX 0.5.9/96_plugdev_allow_send.patch 1781 RMD160 08f0cbb8960d4753d15d02c8694fae09a6ef2a02 SHA1 ad04ac23936ac8f1915b2d25cbc366d6db24cdc9 SHA256 090d666c8df223fc0ea30f473fa3d52412ef22aff85c1eebf609a3f00dbd652a
+AUX 0.5.9/97_ignore_fixed_drives.patch 1529 RMD160 ca9c907351003a9924d1e7a472d8dfec21533e79 SHA1 13fcdd49d39f9bcf6bea5ed5f90bd6f2fce9b58c SHA256 b71fdb49a1ad0376f305caf1d11c75dfe8370b970d29adbfe8bd3320757a5259
+AUX 0.5.9/98_hald_cache_test_path.patch 898 RMD160 da4949adae527cee53795666027243161a20400e SHA1 6552ab53c002536e01011ddb2b89d3ead2fef553 SHA256 dd60c1165b79301099053cf299f9b1aaea23c1a767a5494ab896590fd2a368e0
+AUX 0.5.9/99_sun_disklabel_ignore.patch 737 RMD160 421f841c67ba44a174e4f064d9fe06f4395fc7f6 SHA1 22e5d4b5a46fea9b04be52ad40a38cfc8b88cbca SHA256 9f578831836ff89d3bcb7e2b24304fa083f7a95bd7b1d465a68dd6c9c3ae07de
+AUX 0.5.9/series 938 RMD160 6b6d5ab5357129e6588db78d251407193ef5fc7b SHA1 9d998a08e37676493386a6e0ba1e220b6ccba158 SHA256 12281e626fc5b9ee3f3b29d1233d698ad0d16e0cb7e134a89a7c3a536afaaabb
+AUX 96_plugdev_allow_send.patch 1781 RMD160 08f0cbb8960d4753d15d02c8694fae09a6ef2a02 SHA1 ad04ac23936ac8f1915b2d25cbc366d6db24cdc9 SHA256 090d666c8df223fc0ea30f473fa3d52412ef22aff85c1eebf609a3f00dbd652a
+AUX hal-0.5.10-autotools.patch 263 RMD160 1d671becb9bcd3bf635bea70026c1d79d552288a SHA1 fde6a5dada34b941b31adfd59b1a31d0952c94f4 SHA256 9d8eaa54a302fa2daa685c279e3de7390c582b052c25c82769d0eb06fa7a0da1
+AUX hal-0.5.11-ppc64.patch 1127 RMD160 cbb3483ccc324b6c1c076ad03a3c6fbdf4f99c74 SHA1 31dc51bc11563ba5d4d20d7a05459aa1c77975be SHA256 e3707973bd2589f0dfabbbc2121964afa6c55afb20fc530a454ce7edf2f41c78
+AUX hal-0.5.7-hald-scripts.patch 8636 RMD160 339765377e3573b382df987903f301860601668f SHA1 c2ffb779f423e07b38f12a852d942928394abc63 SHA256 d0b713f84c7bc782ba7b13f439630a995588097db2141f4a97c110036f64001a
+AUX hal-0.5.7-hibernate.patch 405 RMD160 1d98e55ffc6ca9fd8ed32bf7e7a5b174da619088 SHA1 811ea39b956c213c4603a7ae97e28ebc42fd8774 SHA256 dfa5d976868fb755f441cea17fed94f5128d14e3049f7cbeac7fe7010786f7cc
+AUX hal-0.5.7-ignored-volumes.patch 1639 RMD160 7e56e8d2c8196baf3dcb3057296f24f6bb96f4fb SHA1 14eeacaf96ebaba14af9506ae8e7869b797957f7 SHA256 2b66eba6b8d34c88219ac126e5f86843a8b207332c1e78c260bcc5458c3b3a63
+AUX hal-0.5.7-part-table.patch 447 RMD160 6432358deffe83d12e908517ab0cc4ee58052287 SHA1 5dc6162c00da2e8ecfb64b19aa0cde049d73297e SHA256 3b99d293545d6d9c02b467a32625057d4502b1d92f8d14e34d65382f0c0cb0db
+AUX hal-0.5.7-plugdev-allow-send.patch 767 RMD160 81da1983cd31552de014142b839f0e43d08909e5 SHA1 055e9cc03a30268b680493e3f4eba4b24348db0f SHA256 19e5f88a512f8e146f63d43935039638b8e51be71f6eea8adcbf3f0c8ab63239
+AUX hal-0.5.7-pmu-fix.patch 982 RMD160 930d9bed6014167629a93ead6f2bc9f2b03f04d1 SHA1 36f5f14e0e88ff7aa71f6bf6b0c2a8130b1358dd SHA256 23b9e12361eb56c481ee747bac8adc6cda148faa6901507bc7e8479ee92aaf98
+AUX hal-0.5.7-rescan-on-resume.patch 516 RMD160 bbf2b4bc576e0aace4a736e15b04a89d5b031f96 SHA1 b4af37f2582dd07b08e35f9bf5dd85ffa150e8c0 SHA256 dbcead5b9276ac85862ac88951278fb7e749ae371808cf5d7142bee85ba16456
+AUX hal-0.5.7-sony-brightness.patch 717 RMD160 85c53fb1c49fbb7325398173a43f256ba179c6a7 SHA1 b2694fbda96d7fe0f3b3431cc7a6f3cc4585bb12 SHA256 25522ed95df9838401684184cc08364058dde6b2b064d3d4e1ba4ddaef9263d2
+AUX hal-0.5.7-unclean-unmount-r1.patch 342 RMD160 768f6274dab1be8c535d681d7f61a0544bb7c26d SHA1 88276d7f5240594c475e1b9c3ef2a664d5fb22f8 SHA256 2036e0e0e46edf347982a20e9ffeb8b7dc7added85a8ef9f23083c225709eca3
+AUX hal-0.5.7.1-autofs-subfs.patch 3051 RMD160 7a0d89fc77ae2bc752517873dd9d302431a5234b SHA1 0715a7a0dfc9cfc9c1dcd86177a0c691990d53a6 SHA256 82ea42ea380a6f4544739ff2f28f47f3182604af0ebb0525d0613b5f24fa296c
+AUX hal-0.5.7.1-ctype-fix.patch 366 RMD160 759e19d7e1046bb88f46a51a84c39c9eef2ca371 SHA1 b30b68a4ddee5db53431328a00334b7229f9a5ab SHA256 1b5b8ef8c37437cae7b0a614033cde953765e67d643b0bfc94f8a2c05970054c
+AUX hal-0.5.7.1-dbus-close.patch 859 RMD160 942829e237154e6612d806d9f3af0d393582f418 SHA1 a190efb43c22dbe7aa3363f3b0fb5e93497bb2da SHA256 7739541fde66bcfcb6bbeb2d5e66976e856ea066aed34c847b38539a2c42b183
+AUX hal-0.5.7.1-fix-dbus.patch 5438 RMD160 dc725822a2959c7a2426215b015bf29a085fca69 SHA1 da415a38bbbecd1790037b505adee53344aae9f7 SHA256 37898de6afb3c383b8d52067a089ebbb87608c76e527d795f73ed58344920e0a
+AUX hal-0.5.7.1-floppies-fix.patch 581 RMD160 ebb1a1a3edfdfe1eb380226d4092422d8d9a26d0 SHA1 b12ef26f7d335343b85cad1d8ba8495b249c82e5 SHA256 7b780fd26a7de2354890b526737d995f63316fded04a4af061926c95a1cc90fc
+AUX hal-0.5.7.1-hald-scripts.patch 8854 RMD160 e54b2c512a6db2ed948d43efe0ce05ea2efaaeb1 SHA1 0631540ded9a0ef83f7633ce8a02b761b67a6cde SHA256 0a227ccbdb90aa30a87a5112ff27518299880aafac85c4b879c11f0a76f8c944
+AUX hal-0.5.7.1-hibernate-fix.patch 421 RMD160 126228bda942a061e87d15bdf6df0740b53f924c SHA1 9412c4c6dbab4133bb3dbbb6baae1cef9dd054a1 SHA256 9f27c993bc54010aec22b4955c149882e18ff2629155dcab372fec4695141826
+AUX hal-0.5.7.1-ignored-volumes.patch 2864 RMD160 2b4031e24b57c2b8685eb95e39f7b3e6eb0c7576 SHA1 c7dc9a6ff210cea6546dfc50c0817308dbe7397c SHA256 054a2db0fd30d6ae9ef828fec930cf55df4e5cbbcc20f3cb86c8801714063790
+AUX hal-0.5.7.1-indirection-fix.patch 4548 RMD160 aab83618c5859f616119df9af80d881957f1f88b SHA1 27758415910b47af73e39d0fc7086d3ef3ec068f SHA256 3612a5238817dedb8d4d31c131ec8fc6baaffcce8b237c5620d9437c1c8677fa
+AUX hal-0.5.7.1-ipod-nano.patch 1411 RMD160 295b3d19d0f3a55343ca5ab95a256fac34e6439c SHA1 18bea5459a848789e22cd3458efaa9120274f342 SHA256 4df49efb2657cb21ca8d7597fc1e83e33d387d0bd07a403f0749bfe6a23bebb5
+AUX hal-0.5.7.1-rescan-on-resume.patch 517 RMD160 7b16d9f68e32945951a1f5d6c27f6920404f66e5 SHA1 c46ee436146f91f60eaf16840a5a889fdd1127a8 SHA256 97524ef90ea5666885a604bdd40bb0e51495ffe0c123f939eaaa12642c9d3904
+AUX hal-0.5.7.1-sr-driver.patch 654 RMD160 86a98b6ceb98f797badd3e1c653f181d498138b1 SHA1 8c1538eb5d1192e336627f1c59c365b2b73b0a6d SHA256 52191c2230af31f0bf18f39a5f0e6d24728da5c7e0de627be55046561318ca55
+AUX hal-0.5.9-hide-recovery-partitions.patch 572 RMD160 bb59ba36f8db6724466cbe41404eb11a9bc4e256 SHA1 856113162e0bed503eab43374eae052637fd9d02 SHA256 85e586bbdb5e450d34b691a54d73d6bfa4beac3a38538cac289a104a01927bd7
AUX hal-unmount.dev 397 RMD160 78286dd9527bbb421082e73b0d08e06cd514d275 SHA1 31169a28448fb1eb1dfee5d1699de9a02449a6b7 SHA256 747a4c483f8a558f2c75666e9547e539475f112363f1dbfc6ea19ca393c8e89b
DIST hal-0.5.11-gentoo-patches-5.tar.bz2 8890 RMD160 ffa1ae251baa8caff74f343f9852a95b800ed9c5 SHA1 7ff6aa207216ac2fdaf1bb4e468c78a2884ef804 SHA256 f03d8f84f97dc3716aebaabc2af43762a8e1a2ffe5acb532915d31ac9794bc21
DIST hal-0.5.11.tar.bz2 1281251 RMD160 741cfe82f0bc2d67106b24cfe526a754ab36e45f SHA1 1ddb7895d2ddc2464b553ad11f7ba38860478ae9 SHA256 78a2621209b2db4d71f25fe3a7df7b7dd4b5e866e9c699454b78e611def065cf
DIST hal-0.5.12rc1-gentoo-patches-1.tar.bz2 3828 RMD160 3c313dd63c4f7b81bb61701222252086aeeafc1c SHA1 11d74bde76f6b03daa0afa03d3d7ccb83f8d6e27 SHA256 0f182436469223e6a2b06cfe2f2fc893f17c351075b259977f217756962a05dd
DIST hal-0.5.12rc1-gentoo-patches-3.tar.bz2 3741 RMD160 93fbb71a9f7a0fa42f44ad4e032d00acf622447f SHA1 ccd33490e65e4ba134c88c3e1f7f7f4ba61ce7c7 SHA256 5951489f2241ae0cef1ac668fe024f97c9cdc651dac841dd18cc796073205085
+DIST hal-0.5.12rc1-gentoo-patches-5.tar.bz2 4014 RMD160 dab46cd7efb0099be1961970261ec03ea3d6291a SHA1 55a4171b6df37f89df7b9baa0a9f6c19ccb4137a SHA256 339030bf17d4fc5eb4fe42ac9b2267e4bf2a6c1f27267f0666e1f4b18e59dfae
DIST hal-0.5.12rc1.tar.bz2 1160384 RMD160 dce660d600c18bfd910814516b675f141d369824 SHA1 1dc809e98cea0fc2f183958da24921c2eaf55edc SHA256 eeeb438dcc2a58288ed3def8c1d0076ca16f35b54d501c46f96e89da24fe38f4
EBUILD hal-0.5.11-r8.ebuild 9002 RMD160 3e806382bdee1b294e9cd4961280c0e440aebbea SHA1 37180c316348135dec5f4a9b25bb82dd7372ea18 SHA256 91b74e7c06b41ad17d802991f14249fd50b7b41123357584c97d4ed0b27a3a94
EBUILD hal-0.5.12_rc1-r2.ebuild 9457 RMD160 039593dd789bf8b84566aea391e64d3e859f4456 SHA1 221f849a138cd3e53f87581813607f11beea8497 SHA256 90cfce72a5873ef353febc0faa6a61b6eec537b7d67ee3abe0caee894733be1c
+EBUILD hal-0.5.12_rc1-r4.ebuild 9591 RMD160 d8a226d5febaf9cef15955f86d682d8f62b8ce78 SHA1 bb44fe578d0a366f9cc625e61fa26ee498984dae SHA256 c849455968cd90da7c5b4770716b6c30a03cb6573d69c7bfca958af1ac07510e
EBUILD hal-0.5.12_rc1.ebuild 9022 RMD160 d0e3ff058cfb4b37dea6c43fb63ed3f6fc5117e4 SHA1 78d3df2c0578c497eb782329d8cc68569dee3872 SHA256 e9d128e2ba1cab4ba98bac4f628842658fb142bfefaaac88b31f1226f76b8d37
diff --git a/sys-apps/hal/files/0.5-hald.rc b/sys-apps/hal/files/0.5-hald.rc
new file mode 100755
index 000000000..2bddc8653
--- /dev/null
+++ b/sys-apps/hal/files/0.5-hald.rc
@@ -0,0 +1,28 @@
+#!/sbin/runscript
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/files/0.5-hald.rc,v 1.7 2006/09/04 15:50:02 cardoe Exp $
+
+depend() {
+ need dbus
+ use logger
+ after coldplug dns nscd
+}
+
+start() {
+ ebegin "Starting Hardware Abstraction Layer daemon"
+
+ if [ -f /proc/acpi/event ]; then
+ chgrp haldaemon /proc/acpi/event
+ chmod 440 /proc/acpi/event
+ fi
+
+ start-stop-daemon --start -q --exec /usr/sbin/hald -- --use-syslog
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Hardware Abstraction Layer daemon"
+ start-stop-daemon --stop -q --pidfile /var/run/hald.pid
+ eend $?
+}
diff --git a/sys-apps/hal/files/0.5.10-hald.rc b/sys-apps/hal/files/0.5.10-hald.rc
index f14e12ab7..af26ee6fa 100644
--- a/sys-apps/hal/files/0.5.10-hald.rc
+++ b/sys-apps/hal/files/0.5.10-hald.rc
@@ -1,10 +1,10 @@
#!/sbin/runscript
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or later
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/files/0.5.10-hald.rc,v 1.2 2008/01/05 19:23:08 compnerd Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/files/0.5.10-hald.rc,v 1.3 2009/05/02 00:16:39 dang Exp $
depend() {
- use logger acpid
+ use logger acpid consolekit
need dbus
after coldplug dns nscd
}
diff --git a/sys-apps/hal/files/0.5.9-hald.conf b/sys-apps/hal/files/0.5.9-hald.conf
new file mode 100644
index 000000000..9b49452d4
--- /dev/null
+++ b/sys-apps/hal/files/0.5.9-hald.conf
@@ -0,0 +1,10 @@
+#The setting below controls the need for ConsoleKit
+#This fixes the problem of requiring people to do
+#rc-update add consolekit default since people
+#forget or don't read ewarn and then complain their system is broken
+#ONCE AGAIN DO NOT TOUCH THE LINE BELOW THIS
+RC_NEED=""
+
+# Should HAL be verbose to syslog? This is needed for debugging
+# HAL.
+HALD_VERBOSE="no"
diff --git a/sys-apps/hal/files/0.5.9-hald.rc b/sys-apps/hal/files/0.5.9-hald.rc
new file mode 100644
index 000000000..9d76a1ad7
--- /dev/null
+++ b/sys-apps/hal/files/0.5.9-hald.rc
@@ -0,0 +1,39 @@
+#!/sbin/runscript
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/files/0.5.9-hald.rc,v 1.7 2007/04/24 15:42:01 cardoe Exp $
+
+depend() {
+ need dbus
+ use logger acpid
+ after coldplug dns nscd
+}
+
+start() {
+ [ -z "${HALD_VERBOSE}" ] && HALD_VERBOSE="no"
+ ebegin "Starting Hardware Abstraction Layer daemon"
+
+# REAL_ROOT=`mount -fv / | cut -d' ' -f1`
+# TEST_ROOT=`cat /proc/mounts | cut -d' ' -f1 | head -n 2 | tail -n 1`
+
+# if [ ! -e ${TEST_ROOT} ]; then
+# echo "You need a ${TEST_ROOT} that points to your ${REAL_ROOT}"
+# echo "See http://bugs.gentoo.org/show_bug.cgi?id=175243"
+# echo "Quick fix is: ln -s ${REAL_ROOT} ${TEST_ROOT}"
+# eend 2
+# fi
+
+ if [ -f /proc/acpi/event ]; then
+ chgrp haldaemon /proc/acpi/event
+ chmod 440 /proc/acpi/event
+ fi
+
+ start-stop-daemon --start -q --exec /usr/sbin/hald -- --use-syslog --verbose=${HALD_VERBOSE}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Hardware Abstraction Layer daemon"
+ start-stop-daemon --stop -q --pidfile /var/run/hald.pid
+ eend $?
+}
diff --git a/sys-apps/hal/files/0.5.9/01_luks_mount_fix.patch b/sys-apps/hal/files/0.5.9/01_luks_mount_fix.patch
new file mode 100644
index 000000000..c72aa91d3
--- /dev/null
+++ b/sys-apps/hal/files/0.5.9/01_luks_mount_fix.patch
@@ -0,0 +1,67 @@
+From: David Zeuthen <davidz@redhat.com>
+Date: Tue, 3 Apr 2007 17:18:23 +0000 (-0400)
+Subject: fix lock checking for LUKS setup/teardown
+X-Git-Tag: HAL_0_2
+X-Git-Url: http://gitweb.freedesktop.org/?p=hal.git;a=commitdiff;h=55256f3d56e3317b3e1efbf84f732b9464eacf8a
+
+fix lock checking for LUKS setup/teardown
+
+Reported here
+
+ http://lists.freedesktop.org/archives/hal/2007-April/007936.html
+---
+
+--- a/tools/hal-luks-setup
++++ b/tools/hal-luks-setup
+@@ -22,17 +22,17 @@ fi
+ # Respect the same locks as Mount()/Unmount() etc.
+ if [ -n "$HAL_METHOD_INVOKED_BY_SYSTEMBUS_CONNECTION_NAME" ] ; then
+ hal-is-caller-locked-out --udi $HAL_PROP_INFO_UDI \
+- --interface org.freedesktop.Hal.Volume \
+- --caller $HAL_METHOD_INVOKED_BY_SYSTEMBUS_CONNECTION_NAME
++ --interface org.freedesktop.Hal.Device.Volume \
++ --caller "$HAL_METHOD_INVOKED_BY_SYSTEMBUS_CONNECTION_NAME"
+ RET=$?
+- if [ "$RET" != "1" ] ; then
++ if [ "$RET" != "0" ] ; then
+ locked_out
+ fi
+- hal-is-caller-locked-out --udi $HAL_PROP_STORAGE_ORIGINATING_DEVICE \
+- --interface org.freedesktop.Hal.Storage \
+- --caller $HAL_METHOD_INVOKED_BY_SYSTEMBUS_CONNECTION_NAME
++ hal-is-caller-locked-out --udi $HAL_PROP_BLOCK_STORAGE_DEVICE \
++ --interface org.freedesktop.Hal.Device.Storage \
++ --caller "$HAL_METHOD_INVOKED_BY_SYSTEMBUS_CONNECTION_NAME"
+ RET=$?
+- if [ "$RET" != "1" ] ; then
++ if [ "$RET" != "0" ] ; then
+ locked_out
+ fi
+ fi
+--- a/tools/hal-luks-teardown
++++ b/tools/hal-luks-teardown
+@@ -23,17 +23,17 @@ fi
+ # Respect the same locks as Mount()/Unmount() etc.
+ if [ -n "$HAL_METHOD_INVOKED_BY_SYSTEMBUS_CONNECTION_NAME" ] ; then
+ hal-is-caller-locked-out --udi $HAL_PROP_INFO_UDI \
+- --interface org.freedesktop.Hal.Volume \
+- --caller $HAL_METHOD_INVOKED_BY_SYSTEMBUS_CONNECTION_NAME
++ --interface org.freedesktop.Hal.Device.Volume \
++ --caller "$HAL_METHOD_INVOKED_BY_SYSTEMBUS_CONNECTION_NAME"
+ RET=$?
+- if [ "$RET" != "1" ] ; then
++ if [ "$RET" != "0" ] ; then
+ locked_out
+ fi
+- hal-is-caller-locked-out --udi $HAL_PROP_STORAGE_ORIGINATING_DEVICE \
+- --interface org.freedesktop.Hal.Storage \
+- --caller $HAL_METHOD_INVOKED_BY_SYSTEMBUS_CONNECTION_NAME
++ hal-is-caller-locked-out --udi $HAL_PROP_BLOCK_STORAGE_DEVICE \
++ --interface org.freedesktop.Hal.Device.Storage \
++ --caller "$HAL_METHOD_INVOKED_BY_SYSTEMBUS_CONNECTION_NAME"
+ RET=$?
+- if [ "$RET" != "1" ] ; then
++ if [ "$RET" != "0" ] ; then
+ locked_out
+ fi
+ fi
diff --git a/sys-apps/hal/files/0.5.9/02_acpi_repeated_property_change.patch b/sys-apps/hal/files/0.5.9/02_acpi_repeated_property_change.patch
new file mode 100644
index 000000000..69d415af0
--- /dev/null
+++ b/sys-apps/hal/files/0.5.9/02_acpi_repeated_property_change.patch
@@ -0,0 +1,39 @@
+From: Danny Kukawka <danny.kukawka@web.de>
+Date: Wed, 4 Apr 2007 22:48:10 +0000 (-0400)
+Subject: fix problem with repeated property-changed signals
+X-Git-Tag: HAL_0_2
+X-Git-Url: http://gitweb.freedesktop.org/?p=hal.git;a=commitdiff;h=3ede8e2ce38e48ba7c292ed17d348f6e810db2c1
+
+fix problem with repeated property-changed signals
+
+> On Mittwoch, 4. April 2007, Richard Hughes wrote:
+> > With git I'm getting the following when I remove AC:
+> >
+> > 15:56:02.865: acpi_ACAD property ac_adapter.present = false
+> > 15:56:03.041: acpi_ACAD property ac_adapter.present = false
+> > 15:56:03.048: acpi_BAT1 property battery.charge_level.percentage = 96
+> > (0x60) 15:56:03.051: acpi_BAT1 property battery.charge_level.percentage =
+> > 96 (0x60)
+> >
+> > acpi_listen seems to think that there is one event from either device,
+> > so I'm unsure what the problem is here.
+>
+> I can confirm this, I take a look at the problem. It is IMO something in
+> the acpi code, could not see this atm for other devices.
+
+This is a general problem. The signal for device_property_changed is listed
+twice in hald.c in function hald_get_gdl().
+---
+
+--- a/hald/hald.c
++++ b/hald/hald.c
+@@ -203,9 +203,6 @@ hald_get_gdl (void)
+ "device_capability_added",
+ G_CALLBACK (gdl_capability_added), NULL);
+ g_signal_connect (global_device_list,
+- "device_property_changed",
+- G_CALLBACK (gdl_property_changed), NULL);
+- g_signal_connect (global_device_list,
+ "device_lock_acquired",
+ G_CALLBACK (gdl_lock_acquired), NULL);
+ g_signal_connect (global_device_list,
diff --git a/sys-apps/hal/files/0.5.9/03_crasher_fix_fail_to_return_value.patch b/sys-apps/hal/files/0.5.9/03_crasher_fix_fail_to_return_value.patch
new file mode 100644
index 000000000..ec08b92b0
--- /dev/null
+++ b/sys-apps/hal/files/0.5.9/03_crasher_fix_fail_to_return_value.patch
@@ -0,0 +1,19 @@
+From: David Zeuthen <davidz@redhat.com>
+Date: Thu, 5 Apr 2007 05:04:53 +0000 (-0400)
+Subject: fix a potential crasher
+X-Git-Tag: HAL_0_2
+X-Git-Url: http://gitweb.freedesktop.org/?p=hal.git;a=commitdiff;h=7ce45a77001031a0d7777d7e1e5269256791b6f1
+
+fix a potential crasher
+---
+
+--- a/hald/hald_dbus.c
++++ b/hald/hald_dbus.c
+@@ -2161,6 +2161,7 @@ device_is_caller_locked_out (DBusConnect
+ /* only allow HAL helpers / privileged users to ask this question */
+ if (!local_interface && !access_check_message_caller_is_root_or_hal (ci_tracker, message)) {
+ raise_permission_denied (connection, message, "IsCallerLockedOut: not privileged");
++ return DBUS_HANDLER_RESULT_HANDLED;
+ }
+
+ dbus_error_init (&error);
diff --git a/sys-apps/hal/files/0.5.9/04_cache_regen_return_fix.patch b/sys-apps/hal/files/0.5.9/04_cache_regen_return_fix.patch
new file mode 100644
index 000000000..be16eb212
--- /dev/null
+++ b/sys-apps/hal/files/0.5.9/04_cache_regen_return_fix.patch
@@ -0,0 +1,18 @@
+Index: b/hald/mmap_cache.c
+===================================================================
+--- a/hald/mmap_cache.c 2007-03-07 16:55:02.000000000 -0500
++++ b/hald/mmap_cache.c 2007-04-11 12:16:44.000000000 -0400
+@@ -137,10 +137,10 @@
+ HAL_INFO (("In regen_cache_cb exit_type=%d, return_code=%d", exit_type, return_code));
+
+ /* see create_cache.c - rc==0 means success - rc==2 means "success, but some fdi files skipped" */
+- if (exit_type != HALD_RUN_SUCCESS || return_code != 0 || return_code != 2) {
+- regen_cache_success = FALSE;
+- } else {
++ if (exit_type == HALD_RUN_SUCCESS && ( return_code == 0 || return_code == 2)) {
+ regen_cache_success = TRUE;
++ } else {
++ regen_cache_success = FALSE;
+ }
+
+ regen_cache_done = TRUE;
diff --git a/sys-apps/hal/files/0.5.9/05_freebsd_partutil_make_fix.patch b/sys-apps/hal/files/0.5.9/05_freebsd_partutil_make_fix.patch
new file mode 100644
index 000000000..6fd63e119
--- /dev/null
+++ b/sys-apps/hal/files/0.5.9/05_freebsd_partutil_make_fix.patch
@@ -0,0 +1,25 @@
+Index: b/partutil/Makefile.am
+===================================================================
+--- a/partutil/Makefile.am 2007-04-11 15:50:44.000000000 -0400
++++ b/partutil/Makefile.am 2007-04-12 11:42:23.000000000 -0400
+@@ -1,17 +1,12 @@
+-if HALD_COMPILE_SOLARIS
+-# do nothing
+-else if HALD_COMPILE_FREEBSD
+-# do nothing
+-else
++if HALD_COMPILE_LINUX
++noinst_LTLIBRARIES = libpartutil.la
++endif
+
+ INCLUDES = @GLIB_CFLAGS@
+
+-noinst_LTLIBRARIES = libpartutil.la
+-
+ libpartutil_la_SOURCES = partutil.h partutil.c ../hald/logger.c
+
+ libpartutil_la_LIBADD = @GLIB_LIBS@ @PARTED_LIBS@
+
+ clean-local :
+ rm -f *~
+-endif
diff --git a/sys-apps/hal/files/0.5.9/06_freebsd_backend_fix.patch b/sys-apps/hal/files/0.5.9/06_freebsd_backend_fix.patch
new file mode 100644
index 000000000..d18c03212
--- /dev/null
+++ b/sys-apps/hal/files/0.5.9/06_freebsd_backend_fix.patch
@@ -0,0 +1,67 @@
+Index: b/hald/freebsd/hf-usb.c
+===================================================================
+--- a/hald/freebsd/hf-usb.c 2007-04-12 11:42:05.000000000 -0400
++++ b/hald/freebsd/hf-usb.c 2007-04-12 11:59:40.000000000 -0400
+@@ -372,11 +372,11 @@
+ can_wake_up = (config_desc.bmAttributes & UC_REMOTE_WAKEUP) != 0;
+ num_interfaces = config_desc.bNumInterface;
+
+- if (config_desc->iConfiguration != 0)
++ if (config_desc.iConfiguration != 0)
+ {
+ char *configuration;
+
+- configuration = hf_usb_get_string_descriptor(controller->fd, di->udi_addr, config_desc->iConfiguration, NULL);
++ configuration = hf_usb_get_string_descriptor(controller->fd, di->udi_addr, config_desc.iConfiguration, NULL);
+ if (configuration)
+ {
+ hal_device_property_set_string(device, "usb_device.configuration", configuration);
+@@ -424,6 +424,8 @@
+
+ static HalDevice *
+ hf_usb_interface_device_new (HalDevice *parent,
++ Controller *controller,
++ const struct usb_device_info *di,
+ const usb_interface_descriptor_t *desc)
+ {
+ HalDevice *device;
+@@ -576,7 +578,7 @@
+ break;
+ }
+
+- if_device = hf_usb_interface_device_new(device, if_desc);
++ if_device = hf_usb_interface_device_new(device, controller, device_info, if_desc);
+ hf_device_preprobe_and_add(if_device);
+
+ p += USB_INTERFACE_DESCRIPTOR_SIZE + if_desc->bNumEndpoints * USB_ENDPOINT_DESCRIPTOR_SIZE;
+Index: b/hald/freebsd/hf-pci.c
+===================================================================
+--- a/hald/freebsd/hf-pci.c 2007-04-12 11:42:05.000000000 -0400
++++ b/hald/freebsd/hf-pci.c 2007-04-12 12:04:48.000000000 -0400
+@@ -38,6 +38,7 @@
+
+ #include "../hald.h"
+ #include "../ids.h"
++#include "../device.h"
+ #include "../logger.h"
+ #include "../util.h"
+
+@@ -210,9 +211,15 @@
+
+ info = g_new(DeviceInfo, 1);
+ info->device = hf_device_store_match(hald_get_gdl(),
+- hal_property_new_int("pci.freebsd.bus", p->pc_sel.pc_bus),
+- hal_property_new_int("pci.freebsd.device", p->pc_sel.pc_dev),
+- hal_property_new_int("pci.freebsd.function", p->pc_sel.pc_func),
++ "pci.freebsd.bus",
++ HAL_PROPERTY_TYPE_INT32,
++ p->pc_sel.pc_bus,
++ "pci.freebsd.device",
++ HAL_PROPERTY_TYPE_INT32,
++ p->pc_sel.pc_dev,
++ "pci.freebsd.function",
++ HAL_PROPERTY_TYPE_INT32,
++ p->pc_sel.pc_func,
+ NULL);
+ info->p = *p;
+ info->secondary_bus = hf_pci_get_register(p, PCIR_SECBUS_1);
diff --git a/sys-apps/hal/files/0.5.9/07_malloc_h_for_stdlib_h.patch b/sys-apps/hal/files/0.5.9/07_malloc_h_for_stdlib_h.patch
new file mode 100644
index 000000000..cfc20c6c0
--- /dev/null
+++ b/sys-apps/hal/files/0.5.9/07_malloc_h_for_stdlib_h.patch
@@ -0,0 +1,51 @@
+Index: b/hald/create_cache.c
+===================================================================
+--- a/hald/create_cache.c 2007-04-11 15:50:43.000000000 -0400
++++ b/hald/create_cache.c 2007-04-11 17:34:54.000000000 -0400
+@@ -34,8 +34,8 @@
+ #include <unistd.h>
+ #include <string.h>
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <dirent.h>
+-#include <malloc.h>
+ #include <errno.h>
+ #include <string.h>
+ #include <getopt.h>
+Index: b/hald/hald.c
+===================================================================
+--- a/hald/hald.c 2007-04-11 15:50:43.000000000 -0400
++++ b/hald/hald.c 2007-04-11 17:37:29.000000000 -0400
+@@ -30,6 +30,11 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
++
++#ifdef HAVE_MALLOPT
++#include <malloc.h>
++#endif
++
+ #include <string.h>
+ #include <unistd.h>
+ #include <getopt.h>
+@@ -43,7 +48,6 @@
+ #include <syslog.h>
+ #include <sys/time.h>
+ #include <sys/resource.h>
+-#include <malloc.h>
+ #include <dbus/dbus.h>
+ #include <dbus/dbus-glib.h>
+ #include <dbus/dbus-glib-lowlevel.h>
+Index: b/hald/cache_test.c
+===================================================================
+--- a/hald/cache_test.c 2007-04-11 15:50:43.000000000 -0400
++++ b/hald/cache_test.c 2007-04-11 17:34:54.000000000 -0400
+@@ -34,7 +34,7 @@
+ #include <unistd.h>
+ #include <string.h>
+ #include <stdio.h>
+-#include <malloc.h>
++#include <stdlib.h>
+ #include <dirent.h>
+ #include <errno.h>
+ #include <expat.h>
diff --git a/sys-apps/hal/files/0.5.9/08_contains_not_fdi_directive.patch b/sys-apps/hal/files/0.5.9/08_contains_not_fdi_directive.patch
new file mode 100644
index 000000000..573418f5e
--- /dev/null
+++ b/sys-apps/hal/files/0.5.9/08_contains_not_fdi_directive.patch
@@ -0,0 +1,86 @@
+From: Danny Kukawka <danny.kukawka@web.de>
+Date: Thu, 12 Apr 2007 19:39:06 +0000 (-0400)
+Subject: fix contains_not fdi-directive
+X-Git-Tag: HAL_0_2
+X-Git-Url: http://gitweb.freedesktop.org/?p=hal.git;a=commitdiff;h=485f9aa6780690d915a13d813bc753501a3c899e
+
+fix contains_not fdi-directive
+
+This patch fixes the contains_not FDI file directive/rule to return true (let
+the match not fail) if the property is not set on the device. This allow to
+have this rule:
+
+ <match key="info.addons" contains_not="hald-addon-input">
+ <append key="info.addons" type="strlist">hald-addon-input</append>
+ </match>
+
+Without this patch this fails if info.addons is not already set. With the
+change it would match if:
+* info.addons is not available
+or
+* info.addons contains no string 'hald-addon-input'
+---
+
+--- a/doc/spec/hal-spec-fdi-files.xml
++++ b/doc/spec/hal-spec-fdi-files.xml
+@@ -156,10 +156,10 @@
+ <para>
+ <literal>contains_not</literal> - can only be used with strlist (string list)
+ and string properties.
+- For a string list this match if the given string is not match any of the
+- item of the list for a string this match of the property not contains the
+- (sub-)string. You can use this attribute to construct if/else blocks together
+- with e.g. <literal>contains</literal>.
++ For a string list this match if the given string not match any of the
++ item of the list (or the property is not set for the device). For a string
++ this match of the property not contains the (sub-)string. You can use this
++ attribute to construct if/else blocks together with e.g. <literal>contains</literal>.
+ </para>
+ </listitem>
+ <listitem>
+--- a/hald/device_info.c
++++ b/hald/device_info.c
+@@ -447,27 +447,28 @@ handle_match (struct rule *rule, HalDevi
+ {
+ dbus_bool_t contains = FALSE;
+
+- if (hal_device_property_get_type (d, prop_to_check) == HAL_PROPERTY_TYPE_STRING) {
+- if (hal_device_has_property (d, prop_to_check)) {
++ if (hal_device_has_property (d, prop_to_check) && value != NULL) {
++
++ if (hal_device_property_get_type (d, prop_to_check) == HAL_PROPERTY_TYPE_STRING) {
+ const char *haystack;
+
+ haystack = hal_device_property_get_string (d, prop_to_check);
+- if (value != NULL && haystack != NULL && (strstr(haystack, value) != NULL))
+- contains = TRUE;
+- }
+- } else if (hal_device_property_get_type (d, prop_to_check) == HAL_PROPERTY_TYPE_STRLIST && value != NULL) {
+- HalDeviceStrListIter iter;
+- for (hal_device_property_strlist_iter_init (d, prop_to_check, &iter);
+- hal_device_property_strlist_iter_is_valid (&iter);
+- hal_device_property_strlist_iter_next (&iter)) {
+- const char *str = hal_device_property_strlist_iter_get_value (&iter);
+- if (strcmp (str, value) == 0) {
++ if (haystack != NULL && (strstr(haystack, value) != NULL))
+ contains = TRUE;
+- break;
++ } else if (hal_device_property_get_type (d, prop_to_check) == HAL_PROPERTY_TYPE_STRLIST) {
++ HalDeviceStrListIter iter;
++ for (hal_device_property_strlist_iter_init (d, prop_to_check, &iter);
++ hal_device_property_strlist_iter_is_valid (&iter);
++ hal_device_property_strlist_iter_next (&iter)) {
++ const char *str = hal_device_property_strlist_iter_get_value (&iter);
++ if (strcmp (str, value) == 0) {
++ contains = TRUE;
++ break;
++ }
+ }
++ } else {
++ return FALSE;
+ }
+- } else {
+- return FALSE;
+ }
+
+ if (rule->type_match == MATCH_CONTAINS) {
diff --git a/sys-apps/hal/files/0.5.9/09_hald_addon_keyboard_start_one.patch b/sys-apps/hal/files/0.5.9/09_hald_addon_keyboard_start_one.patch
new file mode 100644
index 000000000..d5318aa3f
--- /dev/null
+++ b/sys-apps/hal/files/0.5.9/09_hald_addon_keyboard_start_one.patch
@@ -0,0 +1,34 @@
+From: David Zeuthen <davidz@redhat.com>
+Date: Thu, 12 Apr 2007 19:46:26 +0000 (-0400)
+Subject: only start one hald-addon-keyboard addon
+X-Git-Tag: HAL_0_2
+X-Git-Url: http://gitweb.freedesktop.org/?p=hal.git;a=commitdiff;h=f22a37b7a7073b3398e9060e21bc1d12dc58783f
+
+only start one hald-addon-keyboard addon
+
+this patch fixes the problem that one device can have get started the
+same hald-addon-keyboard addon multiple times. This work only together
+with my patch for the contains_not FDI-file directive.
+
+(similar to commit 5745da44f3bb43dafd9b53cbfcfc1218619a5263 on master)
+---
+
+--- a/fdi/policy/10osvendor/10-keyboard-policy.fdi
++++ b/fdi/policy/10osvendor/10-keyboard-policy.fdi
+@@ -5,10 +5,14 @@
+ <device>
+ <match key="info.capabilities" contains="input">
+ <match key="info.capabilities" contains="button">
+- <append key="info.addons" type="strlist">hald-addon-keyboard</append>
++ <match key="info.addons" contains_not="hald-addon-keyboard">
++ <append key="info.addons" type="strlist">hald-addon-keyboard</append>
++ </match>
+ </match>
+ <match key="info.capabilities" contains="input.keyboard">
+- <append key="info.addons" type="strlist">hald-addon-keyboard</append>
++ <match key="info.addons" contains_not="hald-addon-keyboard">
++ <append key="info.addons" type="strlist">hald-addon-keyboard</append>
++ </match>
+ <match key="info.capabilities" contains_not="button">
+ <append key="info.capabilities" type="strlist">button</append>
+ </match>
diff --git a/sys-apps/hal/files/0.5.9/10_freebsd_storage_reprobe_fix.patch b/sys-apps/hal/files/0.5.9/10_freebsd_storage_reprobe_fix.patch
new file mode 100644
index 000000000..3199ed4a4
--- /dev/null
+++ b/sys-apps/hal/files/0.5.9/10_freebsd_storage_reprobe_fix.patch
@@ -0,0 +1,61 @@
+From: Joe Marcus Clarke <marcus@FreeBSD.org>
+Date: Sat, 14 Apr 2007 21:14:15 +0000 (-0400)
+Subject: do not re-probe devices that are managed by hald-addon-storage
+X-Git-Url: http://gitweb.freedesktop.org/?p=hal.git;a=commitdiff;h=15272b99f8d373b9bcd239112231f5bef099d24f
+
+do not re-probe devices that are managed by hald-addon-storage
+
+Do not re-probe devices that are managed by hald-addon-storage since that
+will result in a double-probe and data corruption. In particular, this
+fixes a problem with CD unmounting when ATAPICAM is enabled.
+---
+
+--- a/hald/freebsd/hf-storage.c
++++ b/hald/freebsd/hf-storage.c
+@@ -65,6 +65,7 @@ static GNode *hf_storage_geom_tree = NUL
+ static GHashTable *hf_storage_geom_hash = NULL;
+
+ static void hf_storage_init_geom (void);
++static gboolean hf_storage_device_has_addon (HalDevice *device);
+
+ static void
+ hf_storage_geom_free (gpointer data)
+@@ -587,7 +588,8 @@ hf_storage_conftxt_timeout_cb (gpointer
+ {
+ /* disk changed */
+ device = hf_devtree_find_from_name(hald_get_gdl(), disk->name);
+- if (device && hal_device_has_capability(device, "storage"))
++ if (device && hal_device_has_capability(device, "storage") &&
++ ! hf_storage_device_has_addon(device))
+ hf_storage_device_rescan_real(device);
+ }
+ }
+@@ -768,6 +770,28 @@ hf_storage_device_rescan (HalDevice *dev
+ return FALSE;
+ }
+
++static gboolean
++hf_storage_device_has_addon (HalDevice *device)
++{
++ HalDeviceStrListIter iter;
++
++ g_return_val_if_fail(device != NULL, FALSE);
++
++ for (hal_device_property_strlist_iter_init(device, "info.addons", &iter);
++ hal_device_property_strlist_iter_is_valid(&iter);
++ hal_device_property_strlist_iter_next(&iter))
++ {
++ const char *addon;
++
++ addon = hal_device_property_strlist_iter_get_value(&iter);
++
++ if (! strcmp(addon, "hald-addon-storage"))
++ return TRUE;
++ }
++
++ return FALSE;
++}
++
+ HFHandler hf_storage_handler = {
+ .init = hf_storage_init,
+ .probe = hf_storage_probe,
diff --git a/sys-apps/hal/files/0.5.9/11_hal_fix_segfault_probe_volume.patch b/sys-apps/hal/files/0.5.9/11_hal_fix_segfault_probe_volume.patch
new file mode 100644
index 000000000..2b1db74ec
--- /dev/null
+++ b/sys-apps/hal/files/0.5.9/11_hal_fix_segfault_probe_volume.patch
@@ -0,0 +1,69 @@
+commit f6fbf88c4af259bc4670f5d48c93ab4f70838074
+Author: Danny Kukawka <danny.kukawka@web.de>
+Date: Tue Apr 17 14:38:03 2007 +0200
+
+ fix possible segfault in probe-volume if vid->type == NULL
+
+ Fix possible segfaults in probe-volume and libhal if vid->type == NULL. Added
+ checks for vid->type != NULL to probe-volume.c and new checks for parameter
+ (LIBHAL_CHECK_PARAM_VALID) of libhal_changeset_set_property_string().
+
+ This fix also fd.o bug #10429.
+
+diff --git a/hald/linux/probing/probe-volume.c b/hald/linux/probing/probe-volume.c
+index d5963db..b5f71c0 100644
+--- a/hald/linux/probing/probe-volume.c
++++ b/hald/linux/probing/probe-volume.c
+@@ -122,8 +122,11 @@ set_volume_id_values (LibHalContext *ctx, const char *udi, LibHalChangeSet *cs,
+ libhal_changeset_set_property_string (cs, "volume.fsusage", usage);
+ HAL_DEBUG (("volume.fsusage = '%s'", usage));
+
+- libhal_changeset_set_property_string (cs, "volume.fstype", vid->type);
++ if (!libhal_changeset_set_property_string (cs, "volume.fstype", vid->type))
++ libhal_changeset_set_property_string (cs, "volume.fstype", "");
++
+ HAL_DEBUG(("volume.fstype = '%s'", vid->type));
++
+ if (vid->type_version[0] != '\0') {
+ libhal_changeset_set_property_string (cs, "volume.fsversion", vid->type_version);
+ HAL_DEBUG(("volume.fsversion = '%s'", vid->type_version));
+@@ -141,12 +144,23 @@ set_volume_id_values (LibHalContext *ctx, const char *udi, LibHalChangeSet *cs,
+ libhal_changeset_set_property_string (cs, "info.product", volume_label);
+ }
+ else {
+- snprintf (buf, sizeof (buf), "Volume (%s)", vid->type);
++ if (vid->type != NULL) {
++ snprintf (buf, sizeof (buf), "Volume (%s)", vid->type);
++ } else {
++ snprintf (buf, sizeof (buf), "Volume (unknown)");
++ }
++
+ libhal_changeset_set_property_string (cs, "info.product", buf);
++
+ }
+ g_free(volume_label);
+ } else {
+- snprintf (buf, sizeof (buf), "Volume (%s)", vid->type);
++ if (vid->type != NULL) {
++ snprintf (buf, sizeof (buf), "Volume (%s)", vid->type);
++ } else {
++ snprintf (buf, sizeof (buf), "Volume (unknown)");
++ }
++
+ libhal_changeset_set_property_string (cs, "info.product", buf);
+ }
+ }
+diff --git a/libhal/libhal.c b/libhal/libhal.c
+index 4ddac9e..fb9800a 100644
+--- a/libhal/libhal.c
++++ b/libhal/libhal.c
+@@ -3810,6 +3810,9 @@ libhal_changeset_set_property_string (LibHalChangeSet *changeset, const char *ke
+ {
+ LibHalChangeSetElement *elem;
+
++ LIBHAL_CHECK_PARAM_VALID(key, "*key", FALSE);
++ LIBHAL_CHECK_PARAM_VALID(value, "*value", FALSE);
++
+ elem = calloc (1, sizeof (LibHalChangeSetElement));
+ if (elem == NULL)
+ goto out;
diff --git a/sys-apps/hal/files/0.5.9/12_hal_fix-vol_label_probe_volume.patch b/sys-apps/hal/files/0.5.9/12_hal_fix-vol_label_probe_volume.patch
new file mode 100644
index 000000000..68b61279a
--- /dev/null
+++ b/sys-apps/hal/files/0.5.9/12_hal_fix-vol_label_probe_volume.patch
@@ -0,0 +1,74 @@
+commit 674d2415aed43b43b81b262cbad2228f0477e34a
+Author: Danny Kukawka <danny.kukawka@web.de>
+Date: Tue Apr 17 15:09:22 2007 +0200
+
+ fix problems with case if vid->label[0] is '\0'
+
+ Fix problems with the case where vid->label[0] is '\0'. Don't call
+ strdup_valid_utf8 in this case, simply ignore the label in this case.
+ Cleaned up the code to prevent code duplication.
+
+ This fix fd.o bug #10362.
+
+diff --git a/hald/linux/probing/probe-volume.c b/hald/linux/probing/probe-volume.c
+index b5f71c0..b003b25 100644
+--- a/hald/linux/probing/probe-volume.c
++++ b/hald/linux/probing/probe-volume.c
+@@ -131,38 +131,34 @@ set_volume_id_values (LibHalContext *ctx, const char *udi, LibHalChangeSet *cs,
+ libhal_changeset_set_property_string (cs, "volume.fsversion", vid->type_version);
+ HAL_DEBUG(("volume.fsversion = '%s'", vid->type_version));
+ }
++
+ libhal_changeset_set_property_string (cs, "volume.uuid", vid->uuid);
+ HAL_DEBUG(("volume.uuid = '%s'", vid->uuid));
+
+- /* we need to be sure for a utf8 valid label, because dbus accept only utf8 valid strings */
+- volume_label = strdup_valid_utf8 (vid->label);
+- if( volume_label != NULL ) {
+- libhal_changeset_set_property_string (cs, "volume.label", volume_label);
+- HAL_DEBUG(("volume.label = '%s'", volume_label));
++ if(vid->label != NULL && vid->label[0] != '\0') {
++ /* we need to be sure for a utf8 valid label, because dbus accept only utf8 valid strings */
++ volume_label = strdup_valid_utf8 (vid->label);
++ if( volume_label != NULL ) {
++ libhal_changeset_set_property_string (cs, "volume.label", volume_label);
++ HAL_DEBUG(("volume.label = '%s'", volume_label));
+
+- if (strlen(volume_label) > 0) {
+- libhal_changeset_set_property_string (cs, "info.product", volume_label);
+- }
+- else {
+- if (vid->type != NULL) {
+- snprintf (buf, sizeof (buf), "Volume (%s)", vid->type);
+- } else {
+- snprintf (buf, sizeof (buf), "Volume (unknown)");
++ if (strlen(volume_label) > 0) {
++ libhal_changeset_set_property_string (cs, "info.product", volume_label);
++ g_free(volume_label);
++ return;
+ }
+
+- libhal_changeset_set_property_string (cs, "info.product", buf);
+-
+- }
+- g_free(volume_label);
+- } else {
+- if (vid->type != NULL) {
+- snprintf (buf, sizeof (buf), "Volume (%s)", vid->type);
+- } else {
+- snprintf (buf, sizeof (buf), "Volume (unknown)");
++ g_free(volume_label);
+ }
++ }
+
+- libhal_changeset_set_property_string (cs, "info.product", buf);
++ if (vid->type != NULL) {
++ snprintf (buf, sizeof (buf), "Volume (%s)", vid->type);
++ } else {
++ snprintf (buf, sizeof (buf), "Volume (unknown)");
+ }
++
++ libhal_changeset_set_property_string (cs, "info.product", buf);
+ }
+
+ static void
diff --git a/sys-apps/hal/files/0.5.9/13_detect_newer_macbooks.patch b/sys-apps/hal/files/0.5.9/13_detect_newer_macbooks.patch
new file mode 100644
index 000000000..81c15bd47
--- /dev/null
+++ b/sys-apps/hal/files/0.5.9/13_detect_newer_macbooks.patch
@@ -0,0 +1,41 @@
+From: Martin Pitt <martin@piware.de>
+Date: Wed, 18 Apr 2007 19:33:07 +0000 (-0400)
+Subject: support more Macbook Pro models
+X-Git-Tag: HAL_0_2
+X-Git-Url: http://gitweb.freedesktop.org/?p=hal.git;a=commitdiff;h=98e53bff6ee6c94113b2e745f727c7a78bae5f06
+
+support more Macbook Pro models
+
+Matthew recently fixed the FDIs to support newer MacBook Pro models.
+
+Patch applies cleanly to 0.5.9 and git head.
+
+(changed by davidz: s/smbios.system.product/system.hardware.product)
+---
+
+Index: b/fdi/policy/10osvendor/10-macbookpro-utils.fdi
+===================================================================
+--- a/fdi/policy/10osvendor/10-macbookpro-utils.fdi 2007-04-30 14:56:39.000000000 -0400
++++ b/fdi/policy/10osvendor/10-macbookpro-utils.fdi 2007-04-30 14:56:58.000000000 -0400
+@@ -11,6 +11,21 @@
+ <spawn udi="/org/freedesktop/Hal/devices/macbook_pro_keyboard_backlight"/>
+ <spawn udi="/org/freedesktop/Hal/devices/macbook_pro_lcd_panel"/>
+ </match>
++ <match key="system.hardware.product" string="MacBookPro1,2">
++ <spawn udi="/org/freedesktop/Hal/devices/macbook_pro_light_sensor"/>
++ <spawn udi="/org/freedesktop/Hal/devices/macbook_pro_keyboard_backlight"/>
++ <spawn udi="/org/freedesktop/Hal/devices/macbook_pro_lcd_panel"/>
++ </match>
++ <match key="system.hardware.product" string="MacBookPro2,1">
++ <spawn udi="/org/freedesktop/Hal/devices/macbook_pro_light_sensor"/>
++ <spawn udi="/org/freedesktop/Hal/devices/macbook_pro_keyboard_backlight"/>
++ <spawn udi="/org/freedesktop/Hal/devices/macbook_pro_lcd_panel"/>
++ </match>
++ <match key="system.hardware.product" string="MacBookPro2,2">
++ <spawn udi="/org/freedesktop/Hal/devices/macbook_pro_light_sensor"/>
++ <spawn udi="/org/freedesktop/Hal/devices/macbook_pro_keyboard_backlight"/>
++ <spawn udi="/org/freedesktop/Hal/devices/macbook_pro_lcd_panel"/>
++ </match>
+ </match>
+ </match>
+ </device>
diff --git a/sys-apps/hal/files/0.5.9/14_ntfs_allows_utf8.patch b/sys-apps/hal/files/0.5.9/14_ntfs_allows_utf8.patch
new file mode 100644
index 000000000..92a0ef1f9
--- /dev/null
+++ b/sys-apps/hal/files/0.5.9/14_ntfs_allows_utf8.patch
@@ -0,0 +1,12 @@
+Index: b/fdi/policy/10osvendor/20-storage-methods.fdi
+===================================================================
+--- a/fdi/policy/10osvendor/20-storage-methods.fdi 2007-03-27 01:18:54.000000000 -0400
++++ b/fdi/policy/10osvendor/20-storage-methods.fdi 2007-04-18 10:20:54.000000000 -0400
+@@ -186,6 +186,7 @@
+ <append key="volume.mount.valid_options" type="strlist">gid=</append>
+ <append key="volume.mount.valid_options" type="strlist">umask=</append>
+ <append key="volume.mount.valid_options" type="strlist">locale=</append>
++ <append key="volume.mount.valid_options" type="strlist">utf8</append>
+ </match>
+ <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" string="FreeBSD">
+ <append key="volume.mount.valid_options" type="strlist">-u=</append>
diff --git a/sys-apps/hal/files/0.5.9/15_spec_fdi_matching.patch b/sys-apps/hal/files/0.5.9/15_spec_fdi_matching.patch
new file mode 100644
index 000000000..3410fd976
--- /dev/null
+++ b/sys-apps/hal/files/0.5.9/15_spec_fdi_matching.patch
@@ -0,0 +1,200 @@
+Index: b/doc/spec/hal-spec-fdi-files.xml
+===================================================================
+--- a/doc/spec/hal-spec-fdi-files.xml 2007-04-12 21:22:36.000000000 -0400
++++ b/doc/spec/hal-spec-fdi-files.xml 2007-04-19 15:23:51.000000000 -0400
+@@ -100,6 +100,12 @@
+ </listitem>
+ <listitem>
+ <para>
++ <literal>is_ascii</literal> - matches only when a string property
++ contain only ASCII characters. Can be used with 'true' or 'false'.
++ </para>
++ </listitem>
++ <listitem>
++ <para>
+ <literal>is_absolute_path</literal> - matches only when a string
+ property represents an absolute path (the path doesn't have to exist).
+ Can be used with 'true' or 'false'.
+@@ -107,65 +113,92 @@
+ </listitem>
+ <listitem>
+ <para>
+- <literal>is_ascii</literal> - matches only when a string property
+- contain only ASCII characters. Can be used with 'true' or 'false'.
++ <literal>sibling_contains</literal> - can only be used with string and
++ strlist (string list).
++ For a string key this matches when a sibling item contains the
++ (sub-)string in the same property. For a string list, this is if a string
++ matches an item in the list.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+- <literal>compare_lt</literal> - can be used on int, uint64, double
+- and string properties to compare with a constant.
+- Matches when the given property is less than the given constant
+- using the default ordering.
++ <literal>contains</literal> - can only be used with string and
++ strlist (string list).
++ For a string key this matches when the property contains the given
++ (sub-)string. For a string list this match if the given string match
++ a item of the list.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+- <literal>compare_le</literal> - like <literal>compare_lt</literal>
+- but matches when less than or equal.
++ <literal>contains_ncase</literal> - like <literal>contains</literal>
++ but the property and the given key are converted to lowercase before check.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+- <literal>compare_gt</literal> - like <literal>compare_lt</literal>
+- but matches when greater than.
++ <literal>contains_not</literal> - can only be used with strlist (string list)
++ and string properties.
++ For a string list this match if the given string not match any of the
++ item of the list (or the property is not set for the device). For a string
++ this match of the property not contains the (sub-)string. You can use this
++ attribute to construct if/else blocks together with e.g. <literal>contains</literal>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+- <literal>compare_ge</literal> - like <literal>compare_lt</literal>
+- but matches when greater than or equal.
++ <literal>prefix</literal> - can only be used with string properties.
++ Matches if property begins with the key.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+- <literal>compare_ne</literal> - like <literal>compare_lt</literal>
+- but matches when not equal.
++ <literal>prefix_ncase</literal> - like <literal>prefix</literal> but the
++ property and the given key are converted to lowercase before the check.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+- <literal>contains</literal> - can only be used with string and
+- strlist (string list).
+- For a string key this matches when the property contains the given
+- (sub-)string. For a string list this match if the given string match
+- a item of the list.
++ <literal>suffix</literal> - can only be used with string properties.
++ Matches if property ends with the key.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+- <literal>contains_not</literal> - can only be used with strlist (string list)
+- and string properties.
+- For a string list this match if the given string not match any of the
+- item of the list (or the property is not set for the device). For a string
+- this match of the property not contains the (sub-)string. You can use this
+- attribute to construct if/else blocks together with e.g. <literal>contains</literal>.
++ <literal>suffix_ncase</literal> - like <literal>suffix</literal> but the
++ property and the given key are converted to lowercase before the check.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+- <literal>contains_ncase</literal> - like <literal>contains</literal>
+- but the property and the given key are converted to lowercase before check.
++ <literal>compare_lt</literal> - can be used on int, uint64, double
++ and string properties to compare with a constant.
++ Matches when the given property is less than the given constant
++ using the default ordering.
++ </para>
++ </listitem>
++ <listitem>
++ <para>
++ <literal>compare_le</literal> - like <literal>compare_lt</literal>
++ but matches when less than or equal.
++ </para>
++ </listitem>
++ <listitem>
++ <para>
++ <literal>compare_gt</literal> - like <literal>compare_lt</literal>
++ but matches when greater than.
++ </para>
++ </listitem>
++ <listitem>
++ <para>
++ <literal>compare_ge</literal> - like <literal>compare_lt</literal>
++ but matches when greater than or equal.
++ </para>
++ </listitem>
++ <listitem>
++ <para>
++ <literal>compare_ne</literal> - like <literal>compare_lt</literal>
++ but matches when not equal.
+ </para>
+ </listitem>
+ </itemizedlist>
+Index: b/hald/device_info.c
+===================================================================
+--- a/hald/device_info.c 2007-04-12 21:22:36.000000000 -0400
++++ b/hald/device_info.c 2007-04-19 15:32:52.000000000 -0400
+@@ -71,6 +71,8 @@
+ return "uint64";
+ case MATCH_BOOL:
+ return "bool";
++ case MATCH_DOUBLE:
++ return "double";
+ case MATCH_EXISTS:
+ return "exists";
+ case MATCH_EMPTY:
+@@ -85,6 +87,8 @@
+ return "contains";
+ case MATCH_CONTAINS_NCASE:
+ return "contains_ncase";
++ case MATCH_CONTAINS_NOT:
++ return "contains_not";
+ case MATCH_PREFIX:
+ return "prefix";
+ case MATCH_PREFIX_NCASE:
+@@ -105,8 +109,6 @@
+ return "compare_ne";
+ case MATCH_UNKNOWN:
+ return "unknown match type";
+- case MATCH_CONTAINS_NOT:
+- return "contains_not";
+ }
+ return "invalid match type";
+ }
+@@ -331,6 +333,17 @@
+ return TRUE;
+ }
+
++ case MATCH_DOUBLE:
++ {
++ double val = atof (value);
++
++ if (hal_device_property_get_type (d, prop_to_check) != HAL_PROPERTY_TYPE_DOUBLE)
++ return FALSE;
++ if (hal_device_property_get_double (d, prop_to_check) != val)
++ return FALSE;
++ return TRUE;
++ }
++
+ case MATCH_EXISTS:
+ {
+ dbus_bool_t should_exist = TRUE;
+Index: b/hald/rule.h
+===================================================================
+--- a/hald/rule.h 2007-03-07 16:52:19.000000000 -0500
++++ b/hald/rule.h 2007-04-20 14:10:31.000000000 -0400
+@@ -79,7 +79,8 @@
+ MATCH_COMPARE_GE,
+ MATCH_SIBLING_CONTAINS,
+ MATCH_COMPARE_NE,
+- MATCH_CONTAINS_NOT
++ MATCH_CONTAINS_NOT,
++ MATCH_DOUBLE
+ } match_type;
+
+ /* a "rule" structure that is a generic node of the fdi file */
diff --git a/sys-apps/hal/files/0.5.9/16_dev_root_is_mounted.patch b/sys-apps/hal/files/0.5.9/16_dev_root_is_mounted.patch
new file mode 100644
index 000000000..873bc294d
--- /dev/null
+++ b/sys-apps/hal/files/0.5.9/16_dev_root_is_mounted.patch
@@ -0,0 +1,140 @@
+Index: b/hald/linux/blockdev.c
+===================================================================
+--- a/hald/linux/blockdev.c 2007-03-07 16:52:19.000000000 -0500
++++ b/hald/linux/blockdev.c 2007-04-24 11:31:22.000000000 -0400
+@@ -165,9 +165,6 @@
+ struct mntent mnt;
+ struct mntent *mnte;
+ char buf[1024];
+- unsigned int major;
+- unsigned int minor;
+- dev_t devt = makedev(0, 0);
+ GSList *volumes = NULL;
+ GSList *volume;
+
+@@ -189,43 +186,53 @@
+ /* loop over /proc/mounts */
+ while ((mnte = getmntent_r (f, &mnt, buf, sizeof(buf))) != NULL) {
+ struct stat statbuf;
+- gboolean use_device_name_for_match;
++ dev_t devt;
+
+- /*HAL_INFO ((" * /proc/mounts contain dev %s - type %s", mnt.mnt_fsname, mnt.mnt_type));*/
++ /* HAL_INFO ((" * /proc/mounts contain dev %s - type %s", mnt.mnt_fsname, mnt.mnt_type)); */
+
+- /* If this is a nfs mount (fstype == 'nfs') ignore the mount. Reason:
+- * 1. we don't list nfs devices in HAL
+- * 2. more problematic: stat on mountpoints with 'stale nfs handle' never come
+- * back and block complete HAL and all applications using HAL fail.
++ /* We don't handle nfs mounts in HAL and stat() on mountpoints,
++ * and we would block on 'stale nfs handle'.
+ */
+ if (strcmp(mnt.mnt_type, "nfs") == 0)
+ continue;
+
+- use_device_name_for_match = FALSE;
+- /* get major:minor of special device file */
+- if (stat (mnt.mnt_fsname, &statbuf) != 0) {
+- /* DING DING DING... device node may have been deleted by udev
+- * but device is still mounted and we haven't processed the uevent
+- * for that deletion from udev..
+- *
+- * So in this case... fall back to comparing on device names
+- * rather than pretending the device is not mounted as that's
+- * what will happen if we just skip this /proc/mounts entry.
+- *
+- * The reason it's nicer to compare on major:minor is that
+- * /proc/mounts is broken - it contains the *device name*
+- * passed to mount(2) which in some cases may be a symlink
+- * (on many distros it's common to see /proc/mounts contain
+- * /dev/root as the device for /). Sigh...
+- */
+- use_device_name_for_match = TRUE;
+- } else {
++ /* skip plain names, we look for device nodes */
++ if (mnt.mnt_fsname[0] != '/')
++ continue;
++
++ /*
++ * We can't just stat() the mountpoint, because it breaks all sorts
++ * non-disk filesystems. So assume, that the names in /proc/mounts
++ * are existing device-files used to mount the filesystem.
++ */
++ devt = makedev(0, 0);
++ if (stat (mnt.mnt_fsname, &statbuf) == 0) {
++ /* not a device node */
+ if (major (statbuf.st_rdev) == 0)
+ continue;
++
++ /* found major/minor */
++ devt = statbuf.st_rdev;
++ } else {
++ /* The root filesystem may be mounted by a device name that doesn't
++ * exist in the real root, like /dev/root, which the kernel uses
++ * internally, when no initramfs image is used. For "/", it is safe
++ * to get the major/minor by stat()'ing the mount-point.
++ */
++ if (strcmp (mnt.mnt_dir, "/") == 0 && stat ("/", &statbuf) == 0)
++ devt = statbuf.st_dev;
++
++ /* DING DING DING... the device-node may not exist, or is
++ * already deleted, but the device may be still mounted.
++ *
++ * We will fall back to looking up the device-name, instead
++ * of using major/minor.
++ */
+ }
+
+- /*HAL_INFO (("* found mounts dev %s (%i:%i)", mnt.mnt_fsname, major (statbuf.st_rdev), minor (statbuf.st_rdev)));*/
+- /* match against all hal volumes */
++ /* HAL_INFO (("* found mounts dev %s (%i:%i)", mnt.mnt_fsname,
++ major (devt), minor (devt))); */
++
+ for (volume = volumes; volume != NULL; volume = g_slist_next (volume)) {
+ HalDevice *dev;
+ gboolean is_match;
+@@ -233,7 +240,8 @@
+ is_match = FALSE;
+ dev = HAL_DEVICE (volume->data);
+
+- if (use_device_name_for_match) {
++ /* lookup dev_t or devname of known hal devices */
++ if (major (devt) == 0) {
+ const char *device_name;
+
+ device_name = hal_device_property_get_string (dev, "block.device");
+@@ -243,14 +251,16 @@
+ if (strcmp (device_name, mnt.mnt_fsname) == 0)
+ is_match = TRUE;
+ } else {
+- major = hal_device_property_get_int (dev, "block.major");
+- if (major == 0)
++ unsigned int majornum;
++ unsigned int minornum;
++
++ majornum = hal_device_property_get_int (dev, "block.major");
++ if (majornum == 0)
+ continue;
+- minor = hal_device_property_get_int (dev, "block.minor");
+- devt = makedev (major, minor);
+- /*HAL_INFO ((" match %s (%i:%i)", hal_device_get_udi (dev), major, minor));*/
++ minornum = hal_device_property_get_int (dev, "block.minor");
++ /* HAL_INFO ((" match %s (%i:%i)", hal_device_get_udi (dev), majornum, minornum)); */
+
+- if (statbuf.st_rdev == devt)
++ if (majornum == major (devt) && minornum == minor (devt))
+ is_match = TRUE;
+ }
+
+@@ -262,9 +272,8 @@
+ hasmntopt (&mnt, MNTOPT_RO) ? TRUE : FALSE);
+ hal_device_property_set_string (dev, "volume.mount_point", mnt.mnt_dir);
+ device_property_atomic_update_end ();
+- /*HAL_INFO ((" set %s to be mounted at %s (%s)",
+- hal_device_get_udi (dev), mnt.mnt_dir,
+- hasmntopt (&mnt, MNTOPT_RO) ? "ro" : "rw"));*/
++ /* HAL_INFO ((" set %s to be mounted at %s (%s)", hal_device_get_udi (dev),
++ mnt.mnt_dir, hasmntopt (&mnt, MNTOPT_RO) ? "ro" : "rw")); */
+ volumes = g_slist_delete_link (volumes, volume);
+ break;
+ }
diff --git a/sys-apps/hal/files/0.5.9/17_autoconf_cflag_cleanup.patch b/sys-apps/hal/files/0.5.9/17_autoconf_cflag_cleanup.patch
new file mode 100644
index 000000000..2dc43c6bf
--- /dev/null
+++ b/sys-apps/hal/files/0.5.9/17_autoconf_cflag_cleanup.patch
@@ -0,0 +1,155 @@
+Index: b/configure.in
+===================================================================
+--- a/configure.in 2007-04-03 00:36:44.000000000 -0400
++++ b/configure.in 2007-04-26 02:16:37.000000000 -0400
+@@ -235,78 +235,48 @@
+
+ #### gcc warning flags
+
+-if test "x$GCC" = "xyes"; then
+- changequote(,)dnl
+- case " $CFLAGS " in
+- *[\ \ ]-Wall[\ \ ]*) ;;
+- *) CFLAGS="$CFLAGS -Wall" ;;
+- esac
+-
+- case " $CFLAGS " in
+- *[\ \ ]-Wchar-subscripts[\ \ ]*) ;;
+- *) CFLAGS="$CFLAGS -Wchar-subscripts" ;;
+- esac
++dnl Use as many warning flags as possible with gcc and compatible compilers
+
+- case " $CFLAGS " in
+- *[\ \ ]-Wmissing-declarations[\ \ ]*) ;;
+- *) CFLAGS="$CFLAGS -Wmissing-declarations" ;;
+- esac
++dnl If you change anything below in the variable, the cache is automatically
++dnl ignored and everything is rechecked. So just add a flag and that's it.
++dnl if you need to force a recheck, add a whitespace somewhere
++dnl Also take note of order of flags, you should have the big inclusive flags
++dnl first, and the negating flags last
+
+- case " $CFLAGS " in
+- *[\ \ ]-Wnested-externs[\ \ ]*) ;;
+- *) CFLAGS="$CFLAGS -Wnested-externs" ;;
+- esac
++MAYBE_WARN="-Wall -Wextra \
++-Wchar-subscripts -Wmissing-declarations -Wnested-externs \
++-Wpointer-arith -Wcast-align -Wsign-compare -Wbad-function-cast \
++-Waggregate-return -Wcast-align -Wcast-qual -Wshadow -Wredundant-decls"
+
+- case " $CFLAGS " in
+- *[\ \ ]-Wpointer-arith[\ \ ]*) ;;
+- *) CFLAGS="$CFLAGS -Wpointer-arith" ;;
+- esac
+-
+- case " $CFLAGS " in
+- *[\ \ ]-Wcast-align[\ \ ]*) ;;
+- *) CFLAGS="$CFLAGS -Wcast-align" ;;
+- esac
++dnl invalidate cache if MAYBE_WARN has changed
++if test "x$hal_cv_warn_maybe" != "x$MAYBE_WARN"; then
++ unset hal_cv_warn_cflags
++fi
+
+- case " $CFLAGS " in
+- *[\ \ ]-Wsign-compare[\ \ ]*) ;;
+- *) CFLAGS="$CFLAGS -Wsign-compare" ;;
+- esac
++AC_CACHE_CHECK([for supported warning flags], hal_cv_warn_cflags, [
++ echo
+
+- if test "x$enable_ansi" = "xyes"; then
+- case " $CFLAGS " in
+- *[\ \ ]-ansi[\ \ ]*) ;;
+- *) CFLAGS="$CFLAGS -ansi" ;;
+- esac
++ for W in $MAYBE_WARN; do
++ AC_CC_TRY_FLAG([$W], [CFLAGS="$CFLAGS $W"])
++ done
+
+- case " $CFLAGS " in
+- *[\ \ ]-D_POSIX_C_SOURCE*) ;;
+- *) CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=199309L" ;;
+- esac
++ hal_cv_warn_cflags=$CFLAGS
++ hal_cv_warn_maybe=$MAYBE_WARN
+
+- case " $CFLAGS " in
+- *[\ \ ]-D_BSD_SOURCE[\ \ ]*) ;;
+- *) CFLAGS="$CFLAGS -D_BSD_SOURCE" ;;
+- esac
++ AC_MSG_CHECKING([which warning flags were supported])
++])
+
+- case " $CFLAGS " in
+- *[\ \ ]-pedantic[\ \ ]*) ;;
+- *) CFLAGS="$CFLAGS -pedantic" ;;
+- esac
++if test "x$GCC" = "xyes"; then
++ if test "x$enable_ansi" = "xyes"; then
++ AC_CC_TRY_FLAG([-ansi], [CFLAGS="$CFLAGS -ansi"])
++ AC_CC_TRY_FLAG([-pedanitc], [CFLAGS="$CFLAGS -pedantic"])
++ CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE"
+ fi
+- if test x$enable_gcov = xyes; then
+- case " $CFLAGS " in
+- *[\ \ ]-fprofile-arcs[\ \ ]*) ;;
+- *) CFLAGS="$CFLAGS -fprofile-arcs" ;;
+- esac
+- case " $CFLAGS " in
+- *[\ \ ]-ftest-coverage[\ \ ]*) ;;
+- *) CFLAGS="$CFLAGS -ftest-coverage" ;;
+- esac
+
+- ## remove optimization
+- CFLAGS=`echo "$CFLAGS" | sed -e 's/-O[0-9]*//g'`
++ if test "x$enable_gcov" = "xyes"; then
++ AC_CC_TRY_FLAG([-fprofile-arcs], [CFLAGS="$CFLAGS -fprofile-arcs"])
++ AC_CC_TRY_FLAG([-ftest-coverage], [CFLAGS="$CFLAGS -ftest-coverage"])
+ fi
+- changequote([,])dnl
+ else
+ if test x$enable_gcov = xyes; then
+ AC_MSG_ERROR([--enable-gcov can only be used with gcc])
+Index: b/m4/try_flag.m4
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ b/m4/try_flag.m4 2007-04-26 02:15:05.000000000 -0400
+@@ -0,0 +1,23 @@
++dnl Copied from Cairo configure.in
++dnl Tweaked for more general use by Doug Goldstein <cardoe@gentoo.org>
++dnl
++dnl check compiler flags
++dnl $1 - flag to check
++dnl $2 - when successful do this
++dnl $3 - when not successful, do this
++AC_DEFUN([AC_CC_TRY_FLAG], [
++ AC_MSG_CHECKING([whether $CC supports $1])
++
++ ac_save_CFLAGS="$CFLAGS"
++ CFLAGS="$CFLAGS $1"
++ AC_COMPILE_IFELSE([ ], [ac_cc_flag=yes], [ac_cc_flag=no])
++ CFLAGS="$ac_save_CFLAGS"
++
++ if test "x$ac_cc_flag" = "xyes"; then
++ ifelse([$2], , :, [$2])
++ else
++ ifelse([$3], , :, [$3])
++ fi
++
++ AC_MSG_RESULT([$ac_cc_flag])
++])
+Index: b/Makefile.am
+===================================================================
+--- a/Makefile.am 2007-03-07 16:52:19.000000000 -0500
++++ b/Makefile.am 2007-04-26 02:15:42.000000000 -0400
+@@ -3,6 +3,8 @@
+ SUBDIRS = libhal libhal-storage partutil hald hald-runner tools \
+ fdi doc po privileges
+
++ACLOCAL_AMFLAGS = -I m4
++
+ pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = hal.pc hal-storage.pc
+
diff --git a/sys-apps/hal/files/0.5.9/18_hal_fix_info.category_for_laptop_panel_v2.patch b/sys-apps/hal/files/0.5.9/18_hal_fix_info.category_for_laptop_panel_v2.patch
new file mode 100644
index 000000000..01e0cdd71
--- /dev/null
+++ b/sys-apps/hal/files/0.5.9/18_hal_fix_info.category_for_laptop_panel_v2.patch
@@ -0,0 +1,70 @@
+Index: b/fdi/policy/10osvendor/10-laptop-panel-mgmt-policy.fdi
+===================================================================
+--- a/fdi/policy/10osvendor/10-laptop-panel-mgmt-policy.fdi 2007-03-07 16:52:19.000000000 -0500
++++ b/fdi/policy/10osvendor/10-laptop-panel-mgmt-policy.fdi 2007-04-25 16:17:48.000000000 -0400
+@@ -4,17 +4,20 @@
+
+ <device>
+ <match key="info.category" string="laptop_panel">
+- <append key="info.interfaces" type="strlist">org.freedesktop.Hal.Device.LaptopPanel</append>
++ <!-- only set if the laptop_panel.access_method is not custom -->
++ <match key="laptop_panel.access_method" compare_ne="custom">
++ <append key="info.interfaces" type="strlist">org.freedesktop.Hal.Device.LaptopPanel</append>
+
+- <append key="org.freedesktop.Hal.Device.LaptopPanel.method_names" type="strlist">SetBrightness</append>
+- <append key="org.freedesktop.Hal.Device.LaptopPanel.method_signatures" type="strlist">i</append>
+- <append key="org.freedesktop.Hal.Device.LaptopPanel.method_argnames" type="strlist">brightness_value</append>
+- <append key="org.freedesktop.Hal.Device.LaptopPanel.method_execpaths" type="strlist">hal-system-lcd-set-brightness</append>
++ <append key="org.freedesktop.Hal.Device.LaptopPanel.method_names" type="strlist">SetBrightness</append>
++ <append key="org.freedesktop.Hal.Device.LaptopPanel.method_signatures" type="strlist">i</append>
++ <append key="org.freedesktop.Hal.Device.LaptopPanel.method_argnames" type="strlist">brightness_value</append>
++ <append key="org.freedesktop.Hal.Device.LaptopPanel.method_execpaths" type="strlist">hal-system-lcd-set-brightness</append>
+
+- <append key="org.freedesktop.Hal.Device.LaptopPanel.method_names" type="strlist">GetBrightness</append>
+- <append key="org.freedesktop.Hal.Device.LaptopPanel.method_signatures" type="strlist"></append>
+- <append key="org.freedesktop.Hal.Device.LaptopPanel.method_argnames" type="strlist"></append>
+- <append key="org.freedesktop.Hal.Device.LaptopPanel.method_execpaths" type="strlist">hal-system-lcd-get-brightness</append>
++ <append key="org.freedesktop.Hal.Device.LaptopPanel.method_names" type="strlist">GetBrightness</append>
++ <append key="org.freedesktop.Hal.Device.LaptopPanel.method_signatures" type="strlist"></append>
++ <append key="org.freedesktop.Hal.Device.LaptopPanel.method_argnames" type="strlist"></append>
++ <append key="org.freedesktop.Hal.Device.LaptopPanel.method_execpaths" type="strlist">hal-system-lcd-get-brightness</append>
++ </match>
+ </match>
+ </device>
+
+Index: b/fdi/policy/10osvendor/10-macbook-backlight.fdi
+===================================================================
+--- a/fdi/policy/10osvendor/10-macbook-backlight.fdi 2007-03-19 19:43:31.000000000 -0400
++++ b/fdi/policy/10osvendor/10-macbook-backlight.fdi 2007-04-25 10:30:56.000000000 -0400
+@@ -13,6 +13,7 @@
+ <device>
+ <match key="info.udi" string="/org/freedesktop/Hal/devices/macbook_backlight">
+ <append key="info.capabilities" type="strlist">laptop_panel</append>
++ <merge key="info.category" type="string">laptop_panel</merge>
+ <merge key="info.product" type="string">MacBook Backlight Control</merge>
+ <merge key="laptop_panel.access_method" type="string">custom</merge>
+ <merge key="laptop_panel.num_levels" type="int">118</merge>
+Index: b/fdi/policy/10osvendor/10-macbookpro-utils.fdi
+===================================================================
+--- a/fdi/policy/10osvendor/10-macbookpro-utils.fdi 2007-04-18 10:19:08.000000000 -0400
++++ b/fdi/policy/10osvendor/10-macbookpro-utils.fdi 2007-04-25 10:30:56.000000000 -0400
+@@ -17,6 +17,7 @@
+ <device>
+ <match key="info.udi" string="/org/freedesktop/Hal/devices/macbook_pro_lcd_panel">
+ <append key="info.capabilities" type="strlist">laptop_panel</append>
++ <merge key="info.category" type="string">laptop_panel</merge>
+ <merge key="info.product" type="string">MacBook Pro Laptop Panel</merge>
+ <merge key="laptop_panel.access_method" type="string">custom</merge>
+ <merge key="laptop_panel.num_levels" type="int">229</merge>
+Index: b/fdi/policy/10osvendor/10-omap-backlight.fdi
+===================================================================
+--- a/fdi/policy/10osvendor/10-omap-backlight.fdi 2007-03-07 16:52:19.000000000 -0500
++++ b/fdi/policy/10osvendor/10-omap-backlight.fdi 2007-04-25 10:30:56.000000000 -0400
+@@ -10,6 +10,7 @@
+ <device>
+ <match key="info.udi" string="/org/freedesktop/Hal/devices/omapfb_bl">
+ <merge key="info.product" type="string">OMAP LCD controller and panel</merge>
++ <merge key="info.category" type="string">laptop_panel</merge>
+ <append key="info.capabilities" type="strlist">laptop_panel</append>
+ <merge key="laptop_panel.access_method" type="string">custom</merge>
+ <merge key="laptop_panel.num_levels" type="int">15</merge>
diff --git a/sys-apps/hal/files/0.5.9/19_hald_runner_catch_dbus_disconnect.patch b/sys-apps/hal/files/0.5.9/19_hald_runner_catch_dbus_disconnect.patch
new file mode 100644
index 000000000..2d243d5f9
--- /dev/null
+++ b/sys-apps/hal/files/0.5.9/19_hald_runner_catch_dbus_disconnect.patch
@@ -0,0 +1,30 @@
+Index: b/hald/hald_runner.c
+===================================================================
+--- a/hald/hald_runner.c 2007-04-25 16:17:30.000000000 -0400
++++ b/hald/hald_runner.c 2007-04-25 17:21:47.000000000 -0400
+@@ -726,6 +726,13 @@
+ msg, &call, INT_MAX))
+ DIE (("No memory"));
+
++ /**
++ * The connection was disconnected as per D-Bus API
++ * This is an error condition and should not really happen
++ */
++ if (call == NULL)
++ goto error;
++
+ hd = g_new0 (HelperData, 1);
+ hd->d = device;
+ hd->cb = cb;
+Index: b/hald/hald.c
+===================================================================
+--- a/hald/hald.c 2007-04-12 21:19:50.000000000 -0400
++++ b/hald/hald.c 2007-04-25 17:22:31.000000000 -0400
+@@ -722,6 +722,7 @@
+
+
+ if (!hald_dbus_init ()) {
++ HAL_INFO (("hald_dbus_init() failed"));
+ hald_runner_kill_all();
+ exit (1);
+ }
diff --git a/sys-apps/hal/files/0.5.9/20_firewire_prober_ioctls_fix.patch b/sys-apps/hal/files/0.5.9/20_firewire_prober_ioctls_fix.patch
new file mode 100644
index 000000000..2d9dd8bd1
--- /dev/null
+++ b/sys-apps/hal/files/0.5.9/20_firewire_prober_ioctls_fix.patch
@@ -0,0 +1,31 @@
+From: Kristian Høgsberg <krh@redhat.com>
+Date: Wed, 25 Apr 2007 19:20:39 +0000 (-0400)
+Subject: update firewire prober to use correct ioctl codes
+X-Git-Tag: HAL_0_2
+X-Git-Url: http://gitweb.freedesktop.org/?p=hal.git;a=commitdiff;h=c2b62d08f68881584e020fd031dc6bb143a78a43
+
+update firewire prober to use correct ioctl codes
+---
+
+--- a/hald/linux/probing/probe-ieee1394-unit.c
++++ b/hald/linux/probing/probe-ieee1394-unit.c
+@@ -83,14 +83,11 @@ struct fw_cdev_event_request {
+ __u32 data[0];
+ };
+
+-#define FW_CDEV_IOC_GET_INFO _IO('#', 0x00)
+-#define FW_CDEV_IOC_SEND_REQUEST _IO('#', 0x01)
+-#define FW_CDEV_IOC_ALLOCATE _IO('#', 0x02)
+-#define FW_CDEV_IOC_DEALLOCATE _IO('#', 0x03)
+-#define FW_CDEV_IOC_SEND_RESPONSE _IO('#', 0x04)
+-#define FW_CDEV_IOC_INITIATE_BUS_RESET _IO('#', 0x05)
+-#define FW_CDEV_IOC_ADD_DESCRIPTOR _IO('#', 0x06)
+-#define FW_CDEV_IOC_REMOVE_DESCRIPTOR _IO('#', 0x07)
++#define FW_CDEV_IOC_GET_INFO _IOWR('#', 0x00, struct fw_cdev_get_info)
++#define FW_CDEV_IOC_SEND_REQUEST _IOW('#', 0x01, struct fw_cdev_send_request)
++#define FW_CDEV_IOC_ALLOCATE _IOWR('#', 0x02, struct fw_cdev_allocate)
++#define FW_CDEV_IOC_DEALLOCATE _IOW('#', 0x03, struct fw_cdev_deallocate)
++#define FW_CDEV_IOC_SEND_RESPONSE _IOW('#', 0x04, struct fw_cdev_send_response)
+
+ /* FW_CDEV_VERSION History
+ *
diff --git a/sys-apps/hal/files/0.5.9/21_pm-suspend_correct_options.patch b/sys-apps/hal/files/0.5.9/21_pm-suspend_correct_options.patch
new file mode 100644
index 000000000..1f497958e
--- /dev/null
+++ b/sys-apps/hal/files/0.5.9/21_pm-suspend_correct_options.patch
@@ -0,0 +1,25 @@
+From: David Zeuthen <davidz@redhat.com>
+Date: Wed, 25 Apr 2007 19:24:23 +0000 (-0400)
+Subject: pass correct options to pm-suspend
+X-Git-Tag: HAL_0_2
+X-Git-Url: http://gitweb.freedesktop.org/?p=hal.git;a=commitdiff;h=4149d09581cdc3a17e118d9324a1c194e6461cc2
+
+pass correct options to pm-suspend
+---
+
+--- a/tools/linux/hal-system-power-suspend-linux
++++ b/tools/linux/hal-system-power-suspend-linux
+@@ -26,10 +26,10 @@ QUIRKS=""
+ [ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_S3_MODE" = "true" ] && QUIRKS="$QUIRKS --quirk-s3-mode"
+ [ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_DPMS_SUSPEND" = "true" ] && QUIRKS="$QUIRKS --quirk-dpms-suspend"
+ [ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_DPMS_ON" = "true" ] && QUIRKS="$QUIRKS --quirk-dpms-on"
+-[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBESTATE_RESTORE" = "true" ] && QUIRKS="$QUIRKS --quirk-vbestate"
+-[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBEMODE_RESTORE" = "true" ] && QUIRKS="$QUIRKS --quirk-vbemode"
++[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBESTATE_RESTORE" = "true" ] && QUIRKS="$QUIRKS --quirk-vbestate-restore"
++[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBEMODE_RESTORE" = "true" ] && QUIRKS="$QUIRKS --quirk-vbemode-restore"
+ [ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VGA_MODE_3" = "true" ] && QUIRKS="$QUIRKS --quirk-vga-mode3"
+-[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBE_POST" = "true" ] && QUIRKS="$QUIRKS --quirk-vbepost"
++[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBE_POST" = "true" ] && QUIRKS="$QUIRKS --quirk-vbe-post"
+ [ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_RADEON_OFF" = "true" ] && QUIRKS="$QUIRKS --quirk-radeon-off"
+
+ #PMU systems cannot use /sys/power/state yet, so use a helper to issue an ioctl
diff --git a/sys-apps/hal/files/0.5.9/22_pm-hibernate_correct_options.patch b/sys-apps/hal/files/0.5.9/22_pm-hibernate_correct_options.patch
new file mode 100644
index 000000000..6da14ec58
--- /dev/null
+++ b/sys-apps/hal/files/0.5.9/22_pm-hibernate_correct_options.patch
@@ -0,0 +1,25 @@
+From: David Zeuthen <davidz@redhat.com>
+Date: Wed, 25 Apr 2007 19:25:27 +0000 (-0400)
+Subject: also pass correct options for pm-hibernate
+X-Git-Tag: HAL_0_2
+X-Git-Url: http://gitweb.freedesktop.org/?p=hal.git;a=commitdiff;h=3344f424207ce676b1910a2b3e10c8f2442750c6
+
+also pass correct options for pm-hibernate
+---
+
+--- a/tools/linux/hal-system-power-hibernate-linux
++++ b/tools/linux/hal-system-power-hibernate-linux
+@@ -18,10 +18,10 @@ QUIRKS=""
+ [ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_S3_MODE" = "true" ] && QUIRKS="$QUIRKS --quirk-s3-mode"
+ [ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_DPMS_SUSPEND" = "true" ] && QUIRKS="$QUIRKS --quirk-dpms-suspend"
+ [ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_DPMS_ON" = "true" ] && QUIRKS="$QUIRKS --quirk-dpms-on"
+-[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBESTATE_RESTORE" = "true" ] && QUIRKS="$QUIRKS --quirk-vbestate"
+-[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBEMODE_RESTORE" = "true" ] && QUIRKS="$QUIRKS --quirk-vbemode"
++[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBESTATE_RESTORE" = "true" ] && QUIRKS="$QUIRKS --quirk-vbestate-restore"
++[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBEMODE_RESTORE" = "true" ] && QUIRKS="$QUIRKS --quirk-vbemode-restore"
+ [ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VGA_MODE_3" = "true" ] && QUIRKS="$QUIRKS --quirk-vga-mode3"
+-[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBE_POST" = "true" ] && QUIRKS="$QUIRKS --quirk-vbepost"
++[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBE_POST" = "true" ] && QUIRKS="$QUIRKS --quirk-vbe-post"
+ [ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_RADEON_OFF" = "true" ] && QUIRKS="$QUIRKS --quirk-radeon-off"
+
+ #ALTLinux only supports powersave
diff --git a/sys-apps/hal/files/0.5.9/23_runner_64bit_values.patch b/sys-apps/hal/files/0.5.9/23_runner_64bit_values.patch
new file mode 100644
index 000000000..c878db98c
--- /dev/null
+++ b/sys-apps/hal/files/0.5.9/23_runner_64bit_values.patch
@@ -0,0 +1,34 @@
+diff --git a/hald-runner/main.c b/hald-runner/main.c
+index 3b170b3..3842cb8 100644
+--- a/hald-runner/main.c
++++ b/hald-runner/main.c
+@@ -128,9 +128,10 @@ handle_start(DBusConnection *con, DBusMessage *msg)
+ goto malformed;
+
+ if (run_request_run(r, con, NULL, &pid)) {
++ gint64 ppid = pid;
+ reply = dbus_message_new_method_return(msg);
+ dbus_message_append_args (reply,
+- DBUS_TYPE_INT64, &pid,
++ DBUS_TYPE_INT64, &ppid,
+ DBUS_TYPE_INVALID);
+
+ } else {
+diff --git a/hald-runner/runner.c b/hald-runner/runner.c
+index 57a2a80..8cbc777 100644
+--- a/hald-runner/runner.c
++++ b/hald-runner/runner.c
+@@ -175,11 +175,12 @@ out:
+ /* emit a signal that this PID exited */
+ if(rd->con != NULL && rd->emit_pid_exited) {
+ DBusMessage *signal;
++ gint64 ppid = rd->pid;
+ signal = dbus_message_new_signal ("/org/freedesktop/HalRunner",
+ "org.freedesktop.HalRunner",
+ "StartedProcessExited");
+ dbus_message_append_args (signal,
+- DBUS_TYPE_INT64, &(rd->pid),
++ DBUS_TYPE_INT64, &(ppid),
+ DBUS_TYPE_INVALID);
+ dbus_connection_send(rd->con, signal, NULL);
+ }
diff --git a/sys-apps/hal/files/0.5.9/24_libparted_1_8_7.patch b/sys-apps/hal/files/0.5.9/24_libparted_1_8_7.patch
new file mode 100644
index 000000000..604933615
--- /dev/null
+++ b/sys-apps/hal/files/0.5.9/24_libparted_1_8_7.patch
@@ -0,0 +1,39 @@
+From: Danny Kukawka <danny.kukawka@web.de>
+Date: Wed, 23 May 2007 18:05:17 +0000 (+0200)
+Subject: updated allowed libparted versions
+X-Git-Url: http://gitweb.freedesktop.org/?p=hal.git;a=commitdiff;h=366ab0006278f6c23fc3c33dea7eb61a42fe941e
+
+updated allowed libparted versions
+
+Updated again the list of allowed liparted version by add v1.8.7
+---
+
+Index: b/configure.in
+===================================================================
+--- a/configure.in 2007-04-30 14:58:50.000000000 -0400
++++ b/configure.in 2007-08-01 17:38:20.000000000 -0400
+@@ -193,7 +193,7 @@
+ AC_DEFINE(USE_PARTED,1,[Whether libparted is to be used])
+ AC_CHECK_LIB(uuid, uuid_generate, [], AC_MSG_ERROR([*** uuid library (libuuid) not found]))
+ AC_CHECK_LIB(dl, dlopen, [], AC_MSG_ERROR([*** dl library (libdl) not found]))
+- AC_MSG_CHECKING([for libparted == 1.7.1, 1.8.0, 1.8.1, 1.8.2, 1.8.6])
++ AC_MSG_CHECKING([for libparted == 1.7.1, 1.8.0, 1.8.1, 1.8.2, 1.8.6, 1.8.7])
+ LDFLAGS=-lparted
+ AC_TRY_RUN(
+ #include <stdio.h>
+@@ -211,12 +211,13 @@
+ (major == 1 && minor == 8 && micro == 0) ||
+ (major == 1 && minor == 8 && micro == 1) ||
+ (major == 1 && minor == 8 && micro == 2) ||
+- (major == 1 && minor == 8 && micro == 6))
++ (major == 1 && minor == 8 && micro == 6) ||
++ (major == 1 && minor == 8 && micro == 7))
+ return 0;
+
+ return 1;
+ }
+- ,AC_MSG_RESULT( ),AC_MSG_ERROR([*** Requires libparted == 1.7.1/1.8.0/1.8.1/1.8.2 or 1.8.6]) )
++ ,AC_MSG_RESULT( ),AC_MSG_ERROR([*** Requires libparted == 1.7.1/1.8.0/1.8.1/1.8.2/1.8.6 or 1.8.7]) )
+ PARTED_LIBS=-lparted
+ AC_SUBST(PARTED_LIBS)
+ LDFLAGS=
diff --git a/sys-apps/hal/files/0.5.9/95_gentoo_man_page.patch b/sys-apps/hal/files/0.5.9/95_gentoo_man_page.patch
new file mode 100644
index 000000000..804bb9c12
--- /dev/null
+++ b/sys-apps/hal/files/0.5.9/95_gentoo_man_page.patch
@@ -0,0 +1,507 @@
+---
+ doc/man/hal-disable-polling.1 | 1 +
+ doc/man/hal-disable-polling.1.in | 1 +
+ doc/man/hal-find-by-capability.1 | 1 +
+ doc/man/hal-find-by-capability.1.in | 1 +
+ doc/man/hal-find-by-property.1 | 1 +
+ doc/man/hal-find-by-property.1.in | 1 +
+ doc/man/hal-get-property.1 | 1 +
+ doc/man/hal-get-property.1.in | 1 +
+ doc/man/hal-is-caller-locked-out.1 | 1 +
+ doc/man/hal-is-caller-locked-out.1.in | 1 +
+ doc/man/hal-lock.1 | 1 +
+ doc/man/hal-lock.1.in | 1 +
+ doc/man/hal-set-property.1 | 1 +
+ doc/man/hal-set-property.1.in | 1 +
+ doc/man/hald.8 | 1 +
+ doc/man/hald.8.in | 6 ++++--
+ 16 files changed, 19 insertions(+), 2 deletions(-)
+
+Index: b/doc/man/hal-disable-polling.1
+===================================================================
+--- a/doc/man/hal-disable-polling.1 2007-04-06 19:37:52.000000000 -0400
++++ b/doc/man/hal-disable-polling.1 2007-04-06 20:26:09.000000000 -0400
+@@ -18,7 +18,8 @@
+ .B HAL
+ properties, refer to the \fIHAL spec\fP which can be found in
+ .I "/usr/share/doc/hal/spec/hal-spec.html"
+-depending on the distribution.
++if emerged with
++.B USE=doc.
+
+ .SH OPTIONS
+ The following options are supported:
+@@ -117,7 +118,7 @@
+
+ .SH BUGS
+ .PP
+-Please send bug reports to either the distribution or the HAL
++Please send bug reports to http://bugs.gentoo.org or the HAL
+ mailing list, see
+ .I "http://lists.freedesktop.org/mailman/listinfo/hal"
+ on how to subscribe.
+@@ -134,4 +135,5 @@
+ .SH AUTHOR
+ Written by David Zeuthen <david@fubar.dk> with a lot of help from many
+ others.
++Gentoo specific changes by Doug Goldstein <cardoe@gentoo.org> and Steev Klimaszewski <steev@gentoo.org> with help from Gentoo testers and contributors.
+
+Index: b/doc/man/hal-disable-polling.1.in
+===================================================================
+--- a/doc/man/hal-disable-polling.1.in 2007-04-06 19:37:52.000000000 -0400
++++ b/doc/man/hal-disable-polling.1.in 2007-04-06 20:26:18.000000000 -0400
+@@ -18,7 +18,8 @@
+ .B HAL
+ properties, refer to the \fIHAL spec\fP which can be found in
+ .I "@docdir@/spec/hal-spec.html"
+-depending on the distribution.
++if emerged with
++.B USE=doc.
+
+ .SH OPTIONS
+ The following options are supported:
+@@ -117,7 +118,7 @@
+
+ .SH BUGS
+ .PP
+-Please send bug reports to either the distribution or the HAL
++Please send bug reports to http://bugs.gentoo.org or the HAL
+ mailing list, see
+ .I "http://lists.freedesktop.org/mailman/listinfo/hal"
+ on how to subscribe.
+@@ -134,4 +135,4 @@
+ .SH AUTHOR
+ Written by David Zeuthen <david@fubar.dk> with a lot of help from many
+ others.
+-
++Gentoo specific changes by Doug Goldstein <cardoe@gentoo.org> and Steev Klimaszewski <steev@gentoo.org> with help from Gentoo testers and contributors.
+Index: b/doc/man/hal-find-by-capability.1
+===================================================================
+--- a/doc/man/hal-find-by-capability.1 2007-04-06 19:37:52.000000000 -0400
++++ b/doc/man/hal-find-by-capability.1 2007-04-06 20:25:54.000000000 -0400
+@@ -20,7 +20,8 @@
+ .B HAL
+ properties, refer to the \fIHAL spec\fP which can be found in
+ .I "/usr/share/doc/hal/spec/hal-spec.html"
+-depending on the distribution.
++if emerged with
++.B USE=doc.
+
+ .SH OPTIONS
+ The following options are supported:
+@@ -46,7 +47,7 @@
+
+ .SH BUGS
+ .PP
+-Please send bug reports to either the distribution or the HAL
++Please send bug reports to http://bugs.gentoo.org or the HAL
+ mailing list, see
+ .I "http://lists.freedesktop.org/mailman/listinfo/hal"
+ on how to subscribe.
+@@ -64,3 +65,4 @@
+ Written by David Zeuthen <david@fubar.dk> with a lot of help from many
+ others.
+
++Gentoo specific changes by Doug Goldstein <cardoe@gentoo.org> and Steev Klimaszewski <steev@gentoo.org> with help from Gentoo testers and contributors.
+Index: b/doc/man/hal-find-by-capability.1.in
+===================================================================
+--- a/doc/man/hal-find-by-capability.1.in 2007-04-06 19:37:52.000000000 -0400
++++ b/doc/man/hal-find-by-capability.1.in 2007-04-06 20:25:30.000000000 -0400
+@@ -20,7 +20,8 @@
+ .B HAL
+ properties, refer to the \fIHAL spec\fP which can be found in
+ .I "@docdir@/spec/hal-spec.html"
+-depending on the distribution.
++if emerged with
++.B USE=doc.
+
+ .SH OPTIONS
+ The following options are supported:
+@@ -46,7 +47,7 @@
+
+ .SH BUGS
+ .PP
+-Please send bug reports to either the distribution or the HAL
++Please send bug reports to http://bugs.gentoo.org or the HAL
+ mailing list, see
+ .I "http://lists.freedesktop.org/mailman/listinfo/hal"
+ on how to subscribe.
+@@ -64,3 +65,4 @@
+ Written by David Zeuthen <david@fubar.dk> with a lot of help from many
+ others.
+
++Gentoo specific changes by Doug Goldstein <cardoe@gentoo.org> and Steev Klimaszewski <steev@gentoo.org> with help from Gentoo testers and contributors.
+Index: b/doc/man/hal-find-by-property.1
+===================================================================
+--- a/doc/man/hal-find-by-property.1 2007-04-06 19:37:52.000000000 -0400
++++ b/doc/man/hal-find-by-property.1 2007-04-06 20:25:30.000000000 -0400
+@@ -20,7 +20,8 @@
+ .B HAL
+ properties, refer to the \fIHAL spec\fP which can be found in
+ .I "/usr/share/doc/hal/spec/hal-spec.html"
+-depending on the distribution.
++if emerged with
++.B USE=doc.
+
+ .SH OPTIONS
+ The following options are supported:
+@@ -49,7 +50,7 @@
+
+ .SH BUGS
+ .PP
+-Please send bug reports to either the distribution or the HAL
++Please send bug reports to http://bugs.gentoo.org or the HAL
+ mailing list, see
+ .I "http://lists.freedesktop.org/mailman/listinfo/hal"
+ on how to subscribe.
+@@ -67,3 +68,4 @@
+ Written by David Zeuthen <david@fubar.dk> with a lot of help from many
+ others.
+
++Gentoo specific changes by Doug Goldstein <cardoe@gentoo.org> and Steev Klimaszewski <steev@gentoo.org> with help from Gentoo testers and contributors.
+Index: b/doc/man/hal-find-by-property.1.in
+===================================================================
+--- a/doc/man/hal-find-by-property.1.in 2007-04-06 19:37:52.000000000 -0400
++++ b/doc/man/hal-find-by-property.1.in 2007-04-06 20:25:30.000000000 -0400
+@@ -20,7 +20,8 @@
+ .B HAL
+ properties, refer to the \fIHAL spec\fP which can be found in
+ .I "@docdir@/spec/hal-spec.html"
+-depending on the distribution.
++if emerged with
++.B USE=doc.
+
+ .SH OPTIONS
+ The following options are supported:
+@@ -49,7 +50,7 @@
+
+ .SH BUGS
+ .PP
+-Please send bug reports to either the distribution or the HAL
++Please send bug reports to http://bugs.gentoo.org or the HAL
+ mailing list, see
+ .I "http://lists.freedesktop.org/mailman/listinfo/hal"
+ on how to subscribe.
+@@ -67,3 +68,4 @@
+ Written by David Zeuthen <david@fubar.dk> with a lot of help from many
+ others.
+
++Gentoo specific changes by Doug Goldstein <cardoe@gentoo.org> and Steev Klimaszewski <steev@gentoo.org> with help from Gentoo testers and contributors.
+Index: b/doc/man/hal-get-property.1
+===================================================================
+--- a/doc/man/hal-get-property.1 2007-04-06 19:37:52.000000000 -0400
++++ b/doc/man/hal-get-property.1 2007-04-06 20:25:30.000000000 -0400
+@@ -20,7 +20,8 @@
+ .B HAL
+ properties, refer to the \fIHAL spec\fP which can be found in
+ .I "/usr/share/doc/hal/spec/hal-spec.html"
+-depending on the distribution.
++if emerged with
++.B USE=doc.
+
+ .SH OPTIONS
+ The following options are supported:
+@@ -53,7 +54,7 @@
+
+ .SH BUGS
+ .PP
+-Please send bug reports to either the distribution or the HAL
++Please send bug reports to http://bugs.gentoo.org or the HAL
+ mailing list, see
+ .I "http://lists.freedesktop.org/mailman/listinfo/hal"
+ on how to subscribe.
+@@ -70,3 +71,4 @@
+ Written by David Zeuthen <david@fubar.dk> with a lot of help from many
+ others.
+
++Gentoo specific changes by Doug Goldstein <cardoe@gentoo.org> and Steev Klimaszewski <steev@gentoo.org> with help from Gentoo testers and contributors.
+Index: b/doc/man/hal-get-property.1.in
+===================================================================
+--- a/doc/man/hal-get-property.1.in 2007-04-06 19:37:52.000000000 -0400
++++ b/doc/man/hal-get-property.1.in 2007-04-06 20:25:30.000000000 -0400
+@@ -20,7 +20,8 @@
+ .B HAL
+ properties, refer to the \fIHAL spec\fP which can be found in
+ .I "@docdir@/spec/hal-spec.html"
+-depending on the distribution.
++if emerged with
++.B USE=doc.
+
+ .SH OPTIONS
+ The following options are supported:
+@@ -53,7 +54,7 @@
+
+ .SH BUGS
+ .PP
+-Please send bug reports to either the distribution or the HAL
++Please send bug reports to http://bugs.gentoo.org or the HAL
+ mailing list, see
+ .I "http://lists.freedesktop.org/mailman/listinfo/hal"
+ on how to subscribe.
+@@ -70,3 +71,4 @@
+ Written by David Zeuthen <david@fubar.dk> with a lot of help from many
+ others.
+
++Gentoo specific changes by Doug Goldstein <cardoe@gentoo.org> and Steev Klimaszewski <steev@gentoo.org> with help from Gentoo testers and contributors.
+Index: b/doc/man/hal-is-caller-locked-out.1
+===================================================================
+--- a/doc/man/hal-is-caller-locked-out.1 2007-04-06 19:37:52.000000000 -0400
++++ b/doc/man/hal-is-caller-locked-out.1 2007-04-06 20:25:30.000000000 -0400
+@@ -18,7 +18,8 @@
+ .B HAL
+ properties, refer to the \fIHAL spec\fP which can be found in
+ .I "/usr/share/doc/hal/spec/hal-spec.html"
+-depending on the distribution.
++if emerged with
++.B USE=doc.
+
+ .SH OPTIONS
+ The following options are supported:
+@@ -47,7 +48,7 @@
+
+ .SH BUGS
+ .PP
+-Please send bug reports to either the distribution or the HAL
++Please send bug reports to http://bugs.gentoo.org or the HAL
+ mailing list, see
+ .I "http://lists.freedesktop.org/mailman/listinfo/hal"
+ on how to subscribe.
+@@ -65,3 +66,4 @@
+ Written by David Zeuthen <david@fubar.dk> with a lot of help from many
+ others.
+
++Gentoo specific changes by Doug Goldstein <cardoe@gentoo.org> and Steev Klimaszewski <steev@gentoo.org> with help from Gentoo testers and contributors.
+Index: b/doc/man/hal-is-caller-locked-out.1.in
+===================================================================
+--- a/doc/man/hal-is-caller-locked-out.1.in 2007-04-06 19:37:52.000000000 -0400
++++ b/doc/man/hal-is-caller-locked-out.1.in 2007-04-06 20:25:30.000000000 -0400
+@@ -18,7 +18,8 @@
+ .B HAL
+ properties, refer to the \fIHAL spec\fP which can be found in
+ .I "@docdir@/spec/hal-spec.html"
+-depending on the distribution.
++if emerged with
++.B USE=doc.
+
+ .SH OPTIONS
+ The following options are supported:
+@@ -47,7 +48,7 @@
+
+ .SH BUGS
+ .PP
+-Please send bug reports to either the distribution or the HAL
++Please send bug reports to http://bugs.gentoo.org or the HAL
+ mailing list, see
+ .I "http://lists.freedesktop.org/mailman/listinfo/hal"
+ on how to subscribe.
+@@ -65,3 +66,4 @@
+ Written by David Zeuthen <david@fubar.dk> with a lot of help from many
+ others.
+
++Gentoo specific changes by Doug Goldstein <cardoe@gentoo.org> and Steev Klimaszewski <steev@gentoo.org> with help from Gentoo testers and contributors.
+Index: b/doc/man/hal-lock.1
+===================================================================
+--- a/doc/man/hal-lock.1 2007-04-06 19:37:52.000000000 -0400
++++ b/doc/man/hal-lock.1 2007-04-06 20:25:30.000000000 -0400
+@@ -18,7 +18,8 @@
+ .B HAL
+ locks, refer to the \fIHAL spec\fP which can be found in
+ .I "/usr/share/doc/hal/spec/hal-spec.html"
+-depending on the distribution.
++if emerged with
++.B USE=doc.
+
+ .SH OPTIONS
+ The following options are supported:
+@@ -78,7 +79,7 @@
+
+ .SH BUGS
+ .PP
+-Please send bug reports to either the distribution or the HAL
++Please send bug reports to http://bugs.gentoo.org or the HAL
+ mailing list, see
+ .I "http://lists.freedesktop.org/mailman/listinfo/hal"
+ on how to subscribe.
+@@ -96,3 +97,4 @@
+ Written by David Zeuthen <david@fubar.dk> with a lot of help from many
+ others.
+
++Gentoo specific changes by Doug Goldstein <cardoe@gentoo.org> and Steev Klimaszewski <steev@gentoo.org> with help from Gentoo testers and contributors.
+Index: b/doc/man/hal-lock.1.in
+===================================================================
+--- a/doc/man/hal-lock.1.in 2007-04-06 19:37:52.000000000 -0400
++++ b/doc/man/hal-lock.1.in 2007-04-06 20:25:30.000000000 -0400
+@@ -18,7 +18,8 @@
+ .B HAL
+ locks, refer to the \fIHAL spec\fP which can be found in
+ .I "@docdir@/spec/hal-spec.html"
+-depending on the distribution.
++if emerged with
++.B USE=doc.
+
+ .SH OPTIONS
+ The following options are supported:
+@@ -78,7 +79,7 @@
+
+ .SH BUGS
+ .PP
+-Please send bug reports to either the distribution or the HAL
++Please send bug reports to http://bugs.gentoo.org or the HAL
+ mailing list, see
+ .I "http://lists.freedesktop.org/mailman/listinfo/hal"
+ on how to subscribe.
+@@ -96,3 +97,4 @@
+ Written by David Zeuthen <david@fubar.dk> with a lot of help from many
+ others.
+
++Gentoo specific changes by Doug Goldstein <cardoe@gentoo.org> and Steev Klimaszewski <steev@gentoo.org> with help from Gentoo testers and contributors.
+Index: b/doc/man/hal-set-property.1
+===================================================================
+--- a/doc/man/hal-set-property.1 2007-04-06 19:37:52.000000000 -0400
++++ b/doc/man/hal-set-property.1 2007-04-06 20:25:30.000000000 -0400
+@@ -20,7 +20,8 @@
+ .B HAL
+ properties, refer to the \fIHAL spec\fP which can be found in
+ .I "/usr/share/doc/hal/spec/hal-spec.html"
+-depending on the distribution.
++if emerged with
++.B USE=doc.
+
+ .SH OPTIONS
+ The following options are supported:
+@@ -87,7 +88,7 @@
+
+ .SH BUGS
+ .PP
+-Please send bug reports to either the distribution or the HAL
++Please send bug reports to http://bugs.gentoo.org or the HAL
+ mailing list, see
+ .I "http://lists.freedesktop.org/mailman/listinfo/hal"
+ on how to subscribe.
+@@ -104,3 +105,4 @@
+ Written by David Zeuthen <david@fubar.dk> with a lot of help from many
+ others.
+
++Gentoo specific changes by Doug Goldstein <cardoe@gentoo.org> and Steev Klimaszewski <steev@gentoo.org> with help from Gentoo testers and contributors.
+Index: b/doc/man/hal-set-property.1.in
+===================================================================
+--- a/doc/man/hal-set-property.1.in 2007-04-06 19:37:52.000000000 -0400
++++ b/doc/man/hal-set-property.1.in 2007-04-06 20:25:30.000000000 -0400
+@@ -20,7 +20,8 @@
+ .B HAL
+ properties, refer to the \fIHAL spec\fP which can be found in
+ .I "@docdir@/spec/hal-spec.html"
+-depending on the distribution.
++if emerged with
++.B USE=doc.
+
+ .SH OPTIONS
+ The following options are supported:
+@@ -87,7 +88,7 @@
+
+ .SH BUGS
+ .PP
+-Please send bug reports to either the distribution or the HAL
++Please send bug reports to http://bugs.gentoo.org or the HAL
+ mailing list, see
+ .I "http://lists.freedesktop.org/mailman/listinfo/hal"
+ on how to subscribe.
+@@ -104,3 +105,4 @@
+ Written by David Zeuthen <david@fubar.dk> with a lot of help from many
+ others.
+
++Gentoo specific changes by Doug Goldstein <cardoe@gentoo.org> and Steev Klimaszewski <steev@gentoo.org> with help from Gentoo testers and contributors.
+Index: b/doc/man/hald.8
+===================================================================
+--- a/doc/man/hald.8 2007-04-06 19:37:52.000000000 -0400
++++ b/doc/man/hald.8 2007-04-06 20:29:53.000000000 -0400
+@@ -19,7 +19,8 @@
+ more information about both the big picture and specific API details,
+ refer to the \fIHAL spec\fP which can be found in
+ .I "/usr/share/doc/hal/spec/hal-spec.html"
+-depending on the distribution.
++if emerged with
++.B USE=doc.
+
+ .SH OPTIONS
+ The following options are supported:
+@@ -38,24 +39,20 @@
+
+ .SH BUGS AND DEBUGGING
+ .PP
+-Please send bug reports to either the distribution or the HAL
++Please send bug reports to http://bugs.gentoo.org or the HAL
+ mailing list, see
+ .I "http://lists.freedesktop.org/mailman/listinfo/hal"
+ on how to subscribe.
+
+-First, to obtain useful debug traces you will need to have
+-.B debuginfo
+-packages installed. On a Fedora system this is in the
+-.B hal-debuginfo
+-package and can be installed via the
+-.I yum
+-update program.
++First, to obtain useful debug traces you will need to have HAL emerged with
++.B USE=debug
++enabled. Additionally you should read http://www.gentoo.org/proj/en/qa/backtraces.xml
+
+ Second, shut down the existing
+ .B hald
+-daemon instance; on a Fedora system this is achieved by
++daemon instance; on a Gentoo system this is achieved by
+
+-.I "/etc/init.d/haldaemon stop"
++.I "/etc/init.d/hald stop"
+
+ After having shut down the daemon, you might want to run
+
+@@ -102,4 +99,5 @@
+ .SH AUTHOR
+ Written by David Zeuthen <david@fubar.dk> with a lot of help from many
+ others.
++Gentoo specific changes by Doug Goldstein <cardoe@gentoo.org> and Steev Klimaszewski <steev@gentoo.org> with help from Gentoo testers and contributors.
+
+Index: b/doc/man/hald.8.in
+===================================================================
+--- a/doc/man/hald.8.in 2007-04-06 19:37:52.000000000 -0400
++++ b/doc/man/hald.8.in 2007-04-06 20:30:19.000000000 -0400
+@@ -19,7 +19,8 @@
+ more information about both the big picture and specific API details,
+ refer to the \fIHAL spec\fP which can be found in
+ .I "@docdir@/spec/hal-spec.html"
+-depending on the distribution.
++if emerged with
++.B USE=doc.
+
+ .SH OPTIONS
+ The following options are supported:
+@@ -38,18 +39,14 @@
+
+ .SH BUGS AND DEBUGGING
+ .PP
+-Please send bug reports to either the distribution or the HAL
++Please send bug reports to http://bugs.gentoo.org or the HAL
+ mailing list, see
+ .I "http://lists.freedesktop.org/mailman/listinfo/hal"
+ on how to subscribe.
+
+-First, to obtain useful debug traces you will need to have
+-.B debuginfo
+-packages installed. On a Fedora system this is in the
+-.B hal-debuginfo
+-package and can be installed via the
+-.I yum
+-update program.
++First, to obtain useful debug traces you will need to have HAL emerged with
++.B USE=debug
++enabled. Additionally you should read http://www.gentoo.org/proj/en/qa/backtraces.xml
+
+ Second, shut down the existing
+ .B hald
+@@ -102,4 +99,4 @@
+ .SH AUTHOR
+ Written by David Zeuthen <david@fubar.dk> with a lot of help from many
+ others.
+-
++Gentoo specific changes by Doug Goldstein <cardoe@gentoo.org> and Steev Klimaszewski <steev@gentoo.org> with help from Gentoo testers and contributors.
diff --git a/sys-apps/hal/files/0.5.9/96_plugdev_allow_send.patch b/sys-apps/hal/files/0.5.9/96_plugdev_allow_send.patch
new file mode 100644
index 000000000..ea462785f
--- /dev/null
+++ b/sys-apps/hal/files/0.5.9/96_plugdev_allow_send.patch
@@ -0,0 +1,42 @@
+Index: b/hal.conf
+===================================================================
+--- a/hal.conf 2007-04-03 00:41:24.000000000 -0400
++++ b/hal.conf 2007-04-06 20:36:53.000000000 -0400
+@@ -63,5 +63,16 @@
+ <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
+ </policy>
+
++ <!-- Gentoo specific rules to allow 'plugdev' group to access Volumes and Power Management -->
++ <!-- We possibly will use 'powerdev' for Power Management or work on encapsulating everything in ConsoleKit -->
++ <policy group="plugdev">
++ <allow send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
++ <allow send_interface="org.freedesktop.Hal.Device.LaptopPanel"/>
++ </policy>
++ <policy group="plugdev">
++ <allow send_interface="org.freedesktop.Hal.Device.Volume"/>
++ <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
++ </policy>
++
+ </busconfig>
+
+Index: b/hal.conf.in
+===================================================================
+--- a/hal.conf.in 2007-03-07 16:52:19.000000000 -0500
++++ b/hal.conf.in 2007-04-06 20:37:59.000000000 -0400
+@@ -63,5 +63,16 @@
+ <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
+ </policy>
+
++ <!-- Gentoo specific rules to allow 'plugdev' group to access Volumes and Power Management -->
++ <!-- We possibly will use 'powerdev' for Power Management or work on encapsulating everything in ConsoleKit -->
++ <policy group="plugdev">
++ <allow send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
++ <allow send_interface="org.freedesktop.Hal.Device.LaptopPanel"/>
++ </policy>
++ <policy group="plugdev">
++ <allow send_interface="org.freedesktop.Hal.Device.Volume"/>
++ <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
++ </policy>
++
+ </busconfig>
+
diff --git a/sys-apps/hal/files/0.5.9/97_ignore_fixed_drives.patch b/sys-apps/hal/files/0.5.9/97_ignore_fixed_drives.patch
new file mode 100644
index 000000000..04e2ef3bb
--- /dev/null
+++ b/sys-apps/hal/files/0.5.9/97_ignore_fixed_drives.patch
@@ -0,0 +1,38 @@
+Index: b/fdi/policy/10osvendor/95-storage-ignore-fixed-drives.fdi
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ b/fdi/policy/10osvendor/95-storage-ignore-fixed-drives.fdi 2007-04-24 11:42:44.000000000 -0400
+@@ -0,0 +1,19 @@
++<?xml version="1.0" encoding="UTF-8"?>
++
++<deviceinfo version="0.2">
++ <device>
++ <match key="volume.fsusage" string="filesystem">
++ <match key="@block.storage_device:storage.hotpluggable" bool="false">
++ <match key="@block.storage_device:storage.removable" bool="false">
++ <match key="volume.is_mounted" bool="true">
++ <merge key="volume.ignore" type="bool">true</merge>
++ <!-- Show /media/ mounted devices -->
++ <match key="volume.mount_point" prefix="/media">
++ <merge key="volume.ignore" type="bool">false</merge>
++ </match>
++ </match>
++ </match>
++ </match>
++ </match>
++ </device>
++</deviceinfo>
+Index: b/fdi/policy/10osvendor/Makefile.am
+===================================================================
+--- a/fdi/policy/10osvendor/Makefile.am 2007-04-20 14:10:05.000000000 -0400
++++ b/fdi/policy/10osvendor/Makefile.am 2007-04-24 11:42:44.000000000 -0400
+@@ -7,7 +7,8 @@
+ 10-rfkill-switch.fdi \
+ 10-laptop-panel-mgmt-policy.fdi \
+ 15-storage-luks.fdi \
+- 20-storage-methods.fdi
++ 20-storage-methods.fdi \
++ 95-storage-ignore-fixed-drives.fdi
+
+ if BUILD_MACBOOKPRO
+ dist_fdi_DATA += 10-macbookpro-utils.fdi
diff --git a/sys-apps/hal/files/0.5.9/98_hald_cache_test_path.patch b/sys-apps/hal/files/0.5.9/98_hald_cache_test_path.patch
new file mode 100644
index 000000000..46268e4a0
--- /dev/null
+++ b/sys-apps/hal/files/0.5.9/98_hald_cache_test_path.patch
@@ -0,0 +1,17 @@
+Index: b/hald/hald-cache-test.sh
+===================================================================
+--- a/hald/hald-cache-test.sh 2007-03-07 16:52:19.000000000 -0500
++++ b/hald/hald-cache-test.sh 2007-06-14 12:10:19.000000000 -0400
+@@ -3,9 +3,9 @@
+ mkdir .local-fdi-test
+ make -C ../fdi install DESTDIR=`pwd`/.local-fdi-test prefix=/
+
+-HAL_FDI_SOURCE_PREPROBE=.local-fdi-test/share/hal/fdi/preprobe
+-HAL_FDI_SOURCE_INFORMATION=.local-fdi-test/share/hal/fdi/preprobe
+-HAL_FDI_SOURCE_POLICY=.local-fdi-test/share/hal/fdi/policy
++HAL_FDI_SOURCE_PREPROBE=.local-fdi-test/usr/share/hal/fdi/preprobe
++HAL_FDI_SOURCE_INFORMATION=.local-fdi-test/usr/share/hal/fdi/preprobe
++HAL_FDI_SOURCE_POLICY=.local-fdi-test/usr/share/hal/fdi/policy
+ HAL_FDI_CACHE_NAME=.local-fdi-test/hald-local-fdi-cache
+ export HAL_FDI_SOURCE_PREPROBE HAL_FDI_SOURCE_INFORMATION \
+ HAL_FDI_SOURCE_POLICY HAL_FDI_CACHE_NAME
diff --git a/sys-apps/hal/files/0.5.9/99_sun_disklabel_ignore.patch b/sys-apps/hal/files/0.5.9/99_sun_disklabel_ignore.patch
new file mode 100644
index 000000000..e03ebe59c
--- /dev/null
+++ b/sys-apps/hal/files/0.5.9/99_sun_disklabel_ignore.patch
@@ -0,0 +1,20 @@
+Index: b/fdi/policy/10osvendor/95-storage-ignore-fixed-drives.fdi
+===================================================================
+--- a/fdi/policy/10osvendor/95-storage-ignore-fixed-drives.fdi 2007-07-27 12:26:05.000000000 -0400
++++ b/fdi/policy/10osvendor/95-storage-ignore-fixed-drives.fdi 2007-07-27 12:26:22.000000000 -0400
+@@ -16,4 +16,15 @@
+ </match>
+ </match>
+ </device>
++
++ <!-- sun disklabel -->
++ <device>
++ <match key="volume.fsusage" string="filesystem">
++ <match key="volume.partition.number" int="3">
++ <match key="volume.partition.start" uint64="0">
++ <merge key="volume.ignore" type="bool">true</merge>
++ </match>
++ </match>
++ </match>
++ </device>
+ </deviceinfo>
diff --git a/sys-apps/hal/files/0.5.9/series b/sys-apps/hal/files/0.5.9/series
new file mode 100644
index 000000000..7a74ac53f
--- /dev/null
+++ b/sys-apps/hal/files/0.5.9/series
@@ -0,0 +1,28 @@
+01_luks_mount_fix.patch
+02_acpi_repeated_property_change.patch
+03_crasher_fix_fail_to_return_value.patch
+04_cache_regen_return_fix.patch
+05_freebsd_partutil_make_fix.patch
+06_freebsd_backend_fix.patch
+07_malloc_h_for_stdlib_h.patch
+08_contains_not_fdi_directive.patch
+09_hald_addon_keyboard_start_one.patch
+10_freebsd_storage_reprobe_fix.patch
+11_hal_fix_segfault_probe_volume.patch
+12_hal_fix-vol_label_probe_volume.patch
+13_detect_newer_macbooks.patch
+14_ntfs_allows_utf8.patch
+15_spec_fdi_matching.patch
+16_dev_root_is_mounted.patch
+17_autoconf_cflag_cleanup.patch
+18_hal_fix_info.category_for_laptop_panel_v2.patch
+19_hald_runner_catch_dbus_disconnect.patch
+20_firewire_prober_ioctls_fix.patch
+21_pm-suspend_correct_options.patch
+22_pm-hibernate_correct_options.patch
+23_runner_64bit_values.patch
+24_libparted_1_8_7.patch
+95_gentoo_man_page.patch
+96_plugdev_allow_send.patch
+97_ignore_fixed_drives.patch
+98_hald_cache_test_path.patch
diff --git a/sys-apps/hal/files/96_plugdev_allow_send.patch b/sys-apps/hal/files/96_plugdev_allow_send.patch
new file mode 100644
index 000000000..ea462785f
--- /dev/null
+++ b/sys-apps/hal/files/96_plugdev_allow_send.patch
@@ -0,0 +1,42 @@
+Index: b/hal.conf
+===================================================================
+--- a/hal.conf 2007-04-03 00:41:24.000000000 -0400
++++ b/hal.conf 2007-04-06 20:36:53.000000000 -0400
+@@ -63,5 +63,16 @@
+ <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
+ </policy>
+
++ <!-- Gentoo specific rules to allow 'plugdev' group to access Volumes and Power Management -->
++ <!-- We possibly will use 'powerdev' for Power Management or work on encapsulating everything in ConsoleKit -->
++ <policy group="plugdev">
++ <allow send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
++ <allow send_interface="org.freedesktop.Hal.Device.LaptopPanel"/>
++ </policy>
++ <policy group="plugdev">
++ <allow send_interface="org.freedesktop.Hal.Device.Volume"/>
++ <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
++ </policy>
++
+ </busconfig>
+
+Index: b/hal.conf.in
+===================================================================
+--- a/hal.conf.in 2007-03-07 16:52:19.000000000 -0500
++++ b/hal.conf.in 2007-04-06 20:37:59.000000000 -0400
+@@ -63,5 +63,16 @@
+ <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
+ </policy>
+
++ <!-- Gentoo specific rules to allow 'plugdev' group to access Volumes and Power Management -->
++ <!-- We possibly will use 'powerdev' for Power Management or work on encapsulating everything in ConsoleKit -->
++ <policy group="plugdev">
++ <allow send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
++ <allow send_interface="org.freedesktop.Hal.Device.LaptopPanel"/>
++ </policy>
++ <policy group="plugdev">
++ <allow send_interface="org.freedesktop.Hal.Device.Volume"/>
++ <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
++ </policy>
++
+ </busconfig>
+
diff --git a/sys-apps/hal/files/hal-0.5.10-autotools.patch b/sys-apps/hal/files/hal-0.5.10-autotools.patch
new file mode 100644
index 000000000..86214fce0
--- /dev/null
+++ b/sys-apps/hal/files/hal-0.5.10-autotools.patch
@@ -0,0 +1,14 @@
+since we refer to C++ later in configure, we need to search for the prog
+
+http://bugs.gentoo.org/212772
+
+--- configure.in
++++ configure.in
+@@ -30,6 +30,7 @@
+ AC_ISC_POSIX
+ AC_PROG_CC
+ AM_PROG_CC_C_O
++AC_PROG_CXX
+ AC_HEADER_STDC
+ AC_PROG_LIBTOOL
+ AC_PROG_MAKE_SET
diff --git a/sys-apps/hal/files/hal-0.5.11-ppc64.patch b/sys-apps/hal/files/hal-0.5.11-ppc64.patch
new file mode 100644
index 000000000..1cfc14854
--- /dev/null
+++ b/sys-apps/hal/files/hal-0.5.11-ppc64.patch
@@ -0,0 +1,35 @@
+From 4e44e6ee79de160c70a1dc38dddbf4623f6a7965 Mon Sep 17 00:00:00 2001
+From: root <root@powerstation.mrothe.de>
+Date: Sat, 27 Sep 2008 13:04:02 +0200
+Subject: [PATCH] Fix issue on 64bit big endian architectures.
+
+---
+ hald/create_cache.c | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/hald/create_cache.c b/hald/create_cache.c
+index d52f834..6903688 100644
+--- a/hald/create_cache.c
++++ b/hald/create_cache.c
+@@ -305,15 +305,17 @@ static void remember_jump_position(struct fdi_context *fdi_ctx)
+ static void set_jump_position(struct fdi_context *fdi_ctx)
+ {
+ off_t offset;
++ u_int32_t offset32;
+
+ if (fdi_ctx->depth <= 0)
+ DIE(("Rule depth underrun"));
+
+ fdi_ctx->depth--;
+ offset = RULES_ROUND(lseek(fdi_ctx->cache_fd, 0, SEEK_END));
++ offset32 = (u_int32_t)offset;
+ pad32_write(fdi_ctx->cache_fd,
+ fdi_ctx->match_at_depth[fdi_ctx->depth] + offsetof(struct rule, jump_position),
+- &offset, sizeof(fdi_ctx->rule.jump_position));
++ &offset32, sizeof(fdi_ctx->rule.jump_position));
+
+ if (haldc_verbose)
+ HAL_INFO(("modify rule=0x%08x, set jump to 0x%08x",
+--
+1.6.0.2
+
diff --git a/sys-apps/hal/files/hal-0.5.7-hald-scripts.patch b/sys-apps/hal/files/hal-0.5.7-hald-scripts.patch
new file mode 100644
index 000000000..0e8e41ae9
--- /dev/null
+++ b/sys-apps/hal/files/hal-0.5.7-hald-scripts.patch
@@ -0,0 +1,211 @@
+Index: tools/hal-system-lcd-get-brightness
+===================================================================
+RCS file: /cvs/hal/hal/tools/hal-system-lcd-get-brightness,v
+retrieving revision 1.7
+diff -u -r1.7 hal-system-lcd-get-brightness
+--- hal-0.5.7/tools/hal-system-lcd-get-brightness 18 Feb 2006 23:11:23 -0000 1.7
++++ hal-0.5.7/tools/hal-system-lcd-get-brightness 19 Feb 2006 22:44:22 -0000
+@@ -8,13 +8,13 @@
+ # (at your option) any later version.
+
+ # Check for environment variables
+-if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "" ]; then
++if [ -z "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" ]; then
+ echo "Missing or empty environment variable(s)." >&2
+ echo "This script should be started by hald." >&2
+ exit 1
+ fi
+
+-if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "pmu" ]; then
++if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "pmu" ]; then
+ value="`hal-system-power-pmu getlcd`"
+ if [ $? -ne 0 ]; then
+ echo "org.freedesktop.Hal.Device.LaptopPanel.NotSupported" >&2
+@@ -24,37 +24,37 @@
+ fi
+
+ # Check for file existance and that it's readable
+-if [ ! -r $HAL_PROP_LINUX_ACPI_PATH ]; then
++if [ ! -r "$HAL_PROP_LINUX_ACPI_PATH" ]; then
+ echo "org.freedesktop.Hal.Device.LaptopPanel.NotSupported" >&2
+ echo "$1 not readable!" >&2
+ exit 1
+ fi
+
+-if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "toshiba" ]; then
++if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "toshiba" ]; then
+ # cat /proc/acpi/toshiba/lcd
+ # brightness: 5
+ # brightness_levels: 8
+ value="`cat $HAL_PROP_LINUX_ACPI_PATH | grep brightness: | awk '{print $2;}'`"
+-elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "asus" ]; then
++elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "asus" ]; then
+ # cat /proc/acpi/asus/brn
+ # 5
+ value="`cat $HAL_PROP_LINUX_ACPI_PATH`"
+-elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "panasonic" ]; then
++elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "panasonic" ]; then
+ # cat /proc/acpi/pcc/brightness
+ # 5
+ value="`cat $HAL_PROP_LINUX_ACPI_PATH`"
+-elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "ibm" ]; then
++elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "ibm" ]; then
+ # cat /proc/acpi/ibm/brightness
+ # level: 5
+ # commands: up, down
+ # commands: level <level> (<level> is 0-7)
+ value="`cat $HAL_PROP_LINUX_ACPI_PATH | grep level: | awk '{print $2;}'`"
+-elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "sony" ]; then
++elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "sony" ]; then
+ # cat /proc/acpi/sony/brightness
+ # 5
+ value="`cat $HAL_PROP_LINUX_ACPI_PATH`"
+ let "value = ${value} - 1"
+-elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "omnibook" ]; then
++elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "omnibook" ]; then
+ # cat /proc/omnibook/lcd
+ # LCD brightness: 7
+ value="`cat $HAL_PROP_LINUX_ACPI_PATH | awk '{print $3;}'`"
+Index: tools/hal-system-lcd-set-brightness
+===================================================================
+RCS file: /cvs/hal/hal/tools/hal-system-lcd-set-brightness,v
+retrieving revision 1.7
+diff -u -r1.7 hal-system-lcd-set-brightness
+--- hal-0.5.7/tools/hal-system-lcd-set-brightness 18 Feb 2006 23:11:23 -0000 1.7
++++ hal-0.5.7/tools/hal-system-lcd-set-brightness 19 Feb 2006 22:44:23 -0000
+@@ -8,8 +8,8 @@
+ # (at your option) any later version.
+
+ # Check for environment variables
+-if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "" ] ||
+- [ "$HAL_PROP_LAPTOP_PANEL_NUM_LEVELS" == "" ] ; then
++if [ -z "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" ] ||
++ [ -z "$HAL_PROP_LAPTOP_PANEL_NUM_LEVELS" ] ; then
+ echo "Missing or empty environment variable(s)." >&2
+ echo "This script should be started by hald." >&2
+ exit 1
+@@ -18,7 +18,14 @@
+ # read value for set brightness
+ read value
+
+-if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "pmu" ]; then
++# Check for values outside range
++if [ ${value} -lt 0 ] || [ ${value} -gt $HAL_PROP_LAPTOP_PANEL_NUM_LEVELS ]; then
++ echo "org.freedesktop.Hal.Device.LaptopPanel.Invalid" >&2
++ echo "Brightness has to be between 0 and $HAL_PROP_LAPTOP_PANEL_NUM_LEVELS!" >&2
++ exit 1
++fi
++
++if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "pmu" ]; then
+ hal-system-power-pmu setlcd $value
+ if [ $? -ne 0 ]; then
+ echo "org.freedesktop.Hal.Device.LaptopPanel.NotSupported" >&2
+@@ -28,39 +35,33 @@
+ fi
+
+ # Check for file existance and that it's writable
+-if [ ! -w $HAL_PROP_LINUX_ACPI_PATH ]; then
++if [ ! -w "$HAL_PROP_LINUX_ACPI_PATH" ]; then
+ echo "org.freedesktop.Hal.Device.LaptopPanel.NotSupported" >&2
+ echo "$1 not writable!" >&2
+ exit 1
+ fi
+
+-# Check for values outside range
+-if [ ${value} -lt 0 ] || [ ${value} -gt $HAL_PROP_LAPTOP_PANEL_NUM_LEVELS ]; then
+- echo "org.freedesktop.Hal.Device.LaptopPanel.Invalid" >&2
+- echo "Brightness has to be between 0 and $HAL_PROP_LAPTOP_PANEL_NUM_LEVELS!" >&2
+- exit 1
+-fi
+
+-if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "toshiba" ]; then
++if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "toshiba" ]; then
+ # echo "brightness: {0..x}" >/proc/acpi/toshiba/lcd
+ echo "brightness: $value" > $HAL_PROP_LINUX_ACPI_PATH
+-elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "asus" ]; then
++elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "asus" ]; then
+ # echo {0..15} > /proc/acpi/asus/brn
+ # http://www.taupro.com/wiki/ChemBook/LCDdisplayPowerConfiguration
+ echo "$value" > $HAL_PROP_LINUX_ACPI_PATH
+-elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "panasonic" ]; then
++elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "panasonic" ]; then
+ # echo {0..15} > /proc/acpi/pcc/brightness
+ # http://readlist.com/lists/vger.kernel.org/linux-kernel/7/36405.html
+ echo "$value" > $HAL_PROP_LINUX_ACPI_PATH
+-elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "ibm" ]; then
++elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "ibm" ]; then
+ # echo "level {0..7}" > /proc/acpi/ibm/brightness
+ # http://ibm-acpi.sourceforge.net/README
+ echo "level $value" > $HAL_PROP_LINUX_ACPI_PATH
+-elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "sony" ]; then
++elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "sony" ]; then
+ # echo "{1..8}" > /proc/acpi/sony/brightness
+ # http://popies.net/sonypi/2.6-sony_acpi4.patch
+ echo "$value" > $HAL_PROP_LINUX_ACPI_PATH
+-elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "omnibook" ]; then
++elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "omnibook" ]; then
+ # echo "{0..7}" > /proc/omnibook/lcd
+ # http://bugzilla.gnome.org/show_bug.cgi?id=331458
+ echo "$value" > $HAL_PROP_LINUX_ACPI_PATH
+Index: tools/hal-system-power-hibernate
+===================================================================
+RCS file: /cvs/hal/hal/tools/hal-system-power-hibernate,v
+retrieving revision 1.6
+diff -u -r1.6 hal-system-power-hibernate
+--- hal-0.5.7/tools/hal-system-power-hibernate 16 Jan 2006 12:47:40 -0000 1.6
++++ hal-0.5.7/tools/hal-system-power-hibernate 19 Feb 2006 22:44:23 -0000
+@@ -43,8 +43,9 @@
+ # Suspend2 tools installed
+ /usr/sbin/hibernate --force
+ RET=$?
+- elif [ -w "/sys/power/state" ] ; then
+- # Use the raw kernel sysfs interface
++ elif [ -w "/sys/power/state" ] &&
++ [ "$HAL_PROP_POWER_MANAGEMENT_TYPE" != pmu ] ; then
++ # Use the raw kernel sysfs interface if possible (not on pmu yet)
+ echo "disk" > /sys/power/state
+ RET=$?
+ else
+Index: tools/hal-system-power-suspend
+===================================================================
+RCS file: /cvs/hal/hal/tools/hal-system-power-suspend,v
+retrieving revision 1.6
+diff -u -r1.6 hal-system-power-suspend
+--- hal-0.5.7/tools/hal-system-power-suspend 18 Feb 2006 23:00:55 -0000 1.6
++++ hal-0.5.7/tools/hal-system-power-suspend 19 Feb 2006 22:44:23 -0000
+@@ -18,15 +18,6 @@
+
+ read seconds_to_sleep
+
+-#PMU systems cannot use /sys/power/state yet, so use a helper to issue an ioctl
+-if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "pmu" ]; then
+- hal-system-power-pmu sleep
+- if [ $? -ne 0 ]; then
+- echo "org.freedesktop.Hal.Device.SystemPowerManagement.NotSupported" >&2
+- exit 1
+- fi
+- exit 0
+-fi
+
+ #SuSE and ALTLinux only support powersave
+ if [ -f "/etc/altlinux-release" ] || [ -f "/etc/SuSE-release" ] ; then
+@@ -62,6 +53,10 @@
+ elif [ -x "/usr/sbin/pmi" ] ; then
+ /usr/sbin/pmi action suspend force
+ RET=$?
++ elif [ "$HAL_PROP_POWER_MANAGEMENT_TYPE" = "pmu" ]; then
++ #PMU systems cannot use /sys/power/state yet, so use a helper to issue an ioctl
++ hal-system-power-pmu sleep
++ RET=$?
+ elif [ -w "/sys/power/state" ] ; then
+ # Use the raw kernel sysfs interface
+ echo "mem" > /sys/power/state
+@@ -72,4 +67,8 @@
+ fi
+ fi
+
++if [ $RET -ne 0 ]; then
++ echo "org.freedesktop.Hal.Device.SystemPowerManagement.NotSupported" >&2
++ exit 1
++fi
+ exit $RET
diff --git a/sys-apps/hal/files/hal-0.5.7-hibernate.patch b/sys-apps/hal/files/hal-0.5.7-hibernate.patch
new file mode 100644
index 000000000..fa25bbe91
--- /dev/null
+++ b/sys-apps/hal/files/hal-0.5.7-hibernate.patch
@@ -0,0 +1,12 @@
+--- tools/hal-system-power-suspend 2006-06-05 23:49:08.000000000 -0500
++++ tools/hal-system-power-suspend 2006-06-05 23:50:49.000000000 -0500
+@@ -61,6 +61,9 @@
+ # Use the raw kernel sysfs interface
+ echo "mem" > /sys/power/state
+ RET=$?
++ elif [ -x "/usr/sbin/hibernate-ram" ] ; then
++ /usr/sbin/hibernate-ram
++ RET=$?
+ else
+ # TODO: add other scripts support
+ unsupported
diff --git a/sys-apps/hal/files/hal-0.5.7-ignored-volumes.patch b/sys-apps/hal/files/hal-0.5.7-ignored-volumes.patch
new file mode 100644
index 000000000..04bf203b8
--- /dev/null
+++ b/sys-apps/hal/files/hal-0.5.7-ignored-volumes.patch
@@ -0,0 +1,33 @@
+diff -ruN hal-0.5.7-old/fdi/policy/10osvendor/20-storage-methods.fdi hal-0.5.7/fdi/policy/10osvendor/20-storage-methods.fdi
+--- hal-0.5.7-old/fdi/policy/10osvendor/20-storage-methods.fdi 2006-02-22 15:12:23.000000000 +0100
++++ hal-0.5.7/fdi/policy/10osvendor/20-storage-methods.fdi 2006-03-15 22:48:07.000000000 +0100
+@@ -71,6 +71,29 @@
+ <merge key="volume.ignore" type="bool">false</merge>
+ <match key="@block.storage_device:storage.hotpluggable" bool="false">
+ <match key="@block.storage_device:storage.removable" bool="false">
++ <merge key="volume.ignore" type="bool">true</merge>
++
++ <match key="volume.is_mounted" bool="true">
++ <!-- Show windows drives -->
++ <match key="volume.fstype" string="vfat">
++ <merge key="volume.ignore" type="bool">false</merge>
++ </match>
++ <match key="volume.fstype" string="ntfs">
++ <merge key="volume.ignore" type="bool">false</merge>
++ </match>
++
++ <!-- Show /media/ and /mnt drives -->
++ <match key="volume.mount_point" compare_gt="/media">
++ <match key="volume.mount_point" compare_lt="/media0">
++ <merge key="volume.ignore" type="bool">false</merge>
++ </match>
++ </match>
++ <match key="volume.mount_point" compare_gt="/mnt">
++ <match key="volume.mount_point" compare_lt="/mnt0">
++ <merge key="volume.ignore" type="bool">false</merge>
++ </match>
++ </match>
++ </match>
+
+ <!-- Should always ignore Apple Bootstrap partitions (it would be -->
+ <!-- a security hole to mount it) - TODO: should use the bootable -->
diff --git a/sys-apps/hal/files/hal-0.5.7-part-table.patch b/sys-apps/hal/files/hal-0.5.7-part-table.patch
new file mode 100644
index 000000000..d09b61827
--- /dev/null
+++ b/sys-apps/hal/files/hal-0.5.7-part-table.patch
@@ -0,0 +1,13 @@
+diff -ruN hal-0.5.7-old/volume_id/volume_id.c hal-0.5.7/volume_id/volume_id.c
+--- hal-0.5.7-old/volume_id/volume_id.c 2006-02-22 07:30:41.000000000 +0100
++++ hal-0.5.7/volume_id/volume_id.c 2006-03-08 11:21:01.000000000 +0100
+@@ -165,6 +165,9 @@
+ if (volume_id_probe_raid(id, off, size) == 0)
+ return 0;
+
++ if (volume_id_probe_msdos_part_table(id, off) == 0)
++ return 0;
++
+ if (volume_id_probe_filesystem(id, off, size) == 0)
+ return 0;
+
diff --git a/sys-apps/hal/files/hal-0.5.7-plugdev-allow-send.patch b/sys-apps/hal/files/hal-0.5.7-plugdev-allow-send.patch
new file mode 100644
index 000000000..62b92b3bf
--- /dev/null
+++ b/sys-apps/hal/files/hal-0.5.7-plugdev-allow-send.patch
@@ -0,0 +1,17 @@
+--- hal-0.5.6/hal.conf.in 2006-02-04 10:58:37.000000000 +0200
++++ hal-0.5.6.az/hal.conf.in 2006-02-04 11:41:42.000000000 +0200
+@@ -49,5 +49,14 @@
+ <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
+ </policy>
+
++ <!-- Gentoo specific rules to allow 'plugdev' group access to Volumes, etc -->
++ <!-- NB: not sure if we should use a different group for SystemPowerManagement and LaptopPanel ... -->
++ <policy group="plugdev">
++ <allow send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
++ <allow send_interface="org.freedesktop.Hal.Device.LaptopPanel"/>
++ <allow send_interface="org.freedesktop.Hal.Device.Volume"/>
++ <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
++ </policy>
++
+ </busconfig>
+
diff --git a/sys-apps/hal/files/hal-0.5.7-pmu-fix.patch b/sys-apps/hal/files/hal-0.5.7-pmu-fix.patch
new file mode 100644
index 000000000..cc8696cb0
--- /dev/null
+++ b/sys-apps/hal/files/hal-0.5.7-pmu-fix.patch
@@ -0,0 +1,28 @@
+diff -ruN hal-0.5.7-old/hald/linux2/osspec.c hal-0.5.7/hald/linux2/osspec.c
+--- hal-0.5.7-old/hald/linux2/osspec.c 2006-02-13 17:42:32.000000000 +0100
++++ hal-0.5.7/hald/linux2/osspec.c 2006-03-01 11:56:20.000000000 +0100
+@@ -447,6 +447,7 @@
+ unsigned int len;
+ char *poweroptions;
+ FILE *fp;
++ const char* pmtype = NULL;
+
+ can_suspend = FALSE;
+ can_hibernate = FALSE;
+@@ -471,6 +472,16 @@
+ can_hibernate = TRUE;
+ free (poweroptions);
+
++ pmtype = hal_device_property_get_string(d,"power_management.type");
++ if (pmtype && !strcmp(pmtype, "pmu")) {
++ /* Although /sys/power/state exists on pmu based machines, using it just
++ * crashes mine. Suspending works via the pmu though. So overriding what we
++ * just saw...
++ * Should be removed as soon as /sys/power works on PMU */
++ can_hibernate = FALSE;
++ can_suspend = TRUE;
++ }
++
+ /* check for the presence of suspend2 */
+ if (access ("/proc/software_suspend", F_OK) == 0)
+ can_hibernate = TRUE;
diff --git a/sys-apps/hal/files/hal-0.5.7-rescan-on-resume.patch b/sys-apps/hal/files/hal-0.5.7-rescan-on-resume.patch
new file mode 100644
index 000000000..64fc53721
--- /dev/null
+++ b/sys-apps/hal/files/hal-0.5.7-rescan-on-resume.patch
@@ -0,0 +1,16 @@
+--- tools/hal-system-power-hibernate 2006-04-26 19:25:40.000000000 -0500
++++ tools/hal-system-power-hibernate 2006-04-26 19:34:00.000000000 -0500
+@@ -53,4 +53,13 @@
+ fi
+ fi
+
++# Refresh devices when resuming from a hibernate
++for type in button battery ac_adapter ; do
++ devices=$(hal-find-by-capbility --capability $type)
++ for device in $devices ; do
++ dbus-send --system --print-reply --dest=org.freedesktop.Hal $device \
++ org.freedesktop.Hal.Device.Rescan
++ done
++done
++
+ exit $RET
diff --git a/sys-apps/hal/files/hal-0.5.7-sony-brightness.patch b/sys-apps/hal/files/hal-0.5.7-sony-brightness.patch
new file mode 100644
index 000000000..17d96cc8d
--- /dev/null
+++ b/sys-apps/hal/files/hal-0.5.7-sony-brightness.patch
@@ -0,0 +1,12 @@
+diff -ruN hal-0.5.7-old/tools/hal-system-lcd-set-brightness hal-0.5.7/tools/hal-system-lcd-set-brightness
+--- hal-0.5.7-old/tools/hal-system-lcd-set-brightness 2006-03-15 23:01:12.000000000 +0100
++++ hal-0.5.7/tools/hal-system-lcd-set-brightness 2006-03-15 23:04:54.000000000 +0100
+@@ -60,7 +60,7 @@
+ elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "sony" ]; then
+ # echo "{1..8}" > /proc/acpi/sony/brightness
+ # http://popies.net/sonypi/2.6-sony_acpi4.patch
+- echo "$value" > $HAL_PROP_LINUX_ACPI_PATH
++ echo "$((value + 1))" > $HAL_PROP_LINUX_ACPI_PATH
+ elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "omnibook" ]; then
+ # echo "{0..7}" > /proc/omnibook/lcd
+ # http://bugzilla.gnome.org/show_bug.cgi?id=331458
diff --git a/sys-apps/hal/files/hal-0.5.7-unclean-unmount-r1.patch b/sys-apps/hal/files/hal-0.5.7-unclean-unmount-r1.patch
new file mode 100644
index 000000000..4c3254ff9
--- /dev/null
+++ b/sys-apps/hal/files/hal-0.5.7-unclean-unmount-r1.patch
@@ -0,0 +1,9 @@
+--- tools/linux/90-hal.rules 2006-01-21 14:39:58.000000000 -0500
++++ tools/linux/90-hal.rules.new 2006-03-18 21:14:31.000000000 -0500
+@@ -1,2 +1,6 @@
+ # pass all events to the HAL daemon
+ RUN+="socket:/org/freedesktop/hal/udev_event"
++
++# unmount block devices when they are removed
++SUBSYSTEM=="block",ACTION=="remove", RUN+="hal_unmount"
++
diff --git a/sys-apps/hal/files/hal-0.5.7.1-autofs-subfs.patch b/sys-apps/hal/files/hal-0.5.7.1-autofs-subfs.patch
new file mode 100644
index 000000000..9d4e6f534
--- /dev/null
+++ b/sys-apps/hal/files/hal-0.5.7.1-autofs-subfs.patch
@@ -0,0 +1,94 @@
+diff -Naur hal-0.5.7-orig/hald/linux2/blockdev.c hal-0.5.7/hald/linux2/blockdev.c
+--- hal-0.5.7-orig/hald/linux2/blockdev.c 2006-02-24 07:29:06 +0300
++++ hal-0.5.7/hald/linux2/blockdev.c 2006-06-02 23:45:51 +0400
+@@ -185,6 +185,7 @@
+ dev_t devt = makedev(0, 0);
+ GSList *volumes = NULL;
+ GSList *volume;
++ GSList *autofs_mounts = NULL;
+
+ /* open /proc/mounts */
+ g_snprintf (buf, sizeof (buf), "%s/mounts", get_hal_proc_path ());
+@@ -205,6 +206,43 @@
+ while ((mnte = getmntent_r (f, &mnt, buf, sizeof(buf))) != NULL) {
+ struct stat statbuf;
+
++ /* If this is a nfs mount or autofs
++ * (fstype == 'nfs' || fstype == 'autofs')
++ * ignore the mount. Reason:
++ * 1. we don't list nfs devices in HAL
++ * 2. more problematic: stat on mountpoints with
++ * 'stale nfs handle' never come
++ * back and block complete HAL and all applications
++ * using HAL fail.
++ * 3. autofs and HAL butt heads causing drives to never
++ * be unmounted
++ */
++ if (strcmp(mnt.mnt_type, "nfs") == 0)
++ continue;
++
++ /* If this is an autofs mount (fstype == 'autofs' or fstype == 'subfs')
++ * store the mount in a list for later use.
++ * On mounts managed by autofs or subfs accessing files below the mount
++ * point cause the mount point to be remounted after an
++ * unmount. We keep the list so we do not check for
++ * the .created-by-hal file on mounts under autofs or subfs mount points
++ */
++ if (strcmp(mnt.mnt_type, "autofs") == 0 ||
++ strcmp(mnt.mnt_type, "subfs") == 0) {
++ char *mnt_dir;
++
++ if (mnt.mnt_dir[strlen (mnt.mnt_dir) - 1] != '/')
++ mnt_dir = g_strdup_printf ("%s/", mnt.mnt_dir);
++ else
++ mnt_dir = g_strdup (mnt.mnt_dir);
++
++ autofs_mounts = g_slist_append (autofs_mounts,
++ mnt_dir);
++
++
++ continue;
++ }
++
+ /* check the underlying device of the mount point */
+ if (stat (mnt.mnt_dir, &statbuf) != 0)
+ continue;
+@@ -242,6 +280,7 @@
+ HalDevice *dev;
+ char *mount_point;
+ char *mount_point_hal_file;
++ GSList *autofs_node;
+
+ dev = HAL_DEVICE (volume->data);
+ mount_point = g_strdup (hal_device_property_get_string (dev, "volume.mount_point"));
+@@ -251,8 +290,20 @@
+ device_property_atomic_update_end ();
+ HAL_INFO (("set %s to unmounted", hal_device_get_udi (dev)));
+
++ /* check to see if mount point falls under autofs */
++ autofs_node = autofs_mounts;
++ while (autofs_node != NULL) {
++ char *am = (char *)autofs_node->data;
++
++ if (strncmp (am, mount_point, strlen (am)) == 0);
++ break;
++
++ autofs_node = autofs_node->next;
++ }
++
+ mount_point_hal_file = g_strdup_printf ("%s/.created-by-hal", mount_point);
+- if (g_file_test (mount_point_hal_file, G_FILE_TEST_EXISTS)) {
++ if (!autofs_node &&
++ g_file_test (mount_point_hal_file, G_FILE_TEST_EXISTS)) {
+ char *cleanup_stdin;
+ char *extra_env[2];
+
+@@ -279,6 +330,8 @@
+ g_free (mount_point);
+ }
+ g_slist_free (volumes);
++ g_slist_foreach (autofs_mounts, (GFunc) g_free, NULL);
++ g_slist_free (autofs_mounts);
+ exit:
+ endmntent (f);
+ }
diff --git a/sys-apps/hal/files/hal-0.5.7.1-ctype-fix.patch b/sys-apps/hal/files/hal-0.5.7.1-ctype-fix.patch
new file mode 100644
index 000000000..246202203
--- /dev/null
+++ b/sys-apps/hal/files/hal-0.5.7.1-ctype-fix.patch
@@ -0,0 +1,11 @@
+diff -Nur hal-0.5.7.1-orig/hald/linux2/hotplug.c hal-0.5.7.1/hald/linux2/hotplug.c
+--- hal-0.5.7.1-orig/hald/linux2/hotplug.c 2007-01-30 14:39:33.000000000 -0500
++++ hal-0.5.7.1/hald/linux2/hotplug.c 2007-01-30 14:39:52.000000000 -0500
+@@ -28,6 +28,7 @@
+ #endif
+
+ #include <stdio.h>
++#include <ctype.h>
+ #include <string.h>
+ #include <mntent.h>
+ #include <errno.h>
diff --git a/sys-apps/hal/files/hal-0.5.7.1-dbus-close.patch b/sys-apps/hal/files/hal-0.5.7.1-dbus-close.patch
new file mode 100644
index 000000000..d7dabac69
--- /dev/null
+++ b/sys-apps/hal/files/hal-0.5.7.1-dbus-close.patch
@@ -0,0 +1,24 @@
+diff -ruN hal-0.5.7.1.orig/tools/hal-device.c hal-0.5.7.1/tools/hal-device.c
+--- hal-0.5.7.1.orig/tools/hal-device.c 2006-07-28 16:07:56.000000000 -0500
++++ hal-0.5.7.1/tools/hal-device.c 2006-07-28 16:08:36.000000000 -0500
+@@ -155,7 +155,7 @@
+
+ libhal_ctx_shutdown(hal_ctx, &error);
+ libhal_ctx_free(hal_ctx);
+- dbus_connection_disconnect(conn);
++ dbus_connection_close(conn);
+ dbus_connection_unref(conn);
+ dbus_error_free(&error);
+
+diff -ruN hal-0.5.7.1.orig/tools/lshal.c hal-0.5.7.1/tools/lshal.c
+--- hal-0.5.7.1.orig/tools/lshal.c 2006-07-28 16:07:56.000000000 -0500
++++ hal-0.5.7.1/tools/lshal.c 2006-07-28 16:08:52.000000000 -0500
+@@ -701,7 +701,7 @@
+ libhal_ctx_shutdown (hal_ctx, &error);
+ libhal_ctx_free (hal_ctx);
+
+- dbus_connection_disconnect (conn);
++ dbus_connection_close (conn);
+ dbus_connection_unref (conn);
+
+ if (show_device)
diff --git a/sys-apps/hal/files/hal-0.5.7.1-fix-dbus.patch b/sys-apps/hal/files/hal-0.5.7.1-fix-dbus.patch
new file mode 100644
index 000000000..03fd76cb1
--- /dev/null
+++ b/sys-apps/hal/files/hal-0.5.7.1-fix-dbus.patch
@@ -0,0 +1,184 @@
+--- hal-0.5.7.1/tools/hal-device.c.fixdbus 2006-11-21 15:30:47.000000000 +0100
++++ hal-0.5.7.1/tools/hal-device.c 2006-11-21 15:30:48.000000000 +0100
+@@ -155,7 +155,6 @@
+
+ libhal_ctx_shutdown(hal_ctx, &error);
+ libhal_ctx_free(hal_ctx);
+- dbus_connection_close(conn);
+ dbus_connection_unref(conn);
+ dbus_error_free(&error);
+
+--- hal-0.5.7.1/tools/lshal.c.fixdbus 2006-11-21 15:30:47.000000000 +0100
++++ hal-0.5.7.1/tools/lshal.c 2006-11-21 15:30:48.000000000 +0100
+@@ -701,7 +701,6 @@
+ libhal_ctx_shutdown (hal_ctx, &error);
+ libhal_ctx_free (hal_ctx);
+
+- dbus_connection_close (conn);
+ dbus_connection_unref (conn);
+
+ if (show_device)
+--- hal-0.5.7.1/libhal/libhal.c.fixdbus 2006-02-12 22:47:28.000000000 +0100
++++ hal-0.5.7.1/libhal/libhal.c 2006-11-21 15:33:31.000000000 +0100
+@@ -1525,7 +1525,7 @@
+ reply = dbus_connection_send_with_reply_and_block (ctx->connection,
+ message, -1,
+ error);
+- if (dbus_error_is_set (error)) {
++ if (error != NULL && dbus_error_is_set (error)) {
+ dbus_message_unref (message);
+ return FALSE;
+ }
+@@ -1710,7 +1710,7 @@
+ reply = dbus_connection_send_with_reply_and_block (ctx->connection,
+ message, -1,
+ error);
+- if (dbus_error_is_set (error)) {
++ if (error != NULL && dbus_error_is_set (error)) {
+ dbus_message_unref (message);
+ return FALSE;
+ }
+@@ -1762,7 +1762,7 @@
+ reply = dbus_connection_send_with_reply_and_block (ctx->connection,
+ message, -1,
+ error);
+- if (dbus_error_is_set (error)) {
++ if (error != NULL && dbus_error_is_set (error)) {
+ dbus_message_unref (message);
+ return FALSE;
+ }
+@@ -1814,7 +1814,7 @@
+ reply = dbus_connection_send_with_reply_and_block (ctx->connection,
+ message, -1,
+ error);
+- if (dbus_error_is_set (error)) {
++ if (error != NULL && dbus_error_is_set (error)) {
+ dbus_message_unref (message);
+ return FALSE;
+ }
+@@ -1865,7 +1865,7 @@
+ reply = dbus_connection_send_with_reply_and_block (ctx->connection,
+ message, -1,
+ error);
+- if (dbus_error_is_set (error)) {
++ if (error != NULL && dbus_error_is_set (error)) {
+ dbus_message_unref (message);
+ return FALSE;
+ }
+@@ -1926,7 +1926,7 @@
+ message, -1,
+ error);
+
+- if (dbus_error_is_set (error)) {
++ if (error != NULL && dbus_error_is_set (error)) {
+ if (strcmp (error->name,
+ "org.freedesktop.Hal.DeviceAlreadyLocked") == 0) {
+ if (reason_why_locked != NULL) {
+@@ -1985,7 +1985,7 @@
+ message, -1,
+ error);
+
+- if (dbus_error_is_set (error)) {
++ if (error != NULL && dbus_error_is_set (error)) {
+ dbus_message_unref (message);
+ return FALSE;
+ }
+@@ -2040,7 +2040,7 @@
+ reply = dbus_connection_send_with_reply_and_block (ctx->connection,
+ message, -1,
+ error);
+- if (dbus_error_is_set (error)) {
++ if (error != NULL && dbus_error_is_set (error)) {
+ dbus_message_unref (message);
+ return NULL;
+ }
+@@ -2125,7 +2125,7 @@
+ reply = dbus_connection_send_with_reply_and_block (ctx->connection,
+ message, -1,
+ error);
+- if (dbus_error_is_set (error)) {
++ if (error != NULL && dbus_error_is_set (error)) {
+ dbus_message_unref (message);
+ return FALSE;
+ }
+@@ -2179,7 +2179,7 @@
+ reply = dbus_connection_send_with_reply_and_block (ctx->connection,
+ message, -1,
+ error);
+- if (dbus_error_is_set (error)) {
++ if (error != NULL && dbus_error_is_set (error)) {
+ dbus_message_unref (message);
+ return FALSE;
+ }
+@@ -2365,7 +2365,7 @@
+ reply = dbus_connection_send_with_reply_and_block (ctx->connection,
+ message, -1,
+ error);
+- if (dbus_error_is_set (error)) {
++ if (error != NULL && dbus_error_is_set (error)) {
+ dbus_message_unref (message);
+ return FALSE;
+ }
+@@ -2652,7 +2652,7 @@
+ reply = dbus_connection_send_with_reply_and_block (ctx->connection,
+ message, -1,
+ error);
+- if (dbus_error_is_set (error)) {
++ if (error != NULL && dbus_error_is_set (error)) {
+ dbus_message_unref (message);
+ return FALSE;
+ }
+@@ -2788,7 +2788,7 @@
+ "type='signal',"
+ "interface='org.freedesktop.Hal.Device',"
+ "sender='org.freedesktop.Hal'", error);
+- if (dbus_error_is_set (error)) {
++ if (error != NULL && dbus_error_is_set (error)) {
+ return FALSE;
+ }
+ return TRUE;
+@@ -2820,7 +2820,7 @@
+ "sender='org.freedesktop.Hal'," "path=%s", udi);
+
+ dbus_bus_add_match (ctx->connection, buf, error);
+- if (dbus_error_is_set (error)) {
++ if (error != NULL && dbus_error_is_set (error)) {
+ return FALSE;
+ }
+ return TRUE;
+@@ -2848,7 +2848,7 @@
+ "sender='org.freedesktop.Hal'," "path=%s", udi);
+
+ dbus_bus_remove_match (ctx->connection, buf, error);
+- if (dbus_error_is_set (error)) {
++ if (error != NULL && dbus_error_is_set (error)) {
+ return FALSE;
+ }
+ return TRUE;
+@@ -3223,7 +3223,7 @@
+ message, -1,
+ error);
+
+- if (dbus_error_is_set (error)) {
++ if (error != NULL && dbus_error_is_set (error)) {
+ dbus_message_unref (message);
+ return FALSE;
+ }
+@@ -3273,7 +3273,7 @@
+ message, -1,
+ error);
+
+- if (dbus_error_is_set (error)) {
++ if (error != NULL && dbus_error_is_set (error)) {
+ dbus_message_unref (message);
+ return FALSE;
+ }
+@@ -3342,7 +3342,7 @@
+ message, -1,
+ error);
+
+- if (dbus_error_is_set (error)) {
++ if (error != NULL && dbus_error_is_set (error)) {
+ dbus_message_unref (message);
+ return FALSE;
+ }
diff --git a/sys-apps/hal/files/hal-0.5.7.1-floppies-fix.patch b/sys-apps/hal/files/hal-0.5.7.1-floppies-fix.patch
new file mode 100644
index 000000000..3d259627b
--- /dev/null
+++ b/sys-apps/hal/files/hal-0.5.7.1-floppies-fix.patch
@@ -0,0 +1,11 @@
+diff -Naur hal-0.5.7.1.orig/hald/linux2/hotplug.c hal-0.5.7.1/hald/linux2/hotplug.c
+--- hal-0.5.7.1.orig/hald/linux2/hotplug.c 2007-01-22 15:31:45.322111812 +0100
++++ hal-0.5.7.1/hald/linux2/hotplug.c 2007-01-22 15:31:15.594276651 +0100
+@@ -283,6 +283,7 @@
+
+ len = strlen(hotplug_event->sysfs.sysfs_path);
+ is_partition = (isdigit(hotplug_event->sysfs.sysfs_path[len - 1])
++ && (! strstr(hotplug_event->sysfs.sysfs_path, "/block/fd"))
+ && ! strstr(hotplug_event->sysfs.sysfs_path, "/block/sr")) ||
+ strstr (hotplug_event->sysfs.sysfs_path, "/fakevolume") ;
+
diff --git a/sys-apps/hal/files/hal-0.5.7.1-hald-scripts.patch b/sys-apps/hal/files/hal-0.5.7.1-hald-scripts.patch
new file mode 100644
index 000000000..3403a23b3
--- /dev/null
+++ b/sys-apps/hal/files/hal-0.5.7.1-hald-scripts.patch
@@ -0,0 +1,217 @@
+# this patch modifies a lot of script in tools, please double check
+# before adding another patch on top of it.
+#
+Index: tools/hal-system-lcd-get-brightness
+===================================================================
+RCS file: /cvs/hal/hal/tools/hal-system-lcd-get-brightness,v
+retrieving revision 1.7
+diff -u -r1.7 hal-system-lcd-get-brightness
+--- hal-0.5.7/tools/hal-system-lcd-get-brightness 18 Feb 2006 23:11:23 -0000 1.7
++++ hal-0.5.7/tools/hal-system-lcd-get-brightness 19 Feb 2006 22:44:22 -0000
+@@ -8,13 +8,13 @@
+ # (at your option) any later version.
+
+ # Check for environment variables
+-if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "" ]; then
++if [ -z "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" ]; then
+ echo "Missing or empty environment variable(s)." >&2
+ echo "This script should be started by hald." >&2
+ exit 1
+ fi
+
+-if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "pmu" ]; then
++if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "pmu" ]; then
+ value="`hal-system-power-pmu getlcd`"
+ if [ $? -ne 0 ]; then
+ echo "org.freedesktop.Hal.Device.LaptopPanel.NotSupported" >&2
+@@ -24,37 +24,37 @@
+ fi
+
+ # Check for file existance and that it's readable
+-if [ ! -r $HAL_PROP_LINUX_ACPI_PATH ]; then
++if [ ! -r "$HAL_PROP_LINUX_ACPI_PATH" ]; then
+ echo "org.freedesktop.Hal.Device.LaptopPanel.NotSupported" >&2
+ echo "$1 not readable!" >&2
+ exit 1
+ fi
+
+-if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "toshiba" ]; then
++if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "toshiba" ]; then
+ # cat /proc/acpi/toshiba/lcd
+ # brightness: 5
+ # brightness_levels: 8
+ value="`cat $HAL_PROP_LINUX_ACPI_PATH | grep brightness: | awk '{print $2;}'`"
+-elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "asus" ]; then
++elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "asus" ]; then
+ # cat /proc/acpi/asus/brn
+ # 5
+ value="`cat $HAL_PROP_LINUX_ACPI_PATH`"
+-elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "panasonic" ]; then
++elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "panasonic" ]; then
+ # cat /proc/acpi/pcc/brightness
+ # 5
+ value="`cat $HAL_PROP_LINUX_ACPI_PATH`"
+-elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "ibm" ]; then
++elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "ibm" ]; then
+ # cat /proc/acpi/ibm/brightness
+ # level: 5
+ # commands: up, down
+ # commands: level <level> (<level> is 0-7)
+ value="`cat $HAL_PROP_LINUX_ACPI_PATH | grep level: | awk '{print $2;}'`"
+-elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "sony" ]; then
++elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "sony" ]; then
+ # cat /proc/acpi/sony/brightness
+ # 5
+ value="`cat $HAL_PROP_LINUX_ACPI_PATH`"
+ let "value = ${value} - 1"
+-elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "omnibook" ]; then
++elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "omnibook" ]; then
+ # cat /proc/omnibook/lcd
+ # LCD brightness: 7
+ value="`cat $HAL_PROP_LINUX_ACPI_PATH | awk '{print $3;}'`"
+Index: tools/hal-system-lcd-set-brightness
+===================================================================
+RCS file: /cvs/hal/hal/tools/hal-system-lcd-set-brightness,v
+retrieving revision 1.7
+diff -u -r1.7 hal-system-lcd-set-brightness
+--- hal-0.5.7/tools/hal-system-lcd-set-brightness 18 Feb 2006 23:11:23 -0000 1.7
++++ hal-0.5.7/tools/hal-system-lcd-set-brightness 19 Feb 2006 22:44:23 -0000
+@@ -8,8 +8,8 @@
+ # (at your option) any later version.
+
+ # Check for environment variables
+-if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "" ] ||
+- [ "$HAL_PROP_LAPTOP_PANEL_NUM_LEVELS" == "" ] ; then
++if [ -z "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" ] ||
++ [ -z "$HAL_PROP_LAPTOP_PANEL_NUM_LEVELS" ] ; then
+ echo "Missing or empty environment variable(s)." >&2
+ echo "This script should be started by hald." >&2
+ exit 1
+@@ -18,7 +18,14 @@
+ # read value for set brightness
+ read value
+
+-if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "pmu" ]; then
++# Check for values outside range
++if [ ${value} -lt 0 ] || [ ${value} -gt $HAL_PROP_LAPTOP_PANEL_NUM_LEVELS ]; then
++ echo "org.freedesktop.Hal.Device.LaptopPanel.Invalid" >&2
++ echo "Brightness has to be between 0 and $HAL_PROP_LAPTOP_PANEL_NUM_LEVELS!" >&2
++ exit 1
++fi
++
++if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "pmu" ]; then
+ hal-system-power-pmu setlcd $value
+ if [ $? -ne 0 ]; then
+ echo "org.freedesktop.Hal.Device.LaptopPanel.NotSupported" >&2
+@@ -28,39 +35,33 @@
+ fi
+
+ # Check for file existance and that it's writable
+-if [ ! -w $HAL_PROP_LINUX_ACPI_PATH ]; then
++if [ ! -w "$HAL_PROP_LINUX_ACPI_PATH" ]; then
+ echo "org.freedesktop.Hal.Device.LaptopPanel.NotSupported" >&2
+ echo "$1 not writable!" >&2
+ exit 1
+ fi
+
+-# Check for values outside range
+-if [ ${value} -lt 0 ] || [ ${value} -gt $HAL_PROP_LAPTOP_PANEL_NUM_LEVELS ]; then
+- echo "org.freedesktop.Hal.Device.LaptopPanel.Invalid" >&2
+- echo "Brightness has to be between 0 and $HAL_PROP_LAPTOP_PANEL_NUM_LEVELS!" >&2
+- exit 1
+-fi
+
+-if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "toshiba" ]; then
++if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "toshiba" ]; then
+ # echo "brightness: {0..x}" >/proc/acpi/toshiba/lcd
+ echo "brightness: $value" > $HAL_PROP_LINUX_ACPI_PATH
+-elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "asus" ]; then
++elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "asus" ]; then
+ # echo {0..15} > /proc/acpi/asus/brn
+ # http://www.taupro.com/wiki/ChemBook/LCDdisplayPowerConfiguration
+ echo "$value" > $HAL_PROP_LINUX_ACPI_PATH
+-elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "panasonic" ]; then
++elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "panasonic" ]; then
+ # echo {0..15} > /proc/acpi/pcc/brightness
+ # http://readlist.com/lists/vger.kernel.org/linux-kernel/7/36405.html
+ echo "$value" > $HAL_PROP_LINUX_ACPI_PATH
+-elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "ibm" ]; then
++elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "ibm" ]; then
+ # echo "level {0..7}" > /proc/acpi/ibm/brightness
+ # http://ibm-acpi.sourceforge.net/README
+ echo "level $value" > $HAL_PROP_LINUX_ACPI_PATH
+-elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "sony" ]; then
++elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "sony" ]; then
+ # echo "{1..8}" > /proc/acpi/sony/brightness
+ # http://popies.net/sonypi/2.6-sony_acpi4.patch
+ echo "$value" > $HAL_PROP_LINUX_ACPI_PATH
+-elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "omnibook" ]; then
++elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "omnibook" ]; then
+ # echo "{0..7}" > /proc/omnibook/lcd
+ # http://bugzilla.gnome.org/show_bug.cgi?id=331458
+ echo "$value" > $HAL_PROP_LINUX_ACPI_PATH
+Index: tools/hal-system-power-hibernate
+===================================================================
+RCS file: /cvs/hal/hal/tools/hal-system-power-hibernate,v
+retrieving revision 1.6
+diff -u -r1.6 hal-system-power-hibernate
+--- hal-0.5.7/tools/hal-system-power-hibernate 16 Jan 2006 12:47:40 -0000 1.6
++++ hal-0.5.7/tools/hal-system-power-hibernate 19 Feb 2006 22:44:23 -0000
+@@ -43,8 +43,9 @@
+ # Suspend2 tools installed
+ /usr/sbin/hibernate --force
+ RET=$?
+- elif [ -w "/sys/power/state" ] ; then
+- # Use the raw kernel sysfs interface
++ elif [ -w "/sys/power/state" ] &&
++ [ "$HAL_PROP_POWER_MANAGEMENT_TYPE" != pmu ] ; then
++ # Use the raw kernel sysfs interface if possible (not on pmu yet)
+ echo "disk" > /sys/power/state
+ RET=$?
+ else
+Index: tools/hal-system-power-suspend
+===================================================================
+RCS file: /cvs/hal/hal/tools/hal-system-power-suspend,v
+retrieving revision 1.6
+diff -u -r1.6 hal-system-power-suspend
+--- hal-0.5.7/tools/hal-system-power-suspend 2007-01-18 22:50:15.000000000 +0100
++++ hal-0.5.7/tools/hal-system-power-suspend 2007-01-18 22:53:04.000000000 +0100
+@@ -18,15 +18,6 @@
+
+ read seconds_to_sleep
+
+-#PMU systems cannot use /sys/power/state yet, so use a helper to issue an ioctl
+-if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "pmu" ]; then
+- hal-system-power-pmu sleep
+- if [ $? -ne 0 ]; then
+- echo "org.freedesktop.Hal.Device.SystemPowerManagement.NotSupported" >&2
+- exit 1
+- fi
+- exit 0
+-fi
+
+ #SuSE and ALTLinux only support powersave
+ if [ -f "/etc/altlinux-release" ] || [ -f "/etc/SuSE-release" ] ; then
+@@ -62,6 +53,13 @@
+ elif [ -x "/usr/sbin/pmi" ] ; then
+ /usr/sbin/pmi action suspend force
+ RET=$?
++ elif [ "$HAL_PROP_POWER_MANAGEMENT_TYPE" = "pmu" ]; then
++ #PMU systems cannot use /sys/power/state yet, so use a helper to issue an ioctl
++ hal-system-power-pmu sleep
++ RET=$?
++ elif [ -x "/usr/sbin/hibernate-ram" ] ; then
++ /usr/sbin/hibernate-ram
++ RET=$?
+ elif [ -w "/sys/power/state" ] ; then
+ # Use the raw kernel sysfs interface
+ echo "mem" > /sys/power/state
+@@ -72,4 +70,8 @@
+ fi
+ fi
+
++if [ $RET -ne 0 ]; then
++ echo "org.freedesktop.Hal.Device.SystemPowerManagement.NotSupported" >&2
++ exit 1
++fi
+ exit $RET
diff --git a/sys-apps/hal/files/hal-0.5.7.1-hibernate-fix.patch b/sys-apps/hal/files/hal-0.5.7.1-hibernate-fix.patch
new file mode 100644
index 000000000..86ac72109
--- /dev/null
+++ b/sys-apps/hal/files/hal-0.5.7.1-hibernate-fix.patch
@@ -0,0 +1,12 @@
+--- tools/hal-system-power-hibernate 2006-01-16 07:47:40.000000000 -0500
++++ tools/hal-system-power-hibernate-new 2006-11-19 18:50:43.000000000 -0500
+@@ -36,6 +36,9 @@
+ elif [ -x "/usr/sbin/pmi" ] ; then
+ /usr/sbin/pmi action hibernate force
+ RET=$?
++ elif [ -x "/usr/sbin/hibernate-ram" ] ; then
++ /usr/sbin/hibernate-ram
++ RET=$?
+ elif [ -x "/usr/sbin/pm-hibernate" ] ; then
+ /usr/sbin/pm-hibernate
+ RET=$?
diff --git a/sys-apps/hal/files/hal-0.5.7.1-ignored-volumes.patch b/sys-apps/hal/files/hal-0.5.7.1-ignored-volumes.patch
new file mode 100644
index 000000000..a0cc0fd30
--- /dev/null
+++ b/sys-apps/hal/files/hal-0.5.7.1-ignored-volumes.patch
@@ -0,0 +1,65 @@
+--- hal-0.5.7.1/fdi/policy/10osvendor/20-storage-methods.fdi 2006-02-22 15:15:33.000000000
+0100
++++ hal-0.5.7.1/fdi/policy/10osvendor/20-storage-methods.fdi 2006-10-09 10:46:36.000000000
+0200
+@@ -63,21 +63,54 @@
+ </match>
+
+
++ <match key="volume.fsusage" string="crypto">
++
++ <!-- Here follow volumes we specifically want to ignore - it is the -->
++ <!-- responsibility of software higher in the stack (e.g. gnome-vfs) -->
++ <!-- amd mount programs (e.g. Mount() on HAL) to respect volume.ignore -->
++ <merge key="volume.ignore" type="bool">false</merge>
++ <match key="@block.storage_device:storage.hotpluggable" bool="false">
++ <match key="@block.storage_device:storage.removable" bool="false">
++ <merge key="volume.ignore" type="bool">true</merge>
++
++ <match key="volume.is_mounted" bool="true">
++ <!-- Show /media/ drives -->
++ <match key="volume.mount_point" compare_gt="/media">
++ <match key="volume.mount_point" compare_lt="/media0">
++ <merge key="volume.ignore" type="bool">false</merge>
++ </match>
++ </match>
++ </match>
++ </match>
++ </match>
++ </match>
++
+ <match key="volume.fsusage" string="filesystem">
+
+ <!-- Here follow volumes we specifically want to ignore - it is the -->
+ <!-- responsibility of software higher in the stack (e.g. gnome-vfs) -->
+ <!-- amd mount programs (e.g. Mount() on HAL) to respect volume.ignore -->
+ <merge key="volume.ignore" type="bool">false</merge>
++
++ <!-- Should always ignore Apple Bootstrap partitions (it would be -->
++ <!-- a security hole to mount it) - TODO: should use the bootable -->
++ <!-- flag from the Mac partition table instead -->
++ <match key="volume.fstype" string="hfs">
++ <match key="volume.label" string="bootstrap">
++ <merge key="volume.ignore" type="bool">true</merge>
++ </match>
++ </match>
++
+ <match key="@block.storage_device:storage.hotpluggable" bool="false">
+ <match key="@block.storage_device:storage.removable" bool="false">
++ <merge key="volume.ignore" type="bool">true</merge>
+
+- <!-- Should always ignore Apple Bootstrap partitions (it would be -->
+- <!-- a security hole to mount it) - TODO: should use the bootable -->
+- <!-- flag from the Mac partition table instead -->
+- <match key="volume.fstype" string="hfs">
+- <match key="volume.label" string="bootstrap">
+- <merge key="volume.ignore" type="bool">true</merge>
++ <match key="volume.is_mounted" bool="true">
++ <!-- Show /media/ drives -->
++ <match key="volume.mount_point" compare_gt="/media">
++ <match key="volume.mount_point" compare_lt="/media0">
++ <merge key="volume.ignore" type="bool">false</merge>
++ </match>
+ </match>
+ </match>
+
diff --git a/sys-apps/hal/files/hal-0.5.7.1-indirection-fix.patch b/sys-apps/hal/files/hal-0.5.7.1-indirection-fix.patch
new file mode 100644
index 000000000..198297251
--- /dev/null
+++ b/sys-apps/hal/files/hal-0.5.7.1-indirection-fix.patch
@@ -0,0 +1,117 @@
+diff -uNr hal-0.5.7.orig/hald/device_info.c hal-0.5.7/hald/device_info.c
+--- hal-0.5.7.orig/hald/device_info.c 2006-01-21 07:36:51.000000000 +0100
++++ hal-0.5.7/hald/device_info.c 2006-10-26 23:00:26.000000000 +0200
+@@ -1114,56 +1114,22 @@
+ pc->merge_type, pc->merge_type));
+ break;
+ }
+- } else if (pc->curelem == CURELEM_APPEND && pc->match_ok &&
++ } else if ((pc->curelem == CURELEM_APPEND || pc->curelem == CURELEM_PREPEND) && pc->match_ok &&
+ (hal_device_property_get_type (pc->device, pc->merge_key) == HAL_PROPERTY_TYPE_STRING ||
+ hal_device_property_get_type (pc->device, pc->merge_key) == HAL_PROPERTY_TYPE_STRLIST ||
+ hal_device_property_get_type (pc->device, pc->merge_key) == HAL_PROPERTY_TYPE_INVALID)) {
+ char buf[256];
+ char buf2[256];
+
+- /* As soon as we are appending, we have matched the device... */
++ /* As soon as we are appending/prepending, we have matched the device... */
+ pc->device_matched = TRUE;
+
+ if (pc->merge_type == MERGE_TYPE_STRLIST) {
+- hal_device_property_strlist_append (pc->device, pc->merge_key, pc->cdata_buf);
+- } else {
+- const char *existing_string;
+-
+- switch (pc->merge_type) {
+- case MERGE_TYPE_STRING:
+- strncpy (buf, pc->cdata_buf, sizeof (buf));
+- break;
+-
+- case MERGE_TYPE_COPY_PROPERTY:
+- hal_device_property_get_as_string (pc->device, pc->cdata_buf, buf, sizeof (buf));
+- break;
+-
+- default:
+- HAL_ERROR (("Unknown merge_type=%d='%c'", pc->merge_type, pc->merge_type));
+- break;
+- }
+-
+- existing_string = hal_device_property_get_string (pc->device, pc->merge_key);
+- if (existing_string != NULL) {
+- strncpy (buf2, existing_string, sizeof (buf2));
+- strncat (buf2, buf, sizeof (buf2) - strlen(buf2));
++ if (pc->curelem == CURELEM_APPEND){
++ hal_device_property_strlist_append (pc->device, pc->merge_key, pc->cdata_buf);
+ } else {
+- strncpy (buf2, buf, sizeof (buf2));
++ hal_device_property_strlist_prepend (pc->device, pc->merge_key, pc->cdata_buf);
+ }
+- hal_device_property_set_string (pc->device, pc->merge_key, buf2);
+- }
+- } else if (pc->curelem == CURELEM_PREPEND && pc->match_ok &&
+- (hal_device_property_get_type (pc->device, pc->merge_key) == HAL_PROPERTY_TYPE_STRING ||
+- hal_device_property_get_type (pc->device, pc->merge_key) == HAL_PROPERTY_TYPE_STRLIST ||
+- hal_device_property_get_type (pc->device, pc->merge_key) == HAL_PROPERTY_TYPE_INVALID)) {
+- char buf[256];
+- char buf2[256];
+-
+- /* As soon as we are prepending, we have matched the device... */
+- pc->device_matched = TRUE;
+-
+- if (pc->merge_type == MERGE_TYPE_STRLIST) {
+- hal_device_property_strlist_prepend (pc->device, pc->merge_key, pc->cdata_buf);
+ } else {
+ const char *existing_string;
+
+@@ -1173,8 +1139,34 @@
+ break;
+
+ case MERGE_TYPE_COPY_PROPERTY:
+- hal_device_property_get_as_string (pc->device, pc->cdata_buf, buf, sizeof (buf));
++ {
++ char udi_to_merge_from[256];
++ char prop_to_merge[256];
++
++ /* Resolve key paths like 'someudi/foo/bar/baz:prop.name'
++ * '@prop.here.is.an.udi:with.prop.name'
++ */
++ if (!resolve_udiprop_path (pc->cdata_buf,
++ pc->device->udi,
++ udi_to_merge_from, sizeof (udi_to_merge_from),
++ prop_to_merge, sizeof (prop_to_merge))) {
++ HAL_ERROR (("Could not resolve keypath '%s' on udi '%s'", pc->cdata_buf, pc->device->udi));
++ } else {
++ HalDevice *d;
++
++ d = hal_device_store_find (hald_get_gdl (), udi_to_merge_from);
++ if (d == NULL) {
++ d = hal_device_store_find (hald_get_tdl (), udi_to_merge_from);
++ }
++ if (d == NULL) {
++ HAL_ERROR (("Could not find device with udi '%s'", udi_to_merge_from));
++ } else {
++ hal_device_property_get_as_string (d, prop_to_merge, buf, sizeof (buf));
++ }
++ }
++
+ break;
++ }
+
+ default:
+ HAL_ERROR (("Unknown merge_type=%d='%c'", pc->merge_type, pc->merge_type));
+@@ -1183,8 +1175,13 @@
+
+ existing_string = hal_device_property_get_string (pc->device, pc->merge_key);
+ if (existing_string != NULL) {
+- strncpy (buf2, buf, sizeof (buf2));
+- strncat (buf2, existing_string, sizeof (buf2) - strlen(buf2));
++ if (pc->curelem == CURELEM_APPEND){
++ strncpy (buf2, existing_string, sizeof (buf2));
++ strncat (buf2, buf, sizeof (buf2) - strlen(buf2));
++ } else {
++ strncpy (buf2, buf, sizeof (buf2));
++ strncat (buf2, existing_string, sizeof (buf2) - strlen(buf2));
++ }
+ } else {
+ strncpy (buf2, buf, sizeof (buf2));
+ }
diff --git a/sys-apps/hal/files/hal-0.5.7.1-ipod-nano.patch b/sys-apps/hal/files/hal-0.5.7.1-ipod-nano.patch
new file mode 100644
index 000000000..803c59d9b
--- /dev/null
+++ b/sys-apps/hal/files/hal-0.5.7.1-ipod-nano.patch
@@ -0,0 +1,49 @@
+--- hal-0.5.7.1/volume_id/via_raid.c 2006-02-21 20:15:17.000000000 +0100
++++ hal-0.5.7.1/volume_id/via_raid.c-new 2006-12-16 17:48:31.000000000 +0100
+@@ -3,6 +3,9 @@
+ *
+ * Copyright (C) 2005 Kay Sievers <kay.sievers@vrfy.org>
+ *
++ * Based on information taken from dmraid:
++ * Copyright (C) 2004-2006 Heinz Mauelshagen, Red Hat GmbH
++ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation version 2 of the License.
+@@ -31,7 +34,7 @@
+ uint16_t signature;
+ uint8_t version_number;
+ struct via_array {
+- uint16_t disk_bits;
++ uint16_t disk_bit_mask;
+ uint8_t disk_array_ex;
+ uint32_t capacity_low;
+ uint32_t capacity_high;
+@@ -43,6 +46,17 @@
+
+ #define VIA_SIGNATURE 0xAA55
+
++/* 8 bit checksum on first 50 bytes of metadata. */
++static uint8_t meta_checksum(struct via_meta *via)
++{
++ uint8_t i = 50, sum = 0;
++
++ while (i--)
++ sum += ((uint8_t*) via)[i];
++
++ return sum == via->checksum;
++}
++
+ int volume_id_probe_via_raid(struct volume_id *id, uint64_t off, uint64_t size)
+ {
+ const uint8_t *buf;
+@@ -68,6 +82,9 @@
+ if (via->version_number > 1)
+ return -1;
+
++ if (!meta_checksum(via))
++ return -1;
++
+ volume_id_set_usage(id, VOLUME_ID_RAID);
+ snprintf(id->type_version, sizeof(id->type_version)-1, "%u", via->version_number);
+ id->type = "via_raid_member";
diff --git a/sys-apps/hal/files/hal-0.5.7.1-rescan-on-resume.patch b/sys-apps/hal/files/hal-0.5.7.1-rescan-on-resume.patch
new file mode 100644
index 000000000..e9eeb3142
--- /dev/null
+++ b/sys-apps/hal/files/hal-0.5.7.1-rescan-on-resume.patch
@@ -0,0 +1,16 @@
+--- tools/hal-system-power-hibernate 2006-04-26 19:25:40.000000000 -0500
++++ tools/hal-system-power-hibernate 2006-04-26 19:34:00.000000000 -0500
+@@ -53,4 +53,13 @@
+ fi
+ fi
+
++# Refresh devices when resuming from a hibernate
++for type in button battery ac_adapter ; do
++ devices=$(hal-find-by-capability --capability $type)
++ for device in $devices ; do
++ dbus-send --system --print-reply --dest=org.freedesktop.Hal $device \
++ org.freedesktop.Hal.Device.Rescan
++ done
++done
++
+ exit $RET
diff --git a/sys-apps/hal/files/hal-0.5.7.1-sr-driver.patch b/sys-apps/hal/files/hal-0.5.7.1-sr-driver.patch
new file mode 100644
index 000000000..00de4ef77
--- /dev/null
+++ b/sys-apps/hal/files/hal-0.5.7.1-sr-driver.patch
@@ -0,0 +1,13 @@
+diff -ru hal-0.5.7.1.orig/hald/linux2/hotplug.c hal-0.5.7.1/hald/linux2/hotplug.c
+--- hal-0.5.7.1.orig/hald/linux2/hotplug.c 2006-07-26 11:03:17.000000000 -0700
++++ hal-0.5.7.1/hald/linux2/hotplug.c 2006-08-30 19:50:22.000000000 -0700
+@@ -282,7 +282,8 @@
+ size_t len;
+
+ len = strlen(hotplug_event->sysfs.sysfs_path);
+- is_partition = isdigit(hotplug_event->sysfs.sysfs_path[len - 1]) ||
++ is_partition = (isdigit(hotplug_event->sysfs.sysfs_path[len - 1])
++ && ! strstr(hotplug_event->sysfs.sysfs_path, "/block/sr")) ||
+ strstr (hotplug_event->sysfs.sysfs_path, "/fakevolume") ;
+
+ if (hotplug_event->action == HOTPLUG_ACTION_ADD) {
diff --git a/sys-apps/hal/files/hal-0.5.9-hide-recovery-partitions.patch b/sys-apps/hal/files/hal-0.5.9-hide-recovery-partitions.patch
new file mode 100644
index 000000000..21ff6af13
--- /dev/null
+++ b/sys-apps/hal/files/hal-0.5.9-hide-recovery-partitions.patch
@@ -0,0 +1,14 @@
+--- hal-0.5.9/fdi/policy/10osvendor/20-storage-methods.fdi 2007-05-01 21:39:31.000000000 +0000
++++ hal-0.5.9/fdi/policy/10osvendor/20-storage-methods.fdi 2007-05-01 21:51:14.000000000 +0000
+@@ -100,6 +100,11 @@
+ </match>
+ </match>
+
++ <!-- Hide partitions marked as Compaq Diagnostics -->
++ <match key="volume.partition.type" string="0x12">
++ <merge key="volume.ignore" type="bool">true</merge>
++ </match>
++
+ <!-- EFI firmware partitions -->
+ <match key="volume.fstype" string="vfat">
+ <match key="volume.label" string="EFI">
diff --git a/sys-apps/hal/hal-0.5.12_rc1-r4.ebuild b/sys-apps/hal/hal-0.5.12_rc1-r4.ebuild
new file mode 100644
index 000000000..ca5c6e50f
--- /dev/null
+++ b/sys-apps/hal/hal-0.5.12_rc1-r4.ebuild
@@ -0,0 +1,306 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/hal-0.5.12_rc1-r4.ebuild,v 1.1 2009/05/13 20:54:12 dang Exp $
+
+EAPI="2"
+
+inherit eutils linux-info autotools flag-o-matic multilib-native
+
+PATCH_VERSION="5"
+
+MY_P=${P/_/}
+S=${WORKDIR}/${MY_P}
+PATCHNAME="${MY_P}-gentoo-patches-${PATCH_VERSION}"
+DESCRIPTION="Hardware Abstraction Layer"
+HOMEPAGE="http://www.freedesktop.org/wiki/Software/hal"
+SRC_URI="http://hal.freedesktop.org/releases/${MY_P}.tar.bz2
+ http://dev.gentoo.org/~dang/files/${PATCHNAME}.tar.bz2"
+
+LICENSE="|| ( GPL-2 AFL-2.0 )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
+
+KERNEL_IUSE="kernel_linux kernel_FreeBSD"
+IUSE="X acpi apm crypt consolekit debug dell disk-partition doc laptop policykit selinux ${KERNEL_IUSE}"
+
+RDEPEND=">=dev-libs/dbus-glib-0.61[lib32?]
+ >=dev-libs/glib-2.14[lib32?]
+ >=dev-libs/expat-1.95.8[lib32?]
+ >=dev-libs/libusb-0.1.10a[lib32?]
+ >=sys-apps/pciutils-2.2.7-r1[lib32?]
+ >=dev-util/gperf-3.0.3
+ sys-apps/usbutils
+ virtual/eject
+ amd64? ( >=sys-apps/dmidecode-2.7 )
+ dell? ( >=sys-libs/libsmbios-0.13.4[lib32?] )
+ disk-partition? ( >=sys-apps/parted-1.8.0[lib32?] )
+ ia64? ( >=sys-apps/dmidecode-2.7 )
+ kernel_linux? (
+ >=sys-fs/udev-117
+ >=sys-apps/util-linux-2.13
+ >=sys-kernel/linux-headers-2.6.19
+ crypt? ( >=sys-fs/cryptsetup-1.0.5 )
+ )
+ kernel_FreeBSD? ( >=dev-libs/libvolume_id-0.77 )
+ x86? ( >=sys-apps/dmidecode-2.7 )
+ selinux? ( sys-libs/libselinux sec-policy/selinux-hal )
+ consolekit? (
+ sys-auth/consolekit[policykit=]
+ )
+ policykit? (
+ sys-auth/consolekit[policykit]
+ sys-auth/policykit[pam]
+ )"
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig
+ >=dev-util/intltool-0.35
+ doc? (
+ app-text/xmlto
+ dev-libs/libxml2[lib32?]
+ dev-util/gtk-doc
+ app-text/docbook-sgml-utils
+ )
+ !<gnome-extra/gnome-power-manager-2.24.4-r2"
+PDEPEND=">=app-misc/hal-info-20081219
+ !gnome-extra/hal-device-manager
+ laptop? ( >=sys-power/pm-utils-0.99.3 )"
+
+## HAL Daemon drops privledges so we need group access to read disks
+HALDAEMON_GROUPS_LINUX="haldaemon,plugdev,disk,cdrom,cdrw,floppy,usb"
+HALDAEMON_GROUPS_FREEBSD="haldaemon,plugdev,operator"
+
+function check_hotplug_net() {
+ local CONFIG_CHECK="~HOTPLUG ~NET"
+ local WARNING_HOTPLUG="CONFIG_HOTPLUG:\tis not set (required for HAL)\n"
+ local WARNING_NET="CONFIG_NET:\tis not set (required for HAL)\n"
+ check_extra_config
+}
+
+function check_inotify() {
+ local CONFIG_CHECK="~INOTIFY_USER"
+ local WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER:\tis not set (required for HAL)\n"
+ check_extra_config
+}
+
+function check_acpi_proc() {
+ local CONFIG_CHECK="~ACPI_PROCFS ~ACPI_PROC_EVENT"
+ local WARNING_ACPI_PROCFS="CONFIG_ACPI_PROCFS:\tis not set (required for HAL)\n"
+ local WARNING_ACPI_PROC_EVENT="CONFIG_ACPI_PROC_EVENT:\tis not set (required for HAL)\n"
+ check_extra_config
+}
+
+pkg_setup() {
+ if use kernel_linux ; then
+ if [[ -e "${ROOT}/usr/src/linux/.config" ]] ; then
+ kernel_is ge 2 6 19 || ewarn "HAL requires a kernel version 2.6.19 or newer"
+
+ if kernel_is lt 2 6 23 && use acpi ; then
+ check_acpi_proc
+ fi
+ fi
+
+ check_hotplug_net
+ check_inotify
+ fi
+
+ # http://devmanual.gentoo.org/ebuild-writing/functions/
+ # http://bugs.gentoo.org/show_bug.cgi?id=191605
+
+ # Create groups for hotplugging and HAL
+ enewgroup haldaemon
+ enewgroup plugdev
+
+ # HAL drops priviledges by default now ...
+ # ... so we must make sure it can read disk/cdrom info (ie. be in ${HALDAEMON_GROUPS} groups)
+ if use kernel_linux; then
+ enewuser haldaemon -1 "-1" /dev/null ${HALDAEMON_GROUPS_LINUX}
+ elif use kernel_FreeBSD; then
+ enewuser haldaemon -1 "-1" /dev/null ${HALDAEMON_GROUPS_FREEBSD}
+ fi
+
+ # Make sure that the haldaemon user is in the ${HALDAEMON_GROUPS}
+ # If users have a problem with this, let them file a bug
+ if [[ ${ROOT} == / ]] ; then
+ if use kernel_linux; then
+ usermod -G ${HALDAEMON_GROUPS_LINUX} haldaemon
+ elif use kernel_FreeBSD; then
+ pw usermod haldaemon -G ${HALDAEMON_GROUPS_FREEBSD}
+ fi
+ fi
+}
+
+src_prepare() {
+ EPATCH_MULTI_MSG="Applying Gentoo Patchset ..." \
+ EPATCH_SUFFIX="patch" \
+ EPATCH_SOURCE="${WORKDIR}/${PATCHNAME}/patches/" \
+ EPATCH_FORCE="yes" \
+ epatch
+
+ eautoreconf
+}
+
+multilib-native_src_configure_internal() {
+ local acpi="$(use_enable acpi)"
+ local backend=
+ local hardware=
+ local consolekit="$(use_enable consolekit console-kit)"
+
+ append-flags -rdynamic
+
+ if use kernel_linux ; then
+ backend="linux"
+ elif use kernel_FreeBSD ; then
+ backend="freebsd"
+ else
+ eerror "Invalid backend"
+ fi
+
+ if use kernel_linux ; then
+ if use acpi ; then
+ # Using IBM ACPI and Toshiba ACPI results in double notification as this
+ # was merged into the Linux Kernel 2.6.22
+ if kernel_is lt 2 6 22 ; then
+ acpi="$acpi --enable-acpi-ibm --enable-acpi-toshiba"
+ else
+ acpi="$acpi --disable-acpi-ibm --disable-acpi-toshiba"
+ fi
+
+ acpi="$acpi --enable-acpi-proc --enable-acpi-acpid"
+ else
+ acpi="$acpi --disable-acpi-ibm --disable-acpi-toshiba"
+ acpi="$acpi --disable-acpi-proc --disable-acpi-acpid"
+ fi
+
+ hardware="--with-cpufreq --with-usb-csr --with-keymaps"
+ use arm && hardware="$hardware --with-omap --enable-pmu"
+ use ppc && hardware="$hardware --enable-pmu"
+ if use x86 || use amd64; then
+ hardware="$hardware --with-macbook --with-macbookpro"
+ fi
+
+ if use dell ; then
+ hardware="$hardware --with-dell-backlight"
+ else
+ hardware="$hardware --without-dell-backlight"
+ fi
+
+ hardware="$hardware --enable-sonypic"
+ else
+ hardware="--without-cpufreq --without-usb-csr --without-keymaps"
+ hardware="$hardware --without-omap"
+ hardware="$hardware --without-dell-backlight"
+ hardware="$hardware --enable-acpi-ibm --enable-acpi-toshiba"
+ hardware="$hardware --disable-sonypic"
+ fi
+
+ # Policykit support depends on consolekit support. Therefore, force on
+ # consolekit, even if it's USE flag is off, if policykit support is on.
+ # This enables packages to USE-depend on hal[policykit?]
+ if use policykit ; then
+ consolekit="--enable-console-kit"
+ fi
+
+ econf --with-backend=${backend} \
+ --with-os-type=gentoo \
+ --with-pid-file=/var/run/hald.pid \
+ --with-hwdata=/usr/share/misc \
+ --with-socket-dir=/var/run/hald \
+ --enable-umount-helper \
+ --enable-man-pages \
+ --disable-acl-management \
+ --enable-pci \
+ $(use_enable apm) \
+ $(use_enable debug verbose-mode) \
+ $(use_enable disk-partition parted) \
+ $(use_enable doc docbook-docs) \
+ $(use_enable doc gtk-doc) \
+ $(use_enable policykit policy-kit) \
+ ${consolekit} \
+ --docdir=/usr/share/doc/${PF} \
+ --localstatedir=/var \
+ ${acpi} ${hardware} \
+ || die "configure failed"
+}
+
+multilib-native_src_install_internal() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog NEWS README || die "docs failed"
+
+ # hal umount for unclean unmounts
+ exeinto /lib/udev/
+ newexe "${FILESDIR}/hal-unmount.dev" hal_unmount || die "udev helper failed"
+
+ # initscript
+ newinitd "${FILESDIR}/0.5.10-hald.rc" hald || die "init script failed"
+
+ # configuration
+ cp "${FILESDIR}/0.5.10-hald.conf" "${WORKDIR}/" || \
+ die "failed to copy hald.conf"
+
+ if use debug; then
+ sed -e 's:HALD_VERBOSE="no":HALD_VERBOSE="yes":' \
+ -i "${WORKDIR}/0.5.10-hald.conf" || die "failed to change verbose"
+ fi
+ newconfd "${WORKDIR}/0.5.10-hald.conf" hald || \
+ die "failed to install hald.conf"
+
+ if use X ; then
+ # New Configuration Snippets
+ dodoc "${WORKDIR}/${PATCHNAME}/config-examples/"*.fdi || \
+ die "dodoc X examples failed"
+ fi
+
+ # We now create and keep /media here as both gnome-mount and pmount
+ # use these directories, to avoid collision.
+ keepdir /media
+
+ # We also need to create and keep /etc/fdi/{information,policy,preprobe}
+ # or else hal bombs.
+ keepdir /etc/hal/fdi/{information,policy,preprobe}
+
+ # HAL stores it's fdi cache in /var/cache/hald
+ keepdir /var/cache/hald
+
+ # HAL keeps its unix socket here
+ keepdir /var/run/hald
+ keepdir /var/lib/hal
+}
+
+pkg_postinst() {
+ # Despite what people keep changing this location. Either one works.. it doesn't matter
+ # http://dev.gentoo.org/~plasmaroo/devmanual/ebuild-writing/functions/
+
+ elog "The HAL daemon needs to be running for certain applications to"
+ elog "work. Suggested is to add the init script to your start-up"
+ elog "scripts, this should be done like this :"
+ elog "\`rc-update add hald default\`"
+ echo
+ elog "Looking for automounting support? Add yourself to the plugdev group"
+ echo
+ elog "IF you have additional applications which consume ACPI events, you"
+ elog "should consider installing acpid to allow applications to share ACPI"
+ elog "events."
+ if use X ; then
+ echo
+ elog "If you wish to use a non US layout, you may do so by executing:"
+ elog "setxkbmap <layout> or by utilizing your Desktop Environment's"
+ elog "Keyboard Layout Settings mechanism."
+ elog "Under GNOME, this is gnome-keyboard-properties, and under KDE"
+ elog "it is kxkb."
+ fi
+ echo
+ elog "In order have suspend/hibernate function with HAL or apps that use HAL"
+ elog "(such as gnome-power-manager), you should build HAL with the laptop"
+ elog "useflag which will install pm-utils."
+ if use X ; then
+ echo
+ elog "X Input Hotplugging (if you build xorg-server with the HAL useflag)"
+ elog "reads user specific configuration from /etc/hal/fdi/policy/."
+ echo
+ elog "You should remove the Input sections from your xorg.conf once you have"
+ elog "migrated the rules to a HAL fdi file."
+ fi
+
+ ebeep 5
+ epause 5
+}