[Pkg-ocaml-maint-commits] [sexplib310] 02/09: Imported Upstream version 113.33.03
Stéphane Glondu
glondu at moszumanska.debian.org
Thu Jul 28 14:12:40 UTC 2016
This is an automated email from the git hooks/post-receive script.
glondu pushed a commit to branch master
in repository sexplib310.
commit bf022dce1fe46fe44362ea7c7cfe4195b24dd934
Author: Stephane Glondu <steph at glondu.net>
Date: Sat Jul 23 10:40:37 2016 +0200
Imported Upstream version 113.33.03
---
META.ab | 21 +++++-----
Makefile | 4 +-
_oasis | 37 +++++++++--------
_tags | 2 +-
install.ml | 11 +++++
js-utils/gen_install.ml | 102 -----------------------------------------------
js-utils/install_tags.ml | 11 -----
myocamlbuild.ml | 25 +++---------
opam | 9 +++--
9 files changed, 56 insertions(+), 166 deletions(-)
diff --git a/META.ab b/META.ab
index f889f27..0e2c737 100644
--- a/META.ab
+++ b/META.ab
@@ -1,18 +1,20 @@
version = "$(pkg_version)"
description = "Library for serializing OCaml values to and from S-expressions"
requires = "bigarray"
-archive(byte ) = "sexplib.cma"
-archive(native ) = "sexplib.cmxa"
-archive(native, plugin) = "sexplib.cmxs"
+archive(byte ) = "sexplib.cma"
+archive(native) = "sexplib.cmxa"
+plugin(byte ) = "sexplib.cma"
+plugin(native) = "sexplib.cmxs"
exists_if = "sexplib.cma"
package "num" (
version = "$(pkg_version)"
description = ""
requires = "num sexplib"
- archive(byte ) = "sexplib_num.cma"
- archive(native ) = "sexplib_num.cmxa"
- archive(native, plugin) = "sexplib_num.cmxs"
+ archive(byte ) = "sexplib_num.cma"
+ archive(native) = "sexplib_num.cmxa"
+ plugin(byte ) = "sexplib_num.cma"
+ plugin(native) = "sexplib_num.cmxs"
exists_if = "sexplib_num.cma"
)
@@ -20,8 +22,9 @@ package "unix" (
version = "$(pkg_version)"
description = ""
requires = "sexplib unix"
- archive(byte ) = "sexplib_unix.cma"
- archive(native ) = "sexplib_unix.cmxa"
- archive(native, plugin) = "sexplib_unix.cmxs"
+ archive(byte ) = "sexplib_unix.cma"
+ archive(native) = "sexplib_unix.cmxa"
+ plugin(byte ) = "sexplib_unix.cma"
+ plugin(native) = "sexplib_unix.cmxs"
exists_if = "sexplib_unix.cma"
)
diff --git a/Makefile b/Makefile
index 548348f..117fb54 100644
--- a/Makefile
+++ b/Makefile
@@ -26,8 +26,8 @@ all: $(SETUP)
./$(SETUP) -all $(ALLFLAGS)
$(MAKE) $(NAME).install
-$(NAME).install: js-utils/gen_install.ml setup.log setup.data
- ocaml -I js-utils js-utils/gen_install.ml
+$(NAME).install: install.ml setup.log setup.data
+ ocaml -I "$(OCAML_TOPLEVEL_PATH)" install.ml
install: $(NAME).install
opam-installer -i --prefix $(PREFIX) $(NAME).install
diff --git a/_oasis b/_oasis
index 683ca82..6bd3f5d 100644
--- a/_oasis
+++ b/_oasis
@@ -1,20 +1,23 @@
-OASISFormat: 0.4
-OCamlVersion: >= 4.02.3
-FindlibVersion: >= 1.3.2
-Name: sexplib
-Version: 113.33.00
-Synopsis: Library for serializing OCaml values to and from S-expressions
-Authors: Jane Street Group, LLC <opensource at janestreet.com>
-Copyrights: (C) 2005-2016 Jane Street Group LLC <opensource at janestreet.com>
-Maintainers: Jane Street Group, LLC <opensource at janestreet.com>
-License: Apache-2.0
-LicenseFile: LICENSE.txt
-Homepage: https://github.com/janestreet/sexplib
-Plugins: StdFiles (0.3), DevFiles (0.3), META (0.3)
-XStdFilesAUTHORS: false
-XStdFilesREADME: false
-BuildTools: ocamlbuild
-FilesAB: META.ab
+OASISFormat: 0.4
+OCamlVersion: >= 4.02.3
+FindlibVersion: >= 1.3.2
+Name: sexplib
+Version: 113.33.03
+Synopsis: Library for serializing OCaml values to and from S-expressions
+Authors: Jane Street Group, LLC <opensource at janestreet.com>
+Copyrights: (C) 2005-2016 Jane Street Group LLC <opensource at janestreet.com>
+Maintainers: Jane Street Group, LLC <opensource at janestreet.com>
+License: Apache-2.0
+LicenseFile: LICENSE.txt
+Homepage: https://github.com/janestreet/sexplib
+Plugins: StdFiles (0.3), DevFiles (0.3)
+XStdFilesAUTHORS: false
+XStdFilesREADME: false
+BuildTools: ocamlbuild
+BetaFeatures: section_object
+AlphaFeatures: ocamlbuild_more_args
+XOCamlbuildPluginTags: package(js-build-tools.ocamlbuild_goodies)
+FilesAB: META.ab
Description:
Part of Jane Street’s Core library
The Core suite of libraries is an industrial strength alternative to
diff --git a/_tags b/_tags
index 541666b..bf5b91e 100644
--- a/_tags
+++ b/_tags
@@ -1,7 +1,7 @@
<**/*.ml{,i}>: warn(-40), no_alias_deps
<**/*>: thread
# This prevents the implicit addition of -ppx options by ocamlfind
-<**/*.ml{,i}>: predicate(ppx_driver)
+<**/*>: predicate(custom_ppx)
<src/*.ml>: for-pack(Sexplib)
<num/lib/*.ml>: for-pack(Sexplib_num)
<unix/lib/*.ml>: for-pack(Sexplib_unix)
diff --git a/install.ml b/install.ml
new file mode 100644
index 0000000..06c76a5
--- /dev/null
+++ b/install.ml
@@ -0,0 +1,11 @@
+#use "topfind";;
+#require "js-build-tools.oasis2opam_install";;
+
+open Oasis2opam_install;;
+
+generate ~package:"sexplib"
+ [ oasis_lib "sexplib"
+ ; oasis_lib "sexplib_num"
+ ; oasis_lib "sexplib_unix"
+ ; file "META" ~section:"lib"
+ ]
diff --git a/js-utils/gen_install.ml b/js-utils/gen_install.ml
deleted file mode 100644
index 39db642..0000000
--- a/js-utils/gen_install.ml
+++ /dev/null
@@ -1,102 +0,0 @@
-(* Generate <package>.install from setup.log *)
-
-#use "install_tags.ml"
-
-module String_map = Map.Make(String)
-let string_map_of_list =
- List.fold_left
- (fun acc (k, v) ->
- assert (not (String_map.mem k acc));
- String_map.add k v acc)
- String_map.empty
-
-let lines_of_file fn =
- let ic = open_in fn in
- let rec loop acc =
- match input_line ic with
- | exception End_of_file ->
- close_in ic;
- List.rev acc
- | line ->
- loop (line :: acc)
- in
- loop []
-
-let read_setup_log () =
- lines_of_file "setup.log"
- |> List.map (fun line -> Scanf.sscanf line "%S %S" (fun tag arg -> (tag, arg)))
-
-let read_setup_data () =
- lines_of_file "setup.data"
- |> List.map (fun line -> Scanf.sscanf line "%[^=]=%S" (fun k v -> (k, v)))
-
-let remove_cwd =
- let prefix = Sys.getcwd () ^ "/" in
- let len_prefix = String.length prefix in
- fun fn ->
- let len = String.length fn in
- if len >= len_prefix && String.sub fn 0 len_prefix = prefix then
- String.sub fn len_prefix (len - len_prefix)
- else
- fn
-
-let gen_section oc name files =
- let pr fmt = Printf.fprintf oc (fmt ^^ "\n") in
- pr "%s: [" name;
- List.iter
- (fun (src, dst) ->
- let src = remove_cwd src in
- let dst =
- match dst with
- | None -> Filename.basename src
- | Some fn -> fn
- in
- if src = dst then
- pr " %S" src
- else
- pr " %S {%S}" src dst)
- files;
- pr "]"
-
-let rec filter_log tags log acc =
- match log with
- | [] -> acc
- | (tag, fname) :: rest ->
- match String_map.find tag tags with
- | exception Not_found -> filter_log tags rest acc
- | dst -> filter_log tags rest ((fname, dst) :: acc)
-
-let () =
- let log = read_setup_log () in
- let setup_data = read_setup_data () in
- let ext_dll =
- match List.assoc "ext_dll" setup_data with
- | ext -> ext
- | exception Not_found -> ".so"
- in
- let merge name files map =
- match String_map.find name map with
- | files' -> String_map.add name (files @ files') map
- | exception Not_found -> String_map.add name files map
- in
- let sections =
- List.fold_left
- (fun acc (name, tags, extra_files) ->
- let tags = string_map_of_list tags in
- let files = filter_log tags log [] @ extra_files in
- if name = "lib" then
- let stubs, others =
- List.partition
- (fun (fn, _) -> Filename.check_suffix fn ext_dll)
- files
- in
- merge "lib" others (merge "stublibs" stubs acc)
- else
- merge name files acc)
- String_map.empty sections
- |> String_map.bindings
- |> List.filter (fun (_, l) -> l <> [])
- in
- let oc = open_out (package_name ^ ".install") in
- List.iter (fun (name, files) -> gen_section oc name files) sections;
- close_out oc
diff --git a/js-utils/install_tags.ml b/js-utils/install_tags.ml
deleted file mode 100644
index 69de424..0000000
--- a/js-utils/install_tags.ml
+++ /dev/null
@@ -1,11 +0,0 @@
-let package_name = "sexplib"
-
-let sections =
- [ ("lib",
- [ ("built_lib_sexplib", None)
- ; ("built_lib_sexplib_num", None)
- ; ("built_lib_sexplib_unix", None)
- ],
- [ ("META", None)
- ])
- ]
diff --git a/myocamlbuild.ml b/myocamlbuild.ml
index 4688954..326d293 100644
--- a/myocamlbuild.ml
+++ b/myocamlbuild.ml
@@ -2,28 +2,13 @@
(* OASIS_STOP *)
# 3 "myocamlbuild.ml"
-(* Temporary hacks *)
-let js_hacks = function
- | After_rules ->
- rule "Generate a cmxs from a cmxa"
- ~dep:"%.cmxa"
- ~prod:"%.cmxs"
- ~insert:`top
- (fun env _ ->
- Cmd (S [ !Options.ocamlopt
- ; A "-shared"
- ; A "-linkall"
- ; A "-I"; A (Pathname.dirname (env "%"))
- ; A (env "%.cmxa")
- ; A "-o"
- ; A (env "%.cmxs")
- ]));
+module JS = Jane_street_ocamlbuild_goodies
- (* Pass -predicates to ocamldep *)
- pflag ["ocaml"; "ocamldep"] "predicate" (fun s -> S [A "-predicates"; A s])
- | _ -> ()
+let dev_mode = true
let () =
Ocamlbuild_plugin.dispatch (fun hook ->
- js_hacks hook;
+ JS.alt_cmxs_of_cmxa_rule hook;
+ JS.pass_predicates_to_ocamldep hook;
+ if dev_mode && not Sys.win32 then JS.track_external_deps hook;
dispatch_default hook)
diff --git a/opam b/opam
index a02a481..10c9d1d 100644
--- a/opam
+++ b/opam
@@ -10,8 +10,9 @@ build: [
[make]
]
depends: [
- "ocamlbuild" {build}
- "oasis" {build & >= "0.4"}
- "ocamlfind" {build & >= "1.3.2"}
+ "ocamlbuild" {build}
+ "oasis" {build & >= "0.4"}
+ "ocamlfind" {build & >= "1.3.2"}
+ "js-build-tools" {build}
]
-available: [ ocaml-version >= "4.02.3" ]
+available: [ ocaml-version = "4.02.3" ]
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ocaml-maint/packages/sexplib310.git
More information about the Pkg-ocaml-maint-commits
mailing list