> lowdown fails to cross build from source, because it performs a native > build. Since there is a configure script, debhelper concludes that the > autoconf build system should be used and that it thus should not pass > cross tools to make, but it really should. Also since dh_auto_configure > is overridden, passing cross flags there (CC in particular) is required. > Last but not least, the pkg-config invocations also need to use the host > tools. I'm attaching a patch for your convenience.
Thanks for this, Helmut! > include /usr/share/dpkg/architecture.mk > +-include /usr/share/dpkg/buildtools.mk Why -include? Are there conditions under which buildtools.mk wouldn't exist? > +PKG_CONFIG ?= pkg-config ...and if we assume buildtools.mk always exist, can we drop this and assume PKG_CONFIG is always going to be defined? > # output every command that modifies files on the build system. > #export DH_VERBOSE = 1 > @@ -10,17 +12,18 @@ > # Use libbsd for a system copy of the BSD functions, instead of upstream's > # embedded compats.c coming from the oconfigure project. > # Also see https://github.com/kristapsdz/oconfigure/issues/19 > -CFLAGS += $(shell pkg-config --cflags libmd libbsd-overlay) > -LDFLAGS += $(shell pkg-config --libs libmd libbsd-overlay) > +CFLAGS += $(shell $(PKG_CONFIG) --cflags libmd libbsd-overlay) > +LDFLAGS += $(shell $(PKG_CONFIG) --libs libmd libbsd-overlay) > > # avoid symbol leakage; keep this in the package until merged upstream: > # see https://github.com/kristapsdz/lowdown/issues/109 > LDFLAGS += -Wl,--version-script=debian/liblowdown.map > > %: > - dh $@ > + dh $@ --buildsystem=makefile > > override_dh_auto_configure: > + CC='$(CC)' \ > CFLAGS="${CFLAGS}" \ > ./configure \ > PREFIX=/usr \ LGTM. I'll commit those and upload once we resolve the (trivial) question above :) Best, Faidon

