The following commit has been merged in the master branch:
commit 997c03825f19116afc2b13537c75fe54aa52604f
Author: Sylvain Le Gall gil...@debian.org
Date: Fri Mar 8 00:11:25 2013 +
Use not-yet release oasis 0.3.1 API.
diff --git a/src/BuildDepends.ml b/src/BuildDepends.ml
index 0cae5b7..8bb34ed 100644
--- a/src/BuildDepends.ml
+++ b/src/BuildDepends.ml
@@ -175,7 +175,8 @@ let get ~ctxt pkg =
(fun ((exec, fndlb) as acc) -
function
| Library (_, bs, _)
- | Executable (_, bs, _) -
+ | Executable (_, bs, _)
+ | Object (_, bs, _) -
depends_of_bs bs acc
| Test (_, test) -
diff --git a/src/DhFiles.ml b/src/DhFiles.ml
index b6eb37b..183c96f 100644
--- a/src/DhFiles.ml
+++ b/src/DhFiles.ml
@@ -23,7 +23,7 @@
*)
open OASISTypes
-open OASISLibrary
+open OASISFindlib
open ExtString
open Common
@@ -42,15 +42,15 @@ let create ~ctxt t =
debian_with_fn (deb_pkg.name^.^ext)
in
- let findlib_roots =
-OASISLibrary.group_libs t.pkg_generic
+ let findlib_roots, _, _ =
+OASISFindlib.findlib_mapping t.pkg_generic
in
let roots =
List.rev_map
(fun grp -
let findlib_name =
- OASISLibrary.findlib_of_group grp
+ OASISFindlib.findlib_of_group grp
in
let libs =
@@ -58,8 +58,8 @@ let create ~ctxt t =
function
| Container (_, lst) -
List.fold_left fold acc lst
- | Package (_, cs, bs, lib, lst) -
- List.fold_left fold ((cs, bs, lib) :: acc) lst
+ | Package (_, cs, bs, a, lst) -
+ List.fold_left fold ((cs, bs, a) :: acc) lst
in
fold [] grp
in
@@ -71,18 +71,29 @@ let create ~ctxt t =
List.flatten
(List.flatten
(List.fold_left
- (fun acc e -
- let fns =
- OASISLibrary.generated_unix_files
- ~ctxt
- ~source_file_exists:Sys.file_exists
- ~is_native:true
- ~has_native_dynlink:true
- ~ext_lib:.a
- ~ext_dll:.so
- e
- in
- fns :: acc)
+ (fun acc -
+ function
+ | cs, bs, `Library lib -
+ let fns =
+ OASISLibrary.generated_unix_files
+ ~ctxt
+ ~source_file_exists:Sys.file_exists
+ ~is_native:true
+ ~has_native_dynlink:true
+ ~ext_lib:.a
+ ~ext_dll:.so
+ (cs, bs, lib)
+ in
+ fns :: acc
+ | cs, bs, `Object obj -
+ let fns =
+ OASISObject.generated_unix_files
+ ~ctxt
+ ~source_file_exists:Sys.file_exists
+ ~is_native:true
+ (cs, bs, obj)
+ in
+ fns :: acc)
[]
libs))
in
@@ -120,7 +131,7 @@ let create ~ctxt t =
(ExternalTool ocamldoc)
doc.doc_build_tools
- | Flag _ | Library _ | Executable _ | SrcRepo _ | Test _ -
+ | Flag _ | Object _ | Library _ | Executable _ | SrcRepo _ | Test _ -
false)
t.pkg_generic.sections
in
@@ -214,8 +225,8 @@ Section: Programming/OCaml);
(mk_doc_base docdir cs doc);
n + 1
- | Library _ | Executable _ | Flag _
- | Test _ | SrcRepo _ -
+ | Object _ | Library _ | Executable _
+ | Flag _ | Test _ | SrcRepo _ -
n)
1
t.pkg_generic.sections
diff --git a/src/Expr.ml b/src/Expr.ml
index 5fa36d8..5645273 100644
--- a/src/Expr.ml
+++ b/src/Expr.ml
@@ -61,7 +61,7 @@ let create ~ctxt pkg =
(string_of_bool
(choose_simple ~ctxt conf flag.flag_default))
conf
- | Library _ | Executable _ | Doc _ | Test _ | SrcRepo _ -
+ | Object _ | Library _ | Executable _ | Doc _ | Test _ | SrcRepo
_ -
conf)
conf
pkg.sections
diff --git a/src/GenPkg.ml b/src/GenPkg.ml
index 460b01a..5ea6871 100644
--- a/src/GenPkg.ml
+++ b/src/GenPkg.ml
@@ -43,22 +43,25 @@ let executable_name =
let set ~ctxt t =
- let lib, doc, bin =
+ let obj, lib, doc, bin =
List.fold_left