Skip to content

Commit a7b57ce

Browse files
thesamesamflint2
authored andcommitted
sys-apps/texinfo: fix tests w/ perl-5.42
Signed-off-by: Sam James <[email protected]>
1 parent 6b881d8 commit a7b57ce

File tree

2 files changed

+158
-0
lines changed

2 files changed

+158
-0
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
https://lists.gnu.org/archive/html/bug-texinfo/2025-01/msg00114.html
2+
https://cgit.git.savannah.gnu.org/cgit/texinfo.git/commit/?id=f4ac5b857cf59a58d13e103fe5b7d0d5fe2a52a7
3+
4+
From f4ac5b857cf59a58d13e103fe5b7d0d5fe2a52a7 Mon Sep 17 00:00:00 2001
5+
From: Patrice Dumas <[email protected]>
6+
Date: Thu, 30 Jan 2025 14:26:17 +0100
7+
Subject: * tp/Texinfo/Convert/Converter.pm (output_tree),
8+
tp/Texinfo/Convert/LaTeX.pm (output), tp/Texinfo/Convert/IXIN.pm: fix
9+
precedence problem between ! and string eq, which leads to a warning with
10+
Perl 5.41.7. Report from Igor Todorovski, details on:
11+
https://github.com/Perl/perl5/issues/22954#issuecomment-2623408763
12+
13+
---
14+
ChangeLog | 8 ++++++++
15+
tp/Texinfo/Convert/Converter.pm | 2 +-
16+
tp/Texinfo/Convert/IXIN.pm | 2 +-
17+
tp/Texinfo/Convert/LaTeX.pm | 2 +-
18+
4 files changed, 11 insertions(+), 3 deletions(-)
19+
20+
diff --git a/tp/Texinfo/Convert/Converter.pm b/tp/Texinfo/Convert/Converter.pm
21+
index a54e1f509e..c0d1359334 100644
22+
--- a/tp/Texinfo/Convert/Converter.pm
23+
+++ b/tp/Texinfo/Convert/Converter.pm
24+
@@ -403,7 +403,7 @@ sub output_tree($$)
25+
26+
my $fh;
27+
my $encoded_output_file;
28+
- if (! $output_file eq '') {
29+
+ if ($output_file ne '') {
30+
my $path_encoding;
31+
($encoded_output_file, $path_encoding)
32+
= $self->encoded_output_file_name($output_file);
33+
diff --git a/tp/Texinfo/Convert/IXIN.pm b/tp/Texinfo/Convert/IXIN.pm
34+
index e5d82a7851..71fa03fbeb 100644
35+
--- a/tp/Texinfo/Convert/IXIN.pm
36+
+++ b/tp/Texinfo/Convert/IXIN.pm
37+
@@ -341,7 +341,7 @@ sub output_ixin($$)
38+
39+
my $fh;
40+
my $encoded_output_file;
41+
- if (! $output_file eq '') {
42+
+ if ($output_file ne '') {
43+
my $path_encoding;
44+
($encoded_output_file, $path_encoding)
45+
= $self->encoded_output_file_name($output_file);
46+
diff --git a/tp/Texinfo/Convert/LaTeX.pm b/tp/Texinfo/Convert/LaTeX.pm
47+
index d4126d217f..9ddf3e0e59 100644
48+
--- a/tp/Texinfo/Convert/LaTeX.pm
49+
+++ b/tp/Texinfo/Convert/LaTeX.pm
50+
@@ -1085,7 +1085,7 @@ sub output($$)
51+
52+
my $fh;
53+
my $encoded_output_file;
54+
- if (! $output_file eq '') {
55+
+ if ($output_file ne '') {
56+
my $path_encoding;
57+
($encoded_output_file, $path_encoding)
58+
= $self->encoded_output_file_name($output_file);
59+
--
60+
cgit v1.2.3
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# Copyright 1999-2025 Gentoo Authors
2+
# Distributed under the terms of the GNU General Public License v2
3+
4+
# Note: if your package uses the texi2dvi utility, it must depend on the
5+
# virtual/texi2dvi package to pull in all the right deps. The tool is not
6+
# usable out-of-the-box because it requires the large tex packages.
7+
8+
# Keep an eye on the release/$(ver_cut 1-2) branch upstream for backports.
9+
10+
EAPI=8
11+
12+
inherit flag-o-matic toolchain-funcs
13+
14+
DESCRIPTION="The GNU info program and utilities"
15+
HOMEPAGE="https://www.gnu.org/software/texinfo/"
16+
17+
if [[ ${PV} == 9999 ]]; then
18+
inherit git-r3
19+
EGIT_REPO_URI="https://git.savannah.gnu.org/git/texinfo.git"
20+
REGEN_BDEPEND="
21+
>=dev-build/autoconf-2.62
22+
>=dev-build/automake-1.16
23+
dev-build/libtool
24+
"
25+
elif [[ $(ver_cut 3) -ge 90 || $(ver_cut 4) -ge 90 ]] ; then
26+
SRC_URI="https://alpha.gnu.org/gnu/${PN}/${P}.tar.xz"
27+
REGEN_BDEPEND=""
28+
else
29+
SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
30+
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"
31+
REGEN_BDEPEND=""
32+
fi
33+
34+
LICENSE="GPL-3+"
35+
SLOT="0"
36+
IUSE="nls +standalone static"
37+
38+
RDEPEND="
39+
>=sys-libs/ncurses-5.2-r2:=
40+
virtual/perl-Data-Dumper
41+
virtual/perl-Encode
42+
virtual/perl-Unicode-Collate
43+
standalone? ( >=dev-lang/perl-5.8.1 )
44+
!standalone? (
45+
>=dev-lang/perl-5.8.1:=
46+
dev-libs/libunistring:=
47+
)
48+
nls? ( virtual/libintl )
49+
"
50+
DEPEND="${RDEPEND}"
51+
BDEPEND="
52+
${REGEN_BDEPEND}
53+
nls? ( >=sys-devel/gettext-0.19.6 )
54+
"
55+
56+
PATCHES=(
57+
"${FILESDIR}"/${PN}-7.2-perl-5.42.patch
58+
)
59+
60+
src_prepare() {
61+
default
62+
63+
if [[ ${PV} == 9999 ]]; then
64+
./autogen.sh || die
65+
fi
66+
67+
# Needed if a patch touches install-info.c
68+
#touch man/install-info.1 || die
69+
70+
if use prefix ; then
71+
sed -i -e '1c\#!/usr/bin/env sh' util/texi2dvi util/texi2pdf || die
72+
touch {doc,man}/{texi2dvi,texi2pdf,pdftexi2dvi}.1 || die
73+
fi
74+
}
75+
76+
src_configure() {
77+
# Respect compiler and CPPFLAGS/CFLAGS/LDFLAGS for Perl extensions
78+
# bug #622576
79+
local -x PERL_EXT_CC="$(tc-getCC)" PERL_EXT_CPPFLAGS="${CPPFLAGS}"
80+
local -x PERL_EXT_CFLAGS="${CFLAGS}" PERL_EXT_LDFLAGS="${LDFLAGS}"
81+
82+
use static && append-ldflags -static
83+
84+
# TODO:
85+
# --with-external-Unicode-EastAsianWidth
86+
# --with-external-Text-Unidecode
87+
# --enable-xs-perl-libintl for musl (7.2)?
88+
#
89+
# Also, 7.0.91 seemed to introduce a included-libunistring w/ USE=-standalone
90+
# but it doesn't seem to do anything?
91+
local myeconfargs=(
92+
--cache-file="${S}"/config.cache
93+
$(use_enable nls)
94+
$(use_enable !standalone perl-xs)
95+
)
96+
97+
econf "${myeconfargs[@]}"
98+
}

0 commit comments

Comments
 (0)