The following commit has been merged in the master branch:
commit 0d666992ccba0788498636d7d63ac2a8d0b0e582
Author: Stephane Glondu <st...@glondu.net>
Date:   Sat Mar 3 12:32:12 2012 +0100

    Add compatibility with camlp5 strict

diff --git a/debian/patches/0005-Compatibility-with-camlp5-strict.patch 
b/debian/patches/0005-Compatibility-with-camlp5-strict.patch
new file mode 100644
index 0000000..4225813
--- /dev/null
+++ b/debian/patches/0005-Compatibility-with-camlp5-strict.patch
@@ -0,0 +1,63 @@
+From: Stephane Glondu <st...@glondu.net>
+Date: Sat, 3 Mar 2012 12:31:53 +0100
+Subject: Compatibility with camlp5 strict
+
+Signed-off-by: Stephane Glondu <st...@glondu.net>
+---
+ Makefile       |    2 +-
+ pa_ulex.ml.src |   10 ++++++----
+ 2 files changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 86c5e43..283f8bb 100644
+--- a/Makefile
++++ b/Makefile
+@@ -20,7 +20,7 @@ ulexing.cmxa: $(ULEXING)
+       ocamlopt -a -o ulexing.cmxa $(ULEXING)
+ 
+ pa_ulex.cma: $(ULEX)
+-      ocamlc -a -o pa_ulex.cma -pp 'camlp5o pa_extend.cmo q_MLast.cmo' -I 
+camlp5 $(ULEX)
++      ocamlc -a -o pa_ulex.cma -pp 'camlp5o pa_macro.cmo pa_extend.cmo 
q_MLast.cmo' -I +camlp5 $(ULEX)
+ 
+ pa_ulex.ml: pa_ulex.ml.src
+       ocaml mk_pa_ulex.ml
+diff --git a/pa_ulex.ml.src b/pa_ulex.ml.src
+index b8e1cd6..643fcad 100644
+--- a/pa_ulex.ml.src
++++ b/pa_ulex.ml.src
+@@ -135,6 +135,8 @@ let call_state auto state =
+       <:expr< $lid:f$ lexbuf >>
+       
+ 
++let vala_None = IFDEF STRICT THEN Ploc.VaVal None ELSE None END
++
+ let gen_state auto _loc i (part,trans,final) = 
+   let f = Printf.sprintf "__ulex_state_%i" i in
+   let p = partition_name part in
+@@ -142,11 +144,11 @@ let gen_state auto _loc i (part,trans,final) =
+     Array.mapi 
+       (fun i j ->
+        <:patt< $int:string_of_int i$ >>,
+-       None,
++       vala_None,
+        call_state auto j
+       ) trans in
+   let cases = Array.to_list cases in
+-  let cases = cases @ [<:patt< _ >>, None, <:expr< Ulexing.backtrack lexbuf 
>>] in
++  let cases = cases @ [<:patt< _ >>, vala_None, <:expr< Ulexing.backtrack 
lexbuf >>] in
+   let body = 
+     <:expr< match ($lid:p$ (Ulexing.next lexbuf)) 
+     with [ $list:cases$ ] >> in
+@@ -165,9 +167,9 @@ let gen_definition _loc l =
+   let rs = Array.map fst brs in
+   let auto = Ulex.compile rs in
+ 
+-  let cases = Array.mapi (fun i (_,e) -> <:patt< $int:string_of_int i$ >>, 
None, e) brs in
++  let cases = Array.mapi (fun i (_,e) -> <:patt< $int:string_of_int i$ >>, 
vala_None, e) brs in
+   let cases = Array.to_list cases in
+-  let cases = cases @ [<:patt< _ >>, None, <:expr< raise Ulexing.Error >>] in
++  let cases = cases @ [<:patt< _ >>, vala_None, <:expr< raise Ulexing.Error 
>>] in
+   let actions = <:expr< match __ulex_state_0 lexbuf with [ $list:cases$ ] >> 
in
+   let states = Array.mapi (gen_state auto _loc) auto in
+   let states = List.flatten (Array.to_list states) in
+-- 
diff --git a/debian/patches/series b/debian/patches/series
index 39565f2..d27b7d7 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@
 0002-Fix-version-in-META.patch
 0003-Install-with-META-name-ulex08.patch
 0004-Use-camlp5.patch
+0005-Compatibility-with-camlp5-strict.patch

-- 
ulex0.8 packaging

_______________________________________________
Pkg-ocaml-maint-commits mailing list
Pkg-ocaml-maint-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-ocaml-maint-commits

Reply via email to