svn commit: r507361 - head/Mk/Uses

Tobias Kortkamp tobik at freebsd.org
Mon Jul 29 05:57:53 UTC 2019


On Sun, Jul 28, 2019 at 02:19:30PM +0400, Gleb Popov wrote:
> On Sat, Jul 27, 2019 at 9:51 AM Tobias Kortkamp <tobik at freebsd.org> wrote:
> 
> > On Fri, Jul 26, 2019 at 04:52:50PM +0000, Gleb Popov wrote:
> > > Author: arrowd
> > > Date: Fri Jul 26 16:52:49 2019
> > > New Revision: 507361
> > > URL: https://svnweb.freebsd.org/changeset/ports/507361
> > >
> > > Log:
> > >   Add support for USES= cabal:hpack and document this option.
> > >
> > > Modified:
> > >   head/Mk/Uses/cabal.mk
> > >
> > > Modified: head/Mk/Uses/cabal.mk
> > >
> > ==============================================================================
> > > --- head/Mk/Uses/cabal.mk     Fri Jul 26 16:46:46 2019        (r507360)
> > > +++ head/Mk/Uses/cabal.mk     Fri Jul 26 16:52:49 2019        (r507361)
> > > @@ -2,9 +2,13 @@
> > >  #
> > >  # Provide support for building Haskell packages using Cabal.
> > >  #
> > > -# Feature:      cabal
> > > -# Usage:        USES=cabal
> > > +# Feature:   cabal
> > > +# Usage:     USES=cabal or USES=cabal:ARGS
> > > +# Valid ARGS:        hpack
> > >  #
> > > +# hpack:     The port doesn't have a .cabal file and needs
> > devel/hs-hpack to
> > > +#            generate it from package.yaml file
> > > +#
> > >  # Variables, which can be set by the port:
> > >  #
> > >  #  USE_CABAL         List of Haskell packages required to build a port.
> > > @@ -36,10 +40,6 @@
> > >  .if !defined(_INCLUDE_USES_CABAL_MK)
> > >  _INCLUDE_USES_CABAL_MK=    yes
> > >
> > > -.if !empty(cabal_ARGS)
> > > -IGNORE=              Incorrect 'USES= cabal:${cabal_ARGS}' cabal takes
> > no arguments
> > > -.endif
> > > -
> >
> > Nothing checks USES=cabal args now and it accepts any garbage
> > arguments like USES=cabal:asdfasd.  Please put back some check for
> > invalid arguments.
> >
> 
> Does  https://svnweb.freebsd.org/changeset/ports/507506 look good for you?

It's ok. Thanks.

The error message could be better though.  It flags 'hpack' as
invalid with something like USES=cabal:hpack,foo

"USES=cabal: invalid arguments: hpack foo"

'hpack' is not an invalid argument here, only 'foo' is.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 618 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-ports-all/attachments/20190729/8fca15f6/attachment.sig>


More information about the svn-ports-all mailing list