[ocaml-pgocaml] New upstream version 1.5.

Richard W.M. Jones rjones at fedoraproject.org
Mon Jul 2 13:47:13 UTC 2012


commit 1fcc5882b29078a5cc5d9e5ad1731a6af6b6dd89
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Mon Jul 2 14:41:28 2012 +0100

    New upstream version 1.5.
    
    - Upstream site moved to ocamlforge.
    - Patch camlp4 code to use _loc instead of loc.

 .gitignore                           |    1 +
 ocaml-pgocaml.spec                   |   18 ++++++++--
 pgocaml-1.5-use-underscore-loc.patch |   56 ++++++++++++++++++++++++++++++++++
 sources                              |    2 +-
 4 files changed, 72 insertions(+), 5 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index b466f44..30ca56e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
 pgocaml-1.3.tgz
 /pgocaml-1.4.tgz
+/pgocaml-1.5.tgz
diff --git a/ocaml-pgocaml.spec b/ocaml-pgocaml.spec
index 6bcbe0b..45b31d4 100644
--- a/ocaml-pgocaml.spec
+++ b/ocaml-pgocaml.spec
@@ -2,14 +2,14 @@
 %define debug_package %{nil}
 
 Name:           ocaml-pgocaml
-Version:        1.4
-Release:        4%{?dist}
+Version:        1.5
+Release:        1%{?dist}
 Summary:        OCaml library for type-safe access to PostgreSQL databases
 
 Group:          Development/Libraries
 License:        LGPLv2+ with exceptions
-URL:            http://developer.berlios.de/projects/pgocaml/
-Source0:        http://download.berlios.de/pgocaml/pgocaml-%{version}.tgz
+URL:            http://pgocaml.forge.ocamlcore.org/
+Source0:        http://forge.ocamlcore.org/frs/download.php/850/pgocaml-%{version}.tgz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 ExcludeArch:    sparc64 s390 s390x
 
@@ -27,6 +27,10 @@ BuildRequires:  ocaml-camlp4-devel
 %define __find_requires /usr/lib/rpm/ocaml-find-requires.sh -i Asttypes -i Calendar_builder -i Calendar_sig -i Date -i Date_sig -i Fcalendar -i Ftime -i Parsetree -i Period -i Printer -i Time -i Time_sig -i Time_Zone -i Utils -i Version
 %define __find_provides /usr/lib/rpm/ocaml-find-provides.sh
 
+# Patch sent upstream to use _loc instead of loc.
+Patch0:         pgocaml-1.5-use-underscore-loc.patch
+
+
 %description
 PG'OCaml is a type-safe, simple interface to PostgreSQL from OCaml. It
 lets you embed SQL statements directly into OCaml code.
@@ -45,6 +49,7 @@ developing applications that use %{name}.
 
 %prep
 %setup -q -n pgocaml-%{version}
+%patch0 -p1
 
 
 %build
@@ -94,6 +99,11 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Mon Jun 11 2012 Richard W.M. Jones <rjones at redhat.com> - 1.5-1
+- New upstream version 1.5.
+- Upstream site moved to ocamlforge.
+- Patch camlp4 code to use _loc instead of loc.
+
 * Mon Jun 11 2012 Richard W.M. Jones <rjones at redhat.com> - 1.4-4
 - Rebuild for OCaml 4.00.0.
 
diff --git a/pgocaml-1.5-use-underscore-loc.patch b/pgocaml-1.5-use-underscore-loc.patch
new file mode 100644
index 0000000..858a653
--- /dev/null
+++ b/pgocaml-1.5-use-underscore-loc.patch
@@ -0,0 +1,56 @@
+--- pgocaml-1.5.old/pa_pgsql.ml4	2011-03-15 18:34:11.000000000 +0000
++++ pgocaml-1.5/pa_pgsql.ml4	2012-07-02 14:45:25.641063303 +0100
+@@ -121,7 +121,7 @@
+ 
+ let rex = Pcre.regexp "\\$(@?)(\\??)([_a-z][_a-zA-Z0-9']*)"
+ 
+-let pgsql_expand ?(flags = []) loc dbh query =
++let pgsql_expand ?(flags = []) _loc dbh query =
+   (* Get the option module *)
+   let option_module = IFDEF USE_BATTERIES THEN <:expr<BatOption>>
+     ELSE <:expr<Option>> ENDIF in
+@@ -154,7 +154,7 @@
+ 	let socket = String.sub str 23 (String.length str - 23) in
+ 	key := { !key with unix_domain_socket_dir = Some socket }
+     | str ->
+-	Loc.raise loc (
++	Loc.raise _loc (
+ 	  Failure ("Unknown flag: " ^ str)
+ 	)
+   ) flags;
+@@ -185,7 +185,7 @@
+ 	    | "" -> false | "?" -> true | _ -> assert false in
+ 	  `Var (_varname, list, option) :: loop rest
+       | _ ->
+-	  Loc.raise loc (
++	  Loc.raise _loc (
+ 	    Failure "Pcre.full_split: unexpected value returned"
+ 	  )
+     in
+@@ -220,7 +220,7 @@
+       PGOCaml.prepare my_dbh ~query ();
+       PGOCaml.describe_statement my_dbh (), varmap
+     with
+-      exn -> Loc.raise loc exn in
++      exn -> Loc.raise _loc exn in
+ 
+   (* If the PGSQL(dbh) "execute" flag was used, we will actually
+    * execute the statement now.  Normally this would never be used, but
+@@ -233,7 +233,7 @@
+    * has gone wrong in the substitution above.
+    *)
+   if List.length varmap <> List.length params then
+-    Loc.raise loc (
++    Loc.raise _loc (
+       Failure ("Mismatch in number of parameters found by database. " ^
+ 	       "Most likely your statement contains bare $, $number, etc.")
+     );
+@@ -441,7 +441,7 @@
+ 	  match List.rev extras with
+ 	  | [] -> assert false
+ 	  | query :: flags -> query, flags in
+-	pgsql_expand ~flags loc dbh (Camlp4.Struct.Token.Eval.string query)
++	pgsql_expand ~flags _loc dbh (Camlp4.Struct.Token.Eval.string query)
+     ]
+   ];
+ END
diff --git a/sources b/sources
index 15cebb5..ada4a25 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-9132620652796f03b35aa4b86df58c09  pgocaml-1.4.tgz
+2b955d53b8823b12caeb19c5e1ffdb7c  pgocaml-1.5.tgz


More information about the scm-commits mailing list