From d33402f4dd32f20fe59863c170e0958be70e6e7e Mon Sep 17 00:00:00 2001 From: i0ntempest Date: Tue, 2 Apr 2024 19:35:05 -0400 Subject: [PATCH 1/2] po4a: update to 0.73 Patch files in patch phase Closes: https://trac.macports.org/ticket/65233 --- textproc/po4a/Portfile | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/textproc/po4a/Portfile b/textproc/po4a/Portfile index a6fd1723aafe8..57fe2bc68f85c 100644 --- a/textproc/po4a/Portfile +++ b/textproc/po4a/Portfile @@ -4,7 +4,7 @@ PortSystem 1.0 PortGroup github 1.0 PortGroup perl5 1.0 -github.setup mquinson po4a 0.69 v +github.setup mquinson po4a 0.73 v revision 0 # NOTE: Presently this port assumes core module Pod::Parser, which @@ -34,13 +34,12 @@ long_description The po4a (PO for anything) project goal is to ease \ homepage https://po4a.org/ github.tarball_from releases -checksums rmd160 4414dcdbf920c8d2761d9952b2e63c4a60672e00 \ - sha256 7cd4aff13661665ec2d9df478757ae407683d4ecb5c2627ccf8b46729bcb9496 \ - size 4665710 +checksums rmd160 3b78a27dc79390406a98d667b88b03b11d6f089e \ + sha256 6f18f82d8cb2a377394137ea396cc3e8195d6cd6e454fe0218aa0f0e36038ea0 \ + size 5117198 # TODO: check and fix dependencies -depends_lib-append \ - port:p${perl5.major}-locale-gettext \ +depends_lib-append port:p${perl5.major}-locale-gettext \ port:p${perl5.major}-sgmlspm \ port:p${perl5.major}-sgml-parser-opensp \ port:p${perl5.major}-term-readkey \ @@ -72,15 +71,18 @@ depends_build-append \ port:p${perl5.major}-pathtools \ port:p${perl5.major}-text-parsewords -configure.args "installdirs=core --config cc=\"${configure.cc}\" --config ld=\"${configure.cc}\"" -perl5.use_module_build -configure.cmd ${perl5.bin} -build.cmd ${perl5.bin} -destroot.cmd ${perl5.bin} - -post-destroot { +post-patch { + reinplace "s|/usr/bin/perl|${perl5.bin}|" ${worksrcpath}/Build.PL + reinplace "s|/usr/bin/env perl|${perl5.bin}|" ${worksrcpath}/scripts/msgsearch + reinplace "s|/usr/bin/env perl|${perl5.bin}|" ${worksrcpath}/lib/Locale/Po4a/Gemtext.pm + reinplace -W ${worksrcpath}/lib/Locale/Po4a "s|/usr/bin/perl|${perl5.bin}|" \ + {*}[glob -tails -directory ${worksrcpath}/lib/Locale/Po4a *.pm] + reinplace -W ${worksrcpath}/lib/Locale/Po4a/InProgress "s|/usr/bin/perl|${perl5.bin}|" \ + {*}[glob -tails -directory ${worksrcpath}/lib/Locale/Po4a/InProgress *.pm] + reinplace -W ${worksrcpath}/t "s|/usr/bin/perl|${perl5.bin}|" \ + {*}[glob -tails -directory ${worksrcpath}/t *.t] # Make sure all binaries use the correct MacPorts-provided perl version - reinplace -W ${destroot}${prefix}/bin "s|#! /usr/bin/env perl|#!${perl5.bin}|" \ + reinplace -W ${worksrcpath} "s|/usr/bin/env perl|${perl5.bin}|" \ msguntypot \ po4a \ po4a-gettextize \ @@ -88,3 +90,7 @@ post-destroot { po4a-translate \ po4a-updatepo } + +configure.args "installdirs=core --config cc=\"${configure.cc}\" --config ld=\"${configure.cc}\"" +perl5.use_module_build +configure.cmd ${perl5.bin} From 76d6124dffde92265f27e4635dc542b5c8f5b5e4 Mon Sep 17 00:00:00 2001 From: i0ntempest Date: Sat, 25 May 2024 19:26:37 -0400 Subject: [PATCH 2/2] po4a: temporary workaround for macOS 14 --- textproc/po4a/Portfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/textproc/po4a/Portfile b/textproc/po4a/Portfile index 57fe2bc68f85c..f4a0f5bd5410a 100644 --- a/textproc/po4a/Portfile +++ b/textproc/po4a/Portfile @@ -3,6 +3,7 @@ PortSystem 1.0 PortGroup github 1.0 PortGroup perl5 1.0 +PortGroup active_variants 1.1 github.setup mquinson po4a 0.73 v revision 0 @@ -47,6 +48,11 @@ depends_lib-append port:p${perl5.major}-locale-gettext \ port:p${perl5.major}-unicode-linebreak \ port:p${perl5.major}-yaml-tiny +# Temporary workwround for macOS 14 where system perl is being picked up +depends_lib-append port:perl5 +require_active_variants \ + perl5 perl[string map {. _} ${perl5.major}] + if {${perl5.major} > 5.30} { depends_lib-append \ port:p${perl5.major}-pod-parser