Control: tag -1 patch Here is my suggested solution:
* undo all workarounds - drop the patch - minimize override_dh_auto_build (removing it completely didn't run trans-update) - fix the spurious dependency of the POTFILES target on intl2po - fix debian/rules build - new patch to ensure POTFILES is newer than Makefile (does probably not work if Makefile has a timestamp in the future) all bundled together in the attached source debdiff Alternatively you could also append 'sleep 1' to override_dh_auto_configure Some more issues I noticed: * 'debian/rules clean' fails after a successful build with [...] Making distclean in p64 make[4]: Entering directory '/vice-2.4.dfsg+2.4.26/src/lib/p64' make[4]: Leaving directory '/vice-2.4.dfsg+2.4.26/src/lib/p64' Making distclean in libx264 make[4]: Entering directory '/vice-2.4.dfsg+2.4.26/src/lib/libx264' Makefile:3: config.mak: No such file or directory Found no assembler Minimum version is yasm-1.2.0 If you really want to compile without asm, configure with --disable-asm. Makefile:432: recipe for target 'config.mak' failed make[4]: *** [config.mak] Error 1 make[4]: Leaving directory '/vice-2.4.dfsg+2.4.26/src/lib/libx264' Makefile:805: recipe for target 'distclean-recursive' failed make[3]: *** [distclean-recursive] Error 1 make[3]: Leaving directory '/vice-2.4.dfsg+2.4.26/src/lib' Makefile:2024: recipe for target 'distclean-recursive' failed make[2]: *** [distclean-recursive] Error 1 make[2]: Leaving directory '/vice-2.4.dfsg+2.4.26/src' Makefile:593: recipe for target 'distclean-recursive' failed make[1]: *** [distclean-recursive] Error 1 make[1]: Leaving directory '/vice-2.4.dfsg+2.4.26' dh_auto_clean: make -j1 distclean returned exit code 2 debian/rules:43: recipe for target 'clean' failed make: *** [clean] Error 2 That build system is a bit weird anyway. dh_auto_build starts with running autofoo again, therefter rerunning configure ... Also can you enable a more verbose build? [...] make[5]: Leaving directory '/«BUILDDIR»/vice-2.4.dfsg+2.4.26/src/drive' Making all in vdrive make[5]: Entering directory '/«BUILDDIR»/vice-2.4.dfsg+2.4.26/src/vdrive' ar: `u' modifier ignored since `D' is the default (see `U') make[5]: Leaving directory '/«BUILDDIR»/vice-2.4.dfsg+2.4.26/src/vdrive' Making all in fsdevice make[5]: Entering directory '/«BUILDDIR»/vice-2.4.dfsg+2.4.26/src/fsdevice' [...] obviously it is dong something (that outputs some diagnostics) Andreas
diff -Nru vice-2.4.dfsg+2.4.26/debian/patches/fix-timestamp-race.patch vice-2.4.dfsg+2.4.26/debian/patches/fix-timestamp-race.patch --- vice-2.4.dfsg+2.4.26/debian/patches/fix-timestamp-race.patch 1970-01-01 01:00:00.000000000 +0100 +++ vice-2.4.dfsg+2.4.26/debian/patches/fix-timestamp-race.patch 2016-04-11 11:21:34.000000000 +0200 @@ -0,0 +1,38 @@ +Author: Andreas Beckmann <a...@debian.org> +Description: work around file timestamp race in make + if POTFILES gets created with the same timestamp as the existing Makefile + the Makefile won't be recreated even though POTFILES didn't even exist before + (this is make bug #820658) +Bug-Debian: #725629 + +--- a/po/Makefile.in.in ++++ b/po/Makefile.in.in +@@ -93,6 +93,8 @@ all: all-@USE_NLS@ + all-yes: cat-id-tbl.c $(CATALOGS) + all-no: + ++$(POTFILES): intl2po ++ + $(builddir)/$(PACKAGE).pot: $(POTFILES) + $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) --directory=$(top_builddir) \ + --add-comments --keyword=_ --keyword=N_ \ +@@ -280,7 +282,7 @@ trans-update: + ./gen_win32_files.sh $(POTFILES) + ( if test 'x@DEBUGBUILD@' = 'x1'; then cat >tmp_trans.txt ../src/translate.txt ../src/arch/amigaos/intl.txt; ./check_obsolete.sh $(POTFILES) <tmp_trans.txt; rm -f tmp_trans.txt; fi ) + +-POTFILES: POTFILES.in intl2po ++POTFILES: POTFILES.in + ( if test 'x$(srcdir)' != 'x.'; then \ + posrcprefix='$(top_srcdir)/'; \ + else \ +@@ -290,8 +292,10 @@ POTFILES: POTFILES.in intl2po + && (sed -e '/^#/d' -e '/^[ ]*$$/d' \ + -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \ + | sed -e '$$s/\\$$//') > $@-t \ ++ && if [ ! $@-t -nt Makefile ]; then sleep 1; touch $@-t; fi \ + && chmod a-w $@-t \ + && mv $@-t $@ ) ++ test $@ -nt Makefile + + Makefile: Makefile.in.in ../config.status POTFILES + cd .. \ diff -Nru vice-2.4.dfsg+2.4.26/debian/patches/series vice-2.4.dfsg+2.4.26/debian/patches/series --- vice-2.4.dfsg+2.4.26/debian/patches/series 2016-03-24 18:03:15.000000000 +0100 +++ vice-2.4.dfsg+2.4.26/debian/patches/series 2016-04-11 12:05:56.000000000 +0200 @@ -1,4 +1,4 @@ correct_html_documentation_path_in_manpage.patch kfreebsd_no_machine_cpufunc.h.patch revert_upstream_lib64.patch -try-to-fix-possible-race-condition.patch +fix-timestamp-race.patch diff -Nru vice-2.4.dfsg+2.4.26/debian/patches/try-to-fix-possible-race-condition.patch vice-2.4.dfsg+2.4.26/debian/patches/try-to-fix-possible-race-condition.patch --- vice-2.4.dfsg+2.4.26/debian/patches/try-to-fix-possible-race-condition.patch 2014-03-26 23:22:02.000000000 +0100 +++ vice-2.4.dfsg+2.4.26/debian/patches/try-to-fix-possible-race-condition.patch 1970-01-01 01:00:00.000000000 +0100 @@ -1,33 +0,0 @@ -Description: <short summary of the patch> - TODO: Put a short summary on the line above and replace this paragraph - with a longer explanation of this change. Complete the meta-information - with other relevant fields (see below for details). To make it easier, the - information below has been extracted from the changelog. Adjust it or drop - it. -Author: Laszlo Boszormenyi (GCS) <g...@debian.org> -Bug-Debian: http://bugs.debian.org/721927 - ---- -The information above should follow the Patch Tagging Guidelines, please -checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here -are templates for supplementary fields that you might want to add: - -Origin: <vendor|upstream|other>, <url of original patch> -Bug: <url in upstream bugtracker> -Bug-Debian: http://bugs.debian.org/<bugnumber> -Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber> -Forwarded: <no|not-needed|url proving that it has been forwarded> -Reviewed-By: <name and email of someone who approved the patch> -Last-Update: <YYYY-MM-DD> - ---- vice-2.4.dfsg.orig/po/Makefile.in.in -+++ vice-2.4.dfsg/po/Makefile.in.in -@@ -91,7 +91,7 @@ all: all-@USE_NLS@ - all-yes: cat-id-tbl.c $(CATALOGS) - all-no: - --$(builddir)/$(PACKAGE).pot: $(POTFILES) -+$(builddir)/$(PACKAGE).pot: Makefile $(POTFILES) - $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) --directory=$(top_builddir) \ - --add-comments --keyword=_ --keyword=N_ \ - --files-from=$(srcdir)/POTFILES.in \ diff -Nru vice-2.4.dfsg+2.4.26/debian/rules vice-2.4.dfsg+2.4.26/debian/rules --- vice-2.4.dfsg+2.4.26/debian/rules 2016-03-23 21:13:41.000000000 +0100 +++ vice-2.4.dfsg+2.4.26/debian/rules 2016-04-11 12:22:16.000000000 +0200 @@ -18,10 +18,7 @@ --enable-arch=no override_dh_auto_build: - $(MAKE) intl2po -C po/ $(MAKE) trans-update -C po/ - $(MAKE) -C po/ - $(MAKE) dh_auto_build override_dh_install: @@ -36,6 +33,10 @@ ln -sf vice_toc.html $(PKGDIR)/usr/share/doc/vice/html/index.html ln -sf ../../share/doc/vice/html $(PKGDIR)/usr/lib/vice/doc +.PHONY: build +build: + dh $@ --with autoreconf + %: dh $@ --with autoreconf