On Wed, Feb 18, 2009 at 08:59:58AM +0000, Neil Williams wrote: > attr still needs changes to be cross-built. Current version in Emdebian > Crush: 1:2.4.41-1 > > The remaining changes are in debian/rules and require updating libtool > as well as implementing the standard fix recommended by autotools-dev > for --build and --host. > > Without running libtoolize in debian/rules, the cross-build fails with: > /usr/bin/libtool --mode=compile arm-linux-gnu-gcc -g -O2 -g -O2 -DNDEBUG > -funsigned-char -fno-strict-aliasing -Wall -DVERSION=\"2.4.43\" > -DLOCALEDIR=\"/usr/share/locale\" -DPACKAGE=\"attr\" -I./include > -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -DNDEBUG -funsigned-char > -fno-strict-aliasing -Wall -DVERSION=\"2.4.43\" > -DLOCALEDIR=\"/usr/share/locale\" -DPACKAGE=\"attr\" -I../include > -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -c quote.c > libtool: compile: unable to infer tagged configuration > libtool: compile: specify a tag with `--tag' > make[2]: *** [quote.lo] Error 1 > > Attaching the patch for debian/rules.
I found this (against 1:2.4.43-3) to be a slight improvement in the following ways: * I generally prefer to use autoreconf whenever possible rather than calling the individual tools. We do have to avoid calling autoheader since attr has a custom config.h.in. I found it better to make that explicit so that it's clear that not calling autoheader isn't just an accidental omission. * libtoolize -i (via autoreconf -i) arranges to copy over config.guess; it won't do so without -i, at least not with the version of libtool currently in Ubuntu. * We need to keep the local version of install-sh, since it understands DIST_ROOT; libtoolize -i would normally overwrite it. Since this is an unusual build system requirement, I thought it was clearest to explicitly preserve it in debian/rules. * Always pass --build to configure. * Build-depend on automake for aclocal. diff -u attr-2.4.43/debian/control attr-2.4.43/debian/control --- attr-2.4.43/debian/control +++ attr-2.4.43/debian/control @@ -3,7 +3,7 @@ Priority: optional Maintainer: Nathan Scott <nath...@debian.org> Uploaders: Niv Sardi <xa...@debian.org>, Anibal Monsalve Salazar <ani...@debian.org> -Build-Depends: autoconf, debhelper (>= 7), gettext, libtool +Build-Depends: autoconf, debhelper (>= 7), gettext, automake, libtool Standards-Version: 3.8.2 Homepage: http://oss.sgi.com/projects/xfs/ diff -u attr-2.4.43/debian/rules attr-2.4.43/debian/rules --- attr-2.4.43/debian/rules +++ attr-2.4.43/debian/rules @@ -4,6 +4,13 @@ develop = lib$(package)1-dev library = lib$(package)1 +DEB_BUILD_GNU_TYPE = $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +DEB_HOST_GNU_TYPE = $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +export LOCAL_CONFIGURE_OPTIONS = --build=$(DEB_BUILD_GNU_TYPE) +ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) +LOCAL_CONFIGURE_OPTIONS += --host=$(DEB_HOST_GNU_TYPE) +endif + dirme = debian/$(package) dirdev = debian/$(develop) dirlib = debian/$(library) @@ -28,6 +35,10 @@ .census: @echo "== dpkg-buildpackage: configure" 1>&2 $(checkdir) + # Keep our own install-sh. + cp -a install-sh install-sh.safe + AUTOHEADER=true autoreconf -i -I m4 + mv install-sh.safe install-sh $(options) $(MAKE) configure touch .census @@ -38,6 +49,7 @@ $(MAKE) distclean -rm -rf $(dirme) $(dirdev) $(dirlib) debian/tmp -rm -f debian/*substvars debian/files* debian/*.debhelper + -rm -f config.guess config.sub ltmain.sh binary-indep: 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