Source: mupdf Version: 1.13.0+ds1-1 Tags: patch User: helm...@debian.org Usertags: rebootstrap
mupdf fails to cross build from source, because it uses the build architecture compiler. The easiest way of fixing that is using dh_auto_build. Doing so turned out to be rather invasive, because mupdf has its own mechanism for handling parallel building rather than using dh --parallel. To have make install benefit from --parallel it needs to be calling dh_auto_install. Switching to dh_auto_install means passing DESTDIR to make, which upstream understands, but the packaging already stuffs the DESTDIR value into prefix, so it ends up twice and makes mupdf fail to build. After shrinking prefix, it works again, but that's quite a pile of changes for making it use dh_auto_build. Can you apply the patch? Alternatively, can you include dpkg's buildtools.mk setting DPKG_EXPORT_BUILDTOOLS=1 to pass cross tools to make? Helmut
diff --minimal -Nru mupdf-1.13.0+ds1/debian/changelog mupdf-1.13.0+ds1/debian/changelog --- mupdf-1.13.0+ds1/debian/changelog 2018-04-30 04:17:25.000000000 +0200 +++ mupdf-1.13.0+ds1/debian/changelog 2018-07-04 05:55:48.000000000 +0200 @@ -1,3 +1,10 @@ +mupdf (1.13.0+ds1-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Use dh_auto_build/dh_auto_install --parallel. (Closes: #-1) + + -- Helmut Grohne <hel...@subdivi.de> Wed, 04 Jul 2018 05:55:48 +0200 + mupdf (1.13.0+ds1-1) unstable; urgency=medium * New upstream version 1.13.0+ds1 diff --minimal -Nru mupdf-1.13.0+ds1/debian/control mupdf-1.13.0+ds1/debian/control --- mupdf-1.13.0+ds1/debian/control 2018-04-30 02:07:32.000000000 +0200 +++ mupdf-1.13.0+ds1/debian/control 2018-07-04 05:55:48.000000000 +0200 @@ -3,7 +3,7 @@ Priority: optional Maintainer: Kan-Ru Chen (陳侃如) <kos...@debian.org> Uploaders: Quoc-Viet Nguyen <afel...@gmail.com> -Build-Depends: debhelper (>= 7.0.50~), dpkg-dev (>= 1.16.1.1~), +Build-Depends: debhelper (>= 7.4.10~), dpkg-dev (>= 1.16.1.1~), libfreetype6-dev, pkg-config, libjpeg-dev, libjbig2dec-dev, libopenjp2-7-dev, libx11-dev, libxext-dev, zlib1g-dev, libharfbuzz-dev, freeglut3-dev diff --minimal -Nru mupdf-1.13.0+ds1/debian/rules mupdf-1.13.0+ds1/debian/rules --- mupdf-1.13.0+ds1/debian/rules 2018-04-30 02:53:33.000000000 +0200 +++ mupdf-1.13.0+ds1/debian/rules 2018-07-04 05:55:48.000000000 +0200 @@ -18,18 +18,13 @@ CFLAGS += -DJBIG_NO_MEMENTO CFLAGS += -fPIC -ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) - NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) - MAKEFLAGS += -j$(NUMJOBS) -endif - -BUILD_FLAGS=build=debian OS=Linux verbose=yes XCFLAGS="$(CFLAGS)" XLDFLAGS="$(LDFLAGS)" +BUILD_FLAGS=build=debian OS=Linux verbose=yes XCFLAGS="$(CFLAGS)" XLDFLAGS="$(LDFLAGS)" prefix=/usr override_dh_auto_build: - $(MAKE) $(BUILD_FLAGS) + dh_auto_build -- $(BUILD_FLAGS) override_dh_auto_install: - $(MAKE) $(BUILD_FLAGS) prefix=$(CURDIR)/debian/tmp/usr install + dh_auto_install -- $(BUILD_FLAGS) install -m744 -T $(CURDIR)/debian/mupdf.sh $(CURDIR)/debian/tmp/usr/bin/mupdf override_dh_auto_clean: @@ -38,4 +33,4 @@ -rm -f include/mupdf/pdf/name-table.h source/pdf/pdf-name-table.h %: - dh $@ + dh $@ --parallel