From 322d8102a0ec174a8c1bbcdf1bf48df28691891a Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 17 Apr 2018 13:01:42 +0100 Subject: [PATCH] More fixes for OCaml < 4.06. Remove ocamlbrowser. --- labltk-8.06.4-remove-ocaml-406-isms.patch | 46 ++++++++++++++++++++++- ocaml-labltk.spec | 2 +- 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/labltk-8.06.4-remove-ocaml-406-isms.patch b/labltk-8.06.4-remove-ocaml-406-isms.patch index 82621d4..2800dae 100644 --- a/labltk-8.06.4-remove-ocaml-406-isms.patch +++ b/labltk-8.06.4-remove-ocaml-406-isms.patch @@ -1,6 +1,6 @@ diff -ur labltk-8.06.4.old/builtin/rawimg.ml labltk-8.06.4/builtin/rawimg.ml --- labltk-8.06.4.old/builtin/rawimg.ml 2017-10-30 09:19:07.000000000 +0000 -+++ labltk-8.06.4/builtin/rawimg.ml 2018-04-17 12:30:40.687146757 +0100 ++++ labltk-8.06.4/builtin/rawimg.ml 2018-04-17 12:31:55.769002974 +0100 @@ -10,8 +10,6 @@ pixmap_data: bytes } @@ -25,7 +25,7 @@ diff -ur labltk-8.06.4.old/builtin/rawimg.ml labltk-8.06.4/builtin/rawimg.ml ##ifdef CAMLTK diff -ur labltk-8.06.4.old/compiler/printer.ml labltk-8.06.4/compiler/printer.ml --- labltk-8.06.4.old/compiler/printer.ml 2017-10-30 09:19:07.000000000 +0000 -+++ labltk-8.06.4/compiler/printer.ml 2018-04-17 12:28:51.853254250 +0100 ++++ labltk-8.06.4/compiler/printer.ml 2018-04-17 12:31:55.769002974 +0100 @@ -18,8 +18,6 @@ open Format;; @@ -50,3 +50,45 @@ diff -ur labltk-8.06.4.old/compiler/printer.ml labltk-8.06.4/compiler/printer.ml done; Bytes.to_string res ;; +diff -ur labltk-8.06.4.old/configure labltk-8.06.4/configure +--- labltk-8.06.4.old/configure 2017-10-30 09:19:07.000000000 +0000 ++++ labltk-8.06.4/configure 2018-04-17 12:51:29.609484064 +0100 +@@ -158,7 +158,7 @@ + has_tk=true + fi + +-cc=`cat $where/Makefile.config | grep '^CC=' | sed -e 's/^CC=//'` ++cc=`cat $where/Makefile.config | grep '^NATIVECC=' | sed -e 's/^NATIVECC=//'` + cclibs=`cat $where/Makefile.config | grep '^NATIVECCLIBS=' | sed -e 's/^NATIVECCLIBS=//'` + export cc cclibs + +diff -ur labltk-8.06.4.old/Makefile labltk-8.06.4/Makefile +--- labltk-8.06.4.old/Makefile 2017-10-30 09:19:07.000000000 +0000 ++++ labltk-8.06.4/Makefile 2018-04-17 13:00:33.216962824 +0100 +@@ -17,7 +17,7 @@ + # Top Makefile for mlTk + + SUBDIRS=compiler support lib jpf frx examples_labltk \ +- examples_camltk browser ++ examples_camltk + SUBDIRS_GENERATED=camltk labltk + include config/Makefile + +@@ -31,7 +31,7 @@ + cd lib; $(MAKE) + cd jpf; $(MAKE) + cd frx; $(MAKE) +- cd browser; $(MAKE) ++# cd browser; $(MAKE) + + allopt: + cd support; $(MAKE) opt +@@ -78,7 +78,7 @@ + cd compiler; $(MAKE) install + cd jpf; $(MAKE) install + cd frx; $(MAKE) install +- cd browser; $(MAKE) install ++# cd browser; $(MAKE) install + if test -f lib/labltk.cmxa; then $(MAKE) installopt; else :; fi + + installopt: diff --git a/ocaml-labltk.spec b/ocaml-labltk.spec index f89fead..8114758 100644 --- a/ocaml-labltk.spec +++ b/ocaml-labltk.spec @@ -98,7 +98,7 @@ install -m 0644 camltk/*.o $RPM_BUILD_ROOT%{_libdir}/ocaml/labltk %doc examples_camltk %doc examples_labltk %{_bindir}/labltk -%{_bindir}/ocamlbrowser +#%{_bindir}/ocamlbrowser %{_libdir}/ocaml/labltk/labltktop %{_libdir}/ocaml/labltk/pp %{_libdir}/ocaml/labltk/tkcompiler