[NEW_WIP] devel/p5-MooX-ClassAttribute

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[NEW_WIP] devel/p5-MooX-ClassAttribute

Chris Bennett-3
I have not fully checked this over, but it is a dependency for the
p5-Locale-CLDR group.

I have questions about the CPAN examples.
This way (not necessarily the right way), produces the Perl scripts as
executables, but adds more to the Makefile. Does this really matter?
I can also simplify this, but then the Perl scripts are not executable.
I'm a little unsure about how CPAN_EXAMPLES ought to be done, as I see a
bunch of different methods in existing ports.

# $OpenBSD$

COMMENT = declare class attributes Moose-style... but without Moose

DISTNAME = MooX-ClassAttribute-0.011

CATEGORIES = devel

# Perl
PERMIT_PACKAGE = Yes

MODULES = cpan

RUN_DEPENDS = devel/p5-Exporter-Tiny \
                        devel/p5-Moo>=1.0 \
                        devel/p5-Role-Tiny>=1.0

TEST_DEPENDS = devel/p5-Moose

MAKE_ENV += TEST_POD=1 \
                        RELEASE_TESTING=''

MODCPAN_EXAMPLES = Yes
MODCPAN_EXAMPLES_DIR_HOOKS = ${MODCPAN_EXAMPLES_DIR}/hooks

post-install:
        ${INSTALL_DATA_DIR} ${MODCPAN_EXAMPLES_DIR}
        ${INSTALL_DATA_DIR} ${MODCPAN_EXAMPLES_DIR_HOOKS}
        ${INSTALL_SCRIPT} ${WRKSRC}/examples/hooks/track-consumers.pl ${MODCPAN_EXAMPLES_DIR_HOOKS}
        ${INSTALL_SCRIPT} ${WRKSRC}/examples/binomial_name.pl ${MODCPAN_EXAMPLES_DIR}

PKG_ARCH = *

.include <bsd.port.mk>


Thanks,
--
Chris Bennett



p5-MooX-ClassAttribute-0.011.tar.gz (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [NEW_WIP] devel/p5-MooX-ClassAttribute

Andrew Hewus Fresh
On Fri, Aug 28, 2020 at 02:30:40PM -0500, Chris Bennett wrote:
> I have not fully checked this over, but it is a dependency for the
> p5-Locale-CLDR group.
>
> I have questions about the CPAN examples.
> This way (not necessarily the right way), produces the Perl scripts as
> executables, but adds more to the Makefile. Does this really matter?
> I can also simplify this, but then the Perl scripts are not executable.
> I'm a little unsure about how CPAN_EXAMPLES ought to be done, as I see a
> bunch of different methods in existing ports.

I believe if you set MODCPAN_EXAMPLES=Yes and get rid of
MODCPAN_EXAMPLES_DIR_HOOKS and the post-install target, it looks like
that should Just Work (and make update-plist agrees with me).  I don't
think that the examples should be executable as they are more for
looking at than for actually running.  Plus, they don't have #! lines so
they wouldn't run anyway.

You don't need RELEASE_TESTING='' because the MAKE_ENV is cleared so
nothing leaks.

I'm unsure about the ellipsis in the COMMENT, but that's what upstream
has, so I guess.

I personally don't like so much whitespace and prefer PKG_ARCH to be
near MODULES.  I think it would look better more like this.


> # $OpenBSD$
>
> COMMENT = declare class attributes Moose-style... but without Moose
> DISTNAME = MooX-ClassAttribute-0.011
> CATEGORIES = devel
>
> # Perl
> PERMIT_PACKAGE = Yes
>
> MODULES = cpan
> PKG_ARCH = *
> MODCPAN_EXAMPLES = Yes
>
> RUN_DEPENDS = devel/p5-Exporter-Tiny \
> devel/p5-Moo>=1.0 \
> devel/p5-Role-Tiny>=1.0
>
> TEST_DEPENDS = devel/p5-Moose
>
> MAKE_ENV += TEST_POD=1
>
> .include <bsd.port.mk>

--
andrew - http://afresh1.com

I think I understand, but my stubborn brain refuses to admit it
until I beat it into submission by proof upon proof.
                      -- Michael Shiloh <[hidden email]>

Reply | Threaded
Open this post in threaded view
|

Re: [NEW_WIP] devel/p5-MooX-ClassAttribute

Chris Bennett-3
On Wed, Sep 16, 2020 at 07:36:53PM -0700, Andrew Hewus Fresh wrote:

> On Fri, Aug 28, 2020 at 02:30:40PM -0500, Chris Bennett wrote:
> > I have not fully checked this over, but it is a dependency for the
> > p5-Locale-CLDR group.
> >
> > I have questions about the CPAN examples.
> > This way (not necessarily the right way), produces the Perl scripts as
> > executables, but adds more to the Makefile. Does this really matter?
> > I can also simplify this, but then the Perl scripts are not executable.
> > I'm a little unsure about how CPAN_EXAMPLES ought to be done, as I see a
> > bunch of different methods in existing ports.
>
> I believe if you set MODCPAN_EXAMPLES=Yes and get rid of
> MODCPAN_EXAMPLES_DIR_HOOKS and the post-install target, it looks like
> that should Just Work (and make update-plist agrees with me).  I don't
> think that the examples should be executable as they are more for
> looking at than for actually running.  Plus, they don't have #! lines so
> they wouldn't run anyway.

OK. That makes sense.

>
> You don't need RELEASE_TESTING='' because the MAKE_ENV is cleared so
> nothing leaks.
>

I'll get rid of that then.

> I'm unsure about the ellipsis in the COMMENT, but that's what upstream
> has, so I guess.

I agree that it seems odd.

>
> I personally don't like so much whitespace and prefer PKG_ARCH to be
> near MODULES.  I think it would look better more like this.

OK

Thanks
Chris

>
>
> > # $OpenBSD$
> >
> > COMMENT = declare class attributes Moose-style... but without Moose
> > DISTNAME = MooX-ClassAttribute-0.011
> > CATEGORIES = devel
> >
> > # Perl
> > PERMIT_PACKAGE = Yes
> >
> > MODULES = cpan
> > PKG_ARCH = *
> > MODCPAN_EXAMPLES = Yes
> >
> > RUN_DEPENDS = devel/p5-Exporter-Tiny \
> > devel/p5-Moo>=1.0 \
> > devel/p5-Role-Tiny>=1.0
> >
> > TEST_DEPENDS = devel/p5-Moose
> >
> > MAKE_ENV += TEST_POD=1
> >
> > .include <bsd.port.mk>
>
> --
> andrew - http://afresh1.com
>
> I think I understand, but my stubborn brain refuses to admit it
> until I beat it into submission by proof upon proof.
>                       -- Michael Shiloh <[hidden email]>
>

--
Chris Bennett