Package: libcap2 Version: 1:2.22-1 Severity: wishlist Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: precise origin-ubuntu ubuntu-patch
Hey libcap2 failed to cross-build with "xdeb" as nothing sets CC/BUILD_CC or build/host architectures. Passing CC/BUILD_CC to the upstream makefile seems to be all that's missing to cross-build libcap2 (attached patch). This was originally reported by Wookey at: https://bugs.launchpad.net/ubuntu/+source/libcap2/+bug/872435 which has extra details. Thanks! -- Loïc Minier
diff -Nru libcap2-2.22/debian/changelog libcap2-2.22/debian/changelog --- libcap2-2.22/debian/changelog 2011-07-28 07:44:47.000000000 +0200 +++ libcap2-2.22/debian/changelog 2011-10-19 16:33:51.000000000 +0200 @@ -1,3 +1,11 @@ +libcap2 (1:2.22-1ubuntu1) precise; urgency=low + + * Fix cross-building by passing CC and BUILD_CC to dh_auto_make; based on a + patch by Colin Watson for the previous CDBS packaging, but adapted for the + new dh-based packaging; LP: #872435. + + -- Loïc Minier <loic.min...@linaro.org> Wed, 19 Oct 2011 16:30:24 +0200 + libcap2 (1:2.22-1) unstable; urgency=low * New upstream released diff -Nru libcap2-2.22/debian/rules libcap2-2.22/debian/rules --- libcap2-2.22/debian/rules 2011-07-28 07:44:47.000000000 +0200 +++ libcap2-2.22/debian/rules 2011-10-19 16:30:18.000000000 +0200 @@ -1,8 +1,20 @@ #!/usr/bin/make -f +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) + +ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) +CC := gcc +else +CC := $(DEB_HOST_GNU_TYPE)-gcc +endif + %: dh $@ +override_dh_auto_build: + dh_auto_build -- CC=$(CC) BUILD_CC=gcc + override_dh_auto_install: dh_auto_install -- lib=lib RAISE_SETFCAP=no