From dc995f55a1b99268dc3f2678f28f6317f59c56d8 Mon Sep 17 00:00:00 2001 From: newbluemoon Date: Thu, 11 Nov 2021 10:14:10 +0100 Subject: [PATCH] po4a: update to 0.65 --- .../po4a/patches/dont-pipe-into-onsgmls.patch | 25 + srcpkgs/po4a/patches/fix-sgml-tests.patch | 566 ++++++++++++++++++ srcpkgs/po4a/template | 5 +- 3 files changed, 594 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/po4a/patches/dont-pipe-into-onsgmls.patch create mode 100644 srcpkgs/po4a/patches/fix-sgml-tests.patch diff --git a/srcpkgs/po4a/patches/dont-pipe-into-onsgmls.patch b/srcpkgs/po4a/patches/dont-pipe-into-onsgmls.patch new file mode 100644 index 000000000000..684d451b2272 --- /dev/null +++ b/srcpkgs/po4a/patches/dont-pipe-into-onsgmls.patch @@ -0,0 +1,25 @@ +source: https://github.com/mquinson/po4a/commit/61b1c61a6de9aca1f83b3a0d344ec6cba86b753c + +Directly pass the input file as a parameter to onsgmls +instead of piping the input. + +--- a/lib/Locale/Po4a/Sgml.pm.orig ++++ b/lib/Locale/Po4a/Sgml.pm +@@ -405,7 +405,7 @@ + print $tmpfh $origfile; + close $tmpfh + or die wrap_mod( "po4a::sgml", dgettext( "po4a", "Cannot close tempfile: %s" ), $! ); +- if ( system("onsgmls -p < $tmpfile") ) { ++ if ( system("onsgmls -p $tmpfile") ) { + unlink($tmpfile); + die wrap_mod( + "po4a::sgml", +@@ -858,7 +858,7 @@ + print $tmpfh $origfile; + close $tmpfh or die wrap_mod( "po4a::sgml", dgettext( "po4a", "Cannot close tempfile: %s" ), $! ); + +- my $cmd = "onsgmls -l -E 0 -wno-valid < $tmpfile" . ( $debug{'onsgmls'} ? "" : " 2>/dev/null" ) . " |"; ++ my $cmd = "onsgmls -l -E 0 -wno-valid $tmpfile" . ( $debug{'onsgmls'} ? "" : " 2>/dev/null" ) . " |"; + print STDERR "CMD=$cmd\n" if ( $debug{'generic'} or $debug{'onsgmls'} ); + + open( IN, $cmd ) || die wrap_mod( "po4a::sgml", dgettext( "po4a", "Cannot run onsgmls: %s" ), $! ); diff --git a/srcpkgs/po4a/patches/fix-sgml-tests.patch b/srcpkgs/po4a/patches/fix-sgml-tests.patch new file mode 100644 index 000000000000..dfd5240ca61c --- /dev/null +++ b/srcpkgs/po4a/patches/fix-sgml-tests.patch @@ -0,0 +1,566 @@ +source: https://github.com/mquinson/po4a/commit/6763f890fcb9d27155786e2352027789ac039354 + +make the test sgml files valid according to the +docbook sgml declaration + +--- a/t/fmt/sgml/attributes-order.norm 2021-02-22 17:53:34.000000000 +0100 ++++ b/t/fmt/sgml/attributes-order.norm 2021-11-17 08:55:33.184006403 +0100 +@@ -1,33 +1,39 @@ +- ++ + +- +- ++ test ++ test refentry + + +- ++ refsect1 + +- ++ + + + +- ++ + + + +- ++ + + + +- ++ + + + +- ++ + + + +- ++ + + + ++ ++ another refsect1 ++ ++ tetrahedron ++ ++ + +--- a/t/fmt/sgml/attributes-order.po 2021-02-22 17:53:34.000000000 +0100 ++++ b/t/fmt/sgml/attributes-order.po 2021-11-17 08:57:04.742240950 +0100 +@@ -7,7 +7,7 @@ + msgid "" + msgstr "" + "Project-Id-Version: PACKAGE VERSION\n" +-"POT-Creation-Date: 2020-05-22 00:09+0200\n" ++"POT-Creation-Date: 2021-11-17 08:55+0100\n" + "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" + "Last-Translator: FULL NAME \n" + "Language-Team: LANGUAGE \n" +@@ -16,41 +16,31 @@ + "Content-Type: text/plain; charset=UTF-8\n" + "Content-Transfer-Encoding: 8bit\n" + +-#~ msgid "fname" +-#~ msgstr "FNAME" +- +-#~ msgid "Surname" +-#~ msgstr "SURNAME" +- +-#~ msgid "email@1.com" +-#~ msgstr "EMAIL@1.COM" +- +-#~ msgid "email@2.com" +-#~ msgstr "EMAIL@1.COM" +- +-#~ msgid "" +-#~ "
\n" +-#~ " &dhemail; and &dhuemail;\n" +-#~ " " +-#~ msgstr "" +-#~ "
\n" +-#~ " &dhemail; AND &dhuemail;\n" +-#~ " " +- +-#~ msgid "&dhfirstname; &dhsurname;" +-#~ msgstr "&dhfirstname; &dhsurname;" +- +-#~ msgid "2004, 2007" +-#~ msgstr "2004, 2007" +- +-#~ msgid "&dhusername; and &dhuusername;" +-#~ msgstr "&dhusername; AND &dhuusername;" +- +-#~ msgid "Help Options:" +-#~ msgstr "HELP OPTIONS:" +- +-#~ msgid "Show help options." +-#~ msgstr "SHOW HELP OPTIONS" +- +-#~ msgid "Test test1 test2 test3 test4." +-#~ msgstr "TEST TEST1 TEST2 TEST3 TEST4." ++#. type: ++#: attributes-order.sgml:5 ++#, no-wrap ++msgid "test" ++msgstr "TEST" ++ ++#. type: ++#: attributes-order.sgml:6 ++#, no-wrap ++msgid "test refentry" ++msgstr "TEST REFENTRY" ++ ++#. type: ++#: attributes-order.sgml:9 ++#, no-wrap ++msgid "refsect1" ++msgstr "REFSECT1" ++ ++#. type: ++#: attributes-order.sgml:18 ++#, no-wrap ++msgid "another refsect1" ++msgstr "ANOTHER REFSECT1" ++ ++#. type: ++#: attributes-order.sgml:19 ++msgid "tetrahedron" ++msgstr "TETRAHEDRON" +--- a/t/fmt/sgml/attributes-order.pot 2021-02-22 17:53:34.000000000 +0100 ++++ b/t/fmt/sgml/attributes-order.pot 2021-11-17 08:55:33.185006395 +0100 +@@ -7,7 +7,7 @@ + msgid "" + msgstr "" + "Project-Id-Version: PACKAGE VERSION\n" +-"POT-Creation-Date: 2020-05-22 00:09+0200\n" ++"POT-Creation-Date: 2021-11-17 08:55+0100\n" + "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" + "Last-Translator: FULL NAME \n" + "Language-Team: LANGUAGE \n" +@@ -16,3 +16,31 @@ + "Content-Type: text/plain; charset=UTF-8\n" + "Content-Transfer-Encoding: 8bit\n" + ++#. type: ++#: attributes-order.sgml:5 ++#, no-wrap ++msgid "test" ++msgstr "" ++ ++#. type: ++#: attributes-order.sgml:6 ++#, no-wrap ++msgid "test refentry" ++msgstr "" ++ ++#. type: ++#: attributes-order.sgml:9 ++#, no-wrap ++msgid "refsect1" ++msgstr "" ++ ++#. type: ++#: attributes-order.sgml:18 ++#, no-wrap ++msgid "another refsect1" ++msgstr "" ++ ++#. type: ++#: attributes-order.sgml:19 ++msgid "tetrahedron" ++msgstr "" +--- a/t/fmt/sgml/attributes-order.sgml 2021-02-22 17:53:34.000000000 +0100 ++++ b/t/fmt/sgml/attributes-order.sgml 2021-11-17 09:04:24.200573288 +0100 +@@ -1,12 +1,21 @@ +- ++ + + ++ ++ test ++ test refentry ++ + +- +- +- +- +- +- ++ refsect1 ++ ++ ++ ++ ++ ++ ++ ++ ++ another refsect1 ++ tetrahedron + + +--- a/t/fmt/sgml/attributes-order.trans 2021-02-22 17:53:34.000000000 +0100 ++++ b/t/fmt/sgml/attributes-order.trans 2021-11-17 08:58:01.765764454 +0100 +@@ -1,33 +1,39 @@ +- ++ + +- +- ++ TEST ++ TEST REFENTRY + + +- ++ REFSECT1 + +- ++ + + + +- ++ + + + +- ++ + + + +- ++ + + + +- ++ + + + +- ++ + + + ++ ++ ANOTHER REFSECT1 ++ ++ TETRAHEDRON ++ ++ + +--- a/t/fmt/sgml/basic.norm 2021-02-22 17:53:34.000000000 +0100 ++++ b/t/fmt/sgml/basic.norm 2021-11-16 21:53:56.732261414 +0100 +@@ -1,9 +1,11 @@ +-fname"> + Surname"> + email@1.com"> + email@2.com"> ++ ++ + ]> + + +@@ -20,11 +22,11 @@ + + + +- +- ++ test ++ test refentry + + +- ++ refsect1 + + Help Options: + +--- a/t/fmt/sgml/basic.po 2021-02-22 17:53:34.000000000 +0100 ++++ b/t/fmt/sgml/basic.po 2021-11-17 09:28:47.239474483 +0100 +@@ -7,7 +7,7 @@ + msgid "" + msgstr "" + "Project-Id-Version: PACKAGE VERSION\n" +-"POT-Creation-Date: 2007-08-05 17:42+0200\n" ++"POT-Creation-Date: 2021-11-16 22:40+0100\n" + "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" + "Last-Translator: FULL NAME \n" + "Language-Team: LANGUAGE \n" +@@ -34,10 +34,20 @@ + #. type: definition of entity &dhuemail; + #, no-wrap + msgid "email@2.com" +-msgstr "EMAIL@1.COM" ++msgstr "EMAIL@2.COM" ++ ++#. type: definition of entity &dhusername; ++#, no-wrap ++msgid "Jane Doe" ++msgstr "JANE DOE" ++ ++#. type: definition of entity &dhuusername; ++#, no-wrap ++msgid "John Doe" ++msgstr "JOHN DOE" + + #. type:
+-#: basic.sgml:11 ++#: basic.sgml:13 + #, no-wrap + msgid "" + "
\n" +@@ -49,38 +59,56 @@ + " " + + #. type: +-#: basic.sgml:19 ++#: basic.sgml:21 + msgid "&dhfirstname; &dhsurname;" + msgstr "&dhfirstname; &dhsurname;" + + #. type: +-#: basic.sgml:23 ++#: basic.sgml:25 + msgid "2004, 2007" + msgstr "2004, 2007" + + #. type: +-#: basic.sgml:23 ++#: basic.sgml:25 + #, no-wrap + msgid "&dhusername; and &dhuusername;" +-msgstr "&dhusername; AND &dhuusername;" ++msgstr "&dhusername; and &dhuusername;" ++ ++#. type: ++#: basic.sgml:30 ++#, no-wrap ++msgid "test" ++msgstr "TEST" ++ ++#. type: ++#: basic.sgml:31 ++#, no-wrap ++msgid "test refentry" ++msgstr "TEST REFENTRY" ++ ++#. type: ++#: basic.sgml:34 ++#, no-wrap ++msgid "refsect1" ++msgstr "REFSECT1" + + #. type: +-#: basic.sgml:28 ++#: basic.sgml:35 + msgid "Help Options:" + msgstr "HELP OPTIONS:" + + #. type: +-#: basic.sgml:31 ++#: basic.sgml:38 + #, no-wrap + msgid " " + msgstr "" + + #. type: +-#: basic.sgml:33 ++#: basic.sgml:40 + msgid "Show help options." +-msgstr "SHOW HELP OPTIONS" ++msgstr "SHOW HELP OPTIONS." + + #. type: +-#: basic.sgml:39 basic.sgml:41 ++#: basic.sgml:46 basic.sgml:48 + msgid "Test test1 test2 test3 test4." + msgstr "TEST TEST1 TEST2 TEST3 TEST4." +--- a/t/fmt/sgml/basic.pot 2021-02-22 17:53:34.000000000 +0100 ++++ b/t/fmt/sgml/basic.pot 2021-11-16 22:40:08.561394570 +0100 +@@ -7,7 +7,7 @@ + msgid "" + msgstr "" + "Project-Id-Version: PACKAGE VERSION\n" +-"POT-Creation-Date: 2007-08-05 17:42+0200\n" ++"POT-Creation-Date: 2021-11-16 22:40+0100\n" + "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" + "Last-Translator: FULL NAME \n" + "Language-Team: LANGUAGE \n" +@@ -36,8 +36,18 @@ + msgid "email@2.com" + msgstr "" + ++#. type: definition of entity &dhusername; ++#, no-wrap ++msgid "Jane Doe" ++msgstr "" ++ ++#. type: definition of entity &dhuusername; ++#, no-wrap ++msgid "John Doe" ++msgstr "" ++ + #. type:
+-#: basic.sgml:11 ++#: basic.sgml:13 + #, no-wrap + msgid "" + "
\n" +@@ -46,38 +56,56 @@ + msgstr "" + + #. type: +-#: basic.sgml:19 ++#: basic.sgml:21 + msgid "&dhfirstname; &dhsurname;" + msgstr "" + + #. type: +-#: basic.sgml:23 ++#: basic.sgml:25 + msgid "2004, 2007" + msgstr "" + + #. type: +-#: basic.sgml:23 ++#: basic.sgml:25 + #, no-wrap + msgid "&dhusername; and &dhuusername;" + msgstr "" + ++#. type: ++#: basic.sgml:30 ++#, no-wrap ++msgid "test" ++msgstr "" ++ ++#. type: ++#: basic.sgml:31 ++#, no-wrap ++msgid "test refentry" ++msgstr "" ++ ++#. type: ++#: basic.sgml:34 ++#, no-wrap ++msgid "refsect1" ++msgstr "" ++ + #. type: +-#: basic.sgml:28 ++#: basic.sgml:35 + msgid "Help Options:" + msgstr "" + + #. type: +-#: basic.sgml:31 ++#: basic.sgml:38 + #, no-wrap + msgid " " + msgstr "" + + #. type: +-#: basic.sgml:33 ++#: basic.sgml:40 + msgid "Show help options." + msgstr "" + + #. type: +-#: basic.sgml:39 basic.sgml:41 ++#: basic.sgml:46 basic.sgml:48 + msgid "Test test1 test2 test3 test4." + msgstr "" +--- a/t/fmt/sgml/basic.sgml 2021-02-22 17:53:34.000000000 +0100 ++++ b/t/fmt/sgml/basic.sgml 2021-11-16 15:56:10.113854553 +0100 +@@ -1,8 +1,10 @@ +-fname"> + Surname"> + email@1.com"> + email@2.com"> ++ ++ + ]> + + +@@ -24,7 +26,12 @@ + + + ++ ++ test ++ test refentry ++ + ++ refsect1 + Help Options: + + +@@ -41,3 +48,4 @@ + Test test1 test2 test3 test4. + + ++ +--- a/t/fmt/sgml/basic.trans 2021-02-22 17:53:34.000000000 +0100 ++++ b/t/fmt/sgml/basic.trans 2021-11-17 09:08:31.803514576 +0100 +@@ -1,9 +1,11 @@ +-FNAME"> + SURNAME"> + EMAIL@1.COM"> +- EMAIL@1.COM"> ++ EMAIL@2.COM"> ++ ++ + ]> + + +@@ -16,15 +18,15 @@ + + + 2004, 2007 +- &dhusername; AND &dhuusername; ++ &dhusername; and &dhuusername; + + + +- +- ++ TEST ++ TEST REFENTRY + + +- ++ REFSECT1 + + HELP OPTIONS: + +@@ -33,7 +35,7 @@ + + + +- SHOW HELP OPTIONS ++ SHOW HELP OPTIONS. + + + diff --git a/srcpkgs/po4a/template b/srcpkgs/po4a/template index c0094f9eaa9c..b53e82e65d1f 100644 --- a/srcpkgs/po4a/template +++ b/srcpkgs/po4a/template @@ -1,6 +1,6 @@ # Template file for 'po4a' pkgname=po4a -version=0.63 +version=0.65 revision=1 build_style=perl-ModuleBuild _perldeps="perl perl-Text-WrapI18N perl-Term-ReadKey perl-Unicode-LineBreak @@ -9,9 +9,10 @@ hostmakedepends="${_perldeps} perl-Locale-gettext perl-Module-Build gettext libxslt docbook-xsl" makedepends="${_perldeps} perl-Locale-gettext perl-Module-Build" depends="${_perldeps} opensp gettext" +checkdepends="docbook opensp perl-Test-Pod texlive" short_desc="PO for anything (po4a) project to ease translations using gettext tools" maintainer="newbluemoon " license="GPL-2.0-or-later" homepage="https://po4a.org/" distfiles="https://github.com/mquinson/po4a/archive/v${version}.tar.gz" -checksum=534a050af6e8d8d2acd5dd32b66c9a15f64106f022efef72cd82c175de34e595 +checksum=5900bc5ecd6727b74ec4770dddd461fbf14fe23a4c29507a0c2f35a78ad45b4c