head 1.2; access; symbols pkgsrc-2026Q1:1.2.0.18 pkgsrc-2026Q1-base:1.2 pkgsrc-2025Q4:1.2.0.16 pkgsrc-2025Q4-base:1.2 pkgsrc-2025Q3:1.2.0.14 pkgsrc-2025Q3-base:1.2 pkgsrc-2025Q2:1.2.0.12 pkgsrc-2025Q2-base:1.2 pkgsrc-2025Q1:1.2.0.10 pkgsrc-2025Q1-base:1.2 pkgsrc-2024Q4:1.2.0.8 pkgsrc-2024Q4-base:1.2 pkgsrc-2024Q3:1.2.0.6 pkgsrc-2024Q3-base:1.2 pkgsrc-2024Q2:1.2.0.4 pkgsrc-2024Q2-base:1.2 pkgsrc-2024Q1:1.2.0.2 pkgsrc-2024Q1-base:1.2 pkgsrc-2023Q4:1.1.0.6 pkgsrc-2023Q4-base:1.1 pkgsrc-2023Q3:1.1.0.4 pkgsrc-2023Q3-base:1.1 pkgsrc-2023Q2:1.1.0.2 pkgsrc-2023Q2-base:1.1; locks; strict; comment @# @; 1.2 date 2024.01.29.16.08.20; author adam; state Exp; branches; next 1.1; commitid hJ8KqVNbagJJtmWE; 1.1 date 2023.06.21.19.08.06; author schmonz; state Exp; branches; next ; commitid u33RFaqKMO6xCQtE; desc @@ 1.2 log @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. @ text @$NetBSD: patch-po4a,v 1.1 2023/06/21 19:08:06 schmonz Exp $ Invoke pkgsrc's gettext-tools. Write to the full physical null device. --- po4a.orig 2024-01-28 23:39:44.000000000 +0000 +++ po4a @@@@ -724,7 +724,7 @@@@ sub show_version { my @@ORIGINAL_ARGV = @@ARGV; # Use /NUL instead of /dev/null on Windows -my $devnull = ( $^O =~ /Win/ ) ? '/NUL' : '/dev/null'; +my $devnull = ( $^O =~ /Win/ ) ? '/NUL' : '@@PO4A_DEVNULL@@'; # Parse the options provided on the command line, or in argument sub get_options { @@@@ -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 --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( @@@@ -1737,7 +1737,7 @@@@ if ( $po4a_opts{"split"} ) { $split_po{$lang}{$master} = $master_po; } if ( length $cmd_cat ) { - $cmd_cat = "msgcat" . $Config{_exe} . " -o $tmp_bigpo $cmd_cat"; + $cmd_cat = "@@PREFIX@@/bin/msgcat" . $Config{_exe} . " -o $tmp_bigpo $cmd_cat"; run_cmd($cmd_cat); } @@@@ -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 $cmd .= " --backup=none --update"; } else { @@@@ -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); $stat =~ s/^[^:]*://; print $stat; } @@@@ -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"; run_cmd($cmd); } } @@@@ -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\" " . 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} ) . '"' . " --output $tmp_file >$devnull"; @@@@ -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} . '"' . " --update --backup=none " @@@@ -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\"" ) if ( $po4a_opts{"debug"} ); DOC: foreach my $master ( @ 1.1 log @po4a: fix build on Solarish. - Conditionally depend on diffutils (borrowed from pkgdiff) - On "SunOS", resolve /dev/null symlink (if any) during pre-configure - When invoking gettext-tools, make sure they're the pkgsrc ones - Add 'sgml' option (also off by default) as suggested by upstream Fixes build (and passes nearly all tests, with both options enabled) on Tribblix and Solaris 11, which is exactly as good as things were -- and are -- on NetBSD. Bump PKGREVISION. @ text @d1 1 a1 1 $NetBSD$ d6 1 a6 1 --- po4a.orig 2023-01-01 00:30:43.000000000 +0000 d8 1 a8 1 @@@@ -723,7 +723,7 @@@@ sub show_version { d17 1 a17 1 @@@@ -1615,7 +1615,7 @@@@ if ( $po4a_opts{"split"} ) { d21 2 a22 2 - 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"; d26 1 a26 1 @@@@ -1658,7 +1658,7 @@@@ if ( $po4a_opts{"split"} ) { d35 2 a36 2 @@@@ -1685,7 +1685,7 @@@@ if ( not $po4a_opts{"no-update"} ) { d39 3 a41 3 - 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 d44 1 a44 1 @@@@ -1700,7 +1700,7 @@@@ if ( not $po4a_opts{"no-update"} ) { d48 2 a49 2 - 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); d53 2 a54 2 @@@@ -1708,7 +1708,7 @@@@ if ( not $po4a_opts{"no-update"} ) { } else { d57 2 a58 2 - "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"; d62 1 a62 1 @@@@ -1741,13 +1741,13 @@@@ if ( not $po4a_opts{"no-update"} ) { d69 1 a69 1 . " --output $tmp_file " d75 2 a76 2 . "--no-translator -l $lang --input " . find_output_file( $split_pot{$master} ) d78 1 a78 1 @@@@ -1756,7 +1756,7 @@@@ if ( not $po4a_opts{"no-update"} ) { d84 2 a85 2 . " --compendium " . $po_filename{$lang} d87 1 a87 1 @@@@ -1817,7 +1817,7 @@@@ if ( not $po4a_opts{"no-translations"} ) d91 2 a92 2 - system( "msgfmt" . $Config{_exe} . " --statistics -v -o $devnull $pofile" ) + system( "@@PREFIX@@/bin/msgfmt" . $Config{_exe} . " --statistics -v -o $devnull $pofile" ) @