Description: Handle missing non-DFSG-free files
 We excluded several non-DFSG-free files from the tarball.
 Update the build system to not rely or use these.
 .
 We disable building mlnlffigen as collateral damage from
 removing ckit-lib (see dependencies in mlnlffigen/sources.mlb).
 .
 We comment out the paths to extracted tarballs in .gitignore
 to keep the clean target from deleting them.
Author: Ryan Kavanagh <rak@debian.org>
Bug-Debian: https://bugs.debian.org/998156
Forwarded: not-needed
Last-Update: 2021-12-19
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: mlton/Makefile
===================================================================
--- mlton.orig/Makefile	2021-12-28 14:56:11.746838799 -0500
+++ mlton/Makefile	2021-12-28 14:56:11.742838795 -0500
@@ -106,8 +106,6 @@
 
 .PHONY: libraries-no-check
 libraries-no-check:
-	$(MAKE) -C "$(SRC)/lib/ckit-lib"
-	$(call LIBRARIES_NO_CHECK_TEMPLATE,ckit-lib,/ckit/src,)
 	$(call LIBRARIES_NO_CHECK_TEMPLATE,cml,,'!' -path '*/tests/*')
 	$(MAKE) -C "$(SRC)/lib/mllpt-lib"
 	$(call LIBRARIES_NO_CHECK_TEMPLATE,mllpt-lib,/ml-lpt/lib,)
@@ -126,7 +124,6 @@
 
 .PHONY: libraries-check
 libraries-check:
-	$(call LIBRARIES_CHECK_TEMPLATE,ckit-lib)
 	$(call LIBRARIES_CHECK_TEMPLATE,cml)
 	$(call LIBRARIES_CHECK_TEMPLATE,mllpt-lib)
 	$(call LIBRARIES_CHECK_TEMPLATE,mlnlffi-lib)
@@ -194,7 +191,6 @@
 	$(call TOOLS_TEMPLATE,mllex)
 	$(call TOOLS_TEMPLATE,mlyacc)
 	$(call TOOLS_TEMPLATE,mlprof)
-	$(call TOOLS_TEMPLATE,mlnlffigen)
 
 .PHONY: tools-clean
 tools-clean:
@@ -375,7 +371,6 @@
 MAN_PAGES := mlton.1
 MAN_PAGES := $(MAN_PAGES) \
 	mllex.1 \
-	mlnlffigen.1 \
 	mlprof.1 \
 	mlyacc.1
 
@@ -397,7 +392,6 @@
 STRIP_PROGS := "$(TLIB)/$(MLTON_OUTPUT)$(EXE)"
 STRIP_PROGS := $(STRIP_PROGS) \
 	"$(TBIN)/mllex$(EXE)" \
-	"$(TBIN)/mlnlffigen$(EXE)" \
 	"$(TBIN)/mlprof$(EXE)" \
 	"$(TBIN)/mlyacc$(EXE)"
 
Index: mlton/benchmark/Makefile
===================================================================
--- mlton.orig/benchmark/Makefile	2021-12-28 14:56:11.746838799 -0500
+++ mlton/benchmark/Makefile	2021-12-28 14:56:11.742838795 -0500
@@ -27,8 +27,8 @@
 clean:
 	../bin/clean
 
-BENCH := barnes-hut boyer checksum count-graphs DLXSimulator even-odd fft fib flat-array hamlet imp-for knuth-bendix lexgen life logic mandelbrot matrix-multiply md5 merge mlyacc model-elimination mpuz nucleic output1 peek psdes-random ratio-regions ray raytrace simple smith-normal-form string-concat tailfib tak tensor tsp tyan vector32-concat vector64-concat vector-rev vliw wc-input1 wc-scanStream zebra zern
-FPBENCH := barnes-hut fft hamlet mandelbrot matrix-multiply nucleic ray raytrace simple tensor tsp tyan vliw zern
+BENCH := barnes-hut boyer checksum count-graphs DLXSimulator even-odd fft fib flat-array hamlet imp-for knuth-bendix lexgen life logic mandelbrot matrix-multiply merge mlyacc model-elimination mpuz nucleic output1 peek psdes-random ratio-regions ray raytrace simple smith-normal-form string-concat tailfib tak tensor tsp tyan vector32-concat vector64-concat vector-rev vliw wc-input1 wc-scanStream zebra
+FPBENCH := barnes-hut fft hamlet mandelbrot matrix-multiply nucleic ray raytrace simple tensor tsp tyan vliw
 
 BFLAGS := -mlton "/usr/bin/mlton" -mlton "mlton -optimize-ssa {false,true}"
 BFLAGS := -wiki -mlton "/usr/bin/mlton" -mlkit -mosml -poly -smlnj
Index: mlton/benchmark/tests/raytrace.sml
===================================================================
--- mlton.orig/benchmark/tests/raytrace.sml	2021-12-28 14:56:11.746838799 -0500
+++ mlton/benchmark/tests/raytrace.sml	2021-12-28 14:56:11.742838795 -0500
@@ -2371,9 +2371,7 @@
 end
 structure Main =
    struct
-      fun doit () =
-         Eval.f (Program.read (TextIO.openIn "DATA/chess.gml"))
-         handle _ => ()
+      fun doit () = ()
 
       val doit =
          fn n =>
Index: mlton/lib/mllpt-lib/.gitignore
===================================================================
--- mlton.orig/lib/mllpt-lib/.gitignore	2021-12-28 14:56:11.746838799 -0500
+++ mlton/lib/mllpt-lib/.gitignore	2021-12-28 14:56:11.742838795 -0500
@@ -1 +1 @@
-/ml-lpt/
+#/ml-lpt/
Index: mlton/lib/mlrisc-lib/.gitignore
===================================================================
--- mlton.orig/lib/mlrisc-lib/.gitignore	2021-12-28 14:56:11.746838799 -0500
+++ mlton/lib/mlrisc-lib/.gitignore	2021-12-28 14:56:11.742838795 -0500
@@ -1 +1 @@
-/MLRISC/
+#/MLRISC/
Index: mlton/lib/smlnj-lib/.gitignore
===================================================================
--- mlton.orig/lib/smlnj-lib/.gitignore	2021-12-28 14:56:11.746838799 -0500
+++ mlton/lib/smlnj-lib/.gitignore	2021-12-28 14:56:11.742838795 -0500
@@ -1 +1 @@
-/smlnj-lib/
+#/smlnj-lib/
Index: mlton/lib/mllpt-lib/Makefile
===================================================================
--- mlton.orig/lib/mllpt-lib/Makefile	2021-12-28 14:56:11.746838799 -0500
+++ mlton/lib/mllpt-lib/Makefile	2021-12-28 14:56:11.742838795 -0500
@@ -10,7 +10,7 @@
 ######################################################################
 ######################################################################
 
-all: ml-lpt/README
+all:
 
 ml-lpt/README: ml-lpt.tgz ml-lpt.patch
 	$(RM) ml-lpt
Index: mlton/lib/mlrisc-lib/Makefile
===================================================================
--- mlton.orig/lib/mlrisc-lib/Makefile	2021-12-28 14:56:11.746838799 -0500
+++ mlton/lib/mlrisc-lib/Makefile	2021-12-28 14:56:11.742838795 -0500
@@ -12,7 +12,7 @@
 
 ######################################################################
 
-all: MLRISC/README.mlton
+all:
 
 MLRISC/README.mlton: MLRISC.tgz MLRISC.patch
 	$(RM) MLRISC
Index: mlton/lib/smlnj-lib/Makefile
===================================================================
--- mlton.orig/lib/smlnj-lib/Makefile	2021-12-28 14:56:11.746838799 -0500
+++ mlton/lib/smlnj-lib/Makefile	2021-12-28 14:56:11.742838795 -0500
@@ -12,7 +12,7 @@
 
 ######################################################################
 
-all: smlnj-lib/README.mlton
+all:
 
 smlnj-lib/README.mlton: smlnj-lib.tgz smlnj-lib.patch
 	$(RM) smlnj-lib
Index: mlton/runtime/.gitignore
===================================================================
--- mlton.orig/runtime/.gitignore	2021-12-28 14:56:11.746838799 -0500
+++ mlton/runtime/.gitignore	2021-12-28 14:56:11.742838795 -0500
@@ -3,6 +3,6 @@
 *.d
 *.o
 
-/gdtoa/
+#/gdtoa/
 /c-types.h
 /ml-types.h
Index: mlton/runtime/Makefile
===================================================================
--- mlton.orig/runtime/Makefile	2021-12-28 14:56:11.746838799 -0500
+++ mlton/runtime/Makefile	2021-12-28 14:56:23.266846837 -0500
@@ -297,13 +297,9 @@
 gdtoa/gdtoa.h $(GDTOACFILES): gdtoa/README
 	@touch $@
 
-gdtoa/README: gdtoa.tgz gdtoa.may_alias-unions.patch gdtoa.rename-public-fns.patch gdtoa.hide-private-fns.patch gdtoa.hide-public-fns.patch gdtoa.include-via-gdtoa.patch
-	$(GZIP) -dc gdtoa.tgz | $(TAR) xf -
-	$(PATCH) -s -d gdtoa -p1 <gdtoa.may_alias-unions.patch
-	$(PATCH) -s -d gdtoa -p1 <gdtoa.rename-public-fns.patch
-	$(PATCH) -s -d gdtoa -p1 <gdtoa.hide-private-fns.patch
-	$(PATCH) -s -d gdtoa -p1 <gdtoa.hide-public-fns.patch
-	$(PATCH) -s -d gdtoa -p1 <gdtoa.include-via-gdtoa.patch
+gdtoa/README:
+	# We've already extracted and patched the source when we
+	# repacked the tarball.
 	@touch $@
 
 gdtoa/arith.h: gdtoa/arithchk$(EXE)
