diff -Nru tcl8.5-8.5.8/debian/changelog tcl8.5-8.5.8-2build1/debian/changelog --- tcl8.5-8.5.8/debian/changelog 2010-11-15 10:41:15.000000000 +0000 +++ tcl8.5-8.5.8-2build1/debian/changelog 2010-10-14 08:48:01.000000000 +0000 @@ -1,3 +1,9 @@ +tcl8.5 (8.5.8-2build1-1cross1) maverick; urgency=low + + * Apply crude cross patch to use build host tclsh during installation + + -- Peter Pearse Thu, 14 Oct 2010 08:48:01 +0000 + tcl8.5 (8.5.8-2build1) maverick; urgency=low * Rebuild to set TCL_CC properly on i386. diff -Nru tcl8.5-8.5.8/debian/patches/cross.diff tcl8.5-8.5.8-2build1/debian/patches/cross.diff --- tcl8.5-8.5.8/debian/patches/cross.diff 1970-01-01 00:00:00.000000000 +0000 +++ tcl8.5-8.5.8-2build1/debian/patches/cross.diff 2010-10-14 08:45:25.000000000 +0000 @@ -0,0 +1,89 @@ +diff -ru debian_patched/unix/Makefile.in debian_patched_plus/unix/Makefile.in +--- debian_patched/unix/Makefile.in 2010-08-18 07:24:06.861099376 +0000 ++++ debian_patched_plus/unix/Makefile.in 2010-08-18 09:55:43.085742055 +0000 +@@ -163,6 +163,15 @@ + # normal build although it can be required to run make dist. + TCL_EXE = tclsh + ++# When cross compiling use the pre-existing (host) tclsh ++# rather than the just built (target) tclsh ++cross_compiling = @cross_compiling@ ++ifeq (${cross_compiling},yes) ++ TCLSH=$(TCL_EXE) ++else ++ TCLSH=./tclsh ++endif ++ + # The symbols below provide support for dynamic loading and shared libraries. + # See configure.in for a description of what the symbols mean. The values of + # the symbols are normally set by the configure script. You shouldn't normally +@@ -623,20 +632,20 @@ + shell: tclsh + @LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \ + TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ +- ./tclsh $(SCRIPT) ++ $(TCLSH) $(SCRIPT) + + # This target can be used to run tclsh inside either gdb or insight + gdb: tclsh + @echo "set env @LD_LIBRARY_PATH_VAR@=\"`pwd`:$${@LD_LIBRARY_PATH_VAR@}\"" > gdb.run + @echo "set env TCL_LIBRARY=${TCL_BUILDTIME_LIBRARY}" >> gdb.run +- $(GDB) ./tclsh --command=gdb.run ++ $(GDB) $(TCLSH) --command=gdb.run + rm gdb.run + + # This target can be used to run tclsh inside ddd + ddd: tclsh + @echo "set env @LD_LIBRARY_PATH_VAR@=\"`pwd`:$${@LD_LIBRARY_PATH_VAR@}\"" > gdb.run + @echo "set env TCL_LIBRARY=${TCL_BUILDTIME_LIBRARY}" >> gdb.run +- $(DDD) -command=gdb.run ./tclsh ++ $(DDD) -command=gdb.run $(TCLSH) + rm gdb.run + + VALGRINDARGS=--tool=memcheck --num-callers=8 --leak-resolution=high --leak-check=yes --show-reachable=yes -v +@@ -649,7 +658,7 @@ + valgrindshell: tclsh + @LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \ + TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ +- valgrind $(VALGRINDARGS) ./tclsh $(SCRIPT) ++ valgrind $(VALGRINDARGS) $(TCLSH) $(SCRIPT) + + # The following target outputs the name of the top-level source directory for + # Tcl (it is used by Tk's configure script, for example). The .NO_PARALLEL +@@ -821,14 +830,14 @@ + @echo "Installing time zone data" + @@LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \ + TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ +- ./tclsh $(TOOL_DIR)/installData.tcl \ ++ $(TCLSH) $(TOOL_DIR)/installData.tcl \ + $(TOP_DIR)/library/tzdata "$(SCRIPT_INSTALL_DIR)"/tzdata + + install-msgs: tclsh + @echo "Installing message catalogs" + @@LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \ + TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ +- ./tclsh $(TOOL_DIR)/installData.tcl \ ++ $(TCLSH) $(TOOL_DIR)/installData.tcl \ + $(TOP_DIR)/library/msgs "$(SCRIPT_INSTALL_DIR)"/msgs + + install-doc: doc +@@ -1768,7 +1777,7 @@ + BUILD_HTML = \ + @@LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \ + TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ +- ./tclsh $(TOOL_DIR)/tcltk-man2html.tcl --htmldir="$(HTML_INSTALL_DIR)" \ ++ $(TCLSH) $(TOOL_DIR)/tcltk-man2html.tcl --htmldir="$(HTML_INSTALL_DIR)" \ + --srcdir=$(TOP_DIR)/.. $(BUILD_HTML_FLAGS) + + # +diff -ru debian_patched/unix/configure debian_patched_plus/unix/configure +--- debian_patched/unix/configure 2010-08-18 07:24:06.861099376 +0000 ++++ debian_patched_plus/unix/configure 2010-08-18 09:47:02.805088210 +0000 +@@ -19666,6 +19666,7 @@ + s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t + s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t + s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t ++s,@cross_compiling@,$cross_compiling,;t t + s,@exec_prefix@,$exec_prefix,;t t + s,@prefix@,$prefix,;t t + s,@program_transform_name@,$program_transform_name,;t t diff -Nru tcl8.5-8.5.8/debian/patches/series tcl8.5-8.5.8-2build1/debian/patches/series --- tcl8.5-8.5.8/debian/patches/series 2010-11-15 10:41:15.000000000 +0000 +++ tcl8.5-8.5.8-2build1/debian/patches/series 2010-10-14 08:27:08.000000000 +0000 @@ -7,3 +7,4 @@ non-linux.diff manpages.diff mips.diff +cross.diff diff -Nru tcl8.5-8.5.8/debian/rules tcl8.5-8.5.8-2build1/debian/rules --- tcl8.5-8.5.8/debian/rules 2010-11-15 10:41:15.000000000 +0000 +++ tcl8.5-8.5.8-2build1/debian/rules 2010-10-14 08:36:35.000000000 +0000 @@ -40,6 +40,8 @@ dh_testdir # So so ugly but it works... touch generic/tclStubInit.c + ac_cv_func_strtod=yes \ + tcl_cv_strtod_buggy=1 \ cd unix && \ TCL_LIBRARY="/usr/share/tcltk/tcl$(v)" \ TCL_PACKAGE_PATH="/usr/local/lib/tcltk /usr/local/share/tcltk /usr/lib/tcltk /usr/share/tcltk /usr/lib" \