Skip to content

Commit

Permalink
Add ctypes-foreign. (ocaml-cross#312)
Browse files Browse the repository at this point in the history
* Add ctypes-foreign.

* Patch
  • Loading branch information
toots authored Feb 26, 2024
1 parent 8d8d1bc commit c76015c
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/src/ctypes-foreign/config/discover.ml b/src/ctypes-foreign/config/discover.ml
index 7be7ae3..85de869 100644
--- a/src/ctypes-foreign/config/discover.ml
+++ b/src/ctypes-foreign/config/discover.ml
@@ -14,10 +14,7 @@ let () =
| None -> default
| Some v -> v)
in
- let backend =
- match Sys.os_type with
- | "Win32" | "Cygwin" -> "win"
- | _ -> "unix" in
+ let backend = "win" in

let f = "as_needed_test" in
let ml = f ^ ".ml" in
47 changes: 47 additions & 0 deletions packages/ctypes-foreign-windows/ctypes-foreign-windows.0.22.0/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
opam-version: "2.0"
synopsis: "Dynamic access to foreign C libraries using Ctypes"
description: """

This installs the `ctypes-foreign` interface which
uses `libffi` to provide dynamic access to foreign libraries."""
maintainer: ["Jeremy Yallop <yallop@gmail.com>"]
authors: ["Jeremy Yallop"]
license: "MIT"
tags: ["org:mirage"]
homepage: "https://github.com/yallop/ocaml-ctypes"
doc: "https://ocamllabs.github.io/ocaml-ctypes/"
bug-reports: "https://github.com/yallop/ocaml-ctypes/issues"
depends: [
"dune" {>= "2.9"}
"ocaml-windows" {>= "4.03.0"}
"ctypes-windows" {= version}
"dune-configurator"
]
build: [
["dune" "subst"] {dev}
[
"dune"
"build"
"-p"
"ctypes-foreign"
"-x"
"windows"
"-j"
jobs
"@install"
]
]
extra-files: [
["patches/fix-config.patch" "md5=aabfea16327b5549e9a559f3ae99ba21"]
]
patches: [
"patches/fix-config.patch"
]
depexts: [
["libffi"] {os-distribution = "mxe"}
]
dev-repo: "git+https://github.com/yallop/ocaml-ctypes.git"
url {
src: "https://github.com/yallop/ocaml-ctypes/archive/refs/tags/0.22.0.tar.gz"
checksum: "md5=8a301a3e3b79156448a6659859ad506c"
}
2 changes: 1 addition & 1 deletion packages/srt-windows/srt-windows.0.3.0/opam
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ depends: [
"conf-pkg-config" {build}
"dune" {> "2.0"}
"dune-configurator" {build}
"ctypes-windows"
"ctypes-foreign-windows"
"integers-windows"
"posix-socket-windows"
"posix-socket"
Expand Down

0 comments on commit c76015c

Please sign in to comment.