rpms/ocaml-cmigrep/devel ocaml-3.11.0-string-index-from.patch, NONE, 1.1 ocaml-cmigrep.spec, 1.6, 1.7

Richard W.M. Jones rjones at fedoraproject.org
Mon Nov 24 10:58:00 UTC 2008


Author: rjones

Update of /cvs/pkgs/rpms/ocaml-cmigrep/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv10993

Modified Files:
	ocaml-cmigrep.spec 
Added Files:
	ocaml-3.11.0-string-index-from.patch 
Log Message:
Apply string-index-from patch from OCaml package.

ocaml-3.11.0-string-index-from.patch:

--- NEW FILE ocaml-3.11.0-string-index-from.patch ---
--- ocaml/stdlib/string.ml	2008/07/22 11:29:00	1.28
+++ ocaml/stdlib/string.ml	2008/11/18 10:29:26	1.29
@@ -11,7 +11,7 @@
 (*                                                                     *)
 (***********************************************************************)
 
-(* $Id: string.ml,v 1.28 2008/07/22 11:29:00 weis Exp $ *)
+(* $Id: string.ml,v 1.29 2008/11/18 10:29:26 doligez Exp $ *)
 
 (* String operations *)
 
@@ -154,7 +154,7 @@ let index s c = index_rec s (length s) 0
 
 let index_from s i c =
   let l = length s in
-  if i < 0 || i >= l then invalid_arg "String.index_from" else
+  if i < 0 || i > l then invalid_arg "String.index_from" else
   index_rec s l i c;;
 
 let rec rindex_rec s i c =
@@ -164,22 +164,18 @@ let rec rindex_rec s i c =
 let rindex s c = rindex_rec s (length s - 1) c;;
 
 let rindex_from s i c =
-  let l = length s in
-  if i < 0 || i >= l then invalid_arg "String.rindex_from" else
+  if i < -1 || i >= length s then invalid_arg "String.rindex_from" else
   rindex_rec s i c;;
 
 let contains_from s i c =
   let l = length s in
-  if i < 0 || i >= l then invalid_arg "String.contains_from" else
+  if i < 0 || i > l then invalid_arg "String.contains_from" else
   try ignore (index_rec s l i c); true with Not_found -> false;;
 
-let contains s c =
-  let l = length s in
-  l <> 0 && contains_from s 0 c;;
+let contains s c = contains_from s 0 c;;
 
 let rcontains_from s i c =
-  let l = length s in
-  if i < 0 || i >= l then invalid_arg "String.rcontains_from" else
+  if i < 0 || i >= length s then invalid_arg "String.rcontains_from" else
   try ignore (rindex_rec s i c); true with Not_found -> false;;
 
 type t = string


Index: ocaml-cmigrep.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ocaml-cmigrep/devel/ocaml-cmigrep.spec,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ocaml-cmigrep.spec	20 Nov 2008 17:25:46 -0000	1.6
+++ ocaml-cmigrep.spec	24 Nov 2008 10:57:30 -0000	1.7
@@ -2,31 +2,33 @@
 %define debug_package %{nil}
 
 %define ocaml_major 3.11
-%define ocaml_minor 0+beta1
+%define ocaml_minor 0
+%define ocaml_extra +beta1
 
 %define _default_patch_fuzz 2
 
 Name:           ocaml-cmigrep
 Version:        1.5
-Release:        6%{?dist}
+Release:        7%{?dist}
 Summary:        Search OCaml compiled interface (cmi) files
 
 Group:          Development/Libraries
 License:        GPLv2+
 URL:            http://homepage.mac.com/letaris/
 Source0:        http://homepage.mac.com/letaris/cmigrep-%{version}.tar.bz2
-Source1:        http://caml.inria.fr/distrib/ocaml-%{ocaml_major}/ocaml-%{ocaml_major}.%{ocaml_minor}.tar.bz2
+Source1:        http://caml.inria.fr/distrib/ocaml-%{ocaml_major}/ocaml-%{ocaml_major}.%{ocaml_minor}%{ocaml_extra}.tar.bz2
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 Patch0:         cmigrep-make-without-godi-debian.patch
 Patch1:         ocaml-3.11.0-rpath.patch
 Patch2:         ocaml-user-cflags.patch
 Patch3:         ocaml-3.11.0-ppc64.patch
+Patch6:         ocaml-3.11.0-string-index-from.patch
 
 # Sent upstream on 2008-11-20.
 Patch10:        ocaml-cmigrep-3.11.0-updated-types.patch
 
-BuildRequires:  ocaml = %{ocaml_major}.%{ocaml_minor}
+BuildRequires:  ocaml(runtime) = %{ocaml_major}.%{ocaml_minor}
 BuildRequires:  ocaml-findlib-devel
 BuildRequires:  ocaml-pcre-devel
 BuildRequires:  ocaml-ocamldoc
@@ -51,12 +53,13 @@
 # however in Debian the only packages which actually use
 # compiler-libs are camlp5 & cmigrep.
 bzcat %{SOURCE1} | tar xf -
-pushd ocaml-%{ocaml_major}.%{ocaml_minor}
+pushd ocaml-%{ocaml_major}.%{ocaml_minor}%{ocaml_extra}
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch6 -p1
 popd
-mv ocaml-%{ocaml_major}.%{ocaml_minor} compiler
+mv ocaml-%{ocaml_major}.%{ocaml_minor}%{ocaml_extra} compiler
 
 %patch10 -p1
 
@@ -102,6 +105,9 @@
 
 
 %changelog
+* Thu Nov 20 2008 Richard W.M. Jones <rjones at redhat.com> - 1.5-7
+- Apply string-index-from patch from OCaml package.
+
 * Thu Nov 20 2008 Richard W.M. Jones <rjones at redhat.com> - 1.5-6
 - Fix for OCaml 3.11.0+beta1.
 




More information about the fedora-extras-commits mailing list