Skip to content
Snippets Groups Projects
Commit 3ed45684 authored by Alexey Dokuchaev's avatar Alexey Dokuchaev
Browse files

devel/ocaml-sdl: unbreak the bytecode build and against OCaml 4.06+

Obtained from:	Debian
parent 7ebf05a4
No related branches found
No related tags found
No related merge requests found
--- 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)
--- 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment