debian/0000755000000000000000000000000012247424317007174 5ustar debian/cmigrep.docs0000644000000000000000000000000712237723515011472 0ustar README debian/control0000644000000000000000000000210312237724315010573 0ustar Source: cmigrep Section: ocaml Priority: extra Maintainer: Debian OCaml Maintainers Uploaders: Ralf Treinen , Remi Vanicat , Samuel Mimram , Mehdi Dogguy Build-Depends: debhelper (>= 7.0.50~) Build-Depends-Indep: ocaml-nox (>= 4.01), libpcre-ocaml-dev (>= 6.0.1), ocaml-findlib (>= 1.4), libfindlib-ocaml-dev, ocaml-compiler-libs Standards-Version: 3.9.2 Vcs-Git: git://anonscm.debian.org/pkg-ocaml-maint/packages/cmigrep.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-ocaml-maint/packages/cmigrep.git Homepage: http://homepage.mac.com/letaris/ Package: cmigrep Architecture: all Depends: ${misc:Depends}, ocaml-base-nox-${F:OCamlABI}, libpcre-ocaml (>= 6.2.2-1) Conflicts: ocaml-tools (<= 2007.02.04-2) Replaces: ocaml-tools Description: search in OCaml compiled interface files This program allows you to search for items (like for instance types, constructors, or exceptions) in compiled interface files generated by the Objective Caml compiler. debian/README.source0000644000000000000000000000120112237723515011346 0ustar cmigrep Debian source package ============================= Patching upstream sources ------------------------- This package uses quilt to manage all modifications to the upstream source. Changes are stored in the source package as diffs in debian/patches and applied during the build. To get the fully patched source after unpacking the source package, cd to the root level of the source package and run: debian/rules patch Removing a patch is as simple as removing its entry from the debian/patches/series file, and please also remove the patch file itself. -- Ralf Treinen , Fri, 13 Nov 2009 20:10:16 +0100 debian/source/0000755000000000000000000000000012237723515010475 5ustar debian/source/format0000644000000000000000000000001412237723515011703 0ustar 3.0 (quilt) debian/copyright0000644000000000000000000000134412237723515011132 0ustar This package was debianized by Ralf Treinen on Wed, 16 May 2007 11:49:03 +0200. It was downloaded from http://homepage.mac.com/letaris/ Upstream Author: Eric Stokes Copyright: Copyright © 2004 Eric Stokes License: This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published byg the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. On Debian systems you can find a copy of this license in /usr/share/common-licenses/GPL-2. The Debian packaging is © 2007, Ralf Treinen and is licensed under the GPL, see `/usr/share/common-licenses/GPL'. debian/watch0000644000000000000000000000010112237723515010216 0ustar version=3 http://homepage.mac.com/letaris/cmigrep-(.*)\.tar\.bz2 debian/compat0000644000000000000000000000000212237723515010373 0ustar 5 debian/cmigrep.10000644000000000000000000000360212237723515010706 0ustar .TH CMIGREP 1 .SH NAME cmigrep \- search in ocaml compiled interface files .SH SYNOPSIS .B cmigrep .I .RI \ .SH DESCRIPTION This manual page documents briefly the .BR cmigrep command. This manual page was written for the Debian GNU/Linux distribution because the original program does not have a manual page. .B cmigrep allows to search for information in compiled interfaces of OCaml modules. By default, the search applies to the modules described in the \fI.cmi\fR files in the curent directory and in the ocaml standard directory, but this can be changed with the \-I option (see below). The argument .I can be an exact module name, or a shell wildcard. Multiple modules can be specified. Example: "ModA ModB Foo*.Make" means to search ModA, ModB, and any submodule Make of a module that starts with Foo. .SH OPTIONS .SS General Options .TP .B \-I directory Add \fIdirectory\fR to the search path for modules .TP .B -package packages comma separated list of findlib packages to search .TP .B open modules comma separated list of open modules (in order!) .TP .B -help, --help display list of options .SS Search Patterns .TP .B -t regexp print types with matching names .TP .B -r regexp print record field labels with matching names .TP .B -c regexp print constructors with matching names .TP .B -p regexp print polymorphic variants with matching names .TP .B -m regexp print all matching module names in the path .TP .B -e regexp print exceptions with matching constructors .TP .B -v regexp print values with matching names .TP .B -o regexp print all classes with matching names .TP .B -a regexp print all names which match the given expression .SH SEE ALSO Examples can be found on .I /usr/share/doc/cmigrep/README\fR. .SH AUTHOR \fBcmigrep\fR is written by Eric Stokes . .PP This manual page was compiled by Ralf Treinen . debian/cmigrep.dirs0000644000000000000000000000001112237723515011476 0ustar usr/bin debian/rules0000755000000000000000000000053612237723515010261 0ustar #!/usr/bin/make -f DOCDIR = debian/cmigrep/usr/share/doc/cmigrep OCAMLABI := $(shell ocamlc -version) %: dh $@ override_dh_auto_build: $(MAKE) byte # cmigrep binary is installed by dh_install override_dh_auto_install: mkdir -p $(DOCDIR) cp Changes $(DOCDIR)/changelog override_dh_gencontrol: dh_gencontrol -i -- -VF:OCamlABI="$(OCAMLABI)" debian/gbp.conf0000644000000000000000000000003612237723515010613 0ustar [DEFAULT] pristine-tar = True debian/cmigrep.install0000644000000000000000000000002112237723515012204 0ustar cmigrep usr/bin debian/cmigrep.manpages0000644000000000000000000000002112237723515012331 0ustar debian/cmigrep.1 debian/changelog0000644000000000000000000001335412247424317011054 0ustar cmigrep (1.5-11) unstable; urgency=low * Team upload * Upload to unstable -- Stéphane Glondu Tue, 03 Dec 2013 19:53:57 +0100 cmigrep (1.5-10) experimental; urgency=low * Team upload * Compile with OCaml >= 4.01 * debian/patches: - Compile without godi + Adapt to Types types of OCaml >= 4 + Adapt build system to OCaml >= 4 * Update Vcs-* -- Stéphane Glondu Sun, 10 Nov 2013 16:39:37 +0100 cmigrep (1.5-9) unstable; urgency=low [ Stéphane Glondu ] * Team upload * Recompile with OCaml 3.12.1 (no changes) [ Stefano Zacchiroli ] * Remove myself from Uploaders -- Stéphane Glondu Wed, 02 Nov 2011 22:25:45 +0100 cmigrep (1.5-8) unstable; urgency=low [ Stéphane Glondu ] * Add libfindlib-ocaml-dev to Build-Depends-Indep (Closes: #614524) [ Ralf Treinen ] * Standards-Version 3.9.2 (no change) * Migrate to dh, drop build-dependency on cdbs, bump version of build-dependency on debhelper * build target: we do not have not set the GOBI_LIB variable since reference to it is removed by patch * Convert to source format 3.0, drop quilt from build-dependencies. -- Ralf Treinen Tue, 19 Apr 2011 19:28:29 +0200 cmigrep (1.5-7) unstable; urgency=low [ Ralf Treinen ] * Changed section to ocaml [ Mehdi Dogguy ] * Rebuild against OCaml 3.11.2 -- Mehdi Dogguy Thu, 11 Feb 2010 21:51:35 +0100 cmigrep (1.5-6) unstable; urgency=low * debian/cmigrep.1: escape hyphen, fix a typo. * Standards-Version: 3.8.4 (no change) * debian/copyright: use © for copyright, point to versionend GPL file. -- Ralf Treinen Sat, 30 Jan 2010 14:47:09 +0100 cmigrep (1.5-5) unstable; urgency=low * Bump Standards-Version to 3.8.3 (no change) * Convert from dpatch to quilt: - build-depends on quilt, not dpatch - use quilt cdbs rules - add debian/patches/series, remove 00list - simplify names of patches, use headers similar to DEP-5 format - updated debian/README.source accordingly. * Remove DM-Upload-Allowed * Updated Mehdi's email address * Downgraded build-dependency on libpcre-ocaml-dev from >= 6.0.1-1 to 6.0.1. * Fixed spelling error in manpage. -- Ralf Treinen Mon, 11 Jan 2010 20:28:57 +0100 cmigrep (1.5-4) unstable; urgency=low [ Stephane Glondu ] * Switch packaging to git [ Mehdi Dogguy ] * Bump Standards-Version to 3.8.2 o Added a README.source * Add myself to uploaders * Remove usage of old OCaml's standard library location (It was harmless but there is no reason to keep it) * Tighten build depends to ease OCaml 3.11.1 transition. * Add DM-Upload-Allowed (with team consent) -- Mehdi Dogguy Tue, 07 Jul 2009 13:50:53 +0200 cmigrep (1.5-3) unstable; urgency=low * Patch 02no-private-flag: some constructors in the typing/types module of the compiler libs have lost the "private" field. * Convert to cdbs, build-depend on cdbs and dh-ocaml * Add dependency on ${misc:Depends} * Rename debian/dirs -> debian/cmigrep.dirs, debian/docs -> debian/cmigrep.docs * Create debian/cmigrep.manpages * Cleanup Uploaders * Standards-Version: 3.8.0 (no change) * Recompile for ocaml 3.11. -- Ralf Treinen Mon, 02 Mar 2009 21:05:56 +0100 cmigrep (1.5-2) unstable; urgency=low [ Ralf Treinen ] * Rebuild with OCaml 3.10.2 -- Stefano Zacchiroli Mon, 26 May 2008 12:27:08 +0200 cmigrep (1.5-1) unstable; urgency=low * New upstream release. * debian/control: added Homepage field. -- Ralf Treinen Wed, 30 Apr 2008 22:33:16 +0200 cmigrep (1.4-4) unstable; urgency=low [ Stefano Zacchiroli ] * fix vcs-svn field to point just above the debian/ dir [ Ralf Treinen ] * Rebuild with ocaml 3.10.1 * Standards-Version 3.7.3 (no change) * Fix capitalization of OCaml in short package description * Do not use .UR macro in manpage * Do not install emacs mode any longer: compilation errors, and seems not realy useful (closes: Bug#448148). -- Ralf Treinen Mon, 25 Feb 2008 09:21:44 +0100 cmigrep (1.4-3) unstable; urgency=low * Install emacs mode into its own subdirectory to comply with emacs policy 6.C (closes: Bug#448142). -- Ralf Treinen Mon, 29 Oct 2007 21:01:05 +0100 cmigrep (1.4-2) unstable; urgency=low * Upload to unstable. -- Ralf Treinen Mon, 03 Sep 2007 19:13:37 +0200 cmigrep (1.4-1) experimental; urgency=low * New upstream release. -- Ralf Treinen Fri, 24 Aug 2007 17:08:16 +0200 cmigrep (1.3-4) experimental; urgency=low * Added dependency on libpcre-ocaml (closes: Bug#433650). -- Ralf Treinen Wed, 18 Jul 2007 17:40:58 +0200 cmigrep (1.3-3) experimental; urgency=low * Rebuild against ocaml 3.10 * Use dpatch * Patch 01make-without-godi: provide in the Makefile directly the include paths for the compiler libs. -- Ralf Treinen Sat, 07 Jul 2007 10:22:03 +0200 cmigrep (1.3-2) unstable; urgency=high * Removed trailing common in the uploaders field (closes: Bug#426486). * Fix install-emacsen: compile only cmigrep.el, don't remove unrelated el files (!), compile with -no-site-files, do not create a path.el -- Ralf Treinen Sat, 30 Jun 2007 15:36:59 +0200 cmigrep (1.3-1) unstable; urgency=low * Initial release (Closes: Bug#424893). This package is a split off from the ocaml-tools package. * debian/rules: fix the "clean" target which was broken for cmigrep in the ocaml-tools package (Closes: Bug#424390). -- Ralf Treinen Fri, 25 May 2007 20:46:39 +0200 debian/patches/0000755000000000000000000000000012237723515010624 5ustar debian/patches/0003-Adapt-build-system-to-OCaml-4.patch0000644000000000000000000000411412237723515017447 0ustar From: Stephane Glondu Date: Sun, 10 Nov 2013 16:33:15 +0100 Subject: Adapt build system to OCaml >= 4 --- Makefile | 31 ++++++------------------------- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/Makefile b/Makefile index 546acc6..67cc032 100644 --- a/Makefile +++ b/Makefile @@ -1,33 +1,14 @@ -SOURCES=misc.cmx tbl.cmx config.cmx clflags.cmx terminfo.cmx ccomp.cmx \ -warnings.cmx consistbl.cmx linenum.cmx location.cmx longident.cmx \ -syntaxerr.cmx parser.cmx lexer.cmx parse.cmx printast.cmx \ -unused_var.cmx ident.cmx path.cmx primitive.cmx types.cmx btype.cmx \ -oprint.cmx subst.cmx predef.cmx datarepr.cmx env.cmx typedtree.cmx \ -ctype.cmx printtyp.cmx includeclass.cmx mtype.cmx includecore.cmx \ -includemod.cmx parmatch.cmx typetexp.cmx stypes.cmx typecore.cmx \ -typedecl.cmx typeclass.cmx typemod.cmx cmigrep.ml +SOURCES=ocamlcommon.cmxa cmigrep.ml -BYTESOURCES=misc.cmo tbl.cmo config.cmo clflags.cmo terminfo.cmo \ -ccomp.cmo warnings.cmo consistbl.cmo linenum.cmo location.cmo \ -longident.cmo syntaxerr.cmo parser.cmo lexer.cmo parse.cmo \ -printast.cmo unused_var.cmo ident.cmo path.cmo primitive.cmo types.cmo \ -btype.cmo oprint.cmo subst.cmo predef.cmo datarepr.cmo env.cmo \ -typedtree.cmo ctype.cmo printtyp.cmo includeclass.cmo mtype.cmo \ -includecore.cmo includemod.cmo parmatch.cmo typetexp.cmo stypes.cmo \ -typecore.cmo typedecl.cmo typeclass.cmo typemod.cmo cmigrep.ml - - -GODI_CONF=$(shell godi_confdir) -GODI_BASE=$(shell cat $(GODI_CONF)/godi.conf | grep ^LOCALBASE | sed -e 's/LOCALBASE *= *//') -GODI_LIB=$(GODI_BASE)/lib/ocaml/compiler-lib +BYTESOURCES=ocamlcommon.cma cmigrep.ml all: - ocamlfind ocamlopt -o cmigrep -I $(GODI_LIB) \ - -package pcre,findlib,unix -linkpkg $(SOURCES) + ocamlfind ocamlopt -o cmigrep \ + -package pcre,findlib,unix,compiler-libs -linkpkg $(SOURCES) byte: - ocamlfind ocamlc -o cmigrep -I $(GODI_LIB) \ - -package pcre,findlib,unix -linkpkg $(BYTESOURCES) + ocamlfind ocamlc -o cmigrep \ + -package pcre,findlib,unix,compiler-libs -linkpkg $(BYTESOURCES) install: cp cmigrep $(GODI_BASE)/bin -- debian/patches/0002-Adapt-to-Types-types-of-OCaml-4.patch0000644000000000000000000001251712237723515017703 0ustar From: Stephane Glondu Date: Sun, 10 Nov 2013 16:29:20 +0100 Subject: Adapt to Types types of OCaml >= 4 --- cmigrep.ml | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/cmigrep.ml b/cmigrep.ml index cdac8b3..dd162fa 100755 --- a/cmigrep.ml +++ b/cmigrep.ml @@ -285,7 +285,7 @@ let whsp = Pcre.regexp ~study:true "\\s+|$" let print_type print_path path s exp = List.iter (function - | Tsig_type (id, type_decl, rec_status) -> + | Sig_type (id, type_decl, rec_status) -> if match_ident exp id then begin Printtyp.type_declaration id Format.std_formatter type_decl; if print_path then @@ -302,11 +302,12 @@ let print_constructor print_path path s exp = in List.iter (function - | Tsig_type (id, type_decl, _rec_status) -> + | Sig_type (id, type_decl, _rec_status) -> begin match type_decl.type_kind with | Type_variant (constructors) -> List.iter - (fun (name, type_exprs) -> + (fun (name, type_exprs, _) -> + let name = Ident.name name in if Pcre.pmatch ~rex:exp name then begin Format.print_string name; if type_exprs <> [] then begin @@ -369,7 +370,7 @@ let print_polymorphic_variant print_path path s expr = in List.iter (function - | Tsig_type (id, type_decl, _rec_status) -> + | Sig_type (id, type_decl, _rec_status) -> begin match type_decl.type_kind with | Type_abstract -> print_if_polymorphic_variant id type_decl | _ -> () @@ -380,11 +381,12 @@ let print_polymorphic_variant print_path path s expr = let print_record_label print_path path s exp = List.iter (function - | Tsig_type (id, type_decl, _rec_status) -> + | Sig_type (id, type_decl, _rec_status) -> begin match type_decl.type_kind with | Type_record (labels, _) -> List.iter (fun (name, mutable_flag, type_expr) -> + let name = Ident.name name in if Pcre.pmatch ~rex:exp name then begin begin match mutable_flag with | Asttypes.Mutable -> Format.print_string "mutable " @@ -409,7 +411,7 @@ let print_record_label print_path path s exp = let print_value print_path path s exp = List.iter (function - | Tsig_value (id, desc) -> + | Sig_value (id, desc) -> if match_ident exp id then begin Printtyp.value_description id Format.str_formatter desc; let s = @@ -427,12 +429,12 @@ let print_value print_path path s exp = let print_class print_path path s exp = List.iter (function - | Tsig_class (id, cd, _) when match_ident exp id -> + | Sig_class (id, cd, _) when match_ident exp id -> Printtyp.class_declaration id Format.std_formatter cd; if print_path then Format.print_string (Printf.sprintf " (* %s *)" path); Format.print_newline () - | Tsig_cltype (id, ct, _) when match_ident exp id -> + | Sig_class_type (id, ct, _) when match_ident exp id -> Printtyp.cltype_declaration id Format.std_formatter ct; if print_path then Format.print_string (Printf.sprintf " (* %s *)" path); @@ -444,13 +446,13 @@ let print_all print_path path s exp = let new_s = List.filter (function - | Tsig_value (id, _) - | Tsig_type (id, _, _) - | Tsig_exception (id, _) - | Tsig_module (id, _, _) - | Tsig_modtype (id, _) - | Tsig_class (id, _, _) - | Tsig_cltype (id, _, _) -> + | Sig_value (id, _) + | Sig_type (id, _, _) + | Sig_exception (id, _) + | Sig_module (id, _, _) + | Sig_modtype (id, _) + | Sig_class (id, _, _) + | Sig_class_type (id, _, _) -> match_ident exp id) s in @@ -462,7 +464,7 @@ let print_all print_path path s exp = let print_exception print_path path s exp = List.iter (function - | Tsig_exception (id, exn) -> + | Sig_exception (id, exn) -> if match_ident exp id then begin Printtyp.exception_declaration id Format.std_formatter exn; if print_path then @@ -526,15 +528,15 @@ let cmi_files args mod_expr = let rec matching_submods mod_expr s = match s with - | Tsig_module (id, mt, _) :: tl when match_mod_expr mod_expr (Ident.name id) -> + | Sig_module (id, mt, _) :: tl when match_mod_expr mod_expr (Ident.name id) -> begin match mt with - | Tmty_signature sg -> (Ident.name id, sg) :: matching_submods mod_expr tl - | Tmty_functor (_, mt, _) -> + | Mty_signature sg -> (Ident.name id, sg) :: matching_submods mod_expr tl + | Mty_functor (_, mt, _) -> begin match mt with - | Tmty_signature sg -> (Ident.name id, sg) :: matching_submods mod_expr tl + | Mty_signature sg -> (Ident.name id, sg) :: matching_submods mod_expr tl | _ -> matching_submods mod_expr tl end - | Tmty_ident _ -> matching_submods mod_expr tl + | Mty_ident _ -> matching_submods mod_expr tl end | _ :: tl -> matching_submods mod_expr tl | [] -> [] -- debian/patches/0001-No-private-flag.patch0000644000000000000000000000230512237723515015156 0ustar From: Ralf Treinen Date: Fri, 13 Nov 2009 20:11:48 +0100 Subject: No private flag The fields Type_variant and Type_record have lost the "private" field in the passage from ocaml 3.10 to 3.11. --- cmigrep.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmigrep.ml b/cmigrep.ml index dcab49e..cdac8b3 100755 --- a/cmigrep.ml +++ b/cmigrep.ml @@ -304,7 +304,7 @@ let print_constructor print_path path s exp = (function | Tsig_type (id, type_decl, _rec_status) -> begin match type_decl.type_kind with - | Type_variant (constructors, _private) -> + | Type_variant (constructors) -> List.iter (fun (name, type_exprs) -> if Pcre.pmatch ~rex:exp name then begin @@ -382,7 +382,7 @@ let print_record_label print_path path s exp = (function | Tsig_type (id, type_decl, _rec_status) -> begin match type_decl.type_kind with - | Type_record (labels, _, _) -> + | Type_record (labels, _) -> List.iter (fun (name, mutable_flag, type_expr) -> if Pcre.pmatch ~rex:exp name then begin -- debian/patches/series0000644000000000000000000000015712237723515012044 0ustar 0001-No-private-flag.patch 0002-Adapt-to-Types-types-of-OCaml-4.patch 0003-Adapt-build-system-to-OCaml-4.patch debian/unused/0000755000000000000000000000000012237723515010500 5ustar debian/unused/rules.debhelper0000644000000000000000000000160312237723515013506 0ustar #!/usr/bin/make -f # debian/rules for cmigrep #export DH_VERBOSE=1 include /usr/share/dpatch/dpatch.make OCAMLABI := $(shell ocamlc -version) build: cmigrep cmigrep: patch dh_testdir make byte GODI_LIB=/usr/lib/ocaml/$(OCAMLABI)/compiler-libs clean: unpatch dh_testdir dh_testroot dh_clean make clean install: dh_testdir dh_testroot dh_clean -k dh_installdirs cp cmigrep debian/cmigrep/usr/bin # cp cmigrep.el debian/cmigrep/usr/share/emacs/site-lisp/cmigrep binary-arch: build install binary-indep: build install dh_testdir dh_testroot dh_installdocs dh_installman debian/cmigrep.1 dh_installchangelogs dh_installdebconf # dh_installemacsen dh_link dh_compress dh_fixperms dh_installdeb dh_gencontrol -- -VF:OCamlABI="$(OCAMLABI)" dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install patch unpatch debian/unused/emacsen-install0000644000000000000000000000202112237723515013475 0ustar #! /bin/sh -e # /usr/lib/emacsen-common/packages/install/cmigrep # adapted for cmigrep from a template which was # written by Jim Van Zandt , borrowing heavily # from the install scripts for gettext by Santiago Vila # and octave by Dirk Eddelbuettel . FLAVOR=$1 PACKAGE=cmigrep if [ ${FLAVOR} = emacs ]; then exit 0; fi echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR} FLAGS="${SITEFLAG} -q -batch -f batch-byte-compile -no-site-file" ELDIR=/usr/share/emacs/site-lisp/${PACKAGE} ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE} # Install-info-altdir does not actually exist. # Maybe somebody will write it. if test -x /usr/sbin/install-info-altdir; then echo install/${PACKAGE}: install Info links for ${FLAVOR} install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/info/${PACKAGE}.info.gz fi install -m 755 -d ${ELCDIR} cd ${ELDIR} FILES=cmigrep.el cp ${FILES} ${ELCDIR} cd ${ELCDIR} ${FLAVOR} ${FLAGS} ${FILES} rm ${FILES} exit 0 debian/unused/emacsen-remove0000644000000000000000000000037112237723515013332 0ustar #!/bin/sh -e # /usr/lib/emacsen-common/packages/remove/cmigrep FLAVOR=$1 PACKAGE=cmigrep if [ ${FLAVOR} != emacs ]; then echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR} rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE} fi