perl/perl-image-bmp: Fix 32-bit build failure.

Signed-off-by: B. Watson <urchlay@slackware.uk>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2024-08-19 15:48:38 -04:00 committed by Willy Sudiarto Raharjo
parent 16f5c46319
commit 8e7cbadb97
No known key found for this signature in database
GPG key ID: 3F617144D7238786
2 changed files with 21 additions and 1 deletions

View file

@ -0,0 +1,15 @@
diff -Naur Image-BMP-1.26/lib/Image/BMP.pm Image-BMP-1.26.patched/lib/Image/BMP.pm
--- Image-BMP-1.26/lib/Image/BMP.pm 2024-02-06 19:37:00.000000000 -0500
+++ Image-BMP-1.26.patched/lib/Image/BMP.pm 2024-08-19 15:45:02.250718304 -0400
@@ -382,7 +382,10 @@
$bmp->{YpixelsPerM} = read_bmp($bmp,4);
$bmp->{ColorsUsed} = read_bmp($bmp,4);
$bmp->{ColorsImportant} = read_bmp($bmp,4);
- $bmp->{ColorsUsed} = 1<<$bmp->{BitCount} if $bmp->{ColorsUsed} == 0;
+ {
+ use bigint;
+ $bmp->{ColorsUsed} = 1<<$bmp->{BitCount} if $bmp->{ColorsUsed} == 0;
+ }
$bmp->_debug(1,"Image: $bmp->{BitCount}/$bmp->{ColorsUsed} colors. Geometry: $bmp->{Width}x$bmp->{Height} $bmp->{ImageSize} [comp: $compStr ($bmp->{Compression})]\n");

View file

@ -6,13 +6,14 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
# 20240819 bkw: BUILD=2, fix 32-bit build failure.
# 20240814 bkw: update for v1.26.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=perl-image-bmp
VERSION=${VERSION:-1.26}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -41,6 +42,10 @@ chown -R root:root .
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
# This patch is for v1.26, and was sent to upstream on 20240819. Hope
# it ends up in the next release.
patch -p1 < $CWD/32bitfix.diff
perl Makefile.PL \
PREFIX=/usr \
INSTALLDIRS=vendor \