1 ## 20_camlp5.dpatch by Mike Furr <mfurr@debian.org>
3 ## All lines beginning with `## DP:' are a description of the patch.
4 ## DP: Use camlp5 instead of camlp4.
7 diff -urNad otags-3.09.3~/Makefile otags-3.09.3/Makefile
8 --- otags-3.09.3~/Makefile 2007-09-11 16:10:49.177667219 -0400
9 +++ otags-3.09.3/Makefile 2007-09-11 16:15:48.758821205 -0400
11 # since 3.09.3 we don't need any source tree
13 tags.cmxa pr_emacs_tags.cmxa
14 - ${CAMLOPT} -linkall -o $@ -I ${CAMLP4DIR} odyl.cmxa camlp4.cmxa \
15 + ${CAMLOPT} -linkall -o $@ -I ${CAMLP4DIR} odyl.cmxa camlp5.cmxa \
20 tags.cmxa pr_vi_tags.cmxa
21 - ${CAMLOPT} -linkall -o $@ -I ${CAMLP4DIR} odyl.cmxa camlp4.cmxa \
22 + ${CAMLOPT} -linkall -o $@ -I ${CAMLP4DIR} odyl.cmxa camlp5.cmxa \
26 camlp4o_pr_emacs_ext: tags.cmxa pr_emacs_tags.cmxa
27 - ${CAMLOPT} -linkall -o $@ -I ${CAMLP4DIR} odyl.cmxa camlp4.cmxa \
28 + ${CAMLOPT} -linkall -o $@ -I ${CAMLP4DIR} odyl.cmxa camlp5.cmxa \
29 pa_o.cmx pa_op.cmx $+ \
32 camlp4o_pr_vi_ext: tags.cmxa pr_vi_tags.cmxa
33 - ${CAMLOPT} -linkall -o $@ -I ${CAMLP4DIR} odyl.cmxa camlp4.cmxa \
34 + ${CAMLOPT} -linkall -o $@ -I ${CAMLP4DIR} odyl.cmxa camlp5.cmxa \
35 pa_o.cmx pa_op.cmx $+ \
38 diff -urNad otags-3.09.3~/Makefile.here.tpl otags-3.09.3/Makefile.here.tpl
39 --- otags-3.09.3~/Makefile.here.tpl 2007-03-15 18:40:43.000000000 -0400
40 +++ otags-3.09.3/Makefile.here.tpl 2007-09-11 16:15:15.322674462 -0400
44 # This is a -*-Makefile-*-
45 # $Id: Makefile.here.tpl,v 1.12 2007-03-15 22:40:43 tews Exp $
53 CAMLP4DIR=${shell ${CAMLP4} -where}
56 diff -urNad otags-3.09.3~/configure otags-3.09.3/configure
57 --- otags-3.09.3~/configure 2007-09-11 16:10:31.000000000 -0400
58 +++ otags-3.09.3/configure 2007-09-11 16:17:52.666188170 -0400
63 -libdir=$root/lib/ocaml/camlp4
64 +libdir=$root/lib/ocaml/camlp5
65 #libdir=`camlp4 -where`
67 #splaydir=$root/lib/ocaml
70 # check ocamlc version
71 if [ $versioncheck = 1 ] ; then
72 - if [ "$ocv" \< "3.09" -o "$ocv" \> "3.09.99" ] ; then
73 + if [ "$ocv" \< "3.09" -o "$ocv" \> "3.11.99" ] ; then
74 echo ocaml version $ocv found. Need 3.09.x.
77 diff -urNad otags-3.09.3~/editor.ml otags-3.09.3/editor.ml
78 --- otags-3.09.3~/editor.ml 2007-03-15 18:40:43.000000000 -0400
79 +++ otags-3.09.3/editor.ml 2007-09-11 16:19:03.987033364 -0400
81 (* Cuihtlauac Alvarado, France Telecon, Recherche & Developement *)
82 (* Jean-François Monin, Université Joseph Fourier - VERIMAG *)
84 -(* ocamlc options: !-I `camlp4 -where`!*)
85 +(* ocamlc options: !-I `camlp5 -where`!*)
87 (* $Id: editor.ml,v 1.3 2007-03-15 22:40:43 tews Exp $ *)
89 diff -urNad otags-3.09.3~/mk_conf otags-3.09.3/mk_conf
90 --- otags-3.09.3~/mk_conf 2007-03-15 18:40:43.000000000 -0400
91 +++ otags-3.09.3/mk_conf 2007-09-11 16:20:48.864040187 -0400
93 echo "let editor = ref Emacs"
94 echo "let output = ref (Some \"TAGS\")"
95 echo "let camlp4 = ref (None : string option)"
96 -echo "let camlp4_default = \"camlp4o\""
97 +echo "let camlp4_default = \"camlp5o\""
98 echo "let quotations = ref false"
99 echo "let mli_tags = ref true"
101 diff -urNad otags-3.09.3~/pr.ml otags-3.09.3/pr.ml
102 --- otags-3.09.3~/pr.ml 2007-03-15 18:40:43.000000000 -0400
103 +++ otags-3.09.3/pr.ml 2007-09-11 16:32:04.927885471 -0400
106 (* $Id: pr.ml,v 1.16 2007-03-15 22:40:43 tews Exp $ *)
108 -(* ocamlc options: !-pp "camlp4o q_MLast.cmo" -I `camlp4 -where`!*)
109 -(* ocamldep options: !-pp "camlp4o q_MLast.cmo"!*)
110 +(* ocamlc options: !-pp "camlp5o q_MLast.cmo" -I `camlp5 -where`!*)
111 +(* ocamldep options: !-pp "camlp5o q_MLast.cmo"!*)
113 module type Tags_param = sig
114 val add : string -> int * int -> unit
118 (* TODO: remove this crap *)
119 - let kludge (a, b) = a.Lexing.pos_cnum, b.Lexing.pos_cnum
120 + (*let kludge (a, b) = a.Lexing.pos_cnum, b.Lexing.pos_cnum*)
121 + let kludge loc = (Stdpp.first_pos loc), (Stdpp.last_pos loc)
123 let rec pe_patt ast =
124 let loc = kludge (MLast.loc_of_patt ast) in
126 | <:str_item< module type $i$ = $mt$ >>
127 -> T.add i loc; pe_module_type_expr mt
128 | <:str_item< type $list:ssltl$ >> ->
129 - List.iter (fun ((loc,s),_,c,_) -> T.add s (kludge loc); pe_ctyp c) ssltl
130 + (*List.iter (fun ((loc,s),_,c,_) -> T.add s (kludge loc); pe_ctyp c) ssltl*)
131 + List.iter (fun td ->
132 + let loc,s = td.MLast.tdNam in
133 + T.add s (kludge loc);
134 + pe_ctyp td.MLast.tdDef
137 | <:str_item< value $opt:rf$ $list:pel$ >> -> List.iter (fun (p, _) -> pe_patt p) pel
138 | <:str_item< class $list:cd$ >> ->
139 List.iter (etag_class_info) cd
141 -> T.add i loc; pe_module_type_expr mt
142 | <:sig_item< open $sl$ >> -> ()
143 | <:sig_item< type $list:ssltl$ >> ->
144 - List.iter (fun ((loc,s),_,c,_) -> T.add s (kludge loc); pe_ctyp c) ssltl
145 + (*List.iter (fun ((loc,s),_,c,_) -> T.add s (kludge loc); pe_ctyp c) ssltl*)
148 + let loc,s = td.MLast.tdNam in
149 + T.add s (kludge loc);
150 + pe_ctyp td.MLast.tdDef
152 | <:sig_item< value $s$ : $t$ >> -> T.add s loc
153 | <:sig_item< class $list:cd$ >> -> List.iter (etag_class_type_info) cd
154 | <:sig_item< class type $list:cd$ >> -> List.iter etag_class_type_info cd
155 diff -urNad otags-3.09.3~/splay.ml otags-3.09.3/splay.ml
156 --- otags-3.09.3~/splay.ml 2007-03-15 18:40:43.000000000 -0400
157 +++ otags-3.09.3/splay.ml 2007-09-11 16:20:26.589277675 -0400
160 (* $Id: splay.ml,v 1.3 2007-03-15 22:40:43 tews Exp $ *)
162 -(* ocamlc options: !-pp camlp4o!*)
163 -(* ocamldep options: !-pp camlp4o!*)
164 +(* ocamlc options: !-pp camlp5o!*)
165 +(* ocamldep options: !-pp camlp5o!*)
167 (* dcell mutable, parcours fermeture éclair *)