On Sat, Jan 22, 2022 at 02:24:51AM +0100, Marc Espie wrote:
> Or we can automate this with something like this:
>
> 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 21 Jan 2022 17:39:18 -0000
> @@ -56,6 +56,11 @@ MODPERL_pre-configure = for f in ${MODPE
> ${MODPERL_BIN_ADJ} ${WRKSRC}/$${f}; done
> .endif
>
> +MODPERL_gen = cd ${WRKDIST} && \
> + if test -f ppport.h; then \
> + perl -MDevel::PPPort -e'Devel::PPPort::WriteFile'; \
> + fi
> +
> .if ${CONFIGURE_STYLE:L:Mmodbuild}
> MODPERL_configure = \
> cd ${WRKSRC}; ${SETENV} ${CONFIGURE_ENV} \
I have tried it with my Perl ports testing site.
http://bluhm.genua.de/portstest/results/regress-ot29.html
Logfile size went from 19.2 to 2.9 MB. Before I had 17590
compound-token-split-by-macro warnings, now there are 464 left.
databases/p5-DBI and devel/p5-YAML-XS do something special and still
generate warnings.
databases/p5-CDB_File and devel/p5-Moose fail to build.
http://bluhm.genua.de/portstest/results/2022-01-25T13%3A50%3A36Z/logs/databases/p5-CDB_File/make.log
http://bluhm.genua.de/portstest/results/2022-01-25T13%3A50%3A36Z/logs/devel/p5-Moose/make.log
CDB_File.xs:74:5: error: function-like macro 'PERL_VERSION_LE' is not defined
#if PERL_VERSION_LE(5,13,7)
^
CDB_File.xs:322:5: error: function-like macro 'PERL_VERSION_GT' is not defined
#if PERL_VERSION_GT(5,13,7)
^
mop.c:13:5: error: function-like macro 'PERL_VERSION_GE' is not defined
#if PERL_VERSION_GE(5,10,0)
^
bluhm