git: 3ed4568443a3 - main - devel/ocaml-sdl: unbreak the bytecode build and against OCaml 4.06+
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 28 Mar 2022 09:32:46 UTC
The branch main has been updated by danfe:
URL: https://cgit.FreeBSD.org/ports/commit/?id=3ed4568443a36ecfca7ddddcad9b76e656f0bc58
commit 3ed4568443a36ecfca7ddddcad9b76e656f0bc58
Author: Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2022-03-28 09:32:12 +0000
Commit: Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2022-03-28 09:32:12 +0000
devel/ocaml-sdl: unbreak the bytecode build and against OCaml 4.06+
Obtained from: Debian
---
devel/ocaml-sdl/files/patch-src_Makefile | 20 ++++++++++++++++++++
devel/ocaml-sdl/files/patch-src_sdlmouse.ml | 17 +++++++++++++++++
2 files changed, 37 insertions(+)
diff --git a/devel/ocaml-sdl/files/patch-src_Makefile b/devel/ocaml-sdl/files/patch-src_Makefile
new file mode 100644
index 000000000000..f6c2d2063533
--- /dev/null
+++ b/devel/ocaml-sdl/files/patch-src_Makefile
@@ -0,0 +1,20 @@
+--- src/Makefile.orig 2010-04-19 20:11:04 UTC
++++ src/Makefile
+@@ -17,7 +17,7 @@ gfx_MODULES = sdlgfx
+
+ TARGETS = sdl.cma $(patsubst %,sdl%.cma,$(PARTS))
+ TARGETS += libsdlstub.$(A) $(patsubst %,libsdl%stub.$(A),$(PARTS))
+-ifdef OCAMLOPT
++ifneq ($(OCAMLOPT),no)
+ TARGETS += sdl.cmxa $(patsubst %,sdl%.cmxa,$(PARTS))
+ endif
+
+@@ -87,7 +87,7 @@ ifdef OCAMLFIND
+ install-findlib :
+ $(OCAMLFIND) install sdl ../META \
+ *.cma lib*.$(A) *.cmi *.mli \
+- $(if $(OCAMLOPT),*.cmxa sdl*.$(A) *.cmx) \
++ $(if $(filter-out no,$(OCAMLOPT)),*.cmxa sdl*.$(A) *.cmx) \
+ $(if $(OCAMLMKLIB),dll*.so)
+ ifeq ($(PLATFORM),Apple)
+ $(RANLIB) $$($(OCAMLFIND) printconf destdir)/sdl/*.$(A)
diff --git a/devel/ocaml-sdl/files/patch-src_sdlmouse.ml b/devel/ocaml-sdl/files/patch-src_sdlmouse.ml
new file mode 100644
index 000000000000..1690b0937f93
--- /dev/null
+++ b/devel/ocaml-sdl/files/patch-src_sdlmouse.ml
@@ -0,0 +1,17 @@
+--- src/sdlmouse.ml.orig 2011-04-10 15:33:52 UTC
++++ src/sdlmouse.ml
+@@ -49,12 +49,12 @@ external cursor_data : cursor -> cursor_data
+ = "ml_SDL_Cursor_data"
+
+ let string_of_bits x =
+- let s = String.make 8 ' ' in
++ let s = Bytes.make 8 ' ' in
+ for i=0 to 7 do
+ if x land (1 lsl i) <> 0
+ then s.[7-i] <- '@'
+ done ;
+- s
++ Bytes.to_string s
+
+ let pprint_cursor c =
+ let { data = data ; mask = mask } = cursor_data c in