pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/ocaml-cmdliner Updated package to latest version...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/60c118e2b0ee
branches:  trunk
changeset: 365130:60c118e2b0ee
user:      jaapb <jaapb%pkgsrc.org@localhost>
date:      Tue Jul 11 10:18:38 2017 +0000

description:
Updated package to latest version, 1.0.0. Changes include:

v1.0.0 2017-03-02 La Forclaz (VS)
---------------------------------

**IMPORTANT** The `Arg.converter` type is deprecated in favor of the
`Arg.conv` type. For this release both types are equal but the next
major release will drop the former and make the latter abstract. All
users are kindly requested to migrate to use the new type and **only**
via the new `Arg.[p]conv` and `Arg.conv_{parser,printer}` functions.

- Allow terms to be used more than once in terms without tripping out
  documentation generation (#77). Thanks to Fran?ois Bobot and Gabriel
  Radanne.
- Disallow defining the same option (resp. command) name twice via two
  different arguments (resp. terms). Raises Invalid_argument, used
  to be undefined behaviour (in practice, an arbitrary one would be
  ignored).
- Improve converter API (see important message above).
- Add `Term.exit[_status]` and `Term.exit_status_of[_status]_result`.
  improves composition with `Pervasives.exit`.
- Add `Term.term_result` and `Term.cli_parse_result` improves composition
  with terms evaluating to `result` types.
- Add `Arg.parser_of_kind_of_string`.
- Change semantics of `Arg.pos_left` (see #76 for details).
- Deprecate `Term.man_format` in favor of `Arg.man_format`.
- Reserve the `--cmdliner` option for library use. This is unused for now
  but will be in the future.
- Relicense from BSD3 to ISC.
- Safe-string support.
- Build depend on topkg.

### End-user visible changes

The following changes affect the end-user behaviour of all binaries using
cmdliner.

- Required positional arguments. All missing required position
  arguments are now reported to the end-user, in the correct
  order (#39). Thanks to Dmitrii Kashin for the report.
- Optional arguments. All unknown and ambiguous optional argument
  arguments are now reported to the end-user (instead of only
  the first one).
- Change default behaviour of `--help[=FMT]` option. `FMT` no longer
  defaults to `pager` if unspecified.  It defaults to the new value
  `auto` which prints the help as `pager` or `plain` whenever the
  `TERM` environment variable is `dumb` or undefined (#43). At the API
  level this changes the signature of the type `Term.ret` and values
  `Term.ret`, `Term.man_format` (deprecated) and `Manpage.print` to add the
  new `` `Auto`` case to manual formats. These are now represented by the
  `Manpage.format` type rather than inlined polyvars.

### Doc specification improvements and fixes

- Add `?envs` optional argument to `Term.info`. Documents environment
  variables that influence a term's evaluation and automatically
  integrate them in the manual.
- Add `?exits` optional argument to `Term.info`. Documents exit statuses of
  the program. Use `Term.default_exits` if you are using the new `Term.exit`
  functions.
- Add `?man_xrefs` optional argument to `Term.info`. Documents
  references to other manpages. Automatically formats a `SEE ALSO` section
  in the manual.
- Add `Manpage.escape` to escape a string from the documentation markup
  language.
- Add `Manpage.s_*` constants for standard man page section names.
- Add a `` `Blocks`` case to `Manpage.blocks` to allow block splicing
  (#69).  This avoids having to concatenate block lists at the
  toplevel of your program.
- `Arg.env_var`, change default environment variable section to the
   standard `ENVIRONMENT` manual section rather than `ENVIRONMENT
   VARIABLES`.  If you previously manually positioned that section in
   your man page you will have to change the name. See also next point.
- Fix automatic placement of default environment variable section (#44)
  whenever unspecified in the man page.
- Better automatic insertions of man page sections (#73). See the API
  docs about manual specification. As a side effect the `NAME` section
  can now also be overriden manually.
- Fix repeated environment variable printing for flags (#64). Thanks to
  Thomas Gazagnaire for the report.
- Fix rendering of env vars in man pages, bold is standard (#71).
- Fix plain help formatting for commands with empty
  description. Thanks to Maciek Starzyk for the patch.
- Fix (implement really) groff man page escaping (#48).
- Request `an` macros directly in the man page via `.mso` this
  makes man pages self-describing and avoids having to call `groff` with
  the `-man` option.
- Document required optional arguments as such (#82). Thanks to Isaac Hodes
  for the report.

### Doc language sanitization

This release tries to bring sanity to the doc language. This may break
the rendering of some of your man pages. Thanks to Gabriel Scherer,
Ivan Gotovchits and Nicol?s Ojeda B?r for the feedback.

- It is only allowed to use the variables `$(var)` that are mentioned in
  the docs (`$(docv)`, `$(opt)`, etc.) and the markup directives
  `$({i,b},text)`. Any other unknown `$(var)` will generate errors
  on standard error during documentation generation.
- Markup directives `$({i,b},text)` treat `text` as is, modulo escapes;
  see next point.
- Characters `$`, `(`, `)` and `\` can respectively be escaped by `\$`,
  `\(`, `\)` and `\\`. Escaping `$` and `\` is mandatory everywhere.
  Escaping `)` is mandatory only in markup directives. Escaping `(`
  is only here for your symmetric pleasure. Any other sequence of
  character starting with a `\` is an illegal sequence.
- Variables `$(mname)` and `$(tname)` are now marked up with bold when
  substituted. If you used to write `$(b,$(tname))` this will generate
  an error on standard output, since `$` is not escaped in the markup
  directive. Simply replace these by `$(tname)`.

diffstat:

 devel/ocaml-cmdliner/Makefile      |  44 ++++++++++++++++++++-----------------
 devel/ocaml-cmdliner/PLIST         |  23 +++++++++++++++++++-
 devel/ocaml-cmdliner/buildlink3.mk |   4 +-
 devel/ocaml-cmdliner/distinfo      |  10 ++++----
 4 files changed, 53 insertions(+), 28 deletions(-)

diffs (134 lines):

diff -r dedcbf3a38a3 -r 60c118e2b0ee devel/ocaml-cmdliner/Makefile
--- a/devel/ocaml-cmdliner/Makefile     Tue Jul 11 10:14:07 2017 +0000
+++ b/devel/ocaml-cmdliner/Makefile     Tue Jul 11 10:18:38 2017 +0000
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.11 2016/12/30 11:16:56 jaapb Exp $
+# $NetBSD: Makefile,v 1.12 2017/07/11 10:18:38 jaapb Exp $
 
 PKGNAME=       ocaml-${DISTNAME}
-DISTNAME=      cmdliner-0.9.8
-PKGREVISION=   2
+DISTNAME=      cmdliner-1.0.0
 CATEGORIES=    devel
 MASTER_SITES=  http://erratique.ch/software/cmdliner/releases/
 EXTRACT_SUFX=  .tbz
@@ -13,29 +12,34 @@
 LICENSE=       modified-bsd
 
 USE_LANGUAGES= c
-OCAML_USE_FINDLIB=     yes
-INSTALLATION_DIRS+=    ${OCAML_SITELIBDIR}/cmdliner
+
+OCAML_USE_TOPKG=       yes
+INSTALLATION_DIRS+=    share/doc/cmdliner
 
 .include "../../mk/ocaml.mk"
 
-.if ${OCAML_USE_OPT_COMPILER} == "yes"
-NATIVE=        true
-.else
-NATIVE=        false
-.endif
-
-do-build:
-       cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ocaml ./pkg/build.ml \
-               native=${NATIVE} native-dynlink=${NATIVE}
-
+# Normally, we'd do this using opam-installer, but that requires
+# this package.
 do-install:
-       ${INSTALL_DATA} ${WRKSRC}/_build/pkg/META ${DESTDIR}${PREFIX}/${OCAML_SITELIBDIR}/cmdliner
-       for i in cmdliner.mli cmdliner.cmi cmdliner.cma; do \
-               ${INSTALL_DATA} ${WRKSRC}/_build/src/$$i ${DESTDIR}${PREFIX}/${OCAML_SITELIBDIR}/cmdliner; \
+       for i in CHANGES.md LICENSE.md README.md test/chorus.ml test/cp_ex.ml \
+               test/darcs_ex.ml test/revolt.ml test/rm_ex.ml test/tail_ex.ml; do \
+               ${INSTALL_DATA} ${WRKSRC}/_build/$$i \
+               ${DESTDIR}${PREFIX}/share/doc/cmdliner; \
+       done
+       ${INSTALL_DATA} ${WRKSRC}/_build/opam \
+               ${DESTDIR}${PREFIX}/${OCAML_SITELIBDIR}/cmdliner/opam
+       for i in pkg/META src/cmdliner.cma src/cmdliner.cmi src/cmdliner.cmti \
+               src/cmdliner.mli; do \
+               ${INSTALL_DATA} ${WRKSRC}/_build/$$i \
+               ${DESTDIR}${PREFIX}/${OCAML_SITELIBDIR}/cmdliner; \
        done
 .if ${OCAML_USE_OPT_COMPILER} == "yes"
-       for i in cmdliner.cmx cmdliner.a cmdliner.cmxa cmdliner.cmxs; do \
-               ${INSTALL_DATA} ${WRKSRC}/_build/src/$$i ${DESTDIR}${PREFIX}/${OCAML_SITELIBDIR}/cmdliner; \
+       for i in cmdliner.a cmdliner.cmx cmdliner.cmxa cmdliner.cmxs \
+               cmdliner_arg.cmx cmdliner_base.cmx cmdliner_cline.cmx cmdliner_docgen.cmx \
+               cmdliner_info.cmx cmdliner_manpage.cmx cmdliner_msg.cmx \
+               cmdliner_suggest.cmx cmdliner_term.cmx cmdliner_trie.cmx; do \
+               ${INSTALL_DATA} ${WRKSRC}/_build/src/$$i \
+               ${DESTDIR}${PREFIX}/${OCAML_SITELIBDIR}/cmdliner; \
        done
 .endif
 
diff -r dedcbf3a38a3 -r 60c118e2b0ee devel/ocaml-cmdliner/PLIST
--- a/devel/ocaml-cmdliner/PLIST        Tue Jul 11 10:14:07 2017 +0000
+++ b/devel/ocaml-cmdliner/PLIST        Tue Jul 11 10:18:38 2017 +0000
@@ -1,9 +1,30 @@
-@comment $NetBSD: PLIST,v 1.2 2016/06/17 15:33:24 jaapb Exp $
+@comment $NetBSD: PLIST,v 1.3 2017/07/11 10:18:38 jaapb Exp $
 ${OCAML_SITELIB}/cmdliner/META
 ${PLIST.ocaml-opt}${OCAML_SITELIB}/cmdliner/cmdliner.a
 ${OCAML_SITELIB}/cmdliner/cmdliner.cma
 ${OCAML_SITELIB}/cmdliner/cmdliner.cmi
+${OCAML_SITELIB}/cmdliner/cmdliner.cmti
 ${PLIST.ocaml-opt}${OCAML_SITELIB}/cmdliner/cmdliner.cmx
 ${PLIST.ocaml-opt}${OCAML_SITELIB}/cmdliner/cmdliner.cmxa
 ${PLIST.ocaml-opt}${OCAML_SITELIB}/cmdliner/cmdliner.cmxs
 ${OCAML_SITELIB}/cmdliner/cmdliner.mli
+${PLIST.ocaml-opt}${OCAML_SITELIB}/cmdliner/cmdliner_arg.cmx
+${PLIST.ocaml-opt}${OCAML_SITELIB}/cmdliner/cmdliner_base.cmx
+${PLIST.ocaml-opt}${OCAML_SITELIB}/cmdliner/cmdliner_cline.cmx
+${PLIST.ocaml-opt}${OCAML_SITELIB}/cmdliner/cmdliner_docgen.cmx
+${PLIST.ocaml-opt}${OCAML_SITELIB}/cmdliner/cmdliner_info.cmx
+${PLIST.ocaml-opt}${OCAML_SITELIB}/cmdliner/cmdliner_manpage.cmx
+${PLIST.ocaml-opt}${OCAML_SITELIB}/cmdliner/cmdliner_msg.cmx
+${PLIST.ocaml-opt}${OCAML_SITELIB}/cmdliner/cmdliner_suggest.cmx
+${PLIST.ocaml-opt}${OCAML_SITELIB}/cmdliner/cmdliner_term.cmx
+${PLIST.ocaml-opt}${OCAML_SITELIB}/cmdliner/cmdliner_trie.cmx
+${OCAML_SITELIB}/cmdliner/opam
+share/doc/cmdliner/CHANGES.md
+share/doc/cmdliner/LICENSE.md
+share/doc/cmdliner/README.md
+share/doc/cmdliner/chorus.ml
+share/doc/cmdliner/cp_ex.ml
+share/doc/cmdliner/darcs_ex.ml
+share/doc/cmdliner/revolt.ml
+share/doc/cmdliner/rm_ex.ml
+share/doc/cmdliner/tail_ex.ml
diff -r dedcbf3a38a3 -r 60c118e2b0ee devel/ocaml-cmdliner/buildlink3.mk
--- a/devel/ocaml-cmdliner/buildlink3.mk        Tue Jul 11 10:14:07 2017 +0000
+++ b/devel/ocaml-cmdliner/buildlink3.mk        Tue Jul 11 10:18:38 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.7 2016/12/30 11:16:56 jaapb Exp $
+# $NetBSD: buildlink3.mk,v 1.8 2017/07/11 10:18:38 jaapb Exp $
 
 BUILDLINK_TREE+=       ocaml-cmdliner
 
@@ -6,7 +6,7 @@
 OCAML_CMDLINER_BUILDLINK3_MK:=
 
 BUILDLINK_API_DEPENDS.ocaml-cmdliner+= ocaml-cmdliner>=0.9.8
-BUILDLINK_ABI_DEPENDS.ocaml-cmdliner?= ocaml-cmdliner>=0.9.8nb2
+BUILDLINK_ABI_DEPENDS.ocaml-cmdliner?= ocaml-cmdliner>=1.0.0
 BUILDLINK_PKGSRCDIR.ocaml-cmdliner?=   ../../devel/ocaml-cmdliner
 
 .include "../../devel/ocaml-findlib/buildlink3.mk"
diff -r dedcbf3a38a3 -r 60c118e2b0ee devel/ocaml-cmdliner/distinfo
--- a/devel/ocaml-cmdliner/distinfo     Tue Jul 11 10:14:07 2017 +0000
+++ b/devel/ocaml-cmdliner/distinfo     Tue Jul 11 10:18:38 2017 +0000
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.3 2016/06/17 15:33:24 jaapb Exp $
+$NetBSD: distinfo,v 1.4 2017/07/11 10:18:38 jaapb Exp $
 
-SHA1 (cmdliner-0.9.8.tbz) = 2f8af80a8d172222daf8a35ea0861ebf88e9d6d6
-RMD160 (cmdliner-0.9.8.tbz) = de19b38209faac7d39dd230a3cdec325bb09f596
-SHA512 (cmdliner-0.9.8.tbz) = 6c71c360eaba7f7127e422a71a00a830a086f1d6750897bea0ebc1cc10f8fdaf9e9532d354abd84dbc6c5fcc1878f19d3f424fd9335e7226b625b63b51c89cab
-Size (cmdliner-0.9.8.tbz) = 53249 bytes
+SHA1 (cmdliner-1.0.0.tbz) = 1d6039346e6beffe3d32dc7e2f03e3ab333113a8
+RMD160 (cmdliner-1.0.0.tbz) = a4f180a908cd8ce82c9454b597771d7b1fa59310
+SHA512 (cmdliner-1.0.0.tbz) = 3fc87e49504167864ba4d81fde7bbaa01b7d58b06e2b68b36647857590f41fdc8b3bbd547418f8159b0e76628236b5c30301404b3d8d57e2ff3f082228eee73c
+Size (cmdliner-1.0.0.tbz) = 46542 bytes



Home | Main Index | Thread Index | Old Index