[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#922692: patch



The following patch allows it to build.

diff -ur a/galax-1.1/base/gmisc.ml b/galax-1.1/base/gmisc.ml
--- a/galax-1.1/base/gmisc.ml	2007-02-28 10:48:06.000000000 -0800
+++ b/galax-1.1/base/gmisc.ml	2019-12-17 15:40:56.975372234 -0800
@@ -80,7 +80,7 @@
       | Some x ->
           get_them (x::l)
     in
-    Sort.list (<=) (get_them [])
+    List.sort compare (get_them [])
 
   (* Convert a shell-style regular expression, using the special characters,
      ?*[], to a caml-style regular expression. *)
diff -ur a/galax-1.1/config/Makefile.galax b/galax-1.1/config/Makefile.galax
--- a/galax-1.1/config/Makefile.galax	2019-12-18 14:24:03.000000000 -0800
+++ b/galax-1.1/config/Makefile.galax	2019-12-18 14:07:04.320050575 -0800
@@ -1107,8 +1107,8 @@
 # Description:
 #		This section defines the flags to the O'Caml compiler.
 #########################################################################
-OCAMLC_FLAGS+=-w m
-OCAMLOPT_FLAGS+=-w m
+OCAMLC_FLAGS+=-w m -unsafe-string
+OCAMLOPT_FLAGS+=-w m -unsafe-string
 
 #########################################################################
 # Sub-Section:	INCLUDE directory flags
@@ -1183,6 +1183,11 @@
 -I $(CONF_OCAML_LIBPXP_ISO88591) \
 -I $(CONF_OCAML_LIBCAMOMILE)
 
+# Camomile is putting .cmi files into subdirectories
+ifneq ($(CONF_CAMOMILEINTERFACE),)
+OCAML_LIB_INCLUDES+=$(addprefix -I $(CONF_OCAML_LIBCAMOMILE)/,$(CONF_CAMOMILEINTERFACE))
+endif
+
 # Unfortunately, the netsys library depends on the O'Caml version
 ifeq ($(CONF_WITH_NETSYS), true)
 OCAML_LIB_INCLUDES+=-I $(CONF_OCAML_LIBNETSYS) 
@@ -1264,8 +1269,13 @@
 netclient.cma \
 pxp_engine.cma \
 pxp_lex_utf8.cma pxp_lex_link_utf8.cmo \
-pxp_lex_iso88591.cma pxp_lex_link_iso88591.cmo \
-camomile.cma
+pxp_lex_iso88591.cma pxp_lex_link_iso88591.cmo
+
+ifeq ($(CONF_CAMOMILEARCHIVES),)
+OCAML_LIBS+=camomile.cma
+else
+OCAML_LIBS+=$(addsuffix .cma,$(CONF_CAMOMILEARCHIVES))
+endif
 
 GALAX_ALL_LIBS=$(OCAML_LIBS) $(GALAX_LIBS) $(GALAX_OCAML_RPATH_OPTIONS)
 GALAXD_ALL_LIBS=$(OCAML_LIBS) threads/threads.cma $(GALAX_LIBS) $(GALAX_OCAML_RPATH_OPTIONS)
@@ -1299,8 +1309,13 @@
 netclient.cmxa \
 pxp_engine.cmxa \
 pxp_lex_utf8.cmxa pxp_lex_link_utf8.cmx \
-pxp_lex_iso88591.cmxa pxp_lex_link_iso88591.cmx \
-camomile.cmxa
+pxp_lex_iso88591.cmxa pxp_lex_link_iso88591.cmx
+
+ifeq ($(CONF_CAMOMILEARCHIVES),)
+OCAML_OPTLIBS+=camomile.cmxa
+else
+OCAML_OPTLIBS+=$(addsuffix .cmxa,$(CONF_CAMOMILEARCHIVES))
+endif
 
 GALAX_ALL_OPTLIBS=$(OCAML_OPTLIBS) $(GALAX_OPTLIBS) $(GALAX_OCAML_RPATH_OPTIONS)
 GALAXD_ALL_OPTLIBS=$(OCAML_OPTLIBS) threads/threads.cmxa $(GALAX_OPTLIBS) $(GALAX_OCAML_RPATH_OPTIONS)
diff -ur a/galax-1.1/configure b/galax-1.1/configure
--- a/galax-1.1/configure	2019-12-18 14:24:03.000000000 -0800
+++ b/galax-1.1/configure	2019-12-18 14:28:09.392735565 -0800
@@ -838,7 +838,14 @@
 		ocaml_camomile=`$tool_ocamlfind query camomile 2>/dev/null`
 	fi
 fi
-if [ -n "$ocaml_camomile" -a -f "$ocaml_camomile/camomileLibraryDefault.cmi" ]
+if [ -n "$ocaml_camomile" -a -f "$ocaml_camomile/camomile_yuge.cma" ]
+then
+	# use 0.8 code, but link with multiple libraries and search subdirectories
+	ocaml_camomile_version="0.8"
+	ocaml_camomile_archives="camomileDefaultConfig camomileLibrary camomileLibraryDefault"
+	ocaml_camomile_interface="lib_default default_config library"
+	echo "found version 1.0"
+elif [ -n "$ocaml_camomile" -a -f "$ocaml_camomile/camomileLibraryDefault.cmi" ]
 then
 	ocaml_camomile_version="0.8"
 	echo "found version 0.8"
@@ -1649,6 +1656,8 @@
 CONF_XQUERYUNIT=$regression
 CONF_GALAXUNIT=$galax_regression
 CONF_CAMOMILEVERSION=$ocaml_camomile_version
+CONF_CAMOMILEARCHIVES=$ocaml_camomile_archives
+CONF_CAMOMILEINTERFACE=$ocaml_camomile_interface
 
 _EOF_
 
diff -ur a/galax-1.1/tools/insert_variant b/galax-1.1/tools/insert_variant
--- a/galax-1.1/tools/insert_variant	2019-12-18 14:24:03.000000000 -0800
+++ b/galax-1.1/tools/insert_variant	2019-12-17 15:40:10.098739894 -0800
@@ -1,6 +1,6 @@
 #! /bin/sh
 # (*
-exec ocaml "$0" "$@"
+exec ocaml -unsafe-string "$0" "$@"
 *) directory ".";;
 
 (* Note:


Reply to: