-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
opam
74 lines (71 loc) · 2.05 KB
/
opam
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
opam-version: "2.0"
maintainer: "anil@recoil.org"
authors: ["Anil Madhavapeddy" "Richard Mortier" "Thomas Gazagnaire"
"Pierre Chambart" "David Kaloper" "Jeremy Yallop" ]
homepage: "https://github.com/mirage/ocaml-cstruct"
license: "ISC"
dev-repo: "git+https://github.com/mirage/ocaml-cstruct.git"
bug-reports: "https://github.com/mirage/ocaml-cstruct/issues"
tags: [
"org:mirage"
"org:xapi-project"
]
build: [
[
"./configure"
"--prefix" prefix
"--%{lwt+base-unix:enable}%-lwt"
"--%{ppx_tools:enable}%-ppx"
"--%{async:enable}%-async"
"--%{base-unix:enable}%-unix"
"--enable-tests" {with-test}
]
[make]
[make "test"] {with-test}
]
install: [
[make "install"]
[make "js-install"]
]
depends: [
"ocaml" {>= "4.02.3" & < "4.05.0"}
"ocamlfind" {build}
"ocamlbuild" {build & != "0.9.0"}
"ounit" {with-test}
"ocplib-endian"
"sexplib"
"base-bytes"
"conf-time"
]
depopts: [
"ppx_tools"
"async"
"lwt"
"base-unix"
]
synopsis: "access C structures via a camlp4 extension"
description: """
Cstruct is a library and syntax extension to make it easier to access C-like
structures directly from OCaml. It supports both reading and writing to these
structures, and they are accessed via the Bigarray module.
An example pcap description using PPX extension points is:
```
[%%cstruct
type pcap_header = {
magic_number: uint32_t; (* magic number *)
version_major: uint16_t; (* major version number *)
version_minor: uint16_t; (* minor version number *)
thiszone: uint32_t; (* GMT to local correction *)
sigfigs: uint32_t; (* accuracy of timestamps *)
snaplen: uint32_t; (* max length of captured packets, in octets *)
network: uint32_t; (* data link type *)
} [@@little_endian]]
```
For Camlp4 support, please use a version of Cstruct that is `<=1.9.0`"""
url {
src: "https://github.com/mirage/ocaml-cstruct/archive/v2.3.0.tar.gz"
checksum: [
"sha256=8b802e70c85879cd3b9bd4211d8c01e63f4dd4ac30288bd92d7a24d6c88b62eb"
"md5=f84097a0618715e2849542ee8e893454"
]
}