[arch-commits] Commit in hal/trunk (PKGBUILD consolekit-0.3.patch)

Jan de Groot jgc at archlinux.org
Sat Nov 15 21:43:06 UTC 2008


    Date: Saturday, November 15, 2008 @ 16:43:06
  Author: jgc
Revision: 19170

upgpkg: hal 0.5.11-6
    Add patch for recent versions of consolekit

Added:
  hal/trunk/consolekit-0.3.patch
Modified:
  hal/trunk/PKGBUILD

----------------------+
 PKGBUILD             |   16 ++++---
 consolekit-0.3.patch |  108 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 118 insertions(+), 6 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2008-11-15 21:12:56 UTC (rev 19169)
+++ PKGBUILD	2008-11-15 21:43:06 UTC (rev 19170)
@@ -4,12 +4,12 @@
 
 pkgname=hal
 pkgver=0.5.11
-pkgrel=5
+pkgrel=6
 pkgdesc="Hardware Abstraction Layer"
 arch=(i686 x86_64)
 license=('GPL' 'custom')
 url="http://www.freedesktop.org/wiki/Software/hal"
-depends=('dbus-glib>=0.76' 'dbus>=1.2.4' 'libusb>=0.1.12' 'udev>=118' 'filesystem>=0.7.1-5' 'hal-info>=0.20081022' 'eject' 'libsmbios>=2.0.2' 'dmidecode' 'pciutils>=3.0.2' 'usbutils>=0.73-5' 'pm-utils>=1.2.2.1' 'policykit>=0.9-6')
+depends=('dbus-glib>=0.76' 'dbus>=1.2.4' 'libusb>=0.1.12' 'udev>=118' 'filesystem>=0.7.1-5' 'hal-info>=0.20081022' 'eject' 'libsmbios>=2.0.2' 'dmidecode' 'pciutils>=3.0.2' 'usbutils>=0.73-5' 'pm-utils>=1.2.2.1' 'policykit>=0.9-6' 'consolekit>=0.3.0')
 makedepends=('pkgconfig' 'gperf')
 options=('!libtool')
 install=hal.install
@@ -19,14 +19,16 @@
 	hal-0.5.9-hide-diagnostic.patch
 	ntfs3g-valid-options.patch
 	fix-udev-compatibility.patch
-	ntfs-mount-fix.patch)
+	ntfs-mount-fix.patch
+	consolekit-0.3.patch)
 md5sums=('5e8935ab61bcb14afd2d4548084aace0'
          '277e96ac130d7bfce0b30f0b80db8782'
          'c688a3c6574699365926f4fef7441545'
          '4d4b6801a1cedca22b8bdd9db73b16fb'
          '4242a2c78885e396f639d0cd5e33218c'
          '1a33d73fa422df2f05b7e3483836f778'
-         '96cf8835c30dc581c4fcf72b6ad7675e')
+         '96cf8835c30dc581c4fcf72b6ad7675e'
+	 'ad73507bbf4a7dd350072ab8ea61bb96')
 
 build() {
   cd ${startdir}/src/${pkgname}-${pkgver}
@@ -36,14 +38,16 @@
   # Fix compatibility with udev 126 and later
   patch -Np1 -i ${startdir}/src/fix-udev-compatibility.patch || return 1
   patch -p0 -i ${srcdir}/ntfs-mount-fix.patch || return 1
+  patch -Np1 -i ${srcdir}/consolekit-0.3.patch || return 1
 
+  autoconf || return 1
+
   ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
               --libexecdir=/usr/lib/hal --enable-static=no \
 	      --enable-acpi-ibm --enable-acpi-toshiba \
-              --disable-docbook-docs --disable-doxygen-docs \
+              --disable-docbook-docs \
 	      --with-hal-user=hal --with-hal-group=hal \
 	      --with-pid-file=/var/run/hald.pid || return 1
-  sed -e 's/device-manager//' -i tools/Makefile || return 1
   make || return 1
   make DESTDIR=${startdir}/pkg install || return 1
   install -m755 -d ${startdir}/pkg/etc/rc.d

Added: consolekit-0.3.patch
===================================================================
--- consolekit-0.3.patch	                        (rev 0)
+++ consolekit-0.3.patch	2008-11-15 21:43:06 UTC (rev 19170)
@@ -0,0 +1,108 @@
+From: Danny Kukawka <danny.kukawka at web.de>
+Date: Mon, 25 Aug 2008 10:58:43 +0000 (+0200)
+Subject: added check for ConsoleKit >= v0.3.1 to configure
+X-Git-Url: http://gitweb.freedesktop.org/?p=hal.git;a=commitdiff;h=aa673602a42b3fab01b14dfd2934e9f15e4c6428
+
+added check for ConsoleKit >= v0.3.1 to configure
+
+Added check for ConsoleKit >= v0.3.1 to configure to be able
+to differ between the versions due to API breakage.
+---
+
+--- a/configure.in
++++ b/configure.in
+@@ -486,6 +486,20 @@ if test "x$enable_console_kit" != "xno";
+    AM_CONDITIONAL(HAVE_CONKIT, true)
+    AC_DEFINE(HAVE_CONKIT, [], [Set if we use ConsoleKit])
+    msg_conkit=yes
++   # yes this is ugly, but there is no other way to get the version of CK 
++   AC_MSG_CHECKING([if ConsoleKit version 0.3.0 or newer])
++   if $PKG_CONFIG --atleast-version=0.3.0 ck-connector; then
++     AC_MSG_RESULT([yes])
++     AC_DEFINE(HAVE_CK_0_3, 1, [Define to 1 if ConsoleKit is v0.3.0 or newer])
++   else 
++     if $PKG_CONFIG --max-version=0.2.10 ck-connector; then
++       AC_MSG_RESULT([no])
++     else
++       #assume we have the latest version
++       AC_MSG_WARN([Couldn't detect ConsoleKit version, install the devel package, assume for now you use >= 0.3.0])
++       AC_DEFINE(HAVE_CK_0_3, 1, [Define to 1 if ConsoleKit is v0.3.0 or newer])
++     fi
++   fi
+ fi
+ 
+ AC_PATH_PROG(GPERF, [gperf], [no])
+From: Frederic Crozat <fcrozat at mandriva.com>
+Date: Mon, 25 Aug 2008 11:02:19 +0000 (+0200)
+Subject: adapt new CK library version (>= v0.3.1) to HAL
+X-Git-Url: http://gitweb.freedesktop.org/?p=hal.git;a=commitdiff;h=32022662804d43434a3e7ff168d314385867eb76
+
+adapt new CK library version (>= v0.3.1) to HAL
+
+Adapted new CK library version (>= v0.3.1) to HAL. Adopted
+patch from Ben Gamari <bgamari at gmail.com> to work with old
+and new ConsoleKit versions.
+---
+
+--- a/hald/ck-tracker.c
++++ b/hald/ck-tracker.c
+@@ -256,7 +256,11 @@ ck_session_get_info (CKTracker *tracker,
+ 		goto error;
+ 	}
+ 	if (!dbus_message_get_args (reply, NULL,
++#ifdef HAVE_CK_0_3
++				    DBUS_TYPE_UINT32, &(session->user),
++#else
+ 				    DBUS_TYPE_INT32, &(session->user),
++#endif
+ 				    DBUS_TYPE_INVALID)) {
+ 		HAL_ERROR (("Invalid GetUnixUser reply from CK"));
+ 		goto error;
+@@ -531,7 +535,11 @@ ck_tracker_process_system_bus_message (C
+ 		seat_objpath = dbus_message_get_path (message);
+ 
+ 		if (!dbus_message_get_args (message, NULL,
++#ifdef HAVE_CK_0_3
++					    DBUS_TYPE_OBJECT_PATH, &seat_objpath,
++#else
+ 					    DBUS_TYPE_STRING, &seat_objpath,
++#endif
+ 					    DBUS_TYPE_INVALID)) {
+ 			HAL_ERROR (("Invalid SeatAdded signal from CK"));
+ 			goto out;
+@@ -558,7 +566,11 @@ ck_tracker_process_system_bus_message (C
+ 		seat_objpath = dbus_message_get_path (message);
+ 
+ 		if (!dbus_message_get_args (message, NULL,
++#ifdef HAVE_CK_0_3
++					    DBUS_TYPE_OBJECT_PATH, &seat_objpath,
++#else
+ 					    DBUS_TYPE_STRING, &seat_objpath,
++#endif
+ 					    DBUS_TYPE_INVALID)) {
+ 			HAL_ERROR (("Invalid SeatRemoved signal from CK"));
+ 			goto out;
+@@ -588,7 +600,11 @@ ck_tracker_process_system_bus_message (C
+ 		seat_objpath = dbus_message_get_path (message);
+ 
+ 		if (!dbus_message_get_args (message, NULL,
++#ifdef HAVE_CK_0_3
++					    DBUS_TYPE_OBJECT_PATH, &session_objpath,
++#else
+ 					    DBUS_TYPE_STRING, &session_objpath,
++#endif
+ 					    DBUS_TYPE_INVALID)) {
+ 			HAL_ERROR (("Invalid SessionAdded signal from CK"));
+ 			goto out;
+@@ -624,7 +640,11 @@ ck_tracker_process_system_bus_message (C
+ 		seat_objpath = dbus_message_get_path (message);
+ 
+ 		if (!dbus_message_get_args (message, NULL,
++#ifdef HAVE_CK_0_3
++					    DBUS_TYPE_OBJECT_PATH, &session_objpath,
++#else
+ 					    DBUS_TYPE_STRING, &session_objpath,
++#endif
+ 					    DBUS_TYPE_INVALID)) {
+ 			HAL_ERROR (("Invalid SessionRemoved signal from CK"));
+ 			goto out;




More information about the arch-commits mailing list