Imported Upstream version 2.2.0
Stephane Glondu
9 years ago
11 | 11 | |
12 | 12 | echo "yes" | sudo add-apt-repository ppa:$ppa |
13 | 13 | sudo apt-get update -qq |
14 | sudo apt-get install -qq ocaml ocaml-native-compilers camlp4-extra opam | |
14 | sudo apt-get install -qq ocaml ocaml-native-compilers ocaml-compiler-libs camlp4-extra opam | |
15 | 15 | export OPAMYES=1 |
16 | 16 | export OPAMVERBOSE=1 |
17 | 17 | echo OCaml version |
0 | 2.2.0 (2014-01-27): | |
1 | * Add an [Ipaddr_unix] module to convert to-and-from the standard library. | |
2 | * Add a toplevel pretty printer in the `ipaddr.top` package. | |
3 | ||
0 | 4 | 2.1.0 (2014-01-20): |
1 | 5 | * Add `of_string_raw` to `Ipaddr.V4.Prefix` and `Ipaddr.V6.Prefix` |
2 | 6 | * Add `of_addr` to `Ipaddr.V4.Prefix` and `Ipaddr.V6.Prefix` |
11 | 11 | * `Ipaddr.V4` and `Ipaddr.V4.Prefix` modules are `Map.OrderedType` |
12 | 12 | * `Ipaddr.V6` and `Ipaddr.V6.Prefix` modules are `Map.OrderedType` |
13 | 13 | * `Ipaddr` and `Ipaddr.Prefix` modules are `Map.OrderedType` |
14 | * `Ipaddr_unix` in findlib subpackage `ipaddr.unix` provides compatibility with the standard library `Unix` module | |
15 | * `Ipaddr_top` in findlib subpackage `ipaddr.top` provides top-level pretty printers (requires compiler-libs default since OCaml 4.0) | |
14 | 16 | * IP address scope classification |
15 | 17 | * IPv4-mapped addresses in IPv6 (::ffff:0:0/96) are an embedding of IPv4 |
16 | 18 | * MAC-48 (Ethernet) address support |
0 | 0 | OASISFormat: 0.3 |
1 | 1 | Name: ipaddr |
2 | Version: 2.1.0 | |
2 | Version: 2.2.0 | |
3 | 3 | Synopsis: A library for manipulation of IP (and MAC) address representations |
4 | 4 | Authors: David Sheets, Anil Madhavapeddy, Hugo Heuzard |
5 | 5 | License: ISC |
6 | 6 | Plugins: META (0.3), DevFiles (0.3) |
7 | 7 | BuildTools: ocamlbuild |
8 | ||
9 | Flag unix | |
10 | Description: build the unix library | |
11 | Default: true | |
12 | ||
13 | Flag top | |
14 | Description: build the toplevel printers | |
15 | Default: true | |
8 | 16 | |
9 | 17 | Library ipaddr |
10 | 18 | Path: lib |
13 | 21 | NativeOpt: -w @f@p@u@s@40 |
14 | 22 | ByteOpt: -w @f@p@u@s@40 |
15 | 23 | |
24 | Library ipaddr_unix | |
25 | Build$: flag(unix) | |
26 | Path: lib | |
27 | Findlibparent: ipaddr | |
28 | Findlibname: unix | |
29 | Modules: Ipaddr_unix | |
30 | BuildDepends: unix, ipaddr | |
31 | ||
32 | Library ipaddr_top | |
33 | Build$: flag(top) | |
34 | Path: top | |
35 | FindlibName: top | |
36 | FindlibParent: ipaddr | |
37 | Modules: Ipaddr_top | |
38 | # Compiler libs do not exists for OCaml < 4.0.0 and otherwise always | |
39 | # present. Use _tags to set them up. | |
40 | # BuildDepends: compiler-libs.toplevel | |
41 | XMETARequires: ipaddr | |
42 | XMETADescription: Toplevel printers for IP addresses | |
43 | ||
16 | 44 | Test ipaddr |
17 | 45 | Run: true |
18 | 46 | Command: make |
0 | 0 | # OASIS_START |
1 | # DO NOT EDIT (digest: 4ae62e3665fc102fb022d9d1c2c8df73) | |
1 | # DO NOT EDIT (digest: 6e3d75e627e8d27796e5d44e56fed7b0) | |
2 | 2 | # Ignore VCS directories, you can use the same kind of rule outside |
3 | 3 | # OASIS_START/STOP if you want to exclude directories that contains |
4 | 4 | # useless stuff for the build process |
18 | 18 | <lib/*.ml{,i}>: oasis_library_ipaddr_byte |
19 | 19 | <lib/ipaddr.{cma,cmxa}>: oasis_library_ipaddr_native |
20 | 20 | <lib/*.ml{,i}>: oasis_library_ipaddr_native |
21 | # Library ipaddr_unix | |
22 | "lib/ipaddr_unix.cmxs": use_ipaddr_unix | |
23 | <lib/*.ml{,i}>: use_ipaddr | |
24 | <lib/*.ml{,i}>: pkg_unix | |
25 | # Library ipaddr_top | |
26 | "top/ipaddr_top.cmxs": use_ipaddr_top | |
21 | 27 | # OASIS_STOP |
22 | 28 | true: debug, annot, bin_annot, principal |
29 | <top/*.ml>: I(+compiler-libs) |
0 | 0 | # OASIS_START |
1 | # DO NOT EDIT (digest: 27735b5b8ddb548ad5bbe2baf0be89b6) | |
2 | version = "2.0.0" | |
1 | # DO NOT EDIT (digest: 958d37e3e4912bb1de77a8fb8718d800) | |
2 | version = "2.2.0" | |
3 | 3 | description = |
4 | 4 | "A library for manipulation of IP (and MAC) address representations" |
5 | 5 | archive(byte) = "ipaddr.cma" |
7 | 7 | archive(native) = "ipaddr.cmxa" |
8 | 8 | archive(native, plugin) = "ipaddr.cmxs" |
9 | 9 | exists_if = "ipaddr.cma" |
10 | package "unix" ( | |
11 | version = "2.2.0" | |
12 | description = | |
13 | "A library for manipulation of IP (and MAC) address representations" | |
14 | requires = "unix ipaddr" | |
15 | archive(byte) = "ipaddr_unix.cma" | |
16 | archive(byte, plugin) = "ipaddr_unix.cma" | |
17 | archive(native) = "ipaddr_unix.cmxa" | |
18 | archive(native, plugin) = "ipaddr_unix.cmxs" | |
19 | exists_if = "ipaddr_unix.cma" | |
20 | ) | |
21 | ||
22 | package "top" ( | |
23 | version = "2.2.0" | |
24 | description = "Toplevel printers for IP addresses" | |
25 | requires = "ipaddr" | |
26 | archive(byte) = "ipaddr_top.cma" | |
27 | archive(byte, plugin) = "ipaddr_top.cma" | |
28 | archive(native) = "ipaddr_top.cmxa" | |
29 | archive(native, plugin) = "ipaddr_top.cmxs" | |
30 | exists_if = "ipaddr_top.cma" | |
31 | ) | |
10 | 32 | # OASIS_STOP |
11 | 33 |
133 | 133 | to_buffer b i; |
134 | 134 | Buffer.contents b |
135 | 135 | |
136 | let pp_hum ppf i = | |
137 | Format.fprintf ppf "%s" (to_string i) | |
138 | ||
136 | 139 | (* Byte conversion *) |
137 | 140 | |
138 | 141 | let of_bytes_raw bs o = |
233 | 236 | let b = Buffer.create 18 in |
234 | 237 | to_buffer b subnet; |
235 | 238 | Buffer.contents b |
239 | ||
240 | let pp_hum ppf i = | |
241 | Format.fprintf ppf "%s" (to_string i) | |
236 | 242 | |
237 | 243 | let to_address_buffer buf ((_,sz) as subnet) addr = |
238 | 244 | to_buffer buf (network_address subnet addr,sz) |
521 | 527 | to_buffer ?v4 buf l; |
522 | 528 | Buffer.contents buf |
523 | 529 | |
530 | let pp_hum ppf i = | |
531 | Format.fprintf ppf "%s" (to_string i) | |
532 | ||
524 | 533 | (* byte conversion *) |
525 | 534 | |
526 | 535 | let of_bytes_raw bs o = (* TODO : from cstruct *) |
609 | 618 | let buf = Buffer.create 43 in |
610 | 619 | to_buffer buf subnet; |
611 | 620 | Buffer.contents buf |
621 | ||
622 | let pp_hum ppf i = | |
623 | Format.fprintf ppf "%s" (to_string i) | |
612 | 624 | |
613 | 625 | let to_address_buffer buf ((_,sz) as subnet) addr = |
614 | 626 | to_buffer buf (network_address subnet addr,sz) |
682 | 694 | | V4 x -> V4.to_buffer buf x |
683 | 695 | | V6 x -> V6.to_buffer buf x |
684 | 696 | |
697 | let pp_hum ppf i = | |
698 | Format.fprintf ppf "%s" (to_string i) | |
699 | ||
685 | 700 | let of_string_raw s offset = |
686 | 701 | let len = String.length s in |
687 | 702 | if len < !offset + 1 then raise (need_more s); |
790 | 805 | | V4 p -> V4.Prefix.to_buffer buf p |
791 | 806 | | V6 p -> V6.Prefix.to_buffer buf p |
792 | 807 | |
808 | let pp_hum ppf i = | |
809 | Format.fprintf ppf "%s" (to_string i) | |
793 | 810 | end |
63 | 63 | buffer [buf]. *) |
64 | 64 | val to_buffer : Buffer.t -> t -> unit |
65 | 65 | |
66 | (** [pp_hum f ipv4] outputs a human-readable representation of [ipv4] to | |
67 | the formatter [f]. *) | |
68 | val pp_hum : Format.formatter -> t -> unit | |
69 | ||
66 | 70 | (** Bytestring conversion *) |
67 | 71 | |
68 | 72 | (** [of_bytes_exn ipv4_octets] is the address represented |
154 | 158 | (** [to_string prefix] is the CIDR notation string representation |
155 | 159 | of [prefix], i.e. XXX.XX.X.XXX/XX. *) |
156 | 160 | val to_string : t -> string |
161 | ||
162 | (** [pp_hum f prefix] outputs a human-readable representation of [prefix] | |
163 | to the formatter [f]. *) | |
164 | val pp_hum : Format.formatter -> t -> unit | |
157 | 165 | |
158 | 166 | (** [of_address_string_exn cidr_addr] is the address and prefix |
159 | 167 | represented by [cidr_addr]. Raises [Parse_error] if [cidr_addr] is not |
276 | 284 | buffer [buf]. *) |
277 | 285 | val to_buffer : ?v4:bool -> Buffer.t -> t -> unit |
278 | 286 | |
287 | (** [pp_hum f ipv6] outputs a human-readable representation of [ipv6] to | |
288 | the formatter [f]. *) | |
289 | val pp_hum : Format.formatter -> t -> unit | |
290 | ||
279 | 291 | (** Bytestring conversion *) |
280 | 292 | |
281 | 293 | (** [of_bytes_exn ipv6_octets] is the address represented |
367 | 379 | of [prefix], i.e. XXX:XX:X::XXX/XX. *) |
368 | 380 | val to_string : t -> string |
369 | 381 | |
382 | (** [pp_hum f prefix] outputs a human-readable representation of [prefix] | |
383 | to the formatter [f]. *) | |
384 | val pp_hum : Format.formatter -> t -> unit | |
385 | ||
370 | 386 | (** [of_address_string_exn cidr_addr] is the address and prefix |
371 | 387 | represented by [cidr_addr]. Raises [Parse_error] if [cidr_addr] is not |
372 | 388 | a valid representation of a CIDR-scoped address. *) |
457 | 473 | [buf]. *) |
458 | 474 | val to_buffer : Buffer.t -> t -> unit |
459 | 475 | |
476 | (** [pp_hum f ip] outputs a human-readable representation of [ip] to the | |
477 | formatter [f]. *) | |
478 | val pp_hum : Format.formatter -> t -> unit | |
479 | ||
460 | 480 | (** [of_string_exn s] parses [s] as an IPv4 or IPv6 address. |
461 | 481 | Raises [Parse_error] if [s] is not a valid string representation of an IP |
462 | 482 | address. *) |
507 | 527 | |
508 | 528 | val compare : t -> t -> int |
509 | 529 | |
530 | (** [to_string subnet] is the text string representation of [subnet]. *) | |
531 | val to_string : t -> string | |
532 | ||
533 | (** [to_buffer buf subnet] writes the text string representation of [subnet] | |
534 | into [buf]. *) | |
535 | val to_buffer : Buffer.t -> t -> unit | |
536 | ||
537 | (** [pp_hum f subnet] outputs a human-readable representation of [subnet] | |
538 | to the formatter [f]. *) | |
539 | val pp_hum : Format.formatter -> t -> unit | |
540 | ||
510 | 541 | (** [of_string_exn cidr] is the subnet prefix represented by the CIDR |
511 | 542 | string, [cidr]. Raises [Parse_error] if [cidr] is not a valid |
512 | 543 | representation of a CIDR notation routing prefix. *) |
539 | 570 | (** [of_addr ip] create a subnet composed of only one address, [ip].*) |
540 | 571 | val of_addr : addr -> t |
541 | 572 | |
542 | (** [to_string subnet] is the text string representation of [subnet]. *) | |
543 | val to_string : t -> string | |
544 | ||
545 | (** [to_buffer buf subnet] writes the text string representation of [subnet] | |
546 | into [buf]. *) | |
547 | val to_buffer : Buffer.t -> t -> unit | |
548 | ||
549 | 573 | include Map.OrderedType with type t := t |
550 | 574 | end |
551 | 575 |
0 | (* | |
1 | * Copyright (c) 2014 Anil Madhavapeddy <anil@recoil.org> | |
2 | * | |
3 | * Permission to use, copy, modify, and distribute this software for any | |
4 | * purpose with or without fee is hereby granted, provided that the above | |
5 | * copyright notice and this permission notice appear in all copies. | |
6 | * | |
7 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
8 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
9 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
10 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
11 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
12 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
13 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
14 | * | |
15 | *) | |
16 | ||
17 | let to_inet_addr t = | |
18 | Unix.inet_addr_of_string (Ipaddr.to_string t) | |
19 | ||
20 | let of_inet_addr t = | |
21 | Ipaddr.of_string_exn (Unix.string_of_inet_addr t) | |
22 | ||
23 | module V4 = struct | |
24 | ||
25 | let to_inet_addr t = | |
26 | Unix.inet_addr_of_string (Ipaddr.V4.to_string t) | |
27 | ||
28 | let of_inet_addr_exn t = | |
29 | Ipaddr.V4.of_string_exn (Unix.string_of_inet_addr t) | |
30 | ||
31 | let of_inet_addr t = | |
32 | try Some (of_inet_addr_exn t) | |
33 | with _ -> None | |
34 | end | |
35 | ||
36 | module V6 = struct | |
37 | ||
38 | let to_inet_addr t = | |
39 | Unix.inet_addr_of_string (Ipaddr.V6.to_string t) | |
40 | ||
41 | let of_inet_addr_exn t = | |
42 | Ipaddr.V6.of_string_exn (Unix.string_of_inet_addr t) | |
43 | ||
44 | let of_inet_addr t = | |
45 | try Some (of_inet_addr_exn t) | |
46 | with _ -> None | |
47 | end |
0 | (* | |
1 | * Copyright (c) 2014 Anil Madhavapeddy <anil@recoil.org> | |
2 | * | |
3 | * Permission to use, copy, modify, and distribute this software for any | |
4 | * purpose with or without fee is hereby granted, provided that the above | |
5 | * copyright notice and this permission notice appear in all copies. | |
6 | * | |
7 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
8 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
9 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
10 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
11 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
12 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
13 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
14 | * | |
15 | *) | |
16 | ||
17 | (** Convert to and from [Unix] to [Ipaddr] representations *) | |
18 | ||
19 | (** [to_inet_addr ip] is the {! Unix.inet_addr} equivalent of the | |
20 | IPv4 or IPv6 address [ip]. *) | |
21 | val to_inet_addr : Ipaddr.t -> Unix.inet_addr | |
22 | ||
23 | (** [of_inet_addr ip] is the {! Ipaddr.t} equivalent of the | |
24 | {! Unix.inet_addr} [ip]. *) | |
25 | val of_inet_addr : Unix.inet_addr -> Ipaddr.t | |
26 | ||
27 | module V4 : sig | |
28 | ||
29 | (** [to_inet_addr ip] is the {! Unix.inet_addr} equivalent of the | |
30 | IPv4 address [ip]. *) | |
31 | val to_inet_addr : Ipaddr.V4.t -> Unix.inet_addr | |
32 | ||
33 | (** [of_inet_addr_exn ip] is the {! Ipaddr.t} equivalent of the | |
34 | {!Unix.inet_addr} [ip] IPv4 address. Raises {! Ipaddr.Parse_error} if | |
35 | [ip] is not a valid representation of an IPv4 address. *) | |
36 | val of_inet_addr_exn : Unix.inet_addr -> Ipaddr.V4.t | |
37 | ||
38 | (** Same as [of_inet_addr_exn] but returns an option type instead of raising | |
39 | an exception. *) | |
40 | val of_inet_addr : Unix.inet_addr -> Ipaddr.V4.t option | |
41 | end | |
42 | ||
43 | module V6 : sig | |
44 | ||
45 | (** [to_inet_addr ip] is the {! Unix.inet_addr} equivalent of the | |
46 | IPv6 address [ip]. *) | |
47 | val to_inet_addr : Ipaddr.V6.t -> Unix.inet_addr | |
48 | ||
49 | ||
50 | (** [of_inet_addr_exn ip] is the {! Ipaddr.t} equivalent of the | |
51 | {!Unix.inet_addr} [ip] IPv6 address. Raises {! Ipaddr.Parse_error} if | |
52 | [ip] is not a valid representation of an IPv6 address. *) | |
53 | val of_inet_addr_exn : Unix.inet_addr -> Ipaddr.V6.t | |
54 | ||
55 | (** Same as [of_inet_addr_exn] but returns an option type instead of raising | |
56 | an exception. *) | |
57 | val of_inet_addr : Unix.inet_addr -> Ipaddr.V6.t option | |
58 | end |
0 | # OASIS_START | |
1 | # DO NOT EDIT (digest: ee982b4e45569cc57d5ac614e4a92b5b) | |
2 | Ipaddr_unix | |
3 | # OASIS_STOP |
0 | 0 | (* OASIS_START *) |
1 | (* DO NOT EDIT (digest: a1f1555690ba83caaade174974cb5694) *) | |
1 | (* DO NOT EDIT (digest: b9f1896c4b44f5c023c34582ffa087bd) *) | |
2 | 2 | module OASISGettext = struct |
3 | 3 | (* # 22 "src/oasis/OASISGettext.ml" *) |
4 | 4 | |
554 | 554 | open Ocamlbuild_plugin;; |
555 | 555 | let package_default = |
556 | 556 | { |
557 | MyOCamlbuildBase.lib_ocaml = [("ipaddr", ["lib"], [])]; | |
557 | MyOCamlbuildBase.lib_ocaml = | |
558 | [ | |
559 | ("ipaddr", ["lib"], []); | |
560 | ("ipaddr_unix", ["lib"], []); | |
561 | ("ipaddr_top", ["top"], []) | |
562 | ]; | |
558 | 563 | lib_c = []; |
559 | 564 | flags = |
560 | 565 | [ |
577 | 582 | |
578 | 583 | let dispatch_default = MyOCamlbuildBase.dispatch_default package_default;; |
579 | 584 | |
580 | # 582 "myocamlbuild.ml" | |
585 | # 587 "myocamlbuild.ml" | |
581 | 586 | (* OASIS_STOP *) |
582 | Ocamlbuild_plugin.dispatch dispatch_default;; | |
587 | let () = | |
588 | let additional_rules = function | |
589 | | After_rules -> | |
590 | pflag ["compile"; "ocaml"] "I" (fun x -> S [A "-I"; A x]); | |
591 | | _ -> () | |
592 | in | |
593 | Ocamlbuild_plugin.dispatch | |
594 | (MyOCamlbuildBase.dispatch_combine | |
595 | [MyOCamlbuildBase.dispatch_default package_default; additional_rules]) |
0 | (* setup.ml generated for the first time by OASIS v0.3.1 *) | |
0 | (* setup.ml generated for the first time by OASIS v0.4.1 *) | |
1 | 1 | |
2 | 2 | (* OASIS_START *) |
3 | (* DO NOT EDIT (digest: e94c7d0b39c533c6cd2c54151586f95f) *) | |
3 | (* DO NOT EDIT (digest: 2064a96eb9de6b7991f512d5fa478005) *) | |
4 | 4 | (* |
5 | 5 | Regenerated by OASIS v0.4.1 |
6 | 6 | Visit http://oasis.forge.ocamlcore.org for more information and |
6729 | 6729 | alpha_features = []; |
6730 | 6730 | beta_features = []; |
6731 | 6731 | name = "ipaddr"; |
6732 | version = "2.0.0"; | |
6732 | version = "2.2.0"; | |
6733 | 6733 | license = |
6734 | 6734 | OASISLicense.DEP5License |
6735 | 6735 | (OASISLicense.DEP5Unit |
6783 | 6783 | files_ab = []; |
6784 | 6784 | sections = |
6785 | 6785 | [ |
6786 | Flag | |
6787 | ({ | |
6788 | cs_name = "unix"; | |
6789 | cs_data = PropList.Data.create (); | |
6790 | cs_plugin_data = [] | |
6791 | }, | |
6792 | { | |
6793 | flag_description = Some "build the unix library"; | |
6794 | flag_default = [(OASISExpr.EBool true, true)] | |
6795 | }); | |
6796 | Flag | |
6797 | ({ | |
6798 | cs_name = "top"; | |
6799 | cs_data = PropList.Data.create (); | |
6800 | cs_plugin_data = [] | |
6801 | }, | |
6802 | { | |
6803 | flag_description = Some "build the toplevel printers"; | |
6804 | flag_default = [(OASISExpr.EBool true, true)] | |
6805 | }); | |
6786 | 6806 | Library |
6787 | 6807 | ({ |
6788 | 6808 | cs_name = "ipaddr"; |
6815 | 6835 | lib_findlib_name = Some "ipaddr"; |
6816 | 6836 | lib_findlib_containers = [] |
6817 | 6837 | }); |
6838 | Library | |
6839 | ({ | |
6840 | cs_name = "ipaddr_unix"; | |
6841 | cs_data = PropList.Data.create (); | |
6842 | cs_plugin_data = [] | |
6843 | }, | |
6844 | { | |
6845 | bs_build = | |
6846 | [ | |
6847 | (OASISExpr.EBool true, false); | |
6848 | (OASISExpr.EFlag "unix", true) | |
6849 | ]; | |
6850 | bs_install = [(OASISExpr.EBool true, true)]; | |
6851 | bs_path = "lib"; | |
6852 | bs_compiled_object = Best; | |
6853 | bs_build_depends = | |
6854 | [ | |
6855 | FindlibPackage ("unix", None); | |
6856 | InternalLibrary "ipaddr" | |
6857 | ]; | |
6858 | bs_build_tools = [ExternalTool "ocamlbuild"]; | |
6859 | bs_c_sources = []; | |
6860 | bs_data_files = []; | |
6861 | bs_ccopt = [(OASISExpr.EBool true, [])]; | |
6862 | bs_cclib = [(OASISExpr.EBool true, [])]; | |
6863 | bs_dlllib = [(OASISExpr.EBool true, [])]; | |
6864 | bs_dllpath = [(OASISExpr.EBool true, [])]; | |
6865 | bs_byteopt = [(OASISExpr.EBool true, [])]; | |
6866 | bs_nativeopt = [(OASISExpr.EBool true, [])] | |
6867 | }, | |
6868 | { | |
6869 | lib_modules = ["Ipaddr_unix"]; | |
6870 | lib_pack = false; | |
6871 | lib_internal_modules = []; | |
6872 | lib_findlib_parent = Some "ipaddr"; | |
6873 | lib_findlib_name = Some "unix"; | |
6874 | lib_findlib_containers = [] | |
6875 | }); | |
6876 | Library | |
6877 | ({ | |
6878 | cs_name = "ipaddr_top"; | |
6879 | cs_data = PropList.Data.create (); | |
6880 | cs_plugin_data = [] | |
6881 | }, | |
6882 | { | |
6883 | bs_build = | |
6884 | [ | |
6885 | (OASISExpr.EBool true, false); | |
6886 | (OASISExpr.EFlag "top", true) | |
6887 | ]; | |
6888 | bs_install = [(OASISExpr.EBool true, true)]; | |
6889 | bs_path = "top"; | |
6890 | bs_compiled_object = Best; | |
6891 | bs_build_depends = []; | |
6892 | bs_build_tools = [ExternalTool "ocamlbuild"]; | |
6893 | bs_c_sources = []; | |
6894 | bs_data_files = []; | |
6895 | bs_ccopt = [(OASISExpr.EBool true, [])]; | |
6896 | bs_cclib = [(OASISExpr.EBool true, [])]; | |
6897 | bs_dlllib = [(OASISExpr.EBool true, [])]; | |
6898 | bs_dllpath = [(OASISExpr.EBool true, [])]; | |
6899 | bs_byteopt = [(OASISExpr.EBool true, [])]; | |
6900 | bs_nativeopt = [(OASISExpr.EBool true, [])] | |
6901 | }, | |
6902 | { | |
6903 | lib_modules = ["Ipaddr_top"]; | |
6904 | lib_pack = false; | |
6905 | lib_internal_modules = []; | |
6906 | lib_findlib_parent = Some "ipaddr"; | |
6907 | lib_findlib_name = Some "top"; | |
6908 | lib_findlib_containers = [] | |
6909 | }); | |
6818 | 6910 | Test |
6819 | 6911 | ({ |
6820 | 6912 | cs_name = "ipaddr"; |
6845 | 6937 | }; |
6846 | 6938 | oasis_fn = Some "_oasis"; |
6847 | 6939 | oasis_version = "0.4.1"; |
6848 | oasis_digest = Some "R\021\187\"\243\226u\149=\232\191A\177O\215\223"; | |
6940 | oasis_digest = Some "vz\180\151\174:\136\164H\128{((Q\000V"; | |
6849 | 6941 | oasis_exec = None; |
6850 | 6942 | oasis_setup_args = []; |
6851 | 6943 | setup_update = false |
6853 | 6945 | |
6854 | 6946 | let setup () = BaseSetup.setup setup_t;; |
6855 | 6947 | |
6856 | # 6858 "setup.ml" | |
6948 | # 6950 "setup.ml" | |
6857 | 6949 | (* OASIS_STOP *) |
6858 | 6950 | let () = setup ();; |
0 | let printers = [ | |
1 | "Ipaddr.pp_hum"; | |
2 | "Ipaddr.Prefix.pp_hum"; | |
3 | "Ipaddr.V4.pp_hum"; | |
4 | "Ipaddr.V4.Prefix.pp_hum"; | |
5 | "Ipaddr.V6.pp_hum"; | |
6 | "Ipaddr.V6.Prefix.pp_hum"; | |
7 | ] | |
8 | ||
9 | let eval_string | |
10 | ?(print_outcome = false) ?(err_formatter = Format.err_formatter) str = | |
11 | let lexbuf = Lexing.from_string str in | |
12 | let phrase = !Toploop.parse_toplevel_phrase lexbuf in | |
13 | Toploop.execute_phrase print_outcome err_formatter phrase | |
14 | ||
15 | let rec install_printers = function | |
16 | | [] -> true | |
17 | | printer :: printers -> | |
18 | let cmd = Printf.sprintf "#install_printer %s;;" printer in | |
19 | eval_string cmd && install_printers printers | |
20 | ||
21 | let () = | |
22 | if not (install_printers printers) then | |
23 | Format.eprintf "Problem installing Ipaddr-printers@." |