pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/textproc/po4a



Module Name:    pkgsrc
Committed By:   adam
Date:           Mon Jan 29 16:08:21 UTC 2024

Modified Files:
        pkgsrc/textproc/po4a: Makefile distinfo
        pkgsrc/textproc/po4a/patches: patch-Po4aBuilder.pm
            patch-lib_Locale_Po4a_Po.pm patch-msguntypot patch-po4a
            patch-po4a-updatepo
Removed Files:
        pkgsrc/textproc/po4a/patches: patch-lib_Locale_Po4a_Sgml.pm
            patch-lib_Locale_Po4a_Text.pm

Log Message:
po4a: updated to 0.70

0.70
The PerlIO cleanup release

Major cleanup:

Greatly simplify the code by using PerlIO instead of messing up with encodings manually.
This is a very intrusive change, and even if all tests of our comprehensive suite pass, I still expect issues with this on some corner cases, such as projects not using UTF-8 but a mixture of 
encodings. Please report any issue, and accept my apologies.
This greatly simplifies the code, enabling future maintenance.
Asciidoc:

Correctly handle lines that start with a dot in a paragraph. Thanks Jean-Noël Avila for the pull request.
Labels of cross-references were not translatable. Thanks Jean-Noël Avila for the pull request.
Fix a bug in the handling of the 'id' attribute. Thanks Jean-Noël Avila for the pull request.
Process multi-line attributes in legacy and asciidoctor mode. Thanks Jean-Noël Avila for the pull request.
Process transparent index entries in their own segmentst. Thanks Jean-Noël Avila for the pull request.
Keep original formating. Thanks suddenfall for the feedback, and Jean-Noël Avila for the fixes.
Fix a bug in handling of bold text starting a list item. Thanks Jean-Noël Avila for the pull request.
Fix handling of linebreaks in lists). Thanks Jean-Noël Avila for the pull request.
Tex:

Allow verbatim environment declaration without trailing space. Thanks Mayeul Cantan for the report & the fix.
Informative error message when file not found for \input, indicating how to skip this include [mquinson].
Texinfo:

Translate partial menu node names [Apteryks].
Markdown:

Treat link reference definitions as no-wrap [gemmaro].
Don't emit a warning when provided an empty tag list in YFM [Martin].
YAML:

Verbosely fail on inline lists and dictionaries, as YAML::Tiny does not handle them as lists or dicts anyway. Do quote list-looking strings [Martin & gemmaro].
General:

Don't fail on empty po files, e.g. adoc files containing only includes. Thanks Suddenfall for the report & fix.
Fix an encoding error in one file which resulted in build errors with new gettext versions. Thanks to Jan Palus for the issue report and the fix.
Use the semantic of Perl v5.12 (released in 2012) instead of the previously requested one (v5.6 release in 2000). This is to request the unicode_strings feature, making the utf strings more 
predictable.
Accept BOM markers at the beginning of files [Mt]
Specify in the README.md and in all source files that the license is GPL2+, not GPL2-only [Mt]
Documentation:

Improve the description of the internals, in the hope that potential contributors will become proficient quickly and help us. [Mt]
Revamp the po4a(7) document now that the po4a-* scripts are deprecated. Explain why they are, and don't mention them in the described workflow. [Mt]
po4a main script (the deprecated po4a-* scripts are still buggy):

Deal properly with CRLF files coming from windows.
Allow to escape spaces in file names, or to quote them.
Do not pass empty PO files to msgmerge, as it stumbles on such things when the POT file has UTF chars in the msgids. [Mt]
po4a-translate:

Remove the wrap-po option that was not used internally.
po4a-updatepo:

Do not pass empty PO files to msgmerge, as it stumbles on such things when the POT file has UTF chars in the msgids. [Mt]
Build scripts:

Use xmlcatalog(1) to find DocBook XSL file.
Translations:

Updated: Chinese (traditional), thanks Haowei Hsu.
Updated: French, thanks Jérémie Tarot, brandelune and Jean-Baptiste Holcroft.
Updated: Georgian, thanks Temuri Doghonadze.
Updated: German, thanks Helge Kreutzmann.
Updated: Italian, thanks Marco Ciampa.
Updated: Japanese, thanks gemmaro.
Updated: Norwegian Bokmål, thanks Allan Nordhøy and Petter Reinholdtsen.
Updated: Portuguese, thanks Silvério Santos.
Updated: Russian, thanks vrbtm, Виталий Наумов and Golubev Alexander.
Updated: Serbian (cyrillic), thanks Ivan Pesic.
Updated: Spanish, thanks Francisco Serrador, ignotus and gallegonovato.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 pkgsrc/textproc/po4a/Makefile
cvs rdiff -u -r1.29 -r1.30 pkgsrc/textproc/po4a/distinfo
cvs rdiff -u -r1.10 -r1.11 pkgsrc/textproc/po4a/patches/patch-Po4aBuilder.pm
cvs rdiff -u -r1.2 -r1.3 \
    pkgsrc/textproc/po4a/patches/patch-lib_Locale_Po4a_Po.pm
cvs rdiff -u -r1.1 -r0 \
    pkgsrc/textproc/po4a/patches/patch-lib_Locale_Po4a_Sgml.pm \
    pkgsrc/textproc/po4a/patches/patch-lib_Locale_Po4a_Text.pm
cvs rdiff -u -r1.1 -r1.2 pkgsrc/textproc/po4a/patches/patch-msguntypot \
    pkgsrc/textproc/po4a/patches/patch-po4a
cvs rdiff -u -r1.3 -r1.4 pkgsrc/textproc/po4a/patches/patch-po4a-updatepo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/textproc/po4a/Makefile
diff -u pkgsrc/textproc/po4a/Makefile:1.61 pkgsrc/textproc/po4a/Makefile:1.62
--- pkgsrc/textproc/po4a/Makefile:1.61  Wed Nov  8 13:21:08 2023
+++ pkgsrc/textproc/po4a/Makefile       Mon Jan 29 16:08:20 2024
@@ -1,10 +1,9 @@
-# $NetBSD: Makefile,v 1.61 2023/11/08 13:21:08 wiz Exp $
+# $NetBSD: Makefile,v 1.62 2024/01/29 16:08:20 adam Exp $
 
-DISTNAME=      po4a-0.69
-PKGREVISION=   5
+DISTNAME=      po4a-0.70
 CATEGORIES=    textproc
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=mquinson/}
-GITHUB_RELEASE=        v${PKGVERSION_NOREV}
+GITHUB_TAG=    v${PKGVERSION_NOREV}
 
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=      https://po4a.org/

Index: pkgsrc/textproc/po4a/distinfo
diff -u pkgsrc/textproc/po4a/distinfo:1.29 pkgsrc/textproc/po4a/distinfo:1.30
--- pkgsrc/textproc/po4a/distinfo:1.29  Mon Jul  3 21:16:53 2023
+++ pkgsrc/textproc/po4a/distinfo       Mon Jan 29 16:08:20 2024
@@ -1,12 +1,10 @@
-$NetBSD: distinfo,v 1.29 2023/07/03 21:16:53 wiz Exp $
+$NetBSD: distinfo,v 1.30 2024/01/29 16:08:20 adam Exp $
 
-BLAKE2s (po4a-0.69.tar.gz) = c82a56664a6a9a674b02f1026843d65aea6671c913738f6e1e565d7242dbe96d
-SHA512 (po4a-0.69.tar.gz) = 9cb5eec547ab18d1c3ebdda212b909fc4f5489a74641ba2d7e0a3a1d060f245d23667c16e687c678c5ccc3809c9315d20673266dcc3764172a899caa397238e3
-Size (po4a-0.69.tar.gz) = 4665710 bytes
-SHA1 (patch-Po4aBuilder.pm) = b5a3dae1f53c56e78dbc1034f6313cbede00ce3a
-SHA1 (patch-lib_Locale_Po4a_Po.pm) = 481171dc8f7cbceb0d532f8d3074750d2de82b10
-SHA1 (patch-lib_Locale_Po4a_Sgml.pm) = 3179dd9c39ce8bc346ca6b4ec7bb9ea9a399eb1b
-SHA1 (patch-lib_Locale_Po4a_Text.pm) = d019287e6c03671da4433689691b5447a665208e
-SHA1 (patch-msguntypot) = 299b1ee02dfce836980eee3b7d5ae23256b66cd8
-SHA1 (patch-po4a) = 114b1ea9247bdcc17ed125c19d57d10fb3bca805
-SHA1 (patch-po4a-updatepo) = 22c328728180ea3e572717b6ffd394da4ca30b5a
+BLAKE2s (po4a-0.70.tar.gz) = 2314f3fdc095f26a3c1b6a5cd96713f9e7b3e3c68af7e2bdc0c98738068691cf
+SHA512 (po4a-0.70.tar.gz) = 8ff546776e9f9bc5d9612c734dbb029d232755950177cbb57c1afc5d3384c663d7fd9939ac63a2044fd55ac11ee4fd0552d90cc1e5ea662539f509b27e038a94
+Size (po4a-0.70.tar.gz) = 3946179 bytes
+SHA1 (patch-Po4aBuilder.pm) = ae2ff848ff6ed4812e0cfcbc867a976973919b52
+SHA1 (patch-lib_Locale_Po4a_Po.pm) = 502e4f4a894db186c7218cbb69633cce62b50b8d
+SHA1 (patch-msguntypot) = 0f53ba5a0a76021c52becec9f0d31e67c998ae0a
+SHA1 (patch-po4a) = b589f42086f3a6471bba30b13face9e6983797bd
+SHA1 (patch-po4a-updatepo) = 1426fac95251eb8aa0ff6b74e3183e8fce470743

Index: pkgsrc/textproc/po4a/patches/patch-Po4aBuilder.pm
diff -u pkgsrc/textproc/po4a/patches/patch-Po4aBuilder.pm:1.10 pkgsrc/textproc/po4a/patches/patch-Po4aBuilder.pm:1.11
--- pkgsrc/textproc/po4a/patches/patch-Po4aBuilder.pm:1.10      Wed Jun 21 19:08:06 2023
+++ pkgsrc/textproc/po4a/patches/patch-Po4aBuilder.pm   Mon Jan 29 16:08:20 2024
@@ -1,4 +1,4 @@
-$NetBSD: patch-Po4aBuilder.pm,v 1.10 2023/06/21 19:08:06 schmonz Exp $
+$NetBSD: patch-Po4aBuilder.pm,v 1.11 2024/01/29 16:08:20 adam Exp $
 
 (1) ryoon: remove gzip at initial import.
 (2) mef: Add PerlIO::F_UTF8 () macro.
@@ -6,27 +6,27 @@ $NetBSD: patch-Po4aBuilder.pm,v 1.10 202
 (4) schmonz: Invoke pkgsrc's gettext-tools.
 (5) schmonz: Write to the full physical null device.
 
---- Po4aBuilder.pm.orig        2023-01-01 00:30:43.000000000 +0000
+--- Po4aBuilder.pm.orig        2024-01-28 23:39:44.000000000 +0000
 +++ Po4aBuilder.pm
-@@ -9,6 +9,8 @@ use File::stat;
+@@ -16,6 +16,8 @@ use File::stat;
  
- @ISA = qw(Module::Build);
+ our @ISA = qw(Module::Build);
  
 +sub PerlIO::F_UTF8 () { 0x00008000 } # from perliol.h
 +
  sub ACTION_build {
      my $self = shift;
      $self->depends_on('code');
-@@ -60,7 +62,7 @@ sub ACTION_binpo {
+@@ -67,7 +69,7 @@ sub ACTION_binpo {
          chdir "../..";
        
          if ( -e "po/bin/po4a.pot") {
--            $diff = qx(diff -q -I'#:' -I'POT-Creation-Date:' -I'PO-Revision-Date:' po/bin/po4a.pot po/bin/po4a.pot.new);
-+            $diff = qx(@DIFF@ -q -I'#:' -I'POT-Creation-Date:' -I'PO-Revision-Date:' po/bin/po4a.pot po/bin/po4a.pot.new);
+-            my $diff = qx(diff -q -I'#:' -I'POT-Creation-Date:' -I'PO-Revision-Date:' po/bin/po4a.pot po/bin/po4a.pot.new);
++            my $diff = qx(@DIFF@ -q -I'#:' -I'POT-Creation-Date:' -I'PO-Revision-Date:' po/bin/po4a.pot po/bin/po4a.pot.new);
              if ( $diff eq "" ) {
                  unlink "po/bin/po4a.pot.new" || die;
                  # touch it
-@@ -82,11 +84,11 @@ sub ACTION_binpo {
+@@ -89,11 +91,11 @@ sub ACTION_binpo {
        if (0) {
          unless ($self->up_to_date("po/bin/po4a.pot", $_)) {
              print "XX Sync $_: ";
@@ -35,12 +35,12 @@ $NetBSD: patch-Po4aBuilder.pm,v 1.10 202
              # Typically all that changes was a date. I'd
              # prefer not to commit such changes, so detect
              # and ignore them.
--            $diff = qx(diff -q -I'#:' -I'POT-Creation-Date:' -I'PO-Revision-Date:' $_ $_.new);
-+            $diff = qx(@DIFF@ -q -I'#:' -I'POT-Creation-Date:' -I'PO-Revision-Date:' $_ $_.new);
+-            my $diff = qx(diff -q -I'#:' -I'POT-Creation-Date:' -I'PO-Revision-Date:' $_ $_.new);
++            my $diff = qx(@DIFF@ -q -I'#:' -I'POT-Creation-Date:' -I'PO-Revision-Date:' $_ $_.new);
              if ($diff eq "") {
                  unlink "$_.new" || die;
                  # touch it
-@@ -101,7 +103,7 @@ sub ACTION_binpo {
+@@ -108,7 +110,7 @@ sub ACTION_binpo {
        }
          unless ($self->up_to_date($_,"blib/po/$lang/LC_MESSAGES/po4a.mo")) {
              mkpath( File::Spec->catdir( 'blib', 'po', $lang, "LC_MESSAGES" ), 0, oct(755) );
@@ -49,41 +49,41 @@ $NetBSD: patch-Po4aBuilder.pm,v 1.10 202
          }
      }
  }
-@@ -222,9 +224,9 @@ sub ACTION_man {
-                 $parser->{release} = $parser->{center} = "Po4a Tools";
+@@ -230,9 +232,9 @@ sub ACTION_man {
+             $parser->{release} = $parser->{center} = "Po4a Tools";
          } else {
-                 my $command;
--                $command = "msggrep -K -E -e \"Po4a Tools\" po/pod/$lang.po |";
--                $command .= "msgconv -t UTF-8 | ";
--                $command .= "msgexec /bin/sh -c '[ -n \"\$MSGEXEC_MSGID\" ] ";
-+                $command = "@PREFIX@/bin/msggrep -K -E -e \"Po4a Tools\" po/pod/$lang.po |";
-+                $command .= "@PREFIX@/bin/msgconv -t UTF-8 | ";
-+                $command .= "@PREFIX@/bin/msgexec @SH@ -c '[ -n \"\$MSGEXEC_MSGID\" ] ";
-                 $command .= "&& cat || cat > /dev/null'";
+             my $command;
+-            $command = "msggrep -K -E -e \"Po4a Tools\" po/pod/$lang.po |";
+-            $command .= "msgconv -t UTF-8 | ";
+-            $command .= "msgexec /bin/sh -c '[ -n \"\$MSGEXEC_MSGID\" ] ";
++            $command = "@PREFIX@/bin/msggrep -K -E -e \"Po4a Tools\" po/pod/$lang.po |";
++            $command .= "@PREFIX@/bin/msgconv -t UTF-8 | ";
++            $command .= "@PREFIX@/bin/msgexec @SH@ -c '[ -n \"\$MSGEXEC_MSGID\" ] ";
+             $command .= "&& cat || cat > /dev/null'";
  
-                 my $title = `$command 2> /dev/null`;
-@@ -234,8 +236,6 @@ sub ACTION_man {
+             my $title = `$command 2> /dev/null`;
+@@ -242,8 +244,6 @@ sub ACTION_man {
          }
-         $parser->parse_from_file ($file, $out);
+         $parser->parse_from_file( $file, $out );
  
 -        system("gzip -9 -n -f $out") and die;
 -        unlink "$file" || die;
      }
  
-     if ($^O ne 'MSWin32') {
-@@ -253,9 +253,7 @@ sub ACTION_man {
-             print "Convert $outdir/$outfile.$section (online docbook.xsl file). ";
-             system("xsltproc -o $outdir/$outfile.$section --nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $file") and die;
-             }
--                system ("gzip -9 -n -f $outdir/$outfile.$section") and die;
+     if ( $^O ne 'MSWin32' ) {
+@@ -264,9 +264,7 @@ sub ACTION_man {
+                     print "Convert $outdir/$outfile.$section (online docbook.xsl file). ";
+                     system("xsltproc -o $outdir/$outfile.$section --nonet $docbook_xsl_url $file") and die;
+                 }
+-                system("gzip -9 -n -f $outdir/$outfile.$section") and die;
              }
 -            unlink "$file" || die;
          }
      }
  }
-@@ -284,7 +282,7 @@ sub postats {
-     foreach (sort @files) {
-         $file = $_;
+@@ -294,7 +292,7 @@ sub postats {
+     my (@t100,@t95,@t90,@t80,@t70,@t50,@t33,@t20,@starting);
+     foreach my $file (sort @files) {
          my $lang = fileparse($file, qw{.po});
 -        my $stat = `msgfmt -o /dev/null -c --statistics $file 2>&1`;
 +        my $stat = `@PREFIX@/bin/msgfmt -o @PO4A_DEVNULL@ -c --statistics $file 2>&1`;

Index: pkgsrc/textproc/po4a/patches/patch-lib_Locale_Po4a_Po.pm
diff -u pkgsrc/textproc/po4a/patches/patch-lib_Locale_Po4a_Po.pm:1.2 pkgsrc/textproc/po4a/patches/patch-lib_Locale_Po4a_Po.pm:1.3
--- pkgsrc/textproc/po4a/patches/patch-lib_Locale_Po4a_Po.pm:1.2        Wed Jun 21 19:08:06 2023
+++ pkgsrc/textproc/po4a/patches/patch-lib_Locale_Po4a_Po.pm    Mon Jan 29 16:08:20 2024
@@ -1,20 +1,20 @@
-$NetBSD: patch-lib_Locale_Po4a_Po.pm,v 1.2 2023/06/21 19:08:06 schmonz Exp $
+$NetBSD: patch-lib_Locale_Po4a_Po.pm,v 1.3 2024/01/29 16:08:20 adam Exp $
 
 Use a sufficiently capable diff.
 Write to the full physical null device.
 
---- lib/Locale/Po4a/Po.pm.orig 2023-01-01 00:30:43.000000000 +0000
+--- lib/Locale/Po4a/Po.pm.orig 2024-01-28 23:39:44.000000000 +0000
 +++ lib/Locale/Po4a/Po.pm
-@@ -325,7 +325,7 @@ sub read {
-     $lang =~ s/\.po$//;
+@@ -329,7 +329,7 @@ sub read {
      $self->{lang} = $lang;
  
--    my $cmd = "msgfmt" . $Config{_exe} . " --check-format --check-domain -o /dev/null " . $filename;
-+    my $cmd = "@PREFIX@/bin/msgfmt" . $Config{_exe} . " --check-format --check-domain -o @PO4A_DEVNULL@ " . $filename;
+     if ($checkvalidity) {   # We sometimes need to read a file even if it may be invalid (eg to test whether it's empty)
+-        my $cmd = "msgfmt" . $Config{_exe} . " --check-format --check-domain -o /dev/null \"" . $filename . '"';
++        my $cmd = "@PREFIX@/bin/msgfmt" . $Config{_exe} . " --check-format --check-domain -o /dev/null \"" . $filename . '"';
  
-     my $locale = $ENV{'LC_ALL'};
-     $ENV{'LC_ALL'} = "C";
-@@ -621,7 +621,7 @@ sub move_po_if_needed {
+         my $locale = $ENV{'LC_ALL'};
+         $ENV{'LC_ALL'} = "C";
+@@ -634,7 +634,7 @@ sub move_po_if_needed {
      my $diff;
  
      if ( -e $old_po ) {

Index: pkgsrc/textproc/po4a/patches/patch-msguntypot
diff -u pkgsrc/textproc/po4a/patches/patch-msguntypot:1.1 pkgsrc/textproc/po4a/patches/patch-msguntypot:1.2
--- pkgsrc/textproc/po4a/patches/patch-msguntypot:1.1   Wed Jun 21 19:08:06 2023
+++ pkgsrc/textproc/po4a/patches/patch-msguntypot       Mon Jan 29 16:08:20 2024
@@ -1,15 +1,15 @@
-$NetBSD: patch-msguntypot,v 1.1 2023/06/21 19:08:06 schmonz Exp $
+$NetBSD: patch-msguntypot,v 1.2 2024/01/29 16:08:20 adam Exp $
 
 Invoke pkgsrc's gettext-tools.
 
---- msguntypot.orig    2023-01-01 00:30:43.000000000 +0000
+--- msguntypot.orig    2024-01-28 23:39:44.000000000 +0000
 +++ msguntypot
 @@ -206,7 +206,7 @@ my $pocount = 0;
  while (my $poarg = shift) {
      $pocount ++;
      print wrap_msg(gettext("Handling %s"),$poarg) if $verbose;
--    if (system("msgmerge $msgmergeOpts -o $pofile $poarg $oldfile 2>/dev/null")) {
-+    if (system("@PREFIX@/bin/msgmerge $msgmergeOpts -o $pofile $poarg $oldfile 2>/dev/null")) {
+-    my $cmd = "msgmerge $msgmergeOpts -o $pofile --silent $poarg $oldfile";
++    my $cmd = "@PREFIX@/bin/msgmerge $msgmergeOpts -o $pofile --silent $poarg $oldfile";
+     if (system($cmd)) {
          my $msg = $!;
          unlink ($pofile);
-         die wrap_msg(gettext("Could not run msgmerge: %s"), $msg);
Index: pkgsrc/textproc/po4a/patches/patch-po4a
diff -u pkgsrc/textproc/po4a/patches/patch-po4a:1.1 pkgsrc/textproc/po4a/patches/patch-po4a:1.2
--- pkgsrc/textproc/po4a/patches/patch-po4a:1.1 Wed Jun 21 19:08:06 2023
+++ pkgsrc/textproc/po4a/patches/patch-po4a     Mon Jan 29 16:08:20 2024
@@ -1,11 +1,11 @@
-$NetBSD: patch-po4a,v 1.1 2023/06/21 19:08:06 schmonz Exp $
+$NetBSD: patch-po4a,v 1.2 2024/01/29 16:08:20 adam Exp $
 
 Invoke pkgsrc's gettext-tools.
 Write to the full physical null device.
 
---- po4a.orig  2023-01-01 00:30:43.000000000 +0000
+--- po4a.orig  2024-01-28 23:39:44.000000000 +0000
 +++ po4a
-@@ -723,7 +723,7 @@ sub show_version {
+@@ -724,7 +724,7 @@ sub show_version {
  my @ORIGINAL_ARGV = @ARGV;
  
  # Use /NUL instead of /dev/null on Windows
@@ -14,16 +14,16 @@ Write to the full physical null device.
  
  # Parse the options provided on the command line, or in argument
  sub get_options {
-@@ -1615,7 +1615,7 @@ if ( $po4a_opts{"split"} ) {
+@@ -1694,7 +1694,7 @@ if ( $po4a_opts{"split"} ) {
                  mkdir $dir or die wrap_msg( gettext("Cannot create directory '%s': %s"), $dir, $! );
              }
              my $outfile = $po4a_opts{"force"} ? find_output_file($master_pot) : $tmp_file;
--            my $cmd     = "msggrep$Config{_exe} $split_pot_files{$master_pot} -o $outfile $pot_filename";
-+            my $cmd     = "@PREFIX@/bin/msggrep$Config{_exe} $split_pot_files{$master_pot} -o $outfile $pot_filename";
+-            my $cmd     = "msggrep$Config{_exe} $split_pot_files{$master_pot} -o $outfile $pot_filename --force-po";
++            my $cmd     = "@PREFIX@/bin/msggrep$Config{_exe} $split_pot_files{$master_pot} -o $outfile $pot_filename --force-po";
              run_cmd($cmd);
  
              die wrap_msg(
-@@ -1658,7 +1658,7 @@ if ( $po4a_opts{"split"} ) {
+@@ -1737,7 +1737,7 @@ if ( $po4a_opts{"split"} ) {
              $split_po{$lang}{$master} = $master_po;
          }
          if ( length $cmd_cat ) {
@@ -32,64 +32,64 @@ Write to the full physical null device.
              run_cmd($cmd_cat);
          }
  
-@@ -1685,7 +1685,7 @@ if ( not $po4a_opts{"no-update"} ) {
- 
+@@ -1773,7 +1773,7 @@ if ( not $po4a_opts{"no-update"} ) {
+             if ($usable_pofile) {
                  my $msgmerge_opt = $po4a_opts{"msgmerge-opt"};
                  $msgmerge_opt =~ s/\$lang\b/$lang/g if scalar @langs;
--                my $cmd = "msgmerge" . $Config{_exe} . " $infile $updated_potfile " . $msgmerge_opt;
-+                my $cmd = "@PREFIX@/bin/msgmerge" . $Config{_exe} . " $infile $updated_potfile " . $msgmerge_opt;
-                 if ( $infile eq $outfile ) {    # in place
+-                my $cmd = "msgmerge" . $Config{_exe} . " \"$infile\" \"$updated_potfile\" " . $msgmerge_opt;
++                my $cmd = "@PREFIX@/bin/msgmerge" . $Config{_exe} . " \"$infile\" \"$updated_potfile\" " . $msgmerge_opt;
+                 if ( $infile eq $outfile ) {           # in place
                      $cmd .= " --backup=none --update";
                  } else {
-@@ -1700,7 +1700,7 @@ if ( not $po4a_opts{"no-update"} ) {
+@@ -1788,7 +1788,7 @@ if ( not $po4a_opts{"no-update"} ) {
                          printf( gettext("Updating %s:"), $po_filename{$lang} );
                      }
  
--                    my $stat = qx(msgfmt$Config{_exe} --statistics -v -o $devnull $outfile 2>&1);
-+                    my $stat = qx(@PREFIX@/bin/msgfmt$Config{_exe} --statistics -v -o $devnull $outfile 2>&1);
+-                    my $stat = qx(msgfmt$Config{_exe} --statistics -v -o $devnull \"$outfile\" 2>&1);
++                    my $stat = qx(@PREFIX@/bin/msgfmt$Config{_exe} --statistics -v -o $devnull \"$outfile\" 2>&1);
                      $stat =~ s/^[^:]*://;
                      print $stat;
                  }
-@@ -1708,7 +1708,7 @@ if ( not $po4a_opts{"no-update"} ) {
-             } else {
+@@ -1804,7 +1804,7 @@ if ( not $po4a_opts{"no-update"} ) {
+ 
                  my $read_pot_filename = find_input_file($pot_filename);
                  my $cmd =
--                  "msginit$Config{_exe} -i $read_pot_filename --locale $lang -o $outfile --no-translator >$devnull";
-+                  "@PREFIX@/bin/msginit$Config{_exe} -i $read_pot_filename --locale $lang -o $outfile --no-translator >$devnull";
+-                  "msginit$Config{_exe} -i \"$read_pot_filename\" --locale $lang -o \"$outfile\" --no-translator >$devnull";
++                  "@PREFIX@/bin/msginit$Config{_exe} -i \"$read_pot_filename\" --locale $lang -o \"$outfile\" --no-translator >$devnull";
                  run_cmd($cmd);
              }
          }
-@@ -1741,13 +1741,13 @@ if ( not $po4a_opts{"no-update"} ) {
+@@ -1837,13 +1837,13 @@ if ( not $po4a_opts{"no-update"} ) {
  
                          $cmd =
                              $env
 -                          . " msggrep$Config{_exe}"
 +                          . " @PREFIX@/bin/msggrep$Config{_exe}"
                            . " --force-po --invert-match --msgid --regexp '.'"
-                           . " --output $tmp_file "
+                           . " --output \"$tmp_file\" "
                            . find_input_file( $split_po{$lang}{$master} );
                      } else {
                          $cmd =
 -                            "msginit$Config{_exe} "
 +                            "@PREFIX@/bin/msginit$Config{_exe} "
-                           . "--no-translator -l $lang --input "
-                           . find_output_file( $split_pot{$master} )
+                           . "--no-translator -l $lang --input " . '"'
+                           . find_output_file( $split_pot{$master} ) . '"'
                            . " --output $tmp_file  >$devnull";
-@@ -1756,7 +1756,7 @@ if ( not $po4a_opts{"no-update"} ) {
+@@ -1852,7 +1852,7 @@ if ( not $po4a_opts{"no-update"} ) {
  
                      # Update the PO according to the new POT and to the big PO (compendium).
                      $cmd =
 -                        "msgmerge$Config{_exe} "
 +                        "@PREFIX@/bin/msgmerge$Config{_exe} "
-                       . " --compendium "
-                       . $po_filename{$lang}
+                       . " --compendium " . '"'
+                       . $po_filename{$lang} . '"'
                        . " --update --backup=none "
-@@ -1817,7 +1817,7 @@ if ( not $po4a_opts{"no-translations"} )
+@@ -1913,7 +1913,7 @@ if ( not $po4a_opts{"no-translations"} )
          print "Reading PO file $pofile for language $lang: "
            if ( $po4a_opts{"debug"} );
          $po->read($pofile);
--        system( "msgfmt" . $Config{_exe} . " --statistics -v -o $devnull $pofile" )
-+        system( "@PREFIX@/bin/msgfmt" . $Config{_exe} . " --statistics -v -o $devnull $pofile" )
+-        system( "msgfmt" . $Config{_exe} . " --statistics -v -o $devnull \"$pofile\"" )
++        system( "@PREFIX@/bin/msgfmt" . $Config{_exe} . " --statistics -v -o $devnull \"$pofile\"" )
            if ( $po4a_opts{"debug"} );
  
        DOC: foreach my $master (

Index: pkgsrc/textproc/po4a/patches/patch-po4a-updatepo
diff -u pkgsrc/textproc/po4a/patches/patch-po4a-updatepo:1.3 pkgsrc/textproc/po4a/patches/patch-po4a-updatepo:1.4
--- pkgsrc/textproc/po4a/patches/patch-po4a-updatepo:1.3        Wed Jun 21 19:08:06 2023
+++ pkgsrc/textproc/po4a/patches/patch-po4a-updatepo    Mon Jan 29 16:08:20 2024
@@ -1,23 +1,23 @@
-$NetBSD: patch-po4a-updatepo,v 1.3 2023/06/21 19:08:06 schmonz Exp $
+$NetBSD: patch-po4a-updatepo,v 1.4 2024/01/29 16:08:20 adam Exp $
 
 Invoke pkgsrc's gettext-tools.
 Write to the full physical null device.
 
---- po4a-updatepo.orig 2023-01-01 00:30:43.000000000 +0000
+--- po4a-updatepo.orig 2024-01-28 23:39:44.000000000 +0000
 +++ po4a-updatepo
-@@ -308,13 +308,13 @@ while ( my $po_filename = shift @pofiles
-     if ( -e $po_filename ) {
+@@ -316,13 +316,13 @@ while ( my $po_filename = shift @pofiles
+     if ($usable_pofile) {
          print STDERR wrap_msg( gettext("Updating %s:"), $po_filename )
            if $verbose;
 -        my @cmd = ( "msgmerge" . $Config{_exe} );
 +        my @cmd = ( "@PREFIX@/bin/msgmerge" . $Config{_exe} );
          push( @cmd, split( /\s+/, $msgmerge_opt ) ) if length($msgmerge_opt);
          push @cmd, ( "-U", $po_filename, $pot_filename );
-         print STDERR join( ' ', @cmd ) . "\n" if $debug;
+         print STDERR "Running " . join( ' ', @cmd ) . "\n" if $debug;
          system(@cmd) == 0
-           or die wrap_msg( gettext("Could not run msgmerge: %s"), $! );
+           or die wrap_msg( gettext("Could not run msgmerge: %s\nThe command was: %s"), $!, join( ' ', @cmd ) );
 -        @cmd = ( "msgfmt" . $Config{_exe}, "--statistics", "-v", "-o", File::Spec->devnull(), $po_filename );
-+        @cmd = ( "@PREFIX@/bin/msgfmt" . $Config{_exe}, "--statistics", "-v", "-o", "@PO4A_DEVNULL@", $po_filename );
-         print STDERR join( ' ', @cmd ) . "\n" if $debug;
++        @cmd = ( "@PREFIX@/bin/msgfmt" . $Config{_exe}, "--statistics", "-v", "-o", File::Spec->devnull(), $po_filename );
+         print STDERR "Running " . join( ' ', @cmd ) . "\n" if $debug;
          system(@cmd)
            if $verbose;



Home | Main Index | Thread Index | Old Index