diff --git a/dev-perl/Text-WrapI18N/Text-WrapI18N-0.60.0-r3.ebuild b/dev-perl/Text-WrapI18N/Text-WrapI18N-0.60.0-r3.ebuild new file mode 100644 index 0000000000000..0d0af734929d6 --- /dev/null +++ b/dev-perl/Text-WrapI18N/Text-WrapI18N-0.60.0-r3.ebuild @@ -0,0 +1,18 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DIST_AUTHOR=KUBOTA +DIST_VERSION=0.06 +inherit perl-module + +DESCRIPTION="Internationalized substitute of Text::Wrap" + +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + +RDEPEND="dev-perl/Text-CharWidth" +BDEPEND="${RDEPEND}" + +PATCHES=( "${FILESDIR}"/${PN}-fix-endless-loop.patch ) diff --git a/dev-perl/Text-WrapI18N/files/Text-WrapI18N-fix-endless-loop.patch b/dev-perl/Text-WrapI18N/files/Text-WrapI18N-fix-endless-loop.patch new file mode 100644 index 0000000000000..ab51380b7d160 --- /dev/null +++ b/dev-perl/Text-WrapI18N/files/Text-WrapI18N-fix-endless-loop.patch @@ -0,0 +1,26 @@ +patch is extracted from debian: +https://deb.debian.org/debian/pool/main/libt/libtext-wrapi18n-perl/libtext-wrapi18n-perl_0.06-10.debian.tar.xz + +Description: The infinite loop occurs in Text::WrapI18N when po4a tries to report an error in the PO files. + I could reproduce the problem in WrapI18N::wrap() and I propose the + attached patch to WrapI18N::wrap(). (A word should be placed on the + next line if it fits on this line, but the leading header must be taken + into account, thus $columns -> $columns - length $header) +Origin: vendor +Bug-Debian: https://bugs.debian.org/470250 +Forwarded: unknown +Author: Nicolas François +Reviewed-by: gregor herrmann +Last-Update: 2019-03-21 + +--- a/WrapI18N.pm 2003-06-25 11:14:25.000000000 +0200 ++++ b/WrapI18N.pm 2008-03-13 02:04:02.628000837 +0100 +@@ -88,7 +88,7 @@ sub wrap { + $len = 0; + $text = $top2 . $text; + $word = ''; $wlen = 0; +- } elsif ($wlen + $w <= $columns) { ++ } elsif ($wlen + $w <= $columns - length ($top2)) { + # the current word is sent to next line + $out .= $separator; + $len = 0;