···
2
+
license: "LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception"
3
+
synopsis: "OCaml 5.2.0 with MSVC ports restored"
5
+
This package backports #12839, #12896, #12909 and #12954 on to OCaml 5.2.0,
6
+
allowing the MSVC ports to be used."""
7
+
maintainer: "David Allsopp <david@tarides.com>"
16
+
homepage: "https://ocaml.org"
17
+
bug-reports: "https://github.com/ocaml/opam-repository/issues"
18
+
dev-repo: "git+https://github.com/ocaml/ocaml.git#5.2"
20
+
# This is OCaml 5.2.0
21
+
"ocaml" {= "5.2.0" & post}
23
+
# General base- packages
25
+
"base-bigarray" {post}
26
+
"base-threads" {post}
27
+
"base-domains" {post}
30
+
# The Windows ports explicitly select the architecture (see below) this
31
+
# facility is not yet available for other platforms.
32
+
"host-arch-x86_32" {os != "win32" & arch = "x86_32" & post}
33
+
("host-arch-x86_64" {os != "win32" & arch = "x86_64" & post} |
34
+
("host-arch-x86_32" {os != "win32" & arch = "x86_64" & post} & "ocaml-option-32bit" {os != "win32" & arch = "x86_64"}))
35
+
"host-arch-unknown" {os != "win32" & arch != "arm32" & arch != "arm64" & arch != "ppc64" & arch != "riscv64" & arch != "s390x" & arch != "x86_32" & arch != "x86_64" & post}
37
+
# Port selection (Windows)
39
+
("arch-x86_64" {os = "win32" & arch = "x86_64"} &
40
+
"system-msvc" & "ocaml-option-no-compression" {os = "win32"} |
42
+
"arch-x86_32" {os = "win32"} & "ocaml-option-bytecode-only" {os = "win32"} &
43
+
"system-msvc" & "ocaml-option-no-compression" {os = "win32"})
46
+
"flexdll" {>= "0.42" & os = "win32"}
49
+
conflict-class: "ocaml-core-compiler"
50
+
flags: [ compiler avoid-version ]
51
+
build-env: MSYS2_ARG_CONV_EXCL = "*"
52
+
setenv: CAML_LD_LIBRARY_PATH = "%{lib}%/stublibs"
53
+
x-env-path-rewrite: [
54
+
[CAML_LD_LIBRARY_PATH (";" {os = "win32"} ":" {os != "win32"}) "target"]
59
+
"--host=x86_64-pc-windows" {system-msvc:installed & arch-x86_64:installed}
60
+
"--host=i686-pc-windows" {system-msvc:installed & arch-x86_32:installed}
61
+
"--prefix=%{prefix}%"
62
+
"--docdir=%{doc}%/ocaml"
63
+
"--with-flexdll=%{flexdll:share}%" {os = "win32" & flexdll:installed}
64
+
"--with-winpthreads-msvc=%{winpthreads:share}%" {system-msvc:installed}
66
+
"--with-afl" {ocaml-option-afl:installed}
67
+
"--disable-native-compiler" {ocaml-option-bytecode-only:installed}
68
+
"--disable-flat-float-array" {ocaml-option-no-flat-float-array:installed}
69
+
"--enable-flambda" {ocaml-option-flambda:installed}
70
+
"--enable-frame-pointers" {ocaml-option-fp:installed}
71
+
"--without-zstd" {ocaml-option-no-compression:installed}
72
+
"--disable-warn-error"
76
+
install: [make "install"]
78
+
src: "https://github.com/dra27/ocaml/archive/reb27-5.2.tar.gz"
79
+
checksum: "sha256=7886724949f985bcf2b050cfcabc3a6126de5a18f8bc6f3d853781aaa910e2b8"
82
+
"ocaml-option-32bit"
84
+
"ocaml-option-bytecode-only"
85
+
"ocaml-option-no-flat-float-array"
86
+
"ocaml-option-flambda"
88
+
"ocaml-option-no-compression"
90
+
extra-source "ocaml-variants.install" {
92
+
"https://raw.githubusercontent.com/ocaml/opam-source-archives/main/patches/ocaml-variants/ocaml-variants.install"
94
+
"sha256=79f2a1a5044a91350a0eb6ce12e261a72a2855c094c425cddf3860e58c486678"
95
+
"md5=3e969b841df1f51ca448e6e6295cb451"