[Pkg-ocaml-maint-commits] [SCM] ocaml-data-notation packaging branch, upstream, updated. upstream/0.0.8-2-g90a21fe
Stephane Glondu
steph at glondu.net
Sat Jun 22 15:22:44 UTC 2013
The following commit has been merged in the upstream branch:
commit 90a21fe82a8819ef7f53e1186749c822bb016b75
Author: Stephane Glondu <steph at glondu.net>
Date: Sat Jun 22 17:09:35 2013 +0200
Imported Upstream version 0.0.10
diff --git a/CHANGES.txt b/CHANGES.txt
index f4ab529..dc7c075 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,8 @@
+2012-10-06 Sylvain Le Gall <syvlain .A.T. le-gall.net>
+
+ * New version 0.0.9
+ * Use type_conv 108.07.01 (Closes: #1226)
+
2012-05-23 Sylvain Le Gall <sylvain .A.T. le-gall.net>
* New version 0.0.9
diff --git a/INSTALL.txt b/INSTALL.txt
index f92c313..9dd77c3 100644
--- a/INSTALL.txt
+++ b/INSTALL.txt
@@ -1,5 +1,5 @@
(* OASIS_START *)
-(* DO NOT EDIT (digest: bc089b4ebff093c2ee3af6ab23475647) *)
+(* DO NOT EDIT (digest: c8a610e39b6e20af721540aca8963afc) *)
This is the INSTALL file for the ocaml-data-notation distribution.
This package uses OASIS to generate its build system. See section OASIS for
@@ -11,7 +11,7 @@ Dependencies
In order to compile this package, you will need:
* ocaml (>= 3.10.2) for all, test main
* findlib
-* type_conv (>= 3.0.5) for library pa_noodn, library pa_odn
+* type_conv (>= 108.07.01) for library pa_noodn, library pa_odn
* oUnit (>= 1.1.0) for executable test
* fileutils (>= 0.4.0) for executable test
diff --git a/_oasis b/_oasis
index c1d6913..fb387de 100644
--- a/_oasis
+++ b/_oasis
@@ -1,7 +1,7 @@
OASISFormat: 0.3
OCamlVersion: >= 3.10.2
Name: ocaml-data-notation
-Version: 0.0.9
+Version: 0.0.10
Synopsis: Store data using OCaml notation
Copyrights: (C) 2009-2010 OCamlCore SARL
Authors: Sylvain Le Gall
@@ -28,7 +28,7 @@ Library pa_odn
FindlibParent: odn
FindlibContainers: with
FindlibName: syntax
- BuildDepends: type_conv (>= 3.0.5), camlp4.lib, camlp4.quotations.o
+ BuildDepends: type_conv (>= 108.07.01), camlp4.lib, camlp4.quotations.o
CompiledObject: byte
XMETAType: syntax
XMETARequires: type_conv, camlp4, odn
diff --git a/_tags b/_tags
index 4920732..9ee68df 100644
--- a/_tags
+++ b/_tags
@@ -55,3 +55,5 @@
# OASIS_STOP
<src/pa_odn.ml>: syntax_camlp4o
<src/pa_noodn.ml>: syntax_camlp4o
+"build": not_hygienic
+"build": -traverse
diff --git a/bootstrap.lua b/bootstrap.lua
new file mode 100644
index 0000000..c3130f7
--- /dev/null
+++ b/bootstrap.lua
@@ -0,0 +1,38 @@
+
+local os = os
+local error = error
+local lfs = require("lfs")
+local package = package
+
+module("bootstrap")
+
+function init ()
+ local ci_url = os.getenv("CI_URL")
+ if not ci_url then
+ ci_url = "http://mini:8080/job/continuous-integration/label=debian-squeeze64/lastSuccessfulBuild/artifact/dist/ci.zip"
+ end
+ local bootstrapdir = "build/bootstrap"
+ if lfs.attributes(bootstrapdir) then
+ for fn in lfs.dir(bootstrapdir) do
+ if fn ~= "." and fn ~= ".." then
+ local realfn = bootstrapdir .. "/" .. fn
+ if not os.remove(realfn) then
+ error("Cannot remove " .. realfn)
+ end
+ end
+ end
+ lfs.rmdir("build/bootstrap")
+ end
+ lfs.mkdir("build")
+ lfs.mkdir("build/bootstrap")
+ local topdir = lfs.currentdir()
+ lfs.chdir("build/bootstrap")
+ if os.execute("curl -o ci.zip " .. ci_url) ~= 0 then
+ error "Cannot download ci.zip"
+ end
+ if os.execute("unzip ci.zip") ~= 0 then
+ error "Cannot unzip ci.zip"
+ end
+ lfs.chdir(topdir)
+ package.path = "./build/bootstrap/?.lua;" .. package.path
+end
diff --git a/ci-main.lua b/ci-main.lua
new file mode 100644
index 0000000..284e90e
--- /dev/null
+++ b/ci-main.lua
@@ -0,0 +1,27 @@
+
+bootstrap = require("bootstrap")
+
+bootstrap.init()
+
+oasis = require("oasis")
+darcs = require("darcs")
+ci = require("ci")
+godi = require("godi")
+
+ci.init()
+godi.init()
+oasis.init()
+darcs.init()
+
+godi.bootstrap("3.12")
+godi.update()
+godi.upgrade()
+godi.build("godi-findlib")
+godi.build("godi-type_conv")
+godi.build("godi-ounit")
+godi.build("godi-ocaml-fileutils")
+
+ci.exec("ocaml", "setup.ml", "-configure")
+ci.exec("ocaml", "setup.ml", "-build")
+ci.exec("ocaml", "setup.ml", "-test")
+darcs.create_tag(oasis.package_version())
diff --git a/myocamlbuild.ml b/myocamlbuild.ml
index 3bfc0f4..2340d27 100644
--- a/myocamlbuild.ml
+++ b/myocamlbuild.ml
@@ -20,7 +20,7 @@
(********************************************************************************)
(* OASIS_START *)
-(* DO NOT EDIT (digest: 01a1b64c5e97d73addbe2bad86caccfd) *)
+(* DO NOT EDIT (digest: f922d43ab18f38eb9e477cfc08ed7f6a) *)
module OASISGettext = struct
# 21 "/home/gildor/programmation/oasis/src/oasis/OASISGettext.ml"
@@ -416,78 +416,6 @@ module MyOCamlbuildBase = struct
Options.ext_dll, "ext_dll";
]
- | Before_rules ->
- (* TODO: move this into its own file and conditionnaly include it, if
- * needed.
- *)
- (* OCaml cmxs rules: cmxs available in ocamlopt but not ocamlbuild.
- Copied from ocaml_specific.ml in ocamlbuild sources. *)
- let has_native_dynlink =
- try
- bool_of_string (BaseEnvLight.var_get "native_dynlink" env)
- with Not_found ->
- false
- in
- if has_native_dynlink && String.sub Sys.ocaml_version 0 4 = "3.11" then
- begin
- let ext_lib = !Options.ext_lib in
- let ext_obj = !Options.ext_obj in
- let ext_dll = !Options.ext_dll in
- let x_o = "%"-.-ext_obj in
- let x_a = "%"-.-ext_lib in
- let x_dll = "%"-.-ext_dll in
- let x_p_o = "%.p"-.-ext_obj in
- let x_p_a = "%.p"-.-ext_lib in
- let x_p_dll = "%.p"-.-ext_dll in
-
- rule "ocaml: mldylib & p.cmx* & p.o* -> p.cmxs & p.so"
- ~tags:["ocaml"; "native"; "profile"; "shared"; "library"]
- ~prods:["%.p.cmxs"; x_p_dll]
- ~dep:"%.mldylib"
- (OC.native_profile_shared_library_link_mldylib
- "%.mldylib" "%.p.cmxs");
-
- rule "ocaml: mldylib & cmx* & o* -> cmxs & so"
- ~tags:["ocaml"; "native"; "shared"; "library"]
- ~prods:["%.cmxs"; x_dll]
- ~dep:"%.mldylib"
- (OC.native_shared_library_link_mldylib
- "%.mldylib" "%.cmxs");
-
- rule "ocaml: p.cmx & p.o -> p.cmxs & p.so"
- ~tags:["ocaml"; "native"; "profile"; "shared"; "library"]
- ~prods:["%.p.cmxs"; x_p_dll]
- ~deps:["%.p.cmx"; x_p_o]
- (OC.native_shared_library_link ~tags:["profile"]
- "%.p.cmx" "%.p.cmxs");
-
- rule "ocaml: p.cmxa & p.a -> p.cmxs & p.so"
- ~tags:["ocaml"; "native"; "profile"; "shared"; "library"]
- ~prods:["%.p.cmxs"; x_p_dll]
- ~deps:["%.p.cmxa"; x_p_a]
- (OC.native_shared_library_link ~tags:["profile"; "linkall"]
- "%.p.cmxa" "%.p.cmxs");
-
- rule "ocaml: cmx & o -> cmxs"
- ~tags:["ocaml"; "native"; "shared"; "library"]
- ~prods:["%.cmxs"]
- ~deps:["%.cmx"; x_o]
- (OC.native_shared_library_link "%.cmx" "%.cmxs");
-
- rule "ocaml: cmx & o -> cmxs & so"
- ~tags:["ocaml"; "native"; "shared"; "library"]
- ~prods:["%.cmxs"; x_dll]
- ~deps:["%.cmx"; x_o]
- (OC.native_shared_library_link "%.cmx" "%.cmxs");
-
- rule "ocaml: cmxa & a -> cmxs & so"
- ~tags:["ocaml"; "native"; "shared"; "library"]
- ~prods:["%.cmxs"; x_dll]
- ~deps:["%.cmxa"; x_a]
- (OC.native_shared_library_link ~tags:["linkall"]
- "%.cmxa" "%.cmxs");
- end
-
| After_rules ->
(* Declare OCaml libraries *)
List.iter
@@ -528,7 +456,7 @@ module MyOCamlbuildBase = struct
(* When ocaml link something that use the C library, then one
need that file to be up to date.
*)
- dep ["link"; "ocaml"; "program"; tag_libstubs lib]
+ dep ["link"; "ocaml"; "program"; tag_libstubs lib]
[dir/"lib"^(nm_libstubs lib)^"."^(!Options.ext_lib)];
dep ["compile"; "ocaml"; "program"; tag_libstubs lib]
@@ -566,7 +494,7 @@ module MyOCamlbuildBase = struct
end
-# 548 "myocamlbuild.ml"
+# 476 "myocamlbuild.ml"
open Ocamlbuild_plugin;;
let package_default =
{
@@ -580,6 +508,6 @@ let package_default =
let dispatch_default = MyOCamlbuildBase.dispatch_default package_default;;
-# 563 "myocamlbuild.ml"
+# 491 "myocamlbuild.ml"
(* OASIS_STOP *)
Ocamlbuild_plugin.dispatch dispatch_default;;
diff --git a/setup.ml b/setup.ml
index a68cff8..868f02a 100644
--- a/setup.ml
+++ b/setup.ml
@@ -20,9 +20,9 @@
(********************************************************************************)
(* OASIS_START *)
-(* DO NOT EDIT (digest: 7923d1b5bf130fe24d5d5095aae3ddad) *)
+(* DO NOT EDIT (digest: 897a98efb11f56642fed1d7440e9365c) *)
(*
- Regenerated by OASIS v0.3.0~rc6
+ Regenerated by OASIS v0.3.0
Visit http://oasis.forge.ocamlcore.org for more information and
documentation about functions used in this file.
*)
@@ -1207,8 +1207,11 @@ module OASISUnixPath = struct
let parent_dir_name = ".."
+ let is_current_dir fn =
+ fn = current_dir_name || fn = ""
+
let concat f1 f2 =
- if f1 = current_dir_name || f1 = "" then
+ if is_current_dir f1 then
f2
else
let f1' =
@@ -1575,11 +1578,13 @@ module OASISLibrary = struct
add_pack_header ([cs.cs_name^".cma"] :: acc)
in
let native acc =
- let acc = [cs.cs_name^".cmxa"] :: [cs.cs_name^ext_lib] :: acc in
- add_pack_header
- (if has_native_dynlink then
- [cs.cs_name^".cmxs"] :: acc
- else acc)
+ let acc =
+ add_pack_header
+ (if has_native_dynlink then
+ [cs.cs_name^".cmxs"] :: acc
+ else acc)
+ in
+ [cs.cs_name^".cmxa"] :: [cs.cs_name^ext_lib] :: acc
in
match bs.bs_compiled_object with
| Native ->
@@ -1886,7 +1891,23 @@ module OASISExec = struct
open OASISUtils
open OASISMessage
- let run ~ctxt ?f_exit_code cmd args =
+ (* TODO: I don't like this quote, it is there because $(rm) foo expands to
+ * 'rm -f' foo...
+ *)
+ let run ~ctxt ?f_exit_code ?(quote=true) cmd args =
+ let cmd =
+ if quote then
+ if Sys.os_type = "Win32" then
+ if String.contains cmd ' ' then
+ (* Double the 1st double quote... win32... sigh *)
+ "\""^(Filename.quote cmd)
+ else
+ cmd
+ else
+ Filename.quote cmd
+ else
+ cmd
+ in
let cmdline =
String.concat " " (cmd :: args)
in
@@ -2137,7 +2158,7 @@ module OASISFileUtil = struct
end
-# 2121 "setup.ml"
+# 2142 "setup.ml"
module BaseEnvLight = struct
# 21 "/home/gildor/programmation/oasis/src/base/BaseEnvLight.ml"
@@ -2235,7 +2256,7 @@ module BaseEnvLight = struct
end
-# 2219 "setup.ml"
+# 2240 "setup.ml"
module BaseContext = struct
# 21 "/home/gildor/programmation/oasis/src/base/BaseContext.ml"
@@ -3072,6 +3093,23 @@ module BaseStandardVar = struct
let default_executable_name = c "default_executable_name"
let systhread_supported = c "systhread_supported"
+ let flexlink =
+ BaseCheck.prog "flexlink"
+
+ let flexdll_version =
+ var_define
+ ~short_desc:(fun () -> "FlexDLL version (Win32)")
+ "flexdll_version"
+ (fun () ->
+ let lst =
+ OASISExec.run_read_output ~ctxt:!BaseContext.default
+ (flexlink ()) ["-help"]
+ in
+ match lst with
+ | line :: _ ->
+ Scanf.sscanf line "FlexDLL version %s" (fun ver -> ver)
+ | [] ->
+ raise Not_found)
(**/**)
let p name hlp dflt =
@@ -3293,23 +3331,47 @@ module BaseStandardVar = struct
"native_dynlink"
(fun () ->
let res =
- if bool_of_string (is_native ()) then
- begin
- let ocamlfind = ocamlfind () in
- try
- let fn =
- OASISExec.run_read_one_line
- ~ctxt:!BaseContext.default
- ocamlfind
- ["query"; "-predicates"; "native"; "dynlink";
- "-format"; "%d/%a"]
- in
- Sys.file_exists fn
- with _ ->
- false
- end
- else
- false
+ let ocaml_lt_312 () =
+ OASISVersion.comparator_apply
+ (OASISVersion.version_of_string (ocaml_version ()))
+ (OASISVersion.VLesser
+ (OASISVersion.version_of_string "3.12.0"))
+ in
+ let flexdll_lt_030 () =
+ OASISVersion.comparator_apply
+ (OASISVersion.version_of_string (flexdll_version ()))
+ (OASISVersion.VLesser
+ (OASISVersion.version_of_string "0.30"))
+ in
+ let has_native_dynlink =
+ let ocamlfind = ocamlfind () in
+ try
+ let fn =
+ OASISExec.run_read_one_line
+ ~ctxt:!BaseContext.default
+ ocamlfind
+ ["query"; "-predicates"; "native"; "dynlink";
+ "-format"; "%d/%a"]
+ in
+ Sys.file_exists fn
+ with _ ->
+ false
+ in
+ if not has_native_dynlink then
+ false
+ else if ocaml_lt_312 () then
+ false
+ else if (os_type () = "Win32" || os_type () = "Cygwin")
+ && flexdll_lt_030 () then
+ begin
+ BaseMessage.warning
+ (f_ ".cmxs generation disabled because FlexDLL needs to be \
+ at least 0.30. Please upgrade FlexDLL from %s to 0.30.")
+ (flexdll_version ());
+ false
+ end
+ else
+ true
in
string_of_bool res)
@@ -3642,7 +3704,7 @@ module BaseCustom = struct
open OASISGettext
let run cmd args extra_args =
- OASISExec.run ~ctxt:!BaseContext.default
+ OASISExec.run ~ctxt:!BaseContext.default ~quote:false
(var_expand cmd)
(List.map
var_expand
@@ -4434,7 +4496,7 @@ module BaseSetup = struct
end
-# 4418 "setup.ml"
+# 4480 "setup.ml"
module InternalConfigurePlugin = struct
# 21 "/home/gildor/programmation/oasis/src/plugins/internal/InternalConfigurePlugin.ml"
@@ -4614,6 +4676,17 @@ module InternalConfigurePlugin = struct
()
end;
+ (* FlexDLL *)
+ if BaseStandardVar.os_type () = "Win32" ||
+ BaseStandardVar.os_type () = "Cygwin" then
+ begin
+ try
+ var_ignore_eval BaseStandardVar.flexlink
+ with e ->
+ warn_exception e;
+ add_errors (f_ "Cannot find 'flexlink'")
+ end;
+
(* Check build depends *)
List.iter
(function
@@ -4699,6 +4772,71 @@ module InternalInstallPlugin = struct
let install_findlib_ev =
"install-findlib"
+ let win32_max_command_line_length = 8000
+
+ let split_install_command ocamlfind findlib_name meta files =
+ if Sys.os_type = "Win32" then
+ (* Arguments for the first command: *)
+ let first_args = ["install"; findlib_name; meta] in
+ (* Arguments for remaining commands: *)
+ let other_args = ["install"; findlib_name; "-add"] in
+ (* Extract as much files as possible from [files], [len] is
+ the current command line length: *)
+ let rec get_files len acc files =
+ match files with
+ | [] ->
+ (List.rev acc, [])
+ | file :: rest ->
+ let len = len + 1 + String.length file in
+ if len > win32_max_command_line_length then
+ (List.rev acc, files)
+ else
+ get_files len (file :: acc) rest
+ in
+ (* Split the command into several commands. *)
+ let rec split args files =
+ match files with
+ | [] ->
+ []
+ | _ ->
+ (* Length of "ocamlfind install <lib> [META|-add]" *)
+ let len =
+ List.fold_left
+ (fun len arg ->
+ len + 1 (* for the space *) + String.length arg)
+ (String.length ocamlfind)
+ args
+ in
+ match get_files len [] files with
+ | ([], _) ->
+ failwith (s_ "Command line too long.")
+ | (firsts, others) ->
+ let cmd = args @ firsts in
+ (* Use -add for remaining commands: *)
+ let () =
+ let findlib_ge_132 =
+ OASISVersion.comparator_apply
+ (OASISVersion.version_of_string
+ (BaseStandardVar.findlib_version ()))
+ (OASISVersion.VGreaterEqual
+ (OASISVersion.version_of_string "1.3.2"))
+ in
+ if not findlib_ge_132 then
+ failwithf
+ (f_ "Installing the library %s require to use the flag \
+ '-add' of ocamlfind because the command line is too \
+ long. This flag is only available for findlib 1.3.2. \
+ Please upgrade findlib from %s to 1.3.2")
+ findlib_name (BaseStandardVar.findlib_version ())
+ in
+ let cmds = split other_args others in
+ cmd :: cmds
+ in
+ (* The first command does not use -add: *)
+ split first_args files
+ else
+ ["install" :: findlib_name :: meta :: files]
+
let install pkg argv =
let in_destdir =
@@ -4931,8 +5069,17 @@ module InternalInstallPlugin = struct
info
(f_ "Installing findlib library '%s'")
findlib_name;
- OASISExec.run ~ctxt:!BaseContext.default
- (ocamlfind ()) ("install" :: findlib_name :: meta :: files);
+ let ocamlfind = ocamlfind () in
+ let commands =
+ split_install_command
+ ocamlfind
+ findlib_name
+ meta
+ files
+ in
+ List.iter
+ (OASISExec.run ~ctxt:!BaseContext.default ocamlfind)
+ commands;
BaseLog.register install_findlib_ev findlib_name
end;
@@ -5102,7 +5249,7 @@ module InternalInstallPlugin = struct
end
-# 5086 "setup.ml"
+# 5233 "setup.ml"
module OCamlbuildCommon = struct
# 21 "/home/gildor/programmation/oasis/src/plugins/ocamlbuild/OCamlbuildCommon.ml"
@@ -5427,7 +5574,7 @@ module OCamlbuildDocPlugin = struct
end
-# 5411 "setup.ml"
+# 5558 "setup.ml"
module CustomPlugin = struct
# 21 "/home/gildor/programmation/oasis/src/plugins/custom/CustomPlugin.ml"
@@ -5563,7 +5710,7 @@ module CustomPlugin = struct
end
-# 5547 "setup.ml"
+# 5694 "setup.ml"
open OASISTypes;;
let setup_t =
@@ -5616,7 +5763,7 @@ let setup_t =
ocaml_version = Some (OASISVersion.VGreaterEqual "3.10.2");
findlib_version = None;
name = "ocaml-data-notation";
- version = "0.0.9";
+ version = "0.0.10";
license =
OASISLicense.DEP5License
(OASISLicense.DEP5Unit
@@ -5716,7 +5863,7 @@ let setup_t =
[
FindlibPackage
("type_conv",
- Some (OASISVersion.VGreaterEqual "3.0.5"));
+ Some (OASISVersion.VGreaterEqual "108.07.01"));
FindlibPackage ("camlp4.lib", None);
FindlibPackage ("camlp4.quotations.o", None)
];
@@ -5865,8 +6012,8 @@ let setup_t =
plugin_data = [];
};
oasis_fn = Some "_oasis";
- oasis_version = "0.3.0~rc6";
- oasis_digest = Some "\179\206\127\254.J\224k\131\229\188\028m\255\167o";
+ oasis_version = "0.3.0";
+ oasis_digest = Some "zY\177\000# \250\"0\186(+we]\210";
oasis_exec = None;
oasis_setup_args = [];
setup_update = false;
@@ -5874,6 +6021,6 @@ let setup_t =
let setup () = BaseSetup.setup setup_t;;
-# 5859 "setup.ml"
+# 6006 "setup.ml"
(* OASIS_STOP *)
let () = setup ();;
diff --git a/src/META b/src/META
index 218a5c7..40ff5d4 100644
--- a/src/META
+++ b/src/META
@@ -1,6 +1,6 @@
# OASIS_START
-# DO NOT EDIT (digest: fa3321cd1f2a5901240b4fac5b88497f)
-version = "0.0.9"
+# DO NOT EDIT (digest: 67893aeacddde3951841656db55875d2)
+version = "0.0.10"
description = "Store data using OCaml notation"
archive(byte) = "odn.cma"
archive(byte, plugin) = "odn.cma"
@@ -10,7 +10,7 @@ exists_if = "odn.cma"
package "without" (
description = "Virtual container"
package "syntax" (
- version = "0.0.9"
+ version = "0.0.10"
description = "Syntax extension that removes 'with odn'"
requires = "type_conv camlp4"
archive(syntax, preprocessor) = "pa_noodn.cma"
@@ -22,7 +22,7 @@ package "without" (
package "with" (
description = "Virtual container"
package "syntax" (
- version = "0.0.9"
+ version = "0.0.10"
description = "Syntax extension for odn"
requires = "type_conv camlp4 odn"
archive(syntax, preprocessor) = "pa_odn.cma"
diff --git a/src/pa_noodn.ml b/src/pa_noodn.ml
index 6dfb496..2e7f2fa 100644
--- a/src/pa_noodn.ml
+++ b/src/pa_noodn.ml
@@ -32,7 +32,7 @@ open Pa_type_conv
add_generator
"odn"
- (fun _ ->
+ (fun _ _ ->
let _loc =
Loc.ghost
in
diff --git a/src/pa_odn.ml b/src/pa_odn.ml
index a3d664d..9e5ef04 100644
--- a/src/pa_odn.ml
+++ b/src/pa_odn.ml
@@ -198,7 +198,7 @@ let odn_of_nil _loc =
assert false
;;
-let odn_of tp =
+let odn_of _ tp =
let rec odn_aux =
function
| TyDcl (_loc, type_name, tps, rhs, _cl) ->
--
ocaml-data-notation packaging
More information about the Pkg-ocaml-maint-commits
mailing list