Source: colord
Version: 0.1.15-1
Severity: serious
Tags: patch
User: debian-...@lists.debian.org
Usertags: kfreebsd

Hi,

colord currently does not build on kfreebsd [1] due to unsatisfied build
dependencies.
libcolord-dev is a build-dependency of gnome-control-center 3.2 and
gnome-settings-daemon 3.2, which are central pieces of the GNOME 3.2
desktop, so we need colord to build on those archs.

The attached patch should make it possible to successfully compile
colord on kfreebsd.
1/ It marks libgudev-1.0-dev and libusb-1.0-0-dev as linux-any.
2/ As USB support is not optional, it adds libusb2-dev (which provides
libusb-1.0.pc) on kfreebsd-any.
3/ As libsane-dev depends on libusb-dev, and libusb-dev and libusb2-dev
conflict on kfreebsd, that build-dependency is also marked linux-any
(sane support is optional).
4/ Updates debian/rules to adjust the configure flags according to the
plattform
5/ Uses a wildcard in debian/colord.install, as no sensors are built on
kfreebsd, so the usr/lib/*/colord-sensors does not exist there.
6/ Removes an outdated comment from debian/rules.

I don't actually use kfreebsd, so I can't tell if the resulting package
does something useful. But it at least builds successfully in a kfreebsd
VM.

Cheers,
Michael

[1] https://buildd.debian.org/status/package.php?p=colord

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (200, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.1.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

-- no debconf information
diff --git a/debian/colord.install b/debian/colord.install
index 5d8f7f6..286dbb2 100644
--- a/debian/colord.install
+++ b/debian/colord.install
@@ -1,8 +1,7 @@
 debian/tmp/etc/
 lib/udev/rules.d/
 usr/bin/
-usr/lib/*/colord
-usr/lib/*/colord-sensors
+usr/lib/*/colord*
 usr/share/color
 usr/share/dbus-1
 usr/share/locale
diff --git a/debian/control b/debian/control
index 42e9c65..acfaca5 100644
--- a/debian/control
+++ b/debian/control
@@ -7,12 +7,13 @@ Build-Depends:
  intltool,
  libglib2.0-dev,
  liblcms2-dev,
- libgudev-1.0-dev,
+ libgudev-1.0-dev [linux-any],
  libsqlite3-dev,
  docbook-utils,
- libusb-1.0-0-dev,
+ libusb-1.0-0-dev [linux-any],
+ libusb2-dev [kfreebsd-any],
  libpolkit-gobject-1-dev (>= 0.103),
- libsane-dev,
+ libsane-dev [linux-any],
  valac,
  gobject-introspection,
  libgirepository1.0-dev,
diff --git a/debian/rules b/debian/rules
index 38776c2..ef75202 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,19 +11,24 @@
 
 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
+ifeq ($(DEB_HOST_ARCH_OS),linux)
+	confflags = --enable-gudev --enable-sane
+else
+	confflags = --disable-gudev --disable-sane
+endif
+
 override_dh_install:
 	# The .la file(s) are entirely useless; kill them with fire.
 	find debian/tmp -name '*.la' -delete
 	dh_install --fail-missing
 
 override_dh_auto_configure:
-	# Pass --disable-polkit because PolicyKit doesn't (currently) allow
-	# checking for authorisation as a non-root user.
-	# 
-	# Instead we use dbus policy to restrict access to the daemon.
-	dh_auto_configure -- --libexecdir=/usr/lib/$(DEB_HOST_MULTIARCH)/colord \
-		--enable-gudev --enable-sane --disable-static \
-		--disable-volume-search --with-daemon-user=colord
+	dh_auto_configure -- \
+		--libexecdir=/usr/lib/$(DEB_HOST_MULTIARCH)/colord \
+		--disable-static \
+		--disable-volume-search \
+		--with-daemon-user=colord \
+		$(confflags)
 
 override_dh_auto_test:
 	@echo "TODO: Test suite disabled - requires running dbus daemon, currently fails"

Reply via email to