commit:     eb359138a716ccef5fa2f330b648e3bd9ddcc9c6
Author:     Gabi Falk <gabifalk <AT> gmx <DOT> com>
AuthorDate: Sat Dec 14 15:00:00 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Dec 15 16:15:37 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb359138

app-text/po4a: Backport upstream testsuite fixes for perl >= 5.40

Link: 
https://github.com/mquinson/po4a/commit/7cf7b79ee28de7e58378b225570d49fd114ff75e
Link: 
https://github.com/mquinson/po4a/commit/28fe52651eb8096d97d6bd3a97b3168522ba5306
Closes: https://bugs.gentoo.org/938967
Signed-off-by: Gabi Falk <gabifalk <AT> gmx.com>
Closes: https://github.com/gentoo/gentoo/pull/39695
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-text/po4a/files/po4a-0.69-invalid-byte.patch   | 27 +++++++++++++++++++
 app-text/po4a/files/po4a-0.69-perl5.40.patch       | 31 ++++++++++++++++++++++
 app-text/po4a/files/po4a-perl5.40.patch            | 29 ++++++++++++++++++++
 .../po4a/{po4a-0.71.ebuild => po4a-0.69-r2.ebuild} | 12 +++++++--
 .../po4a/{po4a-0.71.ebuild => po4a-0.71-r1.ebuild} |  5 +++-
 .../po4a/{po4a-0.72.ebuild => po4a-0.72-r1.ebuild} |  5 +++-
 .../po4a/{po4a-0.71.ebuild => po4a-0.73-r1.ebuild} |  7 +++--
 7 files changed, 110 insertions(+), 6 deletions(-)

diff --git a/app-text/po4a/files/po4a-0.69-invalid-byte.patch 
b/app-text/po4a/files/po4a-0.69-invalid-byte.patch
new file mode 100644
index 000000000000..f1f230a95b48
--- /dev/null
+++ b/app-text/po4a/files/po4a-0.69-invalid-byte.patch
@@ -0,0 +1,27 @@
+https://bugs.gentoo.org/938967
+https://github.com/mquinson/po4a/commit/7cf7b79ee28de7e58378b225570d49fd114ff75e.patch
+
+From 7cf7b79ee28de7e58378b225570d49fd114ff75e Mon Sep 17 00:00:00 2001
+From: Jan Palus <jpa...@fastmail.com>
+Date: Mon, 3 Jul 2023 14:56:04 +0200
+Subject: [PATCH] SGML: replace invalid byte (0xa0) in comment with space
+ (0x20)
+
+Fixes #428
+---
+ lib/Locale/Po4a/Sgml.pm | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/Locale/Po4a/Sgml.pm b/lib/Locale/Po4a/Sgml.pm
+index 39dd66f2..d02f269d 100644
+--- a/lib/Locale/Po4a/Sgml.pm
++++ b/lib/Locale/Po4a/Sgml.pm
+@@ -773,7 +773,7 @@ sub parse_file {
+             while ( $origfile =~ /^(.*?)&$key(;.*$|[^-_:.A-Za-z0-9].*$|$)/s ) 
{
+ 
+                 # Since we will include a new file, we
+-                #�must do a new round of substitutions.
++                # must do a new round of substitutions.
+                 $dosubstitution = 1;
+                 my ( $begin, $end ) = ( $1, $2 );
+                 $end = "" unless ( defined $end );

diff --git a/app-text/po4a/files/po4a-0.69-perl5.40.patch 
b/app-text/po4a/files/po4a-0.69-perl5.40.patch
new file mode 100644
index 000000000000..8c7d7d8573e8
--- /dev/null
+++ b/app-text/po4a/files/po4a-0.69-perl5.40.patch
@@ -0,0 +1,31 @@
+https://bugs.gentoo.org/938967
+https://github.com/mquinson/po4a/commit/28fe52651eb8096d97d6bd3a97b3168522ba5306
 (backport)
+
+From 45c835a04a388940c627f0c6b8c26554c0ee2b14 Mon Sep 17 00:00:00 2001
+From: Martin Quinson <martin.quin...@ens-rennes.fr>
+Date: Fri, 12 Jul 2024 10:21:34 +0200
+Subject: [PATCH] Fix failures with DynaLoader on Perl 5.40
+
+Thanks to dstoecker for the patch provided in the OpenSuse package,
+and to ana for pointing me to it.
+
+Fixes https://github.com/mquinson/po4a/issues/508
+
+(cherry picked from commit 28fe52651eb8096d97d6bd3a97b3168522ba5306)
+---
+ lib/Locale/Po4a/TransTractor.pm | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/lib/Locale/Po4a/TransTractor.pm b/lib/Locale/Po4a/TransTractor.pm
+index b83dd25b..68296cb1 100644
+--- a/lib/Locale/Po4a/TransTractor.pm
++++ b/lib/Locale/Po4a/TransTractor.pm
+@@ -5,6 +5,8 @@ require Exporter;
+ package Locale::Po4a::TransTractor;
+ use DynaLoader;
+ 
++sub import { }
++
+ use 5.006;
+ use strict;
+ use warnings;

diff --git a/app-text/po4a/files/po4a-perl5.40.patch 
b/app-text/po4a/files/po4a-perl5.40.patch
new file mode 100644
index 000000000000..221e45f79198
--- /dev/null
+++ b/app-text/po4a/files/po4a-perl5.40.patch
@@ -0,0 +1,29 @@
+https://bugs.gentoo.org/938967
+https://github.com/mquinson/po4a/commit/28fe52651eb8096d97d6bd3a97b3168522ba5306.patch
+
+From 28fe52651eb8096d97d6bd3a97b3168522ba5306 Mon Sep 17 00:00:00 2001
+From: Martin Quinson <martin.quin...@ens-rennes.fr>
+Date: Fri, 12 Jul 2024 10:21:34 +0200
+Subject: [PATCH] Fix failures with DynaLoader on Perl 5.40
+
+Thanks to dstoecker for the patch provided in the OpenSuse package,
+and to ana for pointing me to it.
+
+Fixes https://github.com/mquinson/po4a/issues/508
+---
+ lib/Locale/Po4a/TransTractor.pm | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/lib/Locale/Po4a/TransTractor.pm b/lib/Locale/Po4a/TransTractor.pm
+index 7bf59ef05..7b6112433 100644
+--- a/lib/Locale/Po4a/TransTractor.pm
++++ b/lib/Locale/Po4a/TransTractor.pm
+@@ -5,6 +5,8 @@ require Exporter;
+ package Locale::Po4a::TransTractor;
+ use DynaLoader;
+ 
++sub import { }
++
+ use 5.16.0;
+ use strict;
+ use warnings;

diff --git a/app-text/po4a/po4a-0.71.ebuild b/app-text/po4a/po4a-0.69-r2.ebuild
similarity index 77%
copy from app-text/po4a/po4a-0.71.ebuild
copy to app-text/po4a/po4a-0.69-r2.ebuild
index 18c3ed6fdf91..836210177e04 100644
--- a/app-text/po4a/po4a-0.71.ebuild
+++ b/app-text/po4a/po4a-0.69-r2.ebuild
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="8"
-PLOCALES="ace af ar ca cs da de eo es et eu fr hr hu id it ja ka kn ko nb nl 
pl pt pt_BR ru sl sr_Cyrl sv uk vi zh_Hans zh_Hant"
+PLOCALES="ace af ar ca cs da de eo es et eu fr hr hu id it ja ka kn ko nb nl 
pl pt pt_BR ru sl sr_Cyrl sv uk vi zh_CN zh_HK zh_Hant"
 
 inherit perl-module plocale
 
@@ -38,7 +38,15 @@ BDEPEND="app-text/docbook-xml-dtd:4.1.2
                virtual/latex-base
        )"
 
-PATCHES=( "${FILESDIR}"/${PN}-man.patch )
+PATCHES=(
+       "${FILESDIR}"/${P}-man.patch
+       "${FILESDIR}"/${P}-xmlcatalog.patch
+       "${FILESDIR}"/${P}-perl5.40.patch # bug #938967
+       # The perl5.40 patch triggers:
+       # XX Update po/bin/po4a.pot
+       # xgettext: Comment at or before ../../lib/Locale/Po4a/Sgml.pm:776 is 
not UTF-8 encoded.
+       "${FILESDIR}"/${P}-invalid-byte.patch
+)
 
 DIST_TEST="do"
 

diff --git a/app-text/po4a/po4a-0.71.ebuild b/app-text/po4a/po4a-0.71-r1.ebuild
similarity index 93%
copy from app-text/po4a/po4a-0.71.ebuild
copy to app-text/po4a/po4a-0.71-r1.ebuild
index 18c3ed6fdf91..0d85bd31b9c0 100644
--- a/app-text/po4a/po4a-0.71.ebuild
+++ b/app-text/po4a/po4a-0.71-r1.ebuild
@@ -38,7 +38,10 @@ BDEPEND="app-text/docbook-xml-dtd:4.1.2
                virtual/latex-base
        )"
 
-PATCHES=( "${FILESDIR}"/${PN}-man.patch )
+PATCHES=(
+       "${FILESDIR}"/${PN}-man.patch
+       "${FILESDIR}"/${PN}-perl5.40.patch # bug #938967
+)
 
 DIST_TEST="do"
 

diff --git a/app-text/po4a/po4a-0.72.ebuild b/app-text/po4a/po4a-0.72-r1.ebuild
similarity index 93%
rename from app-text/po4a/po4a-0.72.ebuild
rename to app-text/po4a/po4a-0.72-r1.ebuild
index 18c3ed6fdf91..0d85bd31b9c0 100644
--- a/app-text/po4a/po4a-0.72.ebuild
+++ b/app-text/po4a/po4a-0.72-r1.ebuild
@@ -38,7 +38,10 @@ BDEPEND="app-text/docbook-xml-dtd:4.1.2
                virtual/latex-base
        )"
 
-PATCHES=( "${FILESDIR}"/${PN}-man.patch )
+PATCHES=(
+       "${FILESDIR}"/${PN}-man.patch
+       "${FILESDIR}"/${PN}-perl5.40.patch # bug #938967
+)
 
 DIST_TEST="do"
 

diff --git a/app-text/po4a/po4a-0.71.ebuild b/app-text/po4a/po4a-0.73-r1.ebuild
similarity index 88%
rename from app-text/po4a/po4a-0.71.ebuild
rename to app-text/po4a/po4a-0.73-r1.ebuild
index 18c3ed6fdf91..63e8819d32c6 100644
--- a/app-text/po4a/po4a-0.71.ebuild
+++ b/app-text/po4a/po4a-0.73-r1.ebuild
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="8"
-PLOCALES="ace af ar ca cs da de eo es et eu fr hr hu id it ja ka kn ko nb nl 
pl pt pt_BR ru sl sr_Cyrl sv uk vi zh_Hans zh_Hant"
+PLOCALES="ace af ar ca cs da de eo es et eu fr hr hu id it ja ka kn ko nb nl 
pl pt pt_BR ru sl sr sr_Cyrl sv uk vi zh_Hans zh_Hant"
 
 inherit perl-module plocale
 
@@ -38,7 +38,10 @@ BDEPEND="app-text/docbook-xml-dtd:4.1.2
                virtual/latex-base
        )"
 
-PATCHES=( "${FILESDIR}"/${PN}-man.patch )
+PATCHES=(
+       "${FILESDIR}"/${PN}-man.patch
+       "${FILESDIR}"/${PN}-perl5.40.patch # bug #938967
+)
 
 DIST_TEST="do"
 

Reply via email to