summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Puydt <jpuydt@debian.org>2023-07-06 10:53:36 +0200
committerJulien Puydt <jpuydt@debian.org>2023-07-06 10:53:36 +0200
commit39c3834a1f9e266d5087728527224318f8d39df1 (patch)
tree400681f5410dfef7fd980360b4b4f1ccf2a2e370
Import ocaml-visitors_20210608-3.debian.tar.xz
[dgit import tarball ocaml-visitors 20210608-3 ocaml-visitors_20210608-3.debian.tar.xz]
-rw-r--r--changelog146
-rw-r--r--control46
-rw-r--r--copyright57
-rw-r--r--gbp.conf2
-rw-r--r--libppx-visitors-ocaml-doc.doc-base8
-rw-r--r--libppx-visitors-ocaml-doc.docs1
-rw-r--r--patches/series0
-rwxr-xr-xrules28
-rw-r--r--source/format1
-rw-r--r--tests/control2
-rwxr-xr-xtests/weight22
-rw-r--r--tests/weight.ml27
-rw-r--r--watch4
13 files changed, 344 insertions, 0 deletions
diff --git a/changelog b/changelog
new file mode 100644
index 0000000..db45044
--- /dev/null
+++ b/changelog
@@ -0,0 +1,146 @@
+ocaml-visitors (20210608-3) unstable; urgency=medium
+
+ * Fix installation directory.
+
+ -- Julien Puydt <jpuydt@debian.org> Thu, 06 Jul 2023 10:53:36 +0200
+
+ocaml-visitors (20210608-2) unstable; urgency=medium
+
+ * Team upload.
+ * Bump standards-version to 4.6.2.
+ * Fix compilation with recent dune.
+
+ -- Julien Puydt <jpuydt@debian.org> Tue, 04 Jul 2023 09:13:41 +0200
+
+ocaml-visitors (20210608-1) unstable; urgency=medium
+
+ * Team upload
+ * New upstream release
+
+ -- Stéphane Glondu <glondu@debian.org> Fri, 21 Jan 2022 10:47:07 +0100
+
+ocaml-visitors (20210127-1) unstable; urgency=medium
+
+ * Team upload
+ * New upstream release
+ * Bump Standards-Version to 4.6.0
+
+ -- Stéphane Glondu <glondu@debian.org> Tue, 23 Nov 2021 09:59:04 +0100
+
+ocaml-visitors (20200210-3) unstable; urgency=medium
+
+ * Team upload
+ * Call dune build with -p to avoid warnings-as-erros
+
+ -- Stéphane Glondu <glondu@debian.org> Thu, 15 Oct 2020 07:31:03 +0200
+
+ocaml-visitors (20200210-2) unstable; urgency=medium
+
+ * Team upload
+ * Bump debhelper compat level to 13
+ * Add Rules-Requires-Root: no
+ * libppx-visitors-ocaml-doc: add Multi-Arch: foreign
+ * debian/rules: include ocamlvars.mk to improve reproducibility
+
+ -- Stéphane Glondu <glondu@debian.org> Sun, 26 Jul 2020 08:31:28 +0200
+
+ocaml-visitors (20200210-1) unstable; urgency=medium
+
+ * New upstream release
+ * Build-dependencies:
+ - bump version of ocaml-nox
+ - drop ocamlbuild and ocamlfind
+ - add dune
+ - add libppx-tools-ocaml-dev
+ - bump version of libppx-deriving-ocaml-dev
+ - add libresult-ocaml-dev
+ * debian/rules: use dune to build and install
+ * installation: update filename of the manual
+ * override dh_missing to use the --fail-missing option
+ * Standards-version 4.5.0 (no change)
+ * Fix addresses in Vcs-{Git,Browser}
+ * As-installed test: be more verbose
+
+ -- Ralf Treinen <treinen@debian.org> Tue, 11 Feb 2020 20:54:22 +0100
+
+ocaml-visitors (20190711-2) unstable; urgency=medium
+
+ * Team upload
+ * Fix overrides in debian/rules
+
+ -- Stéphane Glondu <glondu@debian.org> Thu, 12 Sep 2019 13:22:35 +0200
+
+ocaml-visitors (20190711-1) unstable; urgency=medium
+
+ * New upstream version.
+ * Standards-Version 4.4.0 (no change)
+
+ -- Ralf Treinen <treinen@debian.org> Wed, 17 Jul 2019 22:52:52 +0200
+
+ocaml-visitors (20180513-1) unstable; urgency=medium
+
+ * New upstream version. This version allows projects using the -dev
+ package to build under dune.
+ * Build-depend on debhelper-compat (=12)
+
+ -- Ralf Treinen <treinen@debian.org> Mon, 18 Feb 2019 20:38:44 +0100
+
+ocaml-visitors (20180306-4) unstable; urgency=medium
+
+ * Standards-Version 4.3.0 (no change)
+ * Debhelper compatibility level 12 (no change)
+ * -dev package Suggests ocaml-findlib since package has a META file
+ * Remove trailing white space in debian/{changelog,rules,control}
+
+ -- Ralf Treinen <treinen@debian.org> Tue, 08 Jan 2019 21:26:16 +0100
+
+ocaml-visitors (20180306-3) unstable; urgency=medium
+
+ * autopkgtest: depends on ocamlbuild
+ * libppx-visitors-ocaml-dev: suggests -doc package.
+
+ -- Ralf Treinen <treinen@debian.org> Wed, 11 Jul 2018 07:59:45 +0200
+
+ocaml-visitors (20180306-2) unstable; urgency=medium
+
+ * Vcs-{Browser,Git}: update to salsa.
+ * Standards-Version 4.1.5 (no change)
+
+ -- Ralf Treinen <treinen@debian.org> Mon, 09 Jul 2018 21:07:17 +0200
+
+ocaml-visitors (20180306-1) unstable; urgency=medium
+
+ * New upstream version.
+ - dropped patch ocaml-4.05 since issue is solved upstream.
+ * Standards-Version 4.1.3:
+ - d/copyright: use https in format specifier
+ * debhelper compatibility level 11:
+ - fixed file location in libppx-visitors-ocaml-doc.doc-base since
+ dh_installdocs now installs into the /usr/share/doc of the main
+ package.
+ * Add minimal version of build-dependency libppx-deriving-ocaml-dev.
+
+ -- Ralf Treinen <treinen@debian.org> Wed, 21 Mar 2018 20:43:06 +0100
+
+ocaml-visitors (20170725-2) unstable; urgency=medium
+
+ * Patch ocaml-4.05: migrate to ocaml 4.05, patch picked from upstream git
+ (closes: #880063)
+ * Standards-Version 4.1.1:
+ - replace Priority extra by optional.
+
+ -- Ralf Treinen <treinen@debian.org> Mon, 30 Oct 2017 20:22:58 +0100
+
+ocaml-visitors (20170725-1) unstable; urgency=medium
+
+ * New upstream release. This release fixes compilation on bytecode
+ architectures (closes: #869207)
+ * Added build-dependency on ocamlbuild.
+
+ -- Ralf Treinen <treinen@debian.org> Fri, 28 Jul 2017 22:32:00 +0200
+
+ocaml-visitors (20170404-1) unstable; urgency=medium
+
+ * Initial upload (closes: #862775)
+
+ -- Ralf Treinen <treinen@debian.org> Thu, 06 Jul 2017 12:52:24 +0200
diff --git a/control b/control
new file mode 100644
index 0000000..36a2d78
--- /dev/null
+++ b/control
@@ -0,0 +1,46 @@
+Source: ocaml-visitors
+Section: ocaml
+Priority: optional
+Maintainer: Debian OCaml Maintainers <debian-ocaml-maint@lists.debian.org>
+Uploaders: Ralf Treinen <treinen@debian.org>,
+Build-Depends:
+ debhelper-compat (= 13),
+ dh-ocaml,
+ ocaml,
+ libppxlib-ocaml-dev (>= 0.22.0),
+ libppx-deriving-ocaml-dev (>= 5.0),
+ ocaml-dune (>= 2.0)
+Build-Depends-Indep:
+ texlive-latex-base,
+ latexmk,
+ lmodern,
+ texlive-fonts-recommended,
+ texlive-latex-extra,
+ ocp-indent
+Standards-Version: 4.6.2
+Rules-Requires-Root: no
+Homepage: https://gitlab.inria.fr/fpottier/visitors
+Vcs-Browser: https://salsa.debian.org/ocaml-team/ocaml-visitors
+Vcs-Git: https://salsa.debian.org/ocaml-team/ocaml-visitors.git
+
+Package: libppx-visitors-ocaml-dev
+Architecture: any
+Depends: ${misc:Depends}, ${ocaml:Depends}, ${shlibs:Depends}
+Provides: ${ocaml:Provides}
+Suggests: libppx-visitors-ocaml-doc, ocaml-findlib
+Description: OCaml syntax extension for object-oriented visitors
+ Visitors is a syntax extension for the OCaml programming language. It
+ allows you to annotate your type definitions, such that a visitor class
+ will be automatically generated. This visitor class contains methods
+ for the traversal of your data structure, like iter, map, fold, etc. It
+ is then easy to override these methods for your needs. This is very
+ convenient when programming with complex algebraic data structures.
+
+Package: libppx-visitors-ocaml-doc
+Section: doc
+Architecture: all
+Multi-Arch: foreign
+Depends: ${misc:Depends}
+Description: Documentation of the visitors syntax extension for OCaml
+ This package contains the documentation of the visitors syntax extension
+ for the OCaml programming language.
diff --git a/copyright b/copyright
new file mode 100644
index 0000000..fa1ca82
--- /dev/null
+++ b/copyright
@@ -0,0 +1,57 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: visitors
+Upstream-Contact: François Pottier <Francois.Pottier@inria.fr>
+Source: https://gitlab.inria.fr/fpottier/visitors.git
+
+Files: *
+Copyright: © 2016, 2017 INRIA
+License: LGPL-2.1
+Comment:
+ the copyright holder has been confirmed in a personal mail by the author.
+
+Files: debian/*
+Copyright: © 2017 Ralf Treinen <treinen@debian.org>
+License: LGPL-2.1
+
+Files: test/cil_types.ml test/cil_types.ml.orig test/cil_types_polymorphic.ml
+Copyright: (C) 2001-2003
+ George C. Necula <necula@cs.berkeley.edu>
+ Scott McPeak <smcpeak@cs.berkeley.edu>
+ Wes Weimer <weimer@cs.berkeley.edu>
+ Ben Liblit <liblit@cs.berkeley.edu>
+License: BSD-3-clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ .
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ .
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ .
+ 3. The names of the contributors may not be used to endorse or
+ promote products derived from this software without specific prior
+ written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+
+License: LGPL-2.1
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License version 2.1 as published by the Free Software Foundation.
+ .
+ On Debian systems, the complete text of the latest GNU Lesser General
+ Public License can be found in `/usr/share/common-licenses/LGPL-2.1'.
diff --git a/gbp.conf b/gbp.conf
new file mode 100644
index 0000000..cec628c
--- /dev/null
+++ b/gbp.conf
@@ -0,0 +1,2 @@
+[DEFAULT]
+pristine-tar = True
diff --git a/libppx-visitors-ocaml-doc.doc-base b/libppx-visitors-ocaml-doc.doc-base
new file mode 100644
index 0000000..1931a08
--- /dev/null
+++ b/libppx-visitors-ocaml-doc.doc-base
@@ -0,0 +1,8 @@
+Document: visitors-documentation
+Title: Visitors
+Author: François Pottier
+Abstract: This document describes how to use the visitors syntax extension for OCaml
+Section: Programming/OCaml
+
+Format: PDF
+Files: /usr/share/doc/libppx-visitors-ocaml-dev/manual.pdf.gz
diff --git a/libppx-visitors-ocaml-doc.docs b/libppx-visitors-ocaml-doc.docs
new file mode 100644
index 0000000..56a14e1
--- /dev/null
+++ b/libppx-visitors-ocaml-doc.docs
@@ -0,0 +1 @@
+doc/manual.pdf
diff --git a/patches/series b/patches/series
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/patches/series
diff --git a/rules b/rules
new file mode 100755
index 0000000..330b78b
--- /dev/null
+++ b/rules
@@ -0,0 +1,28 @@
+#!/usr/bin/make -f
+
+include /usr/share/ocaml/ocamlvars.mk
+
+DESTDIR = $(CURDIR)/debian/libppx-visitors-ocaml-dev/
+
+%:
+ dh $@ --with ocaml
+
+override_dh_auto_build-arch:
+ dune build -p visitors,visitors.runtime,visitors.ppx @install
+
+override_dh_auto_build-indep:
+ cd doc && $(MAKE) SHELL=/bin/bash
+
+override_dh_auto_install:
+ # do nothing
+
+override_dh_install-arch:
+ dune install --destdir=$(DESTDIR) --prefix=/usr --libdir=$(OCAML_STDLIB_DIR)
+ # all useful docs are directly installed into the -doc package
+ rm -r $(DESTDIR)/usr/doc
+
+override_dh_install-indep:
+ dh_installdocs -i
+
+override_dh_auto_test:
+ # do nothing
diff --git a/source/format b/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/tests/control b/tests/control
new file mode 100644
index 0000000..dceeccc
--- /dev/null
+++ b/tests/control
@@ -0,0 +1,2 @@
+Tests: weight
+Depends: @, ocaml-nox, libfindlib-ocaml, ocamlbuild
diff --git a/tests/weight b/tests/weight
new file mode 100755
index 0000000..b5b614b
--- /dev/null
+++ b/tests/weight
@@ -0,0 +1,22 @@
+#!/bin/sh -e
+
+this=weight
+indir=debian/tests
+outdir=${ADT_ARTIFACTS:-/tmp}/${this}
+mkdir -p ${outdir}
+
+ppx='visitors.ppx,visitors.runtime'
+cp ${indir}/${this}.ml ${outdir}
+cd ${outdir}
+echo "* Compile to bytecode."
+ocamlbuild -use-ocamlfind -pkgs ${ppx} weight.byte
+echo "* Run bytecode"
+[ $(./weight.byte) -eq '16' ]
+
+if [ -x /usr/bin/ocamlopt ]
+then
+ echo "* Compile to native code"
+ ocamlbuild -use-ocamlfind -pkgs ${ppx} weight.native;
+ echo "* Run native code"
+ [ $(./weight.native) -eq '16' ]
+fi
diff --git a/tests/weight.ml b/tests/weight.ml
new file mode 100644
index 0000000..33eb9b1
--- /dev/null
+++ b/tests/weight.ml
@@ -0,0 +1,27 @@
+type expr =
+ | EConst of int
+ | EAdd of expr * expr
+ [@@deriving visitors { variety = "iter" }]
+
+let weight (e : expr) : int =
+(* return the weight of an expr, where the weight of constants is its *)
+(* value, and additions have weight 5. *)
+ let v = object
+ val mutable weight = 0
+ method weight = weight
+ inherit [_] iter as super
+ method! visit_EAdd env e0 e1 =
+ weight <- weight + 5;
+ super#visit_EAdd env e0 e1
+ method! visit_EConst env i =
+ weight <- weight + i;
+ super#visit_EConst env i
+ end in
+ v#visit_expr () e;
+ v#weight
+;;
+
+let c = EConst 2 in
+ let e = EAdd(c,EAdd(c,c)) in
+ print_int (weight e)
+;;
diff --git a/watch b/watch
new file mode 100644
index 0000000..581a47b
--- /dev/null
+++ b/watch
@@ -0,0 +1,4 @@
+version=4
+opts="mode=git, pgpmode=none" \
+ https://gitlab.inria.fr/fpottier/visitors.git \
+ refs/tags/([\d]+)