Package: fakeroot
Version: 1.18.4-2
Severity: normal
Tags: patch
User: crossbu...@debian.org
Usertags: cross

fakeroot fails to cross-build as follows:

  strip --remove-section=.comment --remove-section=.note --strip-unneeded 
debian/tmp/usr/lib/arm-linux-gnueabihf/libfakeroot/libfakeroot-sysv.so
  strip: Unable to recognise the format of the input file 
`debian/tmp/usr/lib/arm-linux-gnueabihf/libfakeroot/libfakeroot-sysv.so'

This is easy to fix by using $(DEB_HOST_GNU_TYPE)-strip instead when
cross-building, just as debhelper does.  Patch follows.

  * Use appropriate version of strip when cross-building.

diff -Nru fakeroot-1.18.4/debian/rules fakeroot-1.18.4/debian/rules
--- fakeroot-1.18.4/debian/rules        2012-06-07 00:11:40.000000000 +0100
+++ fakeroot-1.18.4/debian/rules        2012-11-22 13:41:07.000000000 +0000
@@ -2,8 +2,11 @@
 
 DEB_BUILD_GNU_TYPE = $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 DEB_HOST_GNU_TYPE = $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
+ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
+STRIP = strip
+else
 CONFARGS = --host=$(DEB_HOST_GNU_TYPE)
+STRIP = $(DEB_HOST_GNU_TYPE)-strip
 endif
 
 CFLAGS = -W -Wall -g
@@ -130,11 +133,11 @@
                 debian/tmp/usr/share/man/sv/man1/fakeroot-tcp.1 \
                 debian/tmp/usr/share/doc/fakeroot/changelog.Debian
 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
-       strip --remove-section=.comment --remove-section=.note --strip-unneeded 
debian/tmp/${LIB_DIR}/libfakeroot/libfakeroot-sysv.so
-       strip --remove-section=.comment --remove-section=.note --strip-unneeded 
debian/tmp/${LIB_DIR}/libfakeroot/libfakeroot-tcp.so
-       strip --remove-section=.comment --remove-section=.note 
debian/tmp/usr/bin/faked-sysv
-       strip --remove-section=.comment --remove-section=.note 
debian/tmp/usr/bin/faked-tcp
-#      strip --strip-debug debian/tmp/${LIB_DIR}/libfakeroot.a
+       $(STRIP) --remove-section=.comment --remove-section=.note 
--strip-unneeded debian/tmp/${LIB_DIR}/libfakeroot/libfakeroot-sysv.so
+       $(STRIP) --remove-section=.comment --remove-section=.note 
--strip-unneeded debian/tmp/${LIB_DIR}/libfakeroot/libfakeroot-tcp.so
+       $(STRIP) --remove-section=.comment --remove-section=.note 
debian/tmp/usr/bin/faked-sysv
+       $(STRIP) --remove-section=.comment --remove-section=.note 
debian/tmp/usr/bin/faked-tcp
+#      $(STRIP) --strip-debug debian/tmp/${LIB_DIR}/libfakeroot.a
 endif
        $(INSTALL_SCRIPT) debian/fakeroot.postrm debian/tmp/DEBIAN/postrm
        $(INSTALL_SCRIPT) debian/fakeroot.prerm debian/tmp/DEBIAN/prerm

Thanks,

-- 
Colin Watson                                       [cjwat...@ubuntu.com]


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to