[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #66504] [gropdf] build failure on Solaris 10
From: |
G. Branden Robinson |
Subject: |
[bug #66504] [gropdf] build failure on Solaris 10 |
Date: |
Wed, 4 Dec 2024 08:58:29 -0500 (EST) |
Follow-up Comment #12, bug #66504 (group groff):
Wait, that's truncated. Sorry. Here's the full patch.
diff --git a/ChangeLog b/ChangeLog
index 332df7884..f73133de4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-12-03 Deri James <deri@chuzzlewit.myzen.co.uk>
+
+ * src/devices/gropdf/gropdf.pl: Use Perl 5.8-compatible regular
+ expressions and initialization semantics. Fixes groff build
+ failure and Perl interpreter warnings on Solaris 10.
+
+ Fixes <https://savannah.gnu.org/bugs/?66504>.
+
2024-12-03 G. Branden Robinson <g.branden.robinson@gmail.com>
Adapt tests to feeble systems lacking a shell or grep conforming
diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl
index 754c4904b..a40156ed9 100644
--- a/src/devices/gropdf/gropdf.pl
+++ b/src/devices/gropdf/gropdf.pl
@@ -486,7 +486,7 @@ my $term="\n";
my @bl;
my %seac;
my $thisfnt;
-my $parcln=qr/\[[^\]]*?\]|(?<term>.)((?!\g{term}).)*\g{term}/;
+my $parcln=qr/\[[^\]]*?\]|(.)((?!\1).)*\1/;
my $parclntyp=qr/(?:[\d\w]|\([+-]?[\S]{2}|$parcln)/;
if (!GetOptions('F=s' => \$fd, 'I=s' => \@idirs, 'l' => \$frot,
@@ -1697,10 +1697,16 @@ sub do_x
else
{
my $dim=`( identify $FDnm 2>/dev/null || file $FDnm
)`;
- $dim=~m/(?:(?:[,=A-Z]|JP2)
(?<w>\d+)\s*x\s*(?<h>\d+))|(?:height=(?<h>\d+).+width=(?<w>\d+))/;
-
- $info->{ImageWidth}=$+{w};
- $info->{ImageHeight}=$+{h};
+ if ($dim=~m/(?:[,=A-Z]|JP2) (\d+)\s*x\s*(\d+)/)
+ {
+ $info->{ImageWidth}=$1;
+ $info->{ImageHeight}=$2;
+ }
+ elsif ($dim=~m/height=(\d+).+width=(\d+)/)
+ {
+ $info->{ImageWidth}=$2;
+ $info->{ImageHeight}=$1;
+ }
if ($dim=~m/JPEG \d+x|JFIF/)
{
@@ -2009,7 +2015,8 @@ sub do_x
my ($S,$P,$St);
$xprm[2]='' if !$xprm[2] or $xprm[2] eq '.';
- $xprm[3]='' if defined($xprm[3]) and $xprm[3] eq '.';
+ $xprm[3]='' if !defined($xprm[3]) or $xprm[3] eq '.';
+ $xprm[4]='' if !defined($xprm[4]);
if ($xprm[2] and index('DRrAa',substr($xprm[2],0,1)) == -1)
{
@@ -2018,7 +2025,9 @@ sub do_x
else
{
$S=substr($xprm[2],0,1) if $xprm[2];
- $P=$xprm[3];
+ $P='';
+ $P=$xprm[3] if length($xprm[3]);
+ $St='';
$St=$xprm[4] if length($xprm[4]);
if (!defined($S) and !length($P))
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?66504>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
- [bug #66504] [gropdf] build failure on Solaris 10, (continued)
- [bug #66504] [gropdf] build failure on Solaris 10, G. Branden Robinson, 2024/12/02
- [bug #66504] [gropdf] build failure on Solaris 10, Deri James, 2024/12/03
- [bug #66504] [gropdf] build failure on Solaris 10, G. Branden Robinson, 2024/12/03
- [bug #66504] [gropdf] build failure on Solaris 10, G. Branden Robinson, 2024/12/03
- [bug #66504] [gropdf] build failure on Solaris 10, Deri James, 2024/12/03
- [bug #66504] [gropdf] build failure on Solaris 10, G. Branden Robinson, 2024/12/04
- [bug #66504] [gropdf] build failure on Solaris 10, G. Branden Robinson, 2024/12/04
- [bug #66504] [gropdf] build failure on Solaris 10, G. Branden Robinson, 2024/12/04
- [bug #66504] [gropdf] build failure on Solaris 10, G. Branden Robinson, 2024/12/04
- [bug #66504] [gropdf] build failure on Solaris 10, G. Branden Robinson, 2024/12/04
- [bug #66504] [gropdf] build failure on Solaris 10,
G. Branden Robinson <=
- [bug #66504] [patch][gropdf] build failure on Solaris 10, Deri James, 2024/12/05
- [bug #66504] [PATCH] [gropdf] build failure on Solaris 10, G. Branden Robinson, 2024/12/06
- [bug #66504] [PATCH] [gropdf] build failure on Solaris 10, G. Branden Robinson, 2024/12/06
- [bug #66504] [PATCH] [gropdf] build failure on Solaris 10, G. Branden Robinson, 2024/12/06
- [bug #66504] [PATCH] [gropdf] build failure on Solaris 10, G. Branden Robinson, 2024/12/06