diff -Nru ulex-1.1/debian/changelog ulex-1.2/debian/changelog --- ulex-1.1/debian/changelog 2020-02-21 07:35:44.000000000 +0000 +++ ulex-1.2/debian/changelog 2020-08-24 02:53:07.000000000 +0000 @@ -1,8 +1,14 @@ -ulex (1.1-4build1) focal; urgency=medium +ulex (1.2-1) unstable; urgency=medium - * No-change rebuild against ocaml-nox-4.08.1 + * Team upload + * New upstream release + * Remove myself from Uploaders + * Update Homepage and debian/watch + * Bump debhelper compat level to 13 and stop using cdbs + * Bump Standards-Version to 4.5.0 + * Add Rules-Requires-Root: no - -- Steve Langasek Fri, 21 Feb 2020 07:35:44 +0000 + -- Stéphane Glondu Mon, 24 Aug 2020 04:53:07 +0200 ulex (1.1-4) unstable; urgency=medium diff -Nru ulex-1.1/debian/compat ulex-1.2/debian/compat --- ulex-1.1/debian/compat 2019-09-12 06:38:35.000000000 +0000 +++ ulex-1.2/debian/compat 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -7 diff -Nru ulex-1.1/debian/control ulex-1.2/debian/control --- ulex-1.1/debian/control 2020-02-21 07:35:44.000000000 +0000 +++ ulex-1.2/debian/control 2020-08-24 02:53:07.000000000 +0000 @@ -1,22 +1,19 @@ Source: ulex Section: ocaml Priority: optional -Maintainer: Ubuntu Developers -XSBC-Original-Maintainer: Debian OCaml Maintainers -Uploaders: Stéphane Glondu +Maintainer: Debian OCaml Maintainers Build-Depends: - debhelper (>= 7.1.0~), - ocaml-nox (>= 3.11), + debhelper-compat (= 13), + ocaml-nox, camlp4, - camlp4-extra, - ocaml-findlib (>= 1.2.4), - dh-ocaml (>= 0.9), + ocaml-findlib, ocamlbuild, - cdbs -Standards-Version: 3.8.4 + dh-ocaml +Standards-Version: 4.5.0 +Rules-Requires-Root: no Vcs-Git: https://salsa.debian.org/ocaml-team/ulex.git Vcs-Browser: https://salsa.debian.org/ocaml-team/ulex -Homepage: http://www.cduce.org/download.html#side +Homepage: https://github.com/whitequark/ulex Package: ocaml-ulex Architecture: any diff -Nru ulex-1.1/debian/patches/0001-Enable-installing-to-a-target-directory-passed-from-.patch ulex-1.2/debian/patches/0001-Enable-installing-to-a-target-directory-passed-from-.patch --- ulex-1.1/debian/patches/0001-Enable-installing-to-a-target-directory-passed-from-.patch 2019-09-12 06:38:35.000000000 +0000 +++ ulex-1.2/debian/patches/0001-Enable-installing-to-a-target-directory-passed-from-.patch 2020-08-24 02:53:07.000000000 +0000 @@ -10,10 +10,10 @@ 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile -index c398c15..4f05503 100644 +index 585fbb4..a50fe1c 100644 --- a/Makefile +++ b/Makefile -@@ -14,8 +14,9 @@ MODS=ulexing utf16 utf8 +@@ -11,8 +11,9 @@ MODS=ulexing utf16 utf8 install: all cd _build && $(MAKE) -f ../Makefile realinstall diff -Nru ulex-1.1/debian/patches/0002-Fix-compilation-with-OCaml-4.08.0.patch ulex-1.2/debian/patches/0002-Fix-compilation-with-OCaml-4.08.0.patch --- ulex-1.1/debian/patches/0002-Fix-compilation-with-OCaml-4.08.0.patch 2019-09-12 06:38:35.000000000 +0000 +++ ulex-1.2/debian/patches/0002-Fix-compilation-with-OCaml-4.08.0.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -From: Stephane Glondu -Date: Thu, 12 Sep 2019 08:34:15 +0200 -Subject: Fix compilation with OCaml 4.08.0 - ---- - ulexing.ml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ulexing.ml b/ulexing.ml -index 95356f3..3143230 100755 ---- a/ulexing.ml -+++ b/ulexing.ml -@@ -189,7 +189,7 @@ let latin1_lexeme_char lexbuf pos = - let latin1_sub_lexeme lexbuf pos len = - let s = String.create len in - for i = 0 to len - 1 do s.[i] <- to_latin1 lexbuf.buf.(lexbuf.start + pos + i) done; -- s -+ Bytes.to_string s - - let latin1_lexeme lexbuf = - latin1_sub_lexeme lexbuf 0 (lexbuf.pos - lexbuf.start) diff -Nru ulex-1.1/debian/patches/series ulex-1.2/debian/patches/series --- ulex-1.1/debian/patches/series 2019-09-12 06:38:35.000000000 +0000 +++ ulex-1.2/debian/patches/series 2020-08-24 02:53:07.000000000 +0000 @@ -1,2 +1 @@ 0001-Enable-installing-to-a-target-directory-passed-from-.patch -0002-Fix-compilation-with-OCaml-4.08.0.patch diff -Nru ulex-1.1/debian/rules ulex-1.2/debian/rules --- ulex-1.1/debian/rules 2019-09-12 06:38:35.000000000 +0000 +++ ulex-1.2/debian/rules 2020-08-24 02:53:07.000000000 +0000 @@ -1,14 +1,20 @@ #!/usr/bin/make -f -include /usr/share/cdbs/1/rules/debhelper.mk -include /usr/share/cdbs/1/class/makefile.mk -include /usr/share/cdbs/1/rules/ocaml.mk + +include /usr/share/ocaml/ocamlvars.mk PKGNAME = ocaml-ulex -OCAML_OCAMLDOC_PACKAGES = $(PKGNAME) -DEB_MAKE_INSTALL_TARGET = install DESTDIR=$(CURDIR)/debian/$(PKGNAME)$(OCAML_STDLIB_DIR) -OCAML_DHOCAML_FLAGS = --runtime-map=ocaml-ulex +%: + dh $@ --with ocaml + +override_dh_auto_build: + dh_auto_build ifeq ($(OCAML_HAVE_OCAMLOPT),yes) -build/$(PKGNAME):: $(MAKE) all.opt endif + +override_dh_auto_install: + $(MAKE) install DESTDIR=$(CURDIR)/debian/$(PKGNAME)$(OCAML_STDLIB_DIR) + +override_dh_ocaml: + dh_ocaml --runtime-map=ocaml-ulex diff -Nru ulex-1.1/debian/watch ulex-1.2/debian/watch --- ulex-1.1/debian/watch 2019-09-12 06:38:35.000000000 +0000 +++ ulex-1.2/debian/watch 2020-08-24 02:53:07.000000000 +0000 @@ -1,8 +1,2 @@ -# See uscan(1) for format - -# Compulsory line, this is a version 3 file version=3 - -http://www.cduce.org/download.html \ - http://www.cduce.org/download/ulex-(.*)\.tar\.gz - +https://github.com/whitequark/ulex/releases .*/archive/v?([0-9.]+)\.tar\.gz diff -Nru ulex-1.1/descr ulex-1.2/descr --- ulex-1.1/descr 1970-01-01 00:00:00.000000000 +0000 +++ ulex-1.2/descr 2017-11-26 13:47:52.000000000 +0000 @@ -0,0 +1 @@ +lexer generator for Unicode and OCaml diff -Nru ulex-1.1/Makefile ulex-1.2/Makefile --- ulex-1.1/Makefile 2008-04-18 12:42:18.000000000 +0000 +++ ulex-1.2/Makefile 2017-11-26 13:47:52.000000000 +0000 @@ -1,6 +1,3 @@ -VERSION=1.1 -# Don't forget to change META file as well - ALL=pa_ulex.cma ulexing.cma OCAMLBUILD=ocamlbuild -byte-plugin @@ -37,19 +34,15 @@ doc: ocamldoc -html ulexing.mli -PACKAGE = ulex-$(VERSION) -DISTRIB = CHANGES LICENSE META README Makefile _tags *.ml *.mli -.PHONY: package -package: clean - rm -Rf $(PACKAGE) - mkdir $(PACKAGE) - cp -R $(DISTRIB) $(PACKAGE)/ - tar czf $(PACKAGE).tar.gz $(PACKAGE) - rm -Rf $(PACKAGE) - -upload: - $(MAKE) package - rsync -avz $(PACKAGE).tar.gz brome.pps.jussieu.fr:/home/web/wwwcduce/public_html/download - $(MAKE) doc -# rsync -avz *.html *.css cduce@di.ens.fr:public_html/ulex - rsync -avz CHANGES *.html *.css brome.pps.jussieu.fr:/home/web/wwwcduce/public_html/ulex +VERSION := $$(opam query --version) +NAME_VERSION := $$(opam query --name-version) +ARCHIVE := $$(opam query --archive) + +release: + git tag -a v$(VERSION) -m "Version $(VERSION)." + git push origin v$(VERSION) + opam publish prepare $(NAME_VERSION) $(ARCHIVE) + cp -t $(NAME_VERSION) descr + grep -Ev '^(name|version):' opam >$(NAME_VERSION)/opam + opam publish submit $(NAME_VERSION) + rm -rf $(NAME_VERSION) diff -Nru ulex-1.1/META ulex-1.2/META --- ulex-1.1/META 2008-04-18 12:42:18.000000000 +0000 +++ ulex-1.2/META 2017-11-26 13:47:52.000000000 +0000 @@ -1,4 +1,4 @@ -version = "1.1" +version = "1.2" requires = "camlp4" description = "Runtime support for ulex" archive(byte) = "ulexing.cma" diff -Nru ulex-1.1/opam ulex-1.2/opam --- ulex-1.1/opam 1970-01-01 00:00:00.000000000 +0000 +++ ulex-1.2/opam 2017-11-26 13:47:52.000000000 +0000 @@ -0,0 +1,15 @@ +opam-version: "1.2" +name: "ulex" +version: "1.2" +maintainer: "whitequark@whitequark.org" +build: [ + [make] + [make "all.opt"] +] +install: [make "install"] +remove: [["ocamlfind" "remove" "ulex"]] +depends: [ + "ocamlfind" + "camlp4" + "ocamlbuild" {build} +] diff -Nru ulex-1.1/pa_ulex.ml ulex-1.2/pa_ulex.ml --- ulex-1.1/pa_ulex.ml 2008-04-18 12:42:18.000000000 +0000 +++ ulex-1.2/pa_ulex.ml 2017-11-26 13:47:52.000000000 +0000 @@ -57,7 +57,7 @@ match (aux max_int [] l : int * 'a list * 'b list) with | _,[], _ -> decision l | min,((_,max,_)::_ as l1), l2 -> - let arr = Array.create (max-min+1) 0 in + let arr = Array.make (max-min+1) 0 in List.iter (fun (a,b,i) -> for j = a to b do arr.(j-min) <- i + 1 done) l1; Lte (min-1, Return (-1), Lte (max, Table (min,arr), decision l2)) @@ -213,6 +213,11 @@ regexp: [ [ r1 = regexp; "|"; r2 = regexp -> Ulex.alt r1 r2 ] | [ r1 = regexp; r2 = regexp -> Ulex.seq r1 r2 ] + | [ r1 = regexp; "#"; r2 = regexp -> + try Ulex.diff r1 r2 + with Not_found -> + failwith + ("pa_ulex (error): operands of # must be bare character sets") ] | [ r = regexp; "*" -> Ulex.rep r | r = regexp; "+" -> Ulex.plus r | r = regexp; "?" -> Ulex.alt Ulex.eps r diff -Nru ulex-1.1/test.ml ulex-1.2/test.ml --- ulex-1.1/test.ml 2008-04-18 12:42:18.000000000 +0000 +++ ulex-1.2/test.ml 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ -let regexp number = [ '0'-'9' ]+ - -let rec token enc = lexer - | "" -> enc := Ulexing.Utf8; token enc lexbuf - | "" -> enc := Ulexing.Latin1; token enc lexbuf - | xml_letter+ -> Printf.sprintf "word(%s)" (Ulexing.utf8_lexeme lexbuf) - | number -> "number" - | eof -> exit 0 - | [1234-1246] -> "bla" - | "(" -> - Ulexing.rollback lexbuf; (* Puts the lexeme back into the buffer *) - (lexer "(" [^ '(']* ")" -> Ulexing.utf8_lexeme lexbuf) lexbuf - (* Note the use of an inline lexer *) - | _ -> "???" - - -let () = - let enc = ref Ulexing.Ascii in - let lexbuf = Ulexing.from_var_enc_string enc "abcéé(abc)(def)ghi" in - try - while true do - let r = token enc lexbuf in - Printf.printf "%s\n" r - done - with - | Ulexing.Error -> - Printf.eprintf - "Lexing error at offset %i\n" (Ulexing.lexeme_end lexbuf) - | Ulexing.InvalidCodepoint i -> - Printf.eprintf - "Invalid code point %i at offset %i\n" i (Ulexing.lexeme_end lexbuf) diff -Nru ulex-1.1/ulexing.ml ulex-1.2/ulexing.ml --- ulex-1.1/ulexing.ml 2008-04-18 12:42:18.000000000 +0000 +++ ulex-1.2/ulexing.ml 2017-11-26 13:47:52.000000000 +0000 @@ -42,7 +42,7 @@ let create f = { empty_lexbuf with refill = f; - buf = Array.create chunk_size 0; + buf = Array.make chunk_size 0; } let from_stream s = @@ -120,7 +120,7 @@ Array.blit lexbuf.buf s lexbuf.buf 0 ls else begin let newlen = (Array.length lexbuf.buf + chunk_size) * 2 in - let newbuf = Array.create newlen 0 in + let newbuf = Array.make newlen 0 in Array.blit lexbuf.buf s newbuf 0 ls; lexbuf.buf <- newbuf end; @@ -187,9 +187,11 @@ to_latin1 (lexeme_char lexbuf pos) let latin1_sub_lexeme lexbuf pos len = - let s = String.create len in - for i = 0 to len - 1 do s.[i] <- to_latin1 lexbuf.buf.(lexbuf.start + pos + i) done; - s + let s = Bytes.create len in + for i = 0 to len - 1 do + Bytes.set s i (to_latin1 lexbuf.buf.(lexbuf.start + pos + i)) + done; + Bytes.to_string s let latin1_lexeme lexbuf = latin1_sub_lexeme lexbuf 0 (lexbuf.pos - lexbuf.start) diff -Nru ulex-1.1/ulex.ml ulex-1.2/ulex.ml --- ulex-1.1/ulex.ml 2008-04-18 12:42:18.000000000 +0000 +++ ulex-1.2/ulex.ml 2017-11-26 13:47:52.000000000 +0000 @@ -22,6 +22,18 @@ n.eps <- [r1 succ; r2 succ]; n +let diff r1 r2 = + let cset r = + match r (new_node ()) with + | { eps = []; trans = [cset, _] } -> cset + | _ -> raise Not_found + in + let c1, c2 = cset r1, cset r2 in + fun succ -> + let n = new_node () in + n.trans <- [Cset.difference c1 c2, succ]; + n + let rep r succ = let n = new_node () in n.eps <- [r n; succ]; diff -Nru ulex-1.1/ulex.mli ulex-1.2/ulex.mli --- ulex-1.1/ulex.mli 2008-04-18 12:42:18.000000000 +0000 +++ ulex-1.2/ulex.mli 2017-11-26 13:47:52.000000000 +0000 @@ -3,6 +3,7 @@ val chars: Cset.t -> regexp val seq: regexp -> regexp -> regexp val alt: regexp -> regexp -> regexp +val diff: regexp -> regexp -> regexp val rep: regexp -> regexp val plus: regexp -> regexp val eps: regexp diff -Nru ulex-1.1/utf8.ml ulex-1.2/utf8.ml --- ulex-1.1/utf8.ml 2008-04-18 12:42:18.000000000 +0000 +++ ulex-1.2/utf8.ml 2017-11-26 13:47:52.000000000 +0000 @@ -89,7 +89,7 @@ let to_int_array s pos bytes = let n = compute_len s pos bytes in - let a = Array.create n 0 in + let a = Array.make n 0 in blit_to_int s pos a 0 n; a @@ -110,7 +110,7 @@ Buffer.add_char b (Char.chr (0x80 lor (p land 0x3f))) ) else if p <= 0xffff then ( - if (p >= 0xd800 & p < 0xe000) then raise MalFormed; + if (p >= 0xd800 && p < 0xe000) then raise MalFormed; Buffer.add_char b (Char.chr (0xe0 lor (p lsr 12))); Buffer.add_char b (Char.chr (0x80 lor ((p lsr 6) land 0x3f))); Buffer.add_char b (Char.chr (0x80 lor (p land 0x3f)))