Source: enca Version: 1.19-1 Tags: patch User: [email protected] Usertags: rebootstrap
enca fails to cross build from source, because the build tool make_hash is compiled with the host architecture compiler and thus cannot be reliably executed during the build. Please consider applying the attached patch to switch to the build architecture compiler. Helmut
diff --minimal -Nru enca-1.19/debian/changelog enca-1.19/debian/changelog --- enca-1.19/debian/changelog 2016-09-05 16:23:32.000000000 +0200 +++ enca-1.19/debian/changelog 2016-10-21 18:40:29.000000000 +0200 @@ -1,3 +1,11 @@ +enca (1.19-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: Build make_hash.c with the build architecture compiler + (Closes: #-1). + + -- Helmut Grohne <[email protected]> Fri, 21 Oct 2016 18:40:04 +0200 + enca (1.19-1) unstable; urgency=medium * New upstream release. diff --minimal -Nru enca-1.19/debian/control enca-1.19/debian/control --- enca-1.19/debian/control 2016-09-05 16:23:19.000000000 +0200 +++ enca-1.19/debian/control 2016-10-21 18:35:13.000000000 +0200 @@ -1,7 +1,7 @@ Source: enca Priority: optional Maintainer: Michal ÄihaÅ <[email protected]> -Build-Depends: debhelper (>= 9), dh-autoreconf, librecode-dev, dpkg-dev (>= 1.16.1~) +Build-Depends: debhelper (>= 9), dh-autoreconf, autoconf-archive, librecode-dev, dpkg-dev (>= 1.16.1~) Standards-Version: 3.9.8 Section: text Vcs-Browser: http://anonscm.debian.org/viewvc/collab-maint/deb-maint/enca/trunk/ diff --minimal -Nru enca-1.19/debian/patches/cross.patch enca-1.19/debian/patches/cross.patch --- enca-1.19/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100 +++ enca-1.19/debian/patches/cross.patch 2016-10-21 18:40:02.000000000 +0200 @@ -0,0 +1,63 @@ +From: Helmut Grohne <[email protected]> +Subject: build make_hash with the build arch compiler + +Also note that we cannot include config.h in make_hash.c, because it is +specific to the host architecture. + +Index: enca-1.19/configure.ac +=================================================================== +--- enca-1.19.orig/configure.ac ++++ enca-1.19/configure.ac +@@ -35,6 +35,7 @@ + dnl Checks for programs. + AC_PROG_AWK + AC_PROG_CC ++AX_PROG_CC_FOR_BUILD + AC_GNU_SOURCE + AC_AIX + AC_ISC_POSIX +Index: enca-1.19/tools/Makefile.am +=================================================================== +--- enca-1.19.orig/tools/Makefile.am ++++ enca-1.19/tools/Makefile.am +@@ -2,7 +2,8 @@ + noinst_HEADERS = encodings.h + noinst_SCRIPTS = expand_table.pl + +-make_hash_SOURCES = make_hash.c ++make_hash$(EXEEXT): make_hash.c ++ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -o $@ $< + + BUILT_SOURCES = $(noinst_HEADERS) + +Index: enca-1.19/tools/make_hash.c +=================================================================== +--- enca-1.19.orig/tools/make_hash.c ++++ enca-1.19/tools/make_hash.c +@@ -17,25 +17,9 @@ + with this program; if not, write to the Free Software Foundation, Inc., + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + */ +-#ifdef HAVE_CONFIG_H +-# include "config.h" +-#endif /* HAVE_CONFIG_H */ +- + #include <stdlib.h> + #include <stdio.h> +- +-#ifdef HAVE_STRING_H +-# include <string.h> +-#else /* HAVE_STRING_H */ +-# ifdef HAVE_STRINGS_H +-# include <strings.h> +-# endif /* HAVE_STRINGS_H */ +-#endif /* HAVE_STRING_H */ +- +-#ifdef HAVE_MEMORY_H +-# include <memory.h> +-#endif /* HAVE_MEMORY_H */ +- ++#include <string.h> + #include <unistd.h> + #include <ctype.h> + diff --minimal -Nru enca-1.19/debian/patches/series enca-1.19/debian/patches/series --- enca-1.19/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 +++ enca-1.19/debian/patches/series 2016-10-21 18:34:13.000000000 +0200 @@ -0,0 +1 @@ +cross.patch

