Re: [NEW] devel/p5-System-Info

2018-02-11 Thread James E Keenan

On 02/09/2018 02:32 PM, James E Keenan wrote:

On 02/09/2018 02:22 PM, Alexander Bluhm wrote:

On Wed, Feb 07, 2018 at 12:45:23PM -0500, James E Keenan wrote:

Here is a new port, for Perl extension System-Info (version 0.56)
(http://search.cpan.org/dist/System-Info/).


OK bluhm@, someone may import it

You have p5-Test-NoWarnings in TEST_DEPENDS which is correct as it
is only used in t/sysinfo.t.  But Makefile.PL lists it as PREREQ_PM
and I think it should be TEST_REQUIRES there.  This is not relevant
for OpenBSD as the port relies only on its Makefile, but you may
want to report it upstream.



Thanks.  I will take that up with the upstream maintainer.



I've filed a pull request with upstream.  However, I don't think that we 
need to wait around for them to act on the p.r. to proceed with this 
port.  This is a situation where the number of keystrokes I had to 
change in the Makefile.PL is greater than the number of characters 
changed in the files built!




The kind of elements that one can provide to 
ExtUtil::MakeMaker::WriteMakefile() have evolved over time.  In the past 
decade, that evolution has mainly been in the direction of writing 
better *metadata files* (META.json and META.yml) rather than a better 
*Makefile*.  The TEST_REQUIRES element only became available in 
MakeMaker version 6.64.  To take advantage of this element, I have to 
patch System-Build's Makefile.PL as follows:


#
$ git diff -w HEAD^.. -- Makefile.PL
diff --git a/Makefile.PL b/Makefile.PL
index 8d283eb..75ea273 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -12,13 +12,17 @@ my %wm = (
 AUTHOR   => [ "H.Merijn Brand ",
  "Abe Timmerman " ],
 VERSION_FROM => "lib/System/Info.pm",
-PREREQ_PM   => { "Test::More"   => 0.88,
- "Test::NoWarnings" => 0,
- },
 macro=> { TARFLAGS => "--format=ustar -c -v -f",
  },
 );
 $ExtUtils::MakeMaker::VERSION > 6.30 and $wm{LICENSE} = "perl";
+my $test_requires = {
+"Test::More"   => 0.88,
+"Test::NoWarnings"  => 0,
+};
+($ExtUtils::MakeMaker::VERSION >= 6.64)
+? $wm{TEST_REQUIRES}= $test_requires
+: $wm{PREREQ_PM}= $test_requires;

 my $rv = WriteMakefile (%wm);
#

This has no impact at all on the operation of 'make' or 'make test'. 
It's only when one comes to 'make dist' (or 'make distdir') that one can 
see the impact on the META.json file generated by the latter command.


#
$ diff -w ~/learn/perl/system-info-0.057-meta.json 
./System-Info-0.057/META.json

34c34
<   "runtime" : {
---
>   "test" : {
#



Thank you very much.
Jim Keenan
The distinction between 'runtime' and 'test' there is one that has no 
impact on the users of CPAN distributions.  It only matters to people 
who are working on the CPAN toolchain.


Since ExtUtil::MakeMaker's 'make dist' command is only relevant when a 
module producer is preparing a module for CPAN upload or other 
distribution, I suspect that an OpenBSD package or ports user -- a 
module user -- is never going to run it.


Hence, I suspect that the System-Info maintainers will only accept my 
p.r. if they want to roll it in as they are doing other work on the 
distribution.  So we shouldn't wait for them to change their Makefile.PL 
before we port the current version to OpenBSD.




Re: [NEW] devel/p5-System-Info

2018-02-09 Thread James E Keenan

On 02/09/2018 02:22 PM, Alexander Bluhm wrote:

On Wed, Feb 07, 2018 at 12:45:23PM -0500, James E Keenan wrote:

Here is a new port, for Perl extension System-Info (version 0.56)
(http://search.cpan.org/dist/System-Info/).


OK bluhm@, someone may import it

You have p5-Test-NoWarnings in TEST_DEPENDS which is correct as it
is only used in t/sysinfo.t.  But Makefile.PL lists it as PREREQ_PM
and I think it should be TEST_REQUIRES there.  This is not relevant
for OpenBSD as the port relies only on its Makefile, but you may
want to report it upstream.



Thanks.  I will take that up with the upstream maintainer.

jimk



Re: [NEW] devel/p5-System-Info

2018-02-09 Thread Alexander Bluhm
On Wed, Feb 07, 2018 at 12:45:23PM -0500, James E Keenan wrote:
> Here is a new port, for Perl extension System-Info (version 0.56) 
> (http://search.cpan.org/dist/System-Info/).

OK bluhm@, someone may import it

You have p5-Test-NoWarnings in TEST_DEPENDS which is correct as it
is only used in t/sysinfo.t.  But Makefile.PL lists it as PREREQ_PM
and I think it should be TEST_REQUIRES there.  This is not relevant
for OpenBSD as the port relies only on its Makefile, but you may
want to report it upstream.

bluhm