Skip to content

Commit fd9c672

Browse files
committed
Preparing GitHub transition
1 parent 48fed05 commit fd9c672

File tree

10 files changed

+299
-175
lines changed

10 files changed

+299
-175
lines changed

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
_build
2+
API.docdir
3+
*.bak
4+
.*.swp
5+
setup.data
6+
setup.log
7+
*.byte
8+
*.native

.hgignore

Lines changed: 0 additions & 5 deletions
This file was deleted.

AUTHORS.txt

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
(* OASIS_START *)
2-
(* DO NOT EDIT (digest: 39a7158c5796d2c7f25e8d398114975e) *)
3-
Authors of postgresql-ocaml
4-
Alain Frisch <alain.frisch@lexifi.com>
5-
Markus Mottl <markus.mottl@gmail.com>
6-
7-
Current maintainers of postgresql-ocaml
8-
Markus Mottl <markus.mottl@gmail.com>
9-
Alain Frisch <alain.frisch@lexifi.com>
2+
(* DO NOT EDIT (digest: 32172db7f4f788fae688e747cfda1b0e) *)
3+
4+
Authors of postgresql-ocaml:
5+
6+
* Alain Frisch <alain.frisch@lexifi.com>
7+
* Markus Mottl <markus.mottl@gmail.com>
8+
9+
Current maintainers of postgresql-ocaml:
10+
11+
* Markus Mottl <markus.mottl@gmail.com>
12+
* Alain Frisch <alain.frisch@lexifi.com>
13+
1014
(* OASIS_STOP *)

INSTALL.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
(* OASIS_START *)
2-
(* DO NOT EDIT (digest: 851a53835eb2a813e6aeb1a50279e0d5) *)
2+
(* DO NOT EDIT (digest: c9cde8d1d7a6bc1ed6236ec912d83768) *)
3+
34
This is the INSTALL file for the postgresql-ocaml distribution.
45

56
This package uses OASIS to generate its build system. See section OASIS for
@@ -9,6 +10,7 @@ Dependencies
910
============
1011

1112
In order to compile this package, you will need:
13+
1214
* ocaml (>= 3.12) for all, doc API
1315
* findlib (>= 1.3.1)
1416
* lablgtk2 for executable prompt_gtk

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# OASIS_START
2-
# DO NOT EDIT (digest: 7b2408909643717852b95f994b273fee)
2+
# DO NOT EDIT (digest: a3c674b4239234cbbe53afe090018954)
33

44
SETUP = ocaml setup.ml
55

@@ -33,6 +33,9 @@ distclean:
3333
setup.data:
3434
$(SETUP) -configure $(CONFIGUREFLAGS)
3535

36+
configure:
37+
$(SETUP) -configure $(CONFIGUREFLAGS)
38+
3639
.PHONY: build doc test all install uninstall reinstall clean distclean configure
3740

3841
# OASIS_STOP

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Usage
1717

1818
The OCaml-API in file `lib/postgresql.mli` is well-documented and can be
1919
built as HTML with `make doc`. The API-documentation can also be found
20-
[online](http://mmottl.bitbucket.org/projects/postgresql-ocaml/api/).
20+
[online](http://mmottl.github.io/postgresql-ocaml/api).
2121

2222
More detailed information on how to interact with PostgreSQL is available
2323
in the [PostgreSQL-documentation](http://www.postgresql.org/docs).
@@ -36,8 +36,8 @@ contact the maintainers:
3636
* Alain Frisch <alain.frisch@lexifi.com>
3737

3838
Up-to-date information should be available at:
39-
<https://bitbucket.org/mmottl/postgresql-ocaml>
39+
<http://mmottl.github.io/postgresql-ocaml>
4040

4141
Enjoy!
4242

43-
Markus Mottl in Rutherford, NJ on July 10, 2012
43+
Markus Mottl on July 10, 2012

_oasis

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
OASISFormat: 0.4
22
Name: postgresql-ocaml
3-
Version: 2.0.6
3+
Version: 2.0.7
44
Synopsis: postgresql-ocaml - bindings to the PostgreSQL library
55
Description: postgresql-ocaml offers library functions for accessing PostgreSQL databases
66
Authors: Alain Frisch <alain.frisch@lexifi.com>,
@@ -13,7 +13,7 @@ LicenseFile: COPYING.txt
1313
License: LGPL-2.1+ with OCaml linking exception
1414
OCamlVersion: >= 3.12
1515
FindlibVersion: >= 1.3.1
16-
Homepage: https://bitbucket.org/mmottl/postgresql-ocaml
16+
Homepage: http://mmottl.github.io/postgresql-ocaml
1717
#Categories:
1818
#FilesAB:
1919

@@ -105,8 +105,8 @@ Document API
105105
XOCamlbuildPath: .
106106
XOCamlbuildLibraries: postgresql
107107

108-
SourceRepository trunk
109-
Type: hg
110-
Location: ssh://hg@bitbucket.org/mmottl/postgresql-ocaml
111-
Browser: https://bitbucket.org/mmottl/postgresql-ocaml
112-
Tag: release-$(pkg_version)
108+
SourceRepository head
109+
Type: Git
110+
Location: https://github.com/mmottl/postgresql-ocaml.git
111+
Browser: https://github.com/mmottl/postgresql-ocaml
112+
Tag: v$(pkg_version)

lib/META

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# OASIS_START
2-
# DO NOT EDIT (digest: b1ebcbe4043a5a4e27c03bddf1379855)
3-
version = "2.0.6"
2+
# DO NOT EDIT (digest: 13e6363a73a7b01be54f10b14d313f88)
3+
version = "2.0.7"
44
description = "postgresql-ocaml - bindings to the PostgreSQL library"
55
requires = "threads bigarray"
66
archive(byte) = "postgresql.cma"

myocamlbuild.ml

Lines changed: 40 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(* OASIS_START *)
2-
(* DO NOT EDIT (digest: d0d7a31f5fe589f4d2ca00034335e395) *)
2+
(* DO NOT EDIT (digest: 3e1cc8469630fbc253bc2218e937c7f6) *)
33
module OASISGettext = struct
44
(* # 22 "src/oasis/OASISGettext.ml" *)
55

@@ -39,10 +39,10 @@ module OASISExpr = struct
3939
open OASISGettext
4040

4141

42-
type test = string
42+
type test = string
4343

4444

45-
type flag = string
45+
type flag = string
4646

4747

4848
type t =
@@ -52,10 +52,10 @@ module OASISExpr = struct
5252
| EOr of t * t
5353
| EFlag of flag
5454
| ETest of test * string
55-
5655

5756

58-
type 'a choices = (t * 'a) list
57+
58+
type 'a choices = (t * 'a) list
5959

6060

6161
let eval var_get t =
@@ -259,6 +259,31 @@ module MyOCamlbuildFindlib = struct
259259
Ocamlbuild_pack.Lexers.blank_sep_strings
260260

261261

262+
let exec_from_conf exec =
263+
let exec =
264+
let env_filename = Pathname.basename BaseEnvLight.default_filename in
265+
let env = BaseEnvLight.load ~filename:env_filename ~allow_empty:true () in
266+
try
267+
BaseEnvLight.var_get exec env
268+
with Not_found ->
269+
Printf.eprintf "W: Cannot get variable %s\n" exec;
270+
exec
271+
in
272+
let fix_win32 str =
273+
if Sys.os_type = "Win32" then begin
274+
let buff = Buffer.create (String.length str) in
275+
(* Adapt for windowsi, ocamlbuild + win32 has a hard time to handle '\\'.
276+
*)
277+
String.iter
278+
(fun c -> Buffer.add_char buff (if c = '\\' then '/' else c))
279+
str;
280+
Buffer.contents buff
281+
end else begin
282+
str
283+
end
284+
in
285+
fix_win32 exec
286+
262287
let split s ch =
263288
let buf = Buffer.create 13 in
264289
let x = ref [] in
@@ -286,17 +311,7 @@ module MyOCamlbuildFindlib = struct
286311
with Not_found -> s
287312

288313
(* ocamlfind command *)
289-
let ocamlfind x =
290-
let ocamlfind_prog =
291-
let env_filename = Pathname.basename BaseEnvLight.default_filename in
292-
let env = BaseEnvLight.load ~filename:env_filename ~allow_empty:true () in
293-
try
294-
BaseEnvLight.var_get "ocamlfind" env
295-
with Not_found ->
296-
Printf.eprintf "W: Cannot get variable ocamlfind";
297-
"ocamlfind"
298-
in
299-
S[Sh ocamlfind_prog; x]
314+
let ocamlfind x = S[Sh (exec_from_conf "ocamlfind"); x]
300315

301316
(* This lists all supported packages. *)
302317
let find_packages () =
@@ -325,7 +340,7 @@ module MyOCamlbuildFindlib = struct
325340

326341
let dispatch =
327342
function
328-
| Before_options ->
343+
| After_options ->
329344
(* By using Before_options one let command line options have an higher
330345
* priority on the contrary using After_options will guarantee to have
331346
* the higher priority override default commands by ocamlfind ones *)
@@ -415,10 +430,10 @@ module MyOCamlbuildBase = struct
415430
module OC = Ocamlbuild_pack.Ocaml_compiler
416431

417432

418-
type dir = string
419-
type file = string
420-
type name = string
421-
type tag = string
433+
type dir = string
434+
type file = string
435+
type name = string
436+
type tag = string
422437

423438

424439
(* # 62 "src/plugins/ocamlbuild/MyOCamlbuildBase.ml" *)
@@ -433,7 +448,7 @@ module MyOCamlbuildBase = struct
433448
* directory.
434449
*)
435450
includes: (dir * dir list) list;
436-
}
451+
}
437452

438453

439454
let env_filename =
@@ -476,7 +491,7 @@ module MyOCamlbuildBase = struct
476491
try
477492
opt := no_trailing_dot (BaseEnvLight.var_get var env)
478493
with Not_found ->
479-
Printf.eprintf "W: Cannot get variable %s" var)
494+
Printf.eprintf "W: Cannot get variable %s\n" var)
480495
[
481496
Options.ext_obj, "ext_obj";
482497
Options.ext_lib, "ext_lib";
@@ -576,7 +591,7 @@ module MyOCamlbuildBase = struct
576591
end
577592

578593

579-
# 579 "myocamlbuild.ml"
594+
# 594 "myocamlbuild.ml"
580595
open Ocamlbuild_plugin;;
581596
let package_default =
582597
{
@@ -634,7 +649,7 @@ let package_default =
634649

635650
let dispatch_default = MyOCamlbuildBase.dispatch_default package_default;;
636651

637-
# 638 "myocamlbuild.ml"
652+
# 653 "myocamlbuild.ml"
638653
(* OASIS_STOP *)
639654

640655
let () =

0 commit comments

Comments
 (0)