On 03/10/16 01:39, Stuart Henderson wrote:
> On 2016/03/09 15:26, Nigel Taylor wrote:
>> Attached revised perl.port.mk diff
> 
> Looks sane, testing this (and cpan.port.mk diff) in a full build now.
> 
>> perl.port.mk.diff_p522 - extras diffs I am using.
> 
> Let's clear Module::Build (which already triggers warnings and breaks
> with 5.22) before we look at Module::Install (which iirc does still
> run with 5.22?)

Looked at Module::Build, distinfo, pkg/PLIST are the same. 
pkg/DESCR I used only the first two lines either way is ok.


Makefile is where we differ, mines a little messy I thought, 
what I had was this see later try.

# $OpenBSD:$

COMMENT =               Module build

DISTNAME =              Module-Build-0.4208
PKGNAME =               p5-Module-Build-0.42.08
CATEGORIES =            devel

# Perl
PERMIT_PACKAGE_CDROM =  Yes

MODULES =               cpan

TEST_DEPENDS +=         devel/p5-PAR-Dist>=0.17

# TODO this works but messy...
do-install:
        cd ${WRKSRC} && \
        ./Build \
            --install_path lib="${TRUEPREFIX}/${P5SITE}" \
            --install_path arch="${TRUEPREFIX}/${P5ARCH}" \
            --install_path libdoc="${TRUEPREFIX}/man/man3p" \
            --install_path bindoc="${TRUEPREFIX}/man/man1" \
            --install_path bin="${TRUEPREFIX}/bin" \
            --install_path script="${TRUEPREFIX}/bin" \
            --destdir=${WRKINST} \
            install

.include <bsd.port.mk>

Difference is Makefile.PL is used, which uses Module::Build::Compatable,
converts args and runs Build.PL, results in same Build/Makefile, the convert 
args converts to --config rather than --install_path, so install stage
is messed up.



Best effort I've come up with this slightly neater one....

# $OpenBSD:$

COMMENT =               Module build

DISTNAME =              Module-Build-0.4208
PKGNAME =               p5-Module-Build-0.42.08
CATEGORIES =            devel

# Perl
PERMIT_PACKAGE_CDROM =  Yes

MODULES =               cpan

TEST_DEPENDS +=         devel/p5-PAR-Dist>=0.17
CONFIGURE_STYLE =       modbuild none

.include <bsd.port.mk>



Needs this in perl.port.mk - "none" doesn't add a build depends

 .if ${CONFIGURE_STYLE:L:Mmodbuild}
+.  if ${CONFIGURE_STYLE:L:Mtiny}
+BUILD_DEPENDS +=       devel/p5-Module-Build-Tiny
+.  elif ${CONFIGURE_STYLE:L:Mnone}
+   # for building Module Build...
+.  else
+BUILD_DEPENDS +=       devel/p5-Module-Build
+.  endif

Currently this shouldn't be needed, as it's for when Module::Build is 
removed from core perl with 5.22 and want modbuild to add the dependency. 
Tried current perl.port.mk and the one above, both work. Will need to work 
out ordering, the changed perl.port.mk can go in before perl 5.22.



Followed the version numbering upstream used major.minor.sub, 
either way is ok, but no to using epochs later, keep 4digits or 2's.





$ doas -u _pbuild make       
===>  Enabling ccache for p5-Module-Build-0.42.08
===> p5-Module-Build-0.42.08 depends on: ccache-* -> ccache-3.2.4
===>  Checking files for p5-Module-Build-0.42.08
`/usr/ports/distfiles/Module-Build-0.4208.tar.gz' is up to date.
>> (SHA256) Module-Build-0.4208.tar.gz: OK
===>  Extracting for p5-Module-Build-0.42.08
===>  Patching for p5-Module-Build-0.42.08
===>  Configuring for p5-Module-Build-0.42.08
Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'Module-Build' version '0.4208'
===>  Building for p5-Module-Build-0.42.08
Building Module-Build
$ doas -u _pbuild make fake
===>  Faking installation for p5-Module-Build-0.42.08
install -d -m 755 /usr/ports/pobj/p5-Module-Build-0.42.08/fake-amd64
Building Module-Build
Installing 
/usr/ports/pobj/p5-Module-Build-0.42.08/fake-amd64/usr/local/man/man1/config_data.1
Installing 
/usr/ports/pobj/p5-Module-Build-0.42.08/fake-amd64/usr/local/libdata/perl5/site_perl/inc/latest.pm
Installing 
/usr/ports/pobj/p5-Module-Build-0.42.08/fake-amd64/usr/local/libdata/perl5/site_perl/inc/latest/private.pm
Installing 
/usr/ports/pobj/p5-Module-Build-0.42.08/fake-amd64/usr/local/libdata/perl5/site_perl/Module/Build.pm
Installing 
/usr/ports/pobj/p5-Module-Build-0.42.08/fake-amd64/usr/local/libdata/perl5/site_perl/Module/Build/PodParser.pm



$ doas -u _pbuild make test          
===> p5-Module-Build-0.42.08 depends on: p5-PAR-Dist->=0.17 -> p5-PAR-Dist-0.49
===>  Regression tests for p5-Module-Build-0.42.08
/usr/bin/perl Build --makefile_env_macros 1 test
t/00-compile.t ................. ok
t/PL_files.t ................... ok
t/actions/installdeps.t ........ ok
.......
t/unit_run_test_harness.t ...... ok
t/use_tap_harness.t ............ ok
t/versions.t ................... ok
t/write_default_maniskip.t ..... ok
t/xs.t ......................... ok
All tests successful.
Files=53, Tests=1134, 182 wallclock secs ( 0.41 usr  0.56 sys + 48.54 cusr 
43.36 csys = 92.87 CPU)
Result: PASS


Extra in TEST_DEPENDS, PAR::Dist is optional if pardist is used in Build.PL 
then required,
we aren't creating a distribution just building, optional if included at 
runtime.

$ grep -r PAR:: .   
./README:        Generates a PAR binary distribution for use with PAR or 
PAR::Dist.
./README:        It requires that the PAR::Dist module (version 0.17 and up) is
./t/par.t:  } elsif ( ! eval {require PAR::Dist; PAR::Dist->VERSION(0.17)} ) {
./t/par.t:    plan skip_all => "PAR::Dist 0.17 or up not installed to check 
.par's.";
./t/par.t:# must work around broken Archive::Zip (1.28) which breaks PAR::Dist
./t/par.t:  eval { $meta = PAR::Dist::get_meta($filename) };
./lib/Module/Build.pm:Generates a PAR binary distribution for use with L<PAR> 
or L<PAR::Dist>.
./lib/Module/Build.pm:It requires that the PAR::Dist module (version 0.17 and 
up) is
./lib/Module/Build/Base.pm:  # Need PAR::Dist
./lib/Module/Build/Base.pm:  if ( not eval { require PAR::Dist; 
PAR::Dist->VERSION(0.17) } ) {
./lib/Module/Build/Base.pm:      . "install PAR::Dist first."
./lib/Module/Build/Base.pm:  return PAR::Dist::blib_to_par(
./blib/lib/Module/Build/Base.pm:  # Need PAR::Dist
./blib/lib/Module/Build/Base.pm:  if ( not eval { require PAR::Dist; 
PAR::Dist->VERSION(0.17) } ) {
./blib/lib/Module/Build/Base.pm:      . "install PAR::Dist first."
./blib/lib/Module/Build/Base.pm:  return PAR::Dist::blib_to_par(


Differnce between the two....

$ doas -u _pbuild diff -ruq p5-Module-Build-0.42.08/fake-amd64/ 
p5-Module-Build-0.4208/fake-amd64/        
diff -ruq 
p5-Module-Build-0.42.08/fake-amd64/usr/local/libdata/perl5/site_perl/Module/Build/ConfigData.pm
 
p5-Module-Build-0.4208/fake-amd64/usr/local/libdata/perl5/site_perl/Module/Build/ConfigData.pm
Files 
p5-Module-Build-0.42.08/fake-amd64/usr/local/libdata/perl5/site_perl/Module/Build/ConfigData.pm
 and 
p5-Module-Build-0.4208/fake-amd64/usr/local/libdata/perl5/site_perl/Module/Build/ConfigData.pm
 differ
diff -ruq 
p5-Module-Build-0.42.08/fake-amd64/usr/local/libdata/perl5/site_perl/amd64-openbsd/auto/Module/Build/.packlist
 
p5-Module-Build-0.4208/fake-amd64/usr/local/libdata/perl5/site_perl/amd64-openbsd/auto/Module/Build/.packlist
Files 
p5-Module-Build-0.42.08/fake-amd64/usr/local/libdata/perl5/site_perl/amd64-openbsd/auto/Module/Build/.packlist
 and 
p5-Module-Build-0.4208/fake-amd64/usr/local/libdata/perl5/site_perl/amd64-openbsd/auto/Module/Build/.packlist
 differ
$ 

.packlist has the path so p5-Module-Build-0.4208 
p5-Module-Build-0.42.08 don't match

ConfigData.pm it's a perl thing a data structure, the hashing ordering causes a 
mismatch.
 





Module::Install - yes runs with 5.22, providing add BDEP on Module::Build. 
Moved 
to v1.16 of Module::Install from v1.08 it's just a normal port update.

Some detail about Module::Install has been covered before, best in a 
separate mail(s), new/updates for Module::Install are,

p5-Data-Section.tgz p5-Module-Install-AuthorRequires.tgz
p5-Module-Install-AuthorTests.diff p5-Module-Install-AutoLicense.tgz
p5-Module-Install-AutoManifest.tgz p5-Module-Install-AutomatedTester.tgz
p5-Module-Install-Bugtracker.tgz p5-Module-Install-CheckLib.tgz
p5-Module-Install-CheckOptional.tgz p5-Module-Install-ExtraTests.tgz
p5-Module-Install-GithubMeta.tgz p5-Module-Install-Homepage.tgz
p5-Module-Install-ReadmeFromPod.tgz p5-Module-Install-Repository.diff
p5-Module-Install-TestBase.tgz p5-Module-Install-TestTarget.tgz
p5-Module-Install-XSUtil.diff p5-Module-Install.diff
p5-ShipIt.tgz p5-Software-License.tgz
p5-Test-FailWarnings.tgz p5-Test-Name-FromLine.tgz

then another set switching to modinst / modbuild.


> 
> I've attached my version of this as a port.
> 
>> also attached diff with ports changed to use modbuild tiny (incomplete
>> few ports to do they build as is)
> 
> Looks sane. (side-note, it would be a lot easier to apply a diff
> generated from /usr/ports, rather than have to split up the patch file
> and apply each part manually to the relevant directory)
> 

Attached revised diff, it's generated from /usr/ports/mystuff. I take a copy to 
work 
on and put under mystuff. I cd into directory and did cvs diff Makefile, was 
going 
to do one file for each, instead put output into a single file.


> I'll reply again when the build is done.
> 

Index: devel/p5-MooseX-Types/Makefile
===================================================================
RCS file: /home/cvs/ports/devel/p5-MooseX-Types/Makefile,v
retrieving revision 1.12
diff -u -p -r1.12 Makefile
--- devel/p5-MooseX-Types/Makefile	12 Jun 2015 13:46:08 -0000	1.12
+++ devel/p5-MooseX-Types/Makefile	9 Mar 2016 00:21:40 -0000
@@ -16,10 +16,11 @@ RUN_DEPENDS =	devel/p5-Carp-Clan \
 		devel/p5-Sub-Install \
 		devel/p5-Sub-Name \
 		devel/p5-namespace-autoclean
-BUILD_DEPENDS = ${RUN_DEPENDS} \
-		devel/p5-Module-Build-Tiny
+BUILD_DEPENDS = ${RUN_DEPENDS}
 
 TEST_DEPENDS =	devel/p5-Test-Fatal \
 		devel/p5-Test-Requires
+
+CONFIGURE_STYLE = modbuild tiny
 
 .include <bsd.port.mk>
Index: geo/p5-Geo-UK-Postcode-Regex/Makefile
===================================================================
RCS file: /home/cvs/ports/geo/p5-Geo-UK-Postcode-Regex/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- geo/p5-Geo-UK-Postcode-Regex/Makefile	11 Jan 2016 10:34:21 -0000	1.2
+++ geo/p5-Geo-UK-Postcode-Regex/Makefile	9 Mar 2016 00:21:53 -0000
@@ -11,21 +11,10 @@ PERMIT_PACKAGE_CDROM=	Yes
 
 MAINTAINER=	Stuart Henderson <st...@openbsd.org>
 
-BUILD_DEPENDS=	devel/p5-File-ShareDir-Install \
-		devel/p5-Module-Build-Tiny
+BUILD_DEPENDS=	devel/p5-File-ShareDir-Install
 TEST_DEPENDS=	devel/p5-Test-Exception \
 		devel/p5-Clone
 
-CONFIGURE_STYLE= modbuild
-
-# Module::Build::Tiny like "--" prefix for CLI options
-do-install:
-	@cd ${WRKSRC} && perl \
-	    ${MODPERL_BUILD} ${FAKE_TARGET} \
-		--destdir "${PREFIX}" \
-		--install_path lib="libdata/perl5/site_perl" \
-		--install_path=libdoc="man/man3p" \
-		--install_path=bindoc="man/man1" \
-		--install_path script="bin"
+CONFIGURE_STYLE= modbuild tiny
 
 .include <bsd.port.mk>
Index: www/p5-CGI-Compile/Makefile
===================================================================
RCS file: /home/cvs/ports/www/p5-CGI-Compile/Makefile,v
retrieving revision 1.4
diff -u -p -r1.4 Makefile
--- www/p5-CGI-Compile/Makefile	4 Jan 2016 08:20:04 -0000	1.4
+++ www/p5-CGI-Compile/Makefile	9 Mar 2016 00:22:12 -0000
@@ -9,20 +9,12 @@ CATEGORIES=	www
 # Perl
 PERMIT_PACKAGE_CDROM=	Yes
 
-CONFIGURE_STYLE=modbuild
+CONFIGURE_STYLE=modbuild tiny
 
-BUILD_DEPENDS =	${RUN_DEPENDS} \
-		devel/p5-Module-Build-Tiny>=0.039
+BUILD_DEPENDS =	${RUN_DEPENDS}
 
 RUN_DEPENDS =	devel/p5-File-pushd
 
 TEST_DEPENDS =	devel/p5-Test-NoWarnings
-
-do-install:
-	@cd ${WRKSRC} && perl \
-	    ${MODPERL_BUILD} ${FAKE_TARGET} \
-		--destdir "${PREFIX}" \
-		--install_path lib="libdata/perl5/site_perl" \
-		--install_path libdoc="man/man3p"
 
 .include <bsd.port.mk>
Index: www/p5-Starman/Makefile
===================================================================
RCS file: /home/cvs/ports/www/p5-Starman/Makefile,v
retrieving revision 1.5
diff -u -p -r1.5 Makefile
--- www/p5-Starman/Makefile	10 Jan 2016 22:49:37 -0000	1.5
+++ www/p5-Starman/Makefile	9 Mar 2016 00:22:25 -0000
@@ -13,7 +13,6 @@ PERMIT_PACKAGE_CDROM =	Yes
 CPAN_AUTHOR =		MIYAGAWA
 
 BUILD_DEPENDS =		www/p5-libwww \
-			devel/p5-Module-Build-Tiny>=0.039 \
 			devel/p5-Test-Requires
 
 RUN_DEPENDS =		devel/p5-Data-Dump \
@@ -32,16 +31,6 @@ TEST_DEPENDS =		www/p5-HTTP-Message \
 			net/p5-Test-TCP \
 			www/p5-libwww
 
-CONFIGURE_STYLE =	modbuild
-
-# Module::Build::Tiny like "--" prefix for CLI options
-do-install:
-	@cd ${WRKSRC} && perl \
-	    ${MODPERL_BUILD} ${FAKE_TARGET} \
-		--destdir "${PREFIX}" \
-		--install_path lib="libdata/perl5/site_perl" \
-		--install_path=libdoc="man/man3p" \
-		--install_path=bindoc="man/man1" \
-		--install_path script="bin"
+CONFIGURE_STYLE =	modbuild tiny
 
 .include <bsd.port.mk>

Reply via email to