New patches from Fedora.
[fedora-mingw.git] / ocaml / mingw32-ocaml-3.11.0+beta1-win32unix-path.patch
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.
5
6 --- otherlibs/systhreads/Makefile.orig  2008-11-15 17:14:09.000000000 +0000
7 +++ otherlibs/systhreads/Makefile       2008-11-15 17:14:36.000000000 +0000
8 @@ -15,8 +15,8 @@
9  
10  include ../../config/Makefile
11  
12 -CAMLC=../../ocamlcomp.sh -I ../unix
13 -CAMLOPT=../../ocamlcompopt.sh -I ../unix
14 +CAMLC=../../ocamlcomp.sh -I ../win32unix -I ../unix
15 +CAMLOPT=../../ocamlcompopt.sh -I ../win32unix -I ../unix
16  MKLIB=../../boot/ocamlrun ../../tools/ocamlmklib
17  COMPFLAGS=-warn-error A -g
18  
19 --- otherlibs/bigarray/Makefile.orig    2008-11-15 17:14:14.000000000 +0000
20 +++ otherlibs/bigarray/Makefile 2008-11-15 17:14:54.000000000 +0000
21 @@ -14,8 +14,8 @@
22  # $Id: Makefile,v 1.25 2008/01/04 09:52:27 xleroy Exp $
23  
24  LIBNAME=bigarray
25 -EXTRACFLAGS=-I../unix -DIN_OCAML_BIGARRAY -DCAML_NAME_SPACE
26 -EXTRACAMLFLAGS=-I ../unix
27 +EXTRACFLAGS=-I../win32unix -I../unix -DIN_OCAML_BIGARRAY -DCAML_NAME_SPACE
28 +EXTRACAMLFLAGS=-I ../win32unix -I ../unix
29  COBJS=bigarray_stubs.$(O) mmap_unix.$(O)
30  CAMLOBJS=bigarray.cmo
31  HEADERS=bigarray.h
32 --- myocamlbuild.ml.orig        2008-11-15 17:25:50.000000000 +0000
33 +++ myocamlbuild.ml     2008-11-15 17:33:13.000000000 +0000
34 @@ -116,9 +116,11 @@
35    if partial then ".."/dir else dir;;
36  
37  let unix_dir =
38 -  match Sys.os_type with
39 -  | "Win32" -> if_partial_dir "otherlibs/win32unix"
40 -  | _       -> if_partial_dir "otherlibs/unix";;
41 +  if_partial_dir (
42 +    let win32path = "otherlibs/win32unix" in
43 +    if Sys.file_exists (win32path / "unix.cma") then win32path
44 +    else "otherlibs/unix"
45 +  );;
46  
47  let threads_dir    = if_partial_dir "otherlibs/threads";;
48  let systhreads_dir = if_partial_dir "otherlibs/systhreads";;
49 --- ocamldoc/Makefile.orig      2008-11-15 17:49:57.000000000 +0000
50 +++ ocamldoc/Makefile   2008-11-15 17:50:25.000000000 +0000
51 @@ -62,6 +62,7 @@
52  INCLUDES_NODEP=        -I $(OCAMLSRCDIR)/stdlib \
53         -I $(OCAMLSRCDIR)/otherlibs/str \
54         -I $(OCAMLSRCDIR)/otherlibs/dynlink \
55 +       -I $(OCAMLSRCDIR)/otherlibs/win32unix \
56         -I $(OCAMLSRCDIR)/otherlibs/unix \
57         -I $(OCAMLSRCDIR)/otherlibs/num \
58         -I $(OCAMLSRCDIR)/otherlibs/graph