updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / mingw32-ocaml / mingw32-ocaml-win32unix-path.patch
blobf07a45aaca75694831f8d7c1323a9dbbae51bae0
1 Combined Makefiles again: These libraries depend on the unix library,
2 but really they depend on either the ("real") unix library or the
3 win32unix library. Include both, with win32unix first, on the basis
4 that this should pick up the correct one in all cases.
6 Index: build-tree/ocaml-3.12.0/otherlibs/systhreads/Makefile
7 ===================================================================
8 --- build-tree.orig/ocaml-3.12.0/otherlibs/systhreads/Makefile 2010-04-27 09:55:08.000000000 +0200
9 +++ build-tree/ocaml-3.12.0/otherlibs/systhreads/Makefile 2010-06-23 19:22:23.000000000 +0200
10 @@ -15,8 +15,8 @@
12 include ../../config/Makefile
14 -CAMLC=../../ocamlcomp.sh -I ../unix
15 -CAMLOPT=../../ocamlcompopt.sh -I ../unix
16 +CAMLC=../../ocamlcomp.sh -I ../win32unix -I ../unix
17 +CAMLOPT=../../ocamlcompopt.sh -I ../win32unix -I ../unix
18 MKLIB=../../boot/ocamlrun ../../tools/ocamlmklib
19 COMPFLAGS=-warn-error A -g
21 Index: build-tree/ocaml-3.12.0/otherlibs/bigarray/Makefile
22 ===================================================================
23 --- build-tree.orig/ocaml-3.12.0/otherlibs/bigarray/Makefile 2008-01-04 10:52:27.000000000 +0100
24 +++ build-tree/ocaml-3.12.0/otherlibs/bigarray/Makefile 2010-06-23 19:22:23.000000000 +0200
25 @@ -14,8 +14,8 @@
26 # $Id: Makefile 8748 2008-01-04 09:52:27Z xleroy $
28 LIBNAME=bigarray
29 -EXTRACFLAGS=-I../unix -DIN_OCAML_BIGARRAY -DCAML_NAME_SPACE
30 -EXTRACAMLFLAGS=-I ../unix
31 +EXTRACFLAGS=-I../win32unix -I../unix -DIN_OCAML_BIGARRAY -DCAML_NAME_SPACE
32 +EXTRACAMLFLAGS=-I ../win32unix -I ../unix
33 COBJS=bigarray_stubs.$(O) mmap_unix.$(O)
34 CAMLOBJS=bigarray.cmo
35 HEADERS=bigarray.h
36 Index: build-tree/ocaml-3.12.0/myocamlbuild.ml
37 ===================================================================
38 --- build-tree.orig/ocaml-3.12.0/myocamlbuild.ml 2010-06-08 11:50:56.000000000 +0200
39 +++ build-tree/ocaml-3.12.0/myocamlbuild.ml 2010-06-23 19:22:23.000000000 +0200
40 @@ -107,9 +107,11 @@
41 if mixed then ".."/dir else dir;;
43 let unix_dir =
44 - match Sys.os_type with
45 - | "Win32" -> if_mixed_dir "otherlibs/win32unix"
46 - | _ -> if_mixed_dir "otherlibs/unix";;
47 + if_mixed_dir (
48 + let win32path = "otherlibs/win32unix" in
49 + if Sys.file_exists (win32path / "unix.cma") then win32path
50 + else "otherlibs/unix"
51 + );;
53 let threads_dir = if_mixed_dir "otherlibs/threads";;
54 let systhreads_dir = if_mixed_dir "otherlibs/systhreads";;
55 Index: build-tree/ocaml-3.12.0/ocamldoc/Makefile
56 ===================================================================
57 --- build-tree.orig/ocaml-3.12.0/ocamldoc/Makefile 2009-05-20 13:52:42.000000000 +0200
58 +++ build-tree/ocaml-3.12.0/ocamldoc/Makefile 2010-06-23 19:22:23.000000000 +0200
59 @@ -62,6 +62,7 @@
60 INCLUDES_NODEP= -I $(OCAMLSRCDIR)/stdlib \
61 -I $(OCAMLSRCDIR)/otherlibs/str \
62 -I $(OCAMLSRCDIR)/otherlibs/dynlink \
63 + -I $(OCAMLSRCDIR)/otherlibs/win32unix \
64 -I $(OCAMLSRCDIR)/otherlibs/unix \
65 -I $(OCAMLSRCDIR)/otherlibs/num \
66 -I $(OCAMLSRCDIR)/otherlibs/graph