Source: tcl-fitstcl Version: 2.4-3 Tags: patch User: helm...@debian.org Usertags: rebootstrap
tcl-fitstcl fails to cross build from source, because upstream intentionally broke cross building support. They actively override autoconf's compiler detection and error out when detecting cross compilation. Once forcing the right compiler and removing the stupid error though, it cross builds just fine. It just works. The attached patch implements it. Is that acceptable despite upstreams aversion of cross building? Helmut
diff --minimal -Nru tcl-fitstcl-2.4/debian/changelog tcl-fitstcl-2.4/debian/changelog --- tcl-fitstcl-2.4/debian/changelog 2016-06-01 22:19:08.000000000 +0200 +++ tcl-fitstcl-2.4/debian/changelog 2019-02-12 19:47:47.000000000 +0100 @@ -1,3 +1,12 @@ +tcl-fitstcl (2.4-3.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) + + Force a cross compiler via environment. + + cross.patch: Remove cross compilation error. + + -- Helmut Grohne <hel...@subdivi.de> Tue, 12 Feb 2019 19:47:47 +0100 + tcl-fitstcl (2.4-3) unstable; urgency=low * Use libtclstub to be independent of the Tcl version diff --minimal -Nru tcl-fitstcl-2.4/debian/patches/cross.patch tcl-fitstcl-2.4/debian/patches/cross.patch --- tcl-fitstcl-2.4/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100 +++ tcl-fitstcl-2.4/debian/patches/cross.patch 2019-02-12 19:47:47.000000000 +0100 @@ -0,0 +1,18 @@ +--- tcl-fitstcl-2.4.orig/configure.in ++++ tcl-fitstcl-2.4/configure.in +@@ -122,15 +122,6 @@ + # Set up flags to use the selected compiler + # + AC_PROG_CC +-if test "$cross_compiling" = yes; then +- AC_MSG_WARN(Cannot run a simple C executable on your system:) +- AC_MSG_WARN(There may be something wrong with your compiler,) +- AC_MSG_WARN(or perhaps you are trying to cross-compile?) +- AC_MSG_WARN(Cross-compiling is not supported within HEAsoft.) +- AC_MSG_WARN(Please make sure your compiler is working.) +- AC_MSG_WARN(Contact the FTOOLS help desk for further assistance.) +- AC_MSG_ERROR(Cross-compiling is not allowed.) +-fi + if test "x$GCC" = x; then + GCC=no + fi diff --minimal -Nru tcl-fitstcl-2.4/debian/patches/series tcl-fitstcl-2.4/debian/patches/series --- tcl-fitstcl-2.4/debian/patches/series 2016-06-01 22:14:02.000000000 +0200 +++ tcl-fitstcl-2.4/debian/patches/series 2019-02-12 19:47:47.000000000 +0100 @@ -4,3 +4,4 @@ fix_compiler_warnings.patch nonlinux.patch propagate_flags.patch +cross.patch diff --minimal -Nru tcl-fitstcl-2.4/debian/rules tcl-fitstcl-2.4/debian/rules --- tcl-fitstcl-2.4/debian/rules 2016-01-19 11:36:19.000000000 +0100 +++ tcl-fitstcl-2.4/debian/rules 2019-02-12 19:47:46.000000000 +0100 @@ -1,6 +1,9 @@ #!/usr/bin/make -f # -*- makefile -*- +-include /usr/share/dpkg/buildtools.mk +export CC + %: dh $@ --with autoreconf