From 84288711f40042cd8c879352de09aac1d15cee5d Mon Sep 17 00:00:00 2001 From: Ralf Treinen Date: Mon, 5 Mar 2018 22:04:35 +0100 Subject: Import ppx-derivers_1.2.orig.tar.gz [dgit import orig ppx-derivers_1.2.orig.tar.gz] --- .gitignore | 3 +++ CHANGES.md | 11 +++++++++++ LICENSE.md | 24 ++++++++++++++++++++++++ Makefile | 23 +++++++++++++++++++++++ README.md | 10 ++++++++++ pkg/pkg.ml | 2 ++ ppx_derivers.opam | 13 +++++++++++++ src/jbuild | 3 +++ src/ppx_derivers.ml | 17 +++++++++++++++++ src/ppx_derivers.mli | 19 +++++++++++++++++++ 10 files changed, 125 insertions(+) create mode 100644 .gitignore create mode 100644 CHANGES.md create mode 100644 LICENSE.md create mode 100644 Makefile create mode 100644 README.md create mode 100644 pkg/pkg.ml create mode 100644 ppx_derivers.opam create mode 100644 src/jbuild create mode 100644 src/ppx_derivers.ml create mode 100644 src/ppx_derivers.mli diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f06221c --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +_build/ +.merlin +*.install diff --git a/CHANGES.md b/CHANGES.md new file mode 100644 index 0000000..e492604 --- /dev/null +++ b/CHANGES.md @@ -0,0 +1,11 @@ +# 1.2 + +- Fix copyright year + +# 1.1 + +- Added a LICENSE.md file + +# 1.0 + +- Initial release diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..ce0100a --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,24 @@ +Copyright (c) 2017, Jeremie Dimino +All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * 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. + * Neither the name of Jeremie Dimino nor the names of his + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR AND 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. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1d69010 --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +INSTALL_ARGS := $(if $(PREFIX),--prefix $(PREFIX),) + +.PHONY: all +all: + jbuilder build @install + +.PHONY: install +install: + jbuilder install $(INSTALL_ARGS) + +.PHONY: uninstall +uninstall: + jbuilder uninstall $(INSTALL_ARGS) + +.PHONY: reinstall +reinstall: + $(MAKE) uninstall + $(MAKE) install + +.PHONY: clean +clean: + rm -rf _build *.install + find . -name .merlin -delete diff --git a/README.md b/README.md new file mode 100644 index 0000000..87aa580 --- /dev/null +++ b/README.md @@ -0,0 +1,10 @@ +Ppx_derivers +------------ + +Ppx_derivers is a tiny package whose sole purpose is to allow +[ppx_deriving](https://github.com/whitequark/ppx_deriving) and +[ppx_type_conv](https://github.com/janestreet/ppx_type_conv) to inter-operate +gracefully when linked as part of the same +[ocaml-migrate-parsetree](https://github.com/let-def/ocaml-migrate-parsetree) +driver. + diff --git a/pkg/pkg.ml b/pkg/pkg.ml new file mode 100644 index 0000000..1a04c2b --- /dev/null +++ b/pkg/pkg.ml @@ -0,0 +1,2 @@ +#use "topfind" +#require "topkg-jbuilder.auto" diff --git a/ppx_derivers.opam b/ppx_derivers.opam new file mode 100644 index 0000000..8ee81ac --- /dev/null +++ b/ppx_derivers.opam @@ -0,0 +1,13 @@ +opam-version: "1.2" +maintainer: "jeremie@dimino.org" +authors: ["Jérémie Dimino"] +license: "BSD3" +homepage: "https://github.com/ocaml-ppx/ppx_derivers" +bug-reports: "https://github.com/ocaml-ppx/ppx_derivers/issues" +dev-repo: "git://github.com/ocaml-ppx/ppx_derivers.git" +build: [ + ["jbuilder" "build" "-p" name "-j" jobs] +] +depends: [ + "jbuilder" {>= "1.0+beta7"} +] diff --git a/src/jbuild b/src/jbuild new file mode 100644 index 0000000..e1dac1d --- /dev/null +++ b/src/jbuild @@ -0,0 +1,3 @@ +(library + ((name ppx_derivers) + (public_name ppx_derivers))) diff --git a/src/ppx_derivers.ml b/src/ppx_derivers.ml new file mode 100644 index 0000000..9c1fac6 --- /dev/null +++ b/src/ppx_derivers.ml @@ -0,0 +1,17 @@ +type deriver = .. + +let all = Hashtbl.create 42 + +let register name deriver = + if Hashtbl.mem all name then + Printf.ksprintf failwith + "Ppx_deriviers.register: %S is already registered" name; + Hashtbl.add all name deriver + +let lookup name = + match Hashtbl.find all name with + | drv -> Some drv + | exception Not_found -> None + +let derivers () = + Hashtbl.fold (fun name drv acc -> (name, drv) :: acc) all [] diff --git a/src/ppx_derivers.mli b/src/ppx_derivers.mli new file mode 100644 index 0000000..e2765c2 --- /dev/null +++ b/src/ppx_derivers.mli @@ -0,0 +1,19 @@ +(** Ppx derivers + + This module holds the various derivers registered by either ppx_deriving or + ppx_type_conv. +*) + +(** Type of a deriver. The concrete constructors are added by + ppx_type_conv/ppx_deriving. *) +type deriver = .. + +(** [register name deriver] registers a new deriver. Raises if [name] is already + registered. *) +val register : string -> deriver -> unit + +(** Lookup a previously registered deriver *) +val lookup : string -> deriver option + +(** [derivers ()] returns all currently registered derivers. *) +val derivers : unit -> (string * deriver) list -- cgit v1.2.3 From 3666035ab23f13c2e6dce25160fa01c0f43f821e Mon Sep 17 00:00:00 2001 From: Ralf Treinen Date: Tue, 10 Jul 2018 19:29:49 +0200 Subject: Import ppx-derivers_1.2-4.debian.tar.xz [dgit import tarball ppx-derivers 1.2-4 ppx-derivers_1.2-4.debian.tar.xz] --- changelog | 27 +++++++++++++++++++++++++++ compat | 1 + control | 30 ++++++++++++++++++++++++++++++ copyright | 38 ++++++++++++++++++++++++++++++++++++++ libppx-derivers-ocaml-dev.docs | 1 + rules | 13 +++++++++++++ source/format | 1 + watch | 3 +++ 8 files changed, 114 insertions(+) create mode 100644 changelog create mode 100644 compat create mode 100644 control create mode 100644 copyright create mode 100644 libppx-derivers-ocaml-dev.docs create mode 100755 rules create mode 100644 source/format create mode 100644 watch diff --git a/changelog b/changelog new file mode 100644 index 0000000..851d980 --- /dev/null +++ b/changelog @@ -0,0 +1,27 @@ +ppx-derivers (1.2-4) unstable; urgency=medium + + * Add build-dependency opam, needed since jbuilder invokes opam-installer + + -- Ralf Treinen Tue, 10 Jul 2018 19:29:49 +0200 + +ppx-derivers (1.2-3) unstable; urgency=medium + + * d/rules: install using "jbuilder install" + * build-dependencies: jbuilder renamed to dune + * add libppx-derivers-ocaml-dev.docs to install README.md + + -- Ralf Treinen Tue, 10 Jul 2018 08:59:24 +0200 + +ppx-derivers (1.2-2) unstable; urgency=medium + + * Update Vcs-* to salsa + * Standards-Version : 4.1.5 (no change) + + -- Ralf Treinen Mon, 09 Jul 2018 23:25:55 +0200 + +ppx-derivers (1.2-1) unstable; urgency=medium + + * Initial package (closes: #878803) + + -- Ralf Treinen Mon, 05 Mar 2018 22:04:35 +0100 + diff --git a/compat b/compat new file mode 100644 index 0000000..b4de394 --- /dev/null +++ b/compat @@ -0,0 +1 @@ +11 diff --git a/control b/control new file mode 100644 index 0000000..9f905bb --- /dev/null +++ b/control @@ -0,0 +1,30 @@ +Source: ppx-derivers +Section: ocaml +Priority: optional +Maintainer: Debian OCaml Maintainers +Uploaders: Ralf Treinen +Build-Depends: + debhelper (>= 11), + dh-ocaml, + ocaml-nox, + dune, + opam +Standards-Version: 4.1.5 +Vcs-Browser: https://salsa.debian.org/ocaml-team/ppx-derivers +Vcs-Git: https://salsa.debian.org/ocaml-team/ppx-derivers.git +Homepage: https://github.com/diml/ppx_derivers + +Package: libppx-derivers-ocaml-dev +Provides: + ${ocaml:Provides} +Architecture: any +Depends: + ${ocaml:Depends}, + ${shlibs:Depends}, + ${misc:Depends} +Description: interoperability of ppx-deriving and ppx-type-conv + This package is useful when programming with ppx syntax extensions in + the OCaml programming language. Its purpose is to allow the ppx_deriving + and ppx_type_conv syntax extensions to interoperate gracefully when linked + as part of the same ocaml-migrate-parsetree driver. + diff --git a/copyright b/copyright new file mode 100644 index 0000000..d7b9c9b --- /dev/null +++ b/copyright @@ -0,0 +1,38 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: ppx_derivers +Upstream-Contact: Jérémie Dimino +Source: https://github.com/ocaml-ppx/ppx_derivers + +Files: * +Copyright: © 2017, Jeremie Dimino +License: BSD-3-clause + +Files: debian/* +Copyright: © 2018 Ralf Treinen +License: BSD-3-clause + +License: BSD-3-clause + All rights reserved. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + . + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * 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. + * Neither the name of Jeremie Dimino nor the names of his + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR AND 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. + \ No newline at end of file diff --git a/libppx-derivers-ocaml-dev.docs b/libppx-derivers-ocaml-dev.docs new file mode 100644 index 0000000..b43bf86 --- /dev/null +++ b/libppx-derivers-ocaml-dev.docs @@ -0,0 +1 @@ +README.md diff --git a/rules b/rules new file mode 100755 index 0000000..72da29a --- /dev/null +++ b/rules @@ -0,0 +1,13 @@ +#!/usr/bin/make -f +PDIR := $(CURDIR)/debian/libppx-derivers-ocaml-dev +LIBDIR := $(PDIR)/usr/lib/ocaml + +%: + dh $@ --with ocaml + +# upstream's install target is for opam +override_dh_auto_install: + mkdir -p $(LIBDIR) + jbuilder install --prefix=$(PDIR) --libdir=$(LIBDIR) + # temporary fix until jbuilder install has a --docdir option + rm -r $(PDIR)/doc 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/watch b/watch new file mode 100644 index 0000000..525e735 --- /dev/null +++ b/watch @@ -0,0 +1,3 @@ +version=4 +opts=filenamemangle=s/.+\/(\d\S+)\.tar\.gz/ppx_derivers-$1\.tar\.gz/ \ + https://github.com/ocaml-ppx/ppx_derivers/tags .*/(\d\S+)\.tar\.gz \ No newline at end of file -- cgit v1.2.3