File tree Expand file tree Collapse file tree 5 files changed +25
-19
lines changed Expand file tree Collapse file tree 5 files changed +25
-19
lines changed Original file line number Diff line number Diff line change 1- open Base
2- open Stdio
1+ open Sexplib0
2+ open Sexplib0.Sexp_conv
3+ open StdLabels
34module C = Configurator. V1
45
6+ let write_data fn data =
7+ let och = open_out fn in
8+ Fun. protect
9+ (fun () -> output_string och data)
10+ ~finally: (fun () -> close_out och)
11+
512let write_sexp fn list_of_str =
613 let data = sexp_of_list sexp_of_string list_of_str |> Sexp. to_string in
7- Out_channel. write_all fn ~ data
14+ write_data fn data
815
9- let write_flags file list_of_str =
16+ let write_flags fn list_of_str =
1017 let data = String. concat list_of_str ~sep: " " in
11- Out_channel. write_all file ~ data
18+ write_data fn data
1219
1320let () =
1421 C. main ~name: " GObject-Introspection" (fun c ->
@@ -64,8 +71,7 @@ let () =
6471 in
6572 let os_type = C. ocaml_config_var_exn (C. create " " ) " system" in
6673 let ccopts =
67- if Base.String. (os_type = " macosx" ) then [ " " ]
68- else [ " -Wl,-no-as-needed" ]
74+ if os_type = " macosx" then [ " " ] else [ " -Wl,-no-as-needed" ]
6975 in
7076 write_sexp " c_flags.sexp" conf.cflags;
7177 write_sexp " c_library_flags.sexp" conf.libs;
Original file line number Diff line number Diff line change 11(executable
22 (name discover)
3- (libraries base stdio dune-configurator))
3+ (libraries sexplib0 dune-configurator))
Original file line number Diff line number Diff line change 1212 ( description " This library provides bindings based on Ctypes for the libgirepository API (see https://developer.gnome.org/gi/stable/)" )
1313 ( depends
1414 ( ocaml ( >= 4 .08) )
15- ctypes
16- ctypes-foreign
17- ( dune-configurator :build )
18- ( base :build )
19- ( stdio ( and :build :with -test) )
2015 ( conf-pkg-config :build )
2116 ( conf-gobject-introspection :build )
2217 ( conf-glib-2 :build )
2318 ( conf-gtk3 :build )
19+ ( dune-configurator :build )
20+ ( sexplib0 :build )
21+ ctypes
22+ ctypes-foreign
2423 ( ounit2 :with -test)
24+ ( stdio :with -test)
2525 ) )
Original file line number Diff line number Diff line change @@ -13,16 +13,16 @@ bug-reports: "https://github.com/cedlemo/OCaml-GObject-Introspection/issues"
1313depends: [
1414 "dune" {>= "2.9"}
1515 "ocaml" {>= "4.08"}
16- "ctypes"
17- "ctypes-foreign"
18- "dune-configurator" {build}
19- "base" {build}
20- "stdio" {build & with-test}
2116 "conf-pkg-config" {build}
2217 "conf-gobject-introspection" {build}
2318 "conf-glib-2" {build}
2419 "conf-gtk3" {build}
20+ "dune-configurator" {build}
21+ "sexplib0" {build}
22+ "ctypes"
23+ "ctypes-foreign"
2524 "ounit2" {with-test}
25+ "stdio" {with-test}
2626 "odoc" {with-doc}
2727]
2828build: [
Original file line number Diff line number Diff line change 11(test
22 (name test)
3- (libraries GObject_introspection ounit2 ctypes ctypes.foreign stdio ))
3+ (libraries GObject_introspection ounit2 ctypes ctypes.foreign))
You can’t perform that action at this time.
0 commit comments