Package: acpid
Version: 1:2.0.17-1
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu raring ubuntu-patch

Dear maintainers,

In Ubuntu, we've applied the attached patch to the acpid package to enable
cross-building.  The dh_auto_configure command has built-in support for
cross-building with autoconf, but your debian/rules bypasses this in order
to pass additional CFLAGS.  This patch reworks the approach to use the newer
DEB_CFLAGS_MAINT_{APPEND,PREPEND} interfaces and avoid overriding
dh_auto_configure at all.

Note that debhelper compat level 9 is required in order for
dh_auto_configure to consider the dpkg-buildflags output.  If this is not
acceptable, you can get a similar result by invoking dh_auto_configure --
CFLAGS=$(...).

The changelog entry for this Ubuntu upload is:

  * Bump to debhelper compat level 9 and use the
    DEB_CFLAGS_MAINT_{APPEND_PREPEND} options to change flags, trusting
    dh_auto_configure to do the right thing, so that we get support for
    cross-compilation and other niceties.

Please consider applying this patch in Debian,

Thanks,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slanga...@ubuntu.com                                     vor...@debian.org
=== modified file 'debian/compat'
--- debian/compat	2012-03-18 14:44:34 +0000
+++ debian/compat	2012-12-18 07:05:50 +0000
@@ -1 +1 @@
-7
+9

=== modified file 'debian/control'
--- debian/control	2012-08-08 11:55:33 +0000
+++ debian/control	2012-12-18 07:06:09 +0000
@@ -5,7 +5,7 @@
 Uploaders: Michael Meskes <mes...@debian.org>,
            Loic Minier <l...@dooz.org>
 Standards-Version: 3.9.3
-Build-Depends: debhelper (>= 7.0.50~), dpkg-dev (>= 1.15.7)
+Build-Depends: debhelper (>= 9), dpkg-dev (>= 1.15.7)
 Vcs-Git: git://git.debian.org/git/pkg-acpi/acpid.git
 Vcs-Browser: http://git.debian.org/?p=pkg-acpi/acpid.git
 Homepage: http://www.tedfelix.com/linux/acpid-netlink.html

=== modified file 'debian/rules'
--- debian/rules	2012-03-18 14:44:34 +0000
+++ debian/rules	2012-12-18 07:05:50 +0000
@@ -1,20 +1,11 @@
 #!/usr/bin/make -f
 
-CFLAGS := -W -Wall -Werror -Wundef -Wshadow -D_GNU_SOURCE \
-	$(shell dpkg-buildflags --get CFLAGS) \
-	$(shell dpkg-buildflags --get CPPFLAGS) \
-	-fno-strict-aliasing
-
-LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
+export DEB_CFLAGS_MAINT_PREPEND = -W -Wall -Werror -Wundef -Wshadow -D_GNU_SOURCE
+export DEB_CFLAGS_MAINT_APPEND = -fno-strict-aliasing
 
 %:
 	dh ${@}
 
-override_dh_auto_configure:
-	dh_testdir
-
-	CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure
-
 override_dh_installinit:
 	dh_installinit -s -- start 12 2 3 4 5 . 
 

Reply via email to