tags 634451 + patch upstream
thanks

William Vera wrote:
> This is because dbus is already discontinued in Debian and hwinfo
> still depends on it

D-Bus is not "discontinued". (Perhaps you meant HAL?)

This FTBFS appears to be caused by the multiarch transition: hwinfo wrongly
hard-codes the CFLAGS for libdbus (which changed in dbus 1.4.12-3, and in
recent Ubuntu versions too). It should ask pkg-config, which would work
regardless of D-Bus version (and installed location, for that matter).

Please forward this patch upstream - ideally they should be using
pkg-config --libs for both D-Bus and HAL too, rather than hard-coding
-ldbus-1 and -lhal, but that's less likely to fail randomly.

Regards,
    Simon
>From 186314996ce970e922b3200fde33508eb3185aae Mon Sep 17 00:00:00 2001
From: Simon McVittie <s...@debian.org>
Date: Wed, 27 Jul 2011 16:36:24 +0100
Subject: [PATCH] Use pkg-config for D-Bus' cpp flags instead of hard-coding
 them (Closes: #634451)

---
 debian/changelog                     |    8 ++++++++
 debian/control                       |    2 +-
 debian/patches/dbus_pkg_config.patch |   20 ++++++++++++++++++++
 debian/patches/series                |    1 +
 4 files changed, 30 insertions(+), 1 deletions(-)
 create mode 100644 debian/patches/dbus_pkg_config.patch

diff --git a/debian/changelog b/debian/changelog
index aed826b..bc741ca 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+hwinfo (16.0-2.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Use pkg-config for D-Bus' cpp flags instead of hard-coding them
+    (Closes: #634451, LP: #749278)
+
+ -- Simon McVittie <s...@debian.org>  Wed, 27 Jul 2011 16:19:36 +0100
+
 hwinfo (16.0-2) unstable; urgency=low
 
   * Added the patch to port to sh4 (Closes: #546151). 
diff --git a/debian/control b/debian/control
index a2caf8d..8b12a88 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: hwinfo
 Section: admin
 Priority: optional
 Maintainer: William Vera <bi...@billy.com.mx>
-Build-Depends: debhelper (>= 7.2.11), quilt, perl, flex, libdbus-1-dev, libhal-dev, linux-kernel-headers, doxygen
+Build-Depends: debhelper (>= 7.2.11), quilt, perl, flex, libdbus-1-dev, libhal-dev, linux-kernel-headers, doxygen, pkg-config
 Standards-Version: 3.8.3
 
 Package: hwinfo
diff --git a/debian/patches/dbus_pkg_config.patch b/debian/patches/dbus_pkg_config.patch
new file mode 100644
index 0000000..ee1f3f9
--- /dev/null
+++ b/debian/patches/dbus_pkg_config.patch
@@ -0,0 +1,20 @@
+From: Simon McVittie <s...@debian.org>
+Subject: pick up cpp flags for dbus-1 from pkg-config instead of hard-coding
+
+Hard-coding the include path for dbus-1 is not recommended, and was broken
+by the multiarch transition. The interface provided by upstream can be
+summarized as "use pkg-config".
+
+diff --git a/src/hd/Makefile b/src/hd/Makefile
+index 3aa4819..be5b346 100644
+--- a/src/hd/Makefile
++++ b/src/hd/Makefile
+@@ -4,7 +4,7 @@ CLEANFILES	= version.h
+ 
+ include $(TOPDIR)/Makefile.common
+ 
+-CFLAGS		+= -I /usr/include/dbus-1.0 -I /usr/lib64/dbus-1.0/include -I /usr/lib/dbus-1.0/include
++CFLAGS		+= $(shell pkg-config --cflags dbus-1)
+ 
+ version.h: $(TOPDIR)/VERSION
+ 	@echo "#define HD_VERSION_STRING \"`cat $(TOPDIR)/VERSION`\"" >$@
diff --git a/debian/patches/series b/debian/patches/series
index 355ae00..e2d7788 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@ kbd.c-tiocgdev_undefined
 cpu.c-alpha_bogo
 fix-ftbfs 
 sh_support.patch
+dbus_pkg_config.patch
-- 
1.7.5.4

Reply via email to