Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

po4a: update to 0.73 #23327

Merged
merged 2 commits into from
Aug 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 26 additions & 14 deletions textproc/po4a/Portfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

Check warning on line 1 in textproc/po4a/Portfile

View workflow job for this annotation

GitHub Actions / macos-12

port test po4a: Warning: po4a is configured to build for the architecture(s) 'x86_64', but did not install any Mach-O files.

Check warning on line 1 in textproc/po4a/Portfile

View workflow job for this annotation

GitHub Actions / macos-13

port test po4a: Warning: po4a is configured to build for the architecture(s) 'x86_64', but did not install any Mach-O files.

Check warning on line 1 in textproc/po4a/Portfile

View workflow job for this annotation

GitHub Actions / macos-14

port test po4a: Warning: po4a is configured to build for the architecture(s) 'arm64', but did not install any Mach-O files.

Check warning on line 1 in textproc/po4a/Portfile

View workflow job for this annotation

GitHub Actions / macos-12

port test po4a: Warning: po4a is configured to build for the architecture(s) 'x86_64', but did not install any Mach-O files.

Check warning on line 1 in textproc/po4a/Portfile

View workflow job for this annotation

GitHub Actions / macos-14

port test po4a: Warning: po4a is configured to build for the architecture(s) 'arm64', but did not install any Mach-O files.

Check warning on line 1 in textproc/po4a/Portfile

View workflow job for this annotation

GitHub Actions / macos-13

port test po4a: Warning: po4a is configured to build for the architecture(s) 'x86_64', but did not install any Mach-O files.

PortSystem 1.0
PortGroup github 1.0
PortGroup perl5 1.0
PortGroup active_variants 1.1

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
Expand Down Expand Up @@ -34,20 +35,24 @@
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 \
port:p${perl5.major}-text-wrapi18n \
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
Expand All @@ -72,19 +77,26 @@
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 \
po4a-normalize \
po4a-translate \
po4a-updatepo
}

configure.args "installdirs=core --config cc=\"${configure.cc}\" --config ld=\"${configure.cc}\""
perl5.use_module_build
configure.cmd ${perl5.bin}