On 2022/03/10 19:38, Andrew Hewus Fresh wrote:
> On Fri, Mar 11, 2022 at 01:02:04AM +0100, Alexander Bluhm wrote:
> > Hi,
> > 
> > Can we commit espie@'s diff to fix the -Wcompound-token-split-by-macro
> > compiler warnings?  It reduces the size of my logfiles a lot and
> > allows to look at the build output of XS Perl ports.
> 
> I'm not opposed, but defer to sthen@ on whether any bumping needs to
> happen and therefore if it's better to one-off it in the offenders with
> a patch file.
> 
> The only other thing is that I wish it would compare
> `perl ppport.h --version`  to 
> `perl -MDevel::PPPort -E 'say Devel::PPPort->VERSION'`
> and only update if ours is newer, since I don't watch that closely.
> I suppose it's fairly unlikely that it will invisibly break something
> though.

The ppport.h in a distribution may have been stripped, in which case
--version is unavailable.

This might be simpler if Devel::PPPort itself could check the version.

> With those things considered,
> OK afresh1@

I would like it to not be invisible, and to have a way to disable it.
How about this?

Did it go through a bulk build already?

Index: perl.port.mk
===================================================================
RCS file: /cvs/ports/infrastructure/mk/perl.port.mk,v
retrieving revision 1.32
diff -u -p -r1.32 perl.port.mk
--- perl.port.mk        12 Dec 2021 19:25:39 -0000      1.32
+++ perl.port.mk        11 Mar 2022 07:38:10 -0000
@@ -44,6 +44,8 @@ PERL_MB_OPT = --install_path=lib=${LOCAL
 CONFIGURE_ENV +=       PERL_MB_OPT="${PERL_MB_OPT}"
 #MAKE_ENV +=           PERL_MB_OPT="${PERL_MB_OPT}"
 
+MODPERL_REGEN_PPPORT ?=        Yes
+
 # set /usr/bin/perl for executable scripts
 MODPERL_BIN_ADJ =      perl -pi \
        -e '$$. == 1 && s|^.*env 
perl([0-9.]*)([\s].*)?$$|\#!/usr/bin/perl$$2|;' \
@@ -54,6 +56,15 @@ MODPERL_ADJ_FILES ?=
 .if !empty(MODPERL_ADJ_FILES)
 MODPERL_pre-configure = for f in ${MODPERL_ADJ_FILES}; do \
        ${MODPERL_BIN_ADJ} ${WRKSRC}/$${f}; done
+.endif
+
+.if ${MODPERL_REGEN_PPPORT:L:Myes}
+MODPERL_gen = cd ${WRKDIST} && \
+       if test -f ppport.h; then \
+               echo "Regenerating ppport.h"; \
+               cp ppport.h ppport.h.orig.ppport; \
+               perl -MDevel::PPPort -e'Devel::PPPort::WriteFile'; \
+       fi
 .endif
 
 .if ${CONFIGURE_STYLE:L:Mmodbuild}

Reply via email to