p5-MIME-tools: Fix warning when used with perl 5.38

Perl 5.38 bundles MIME::QuotedPrint at version 3.16_01 which is not
numeric, causing spurious warnings on usage.
patch from Niko Tyni <ntyni@debian.org>
This commit is contained in:
markd 2023-10-14 01:13:32 +00:00
parent 57ec9b168b
commit f84cb378b4
3 changed files with 33 additions and 3 deletions

View File

@ -1,8 +1,8 @@
# $NetBSD: Makefile,v 1.66 2023/07/06 09:40:46 wiz Exp $
# $NetBSD: Makefile,v 1.67 2023/10/14 01:13:32 markd Exp $
DISTNAME= MIME-tools-5.510
PKGNAME= p5-${DISTNAME}
PKGREVISION= 1
PKGREVISION= 2
CATEGORIES= perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=MIME/}
@ -20,5 +20,8 @@ TOOL_DEPENDS+= p5-Test-Deep-[0-9]*:../../devel/p5-Test-Deep
USE_LANGUAGES= # empty
PERL5_PACKLIST= auto/MIME/Tools/.packlist
post-patch:
rm ${WRKSRC}/lib/MIME/Decoder/QuotedPrint.pm.orig
.include "../../lang/perl5/module.mk"
.include "../../mk/bsd.pkg.mk"

View File

@ -1,5 +1,6 @@
$NetBSD: distinfo,v 1.26 2022/12/03 01:00:25 wen Exp $
$NetBSD: distinfo,v 1.27 2023/10/14 01:13:32 markd Exp $
BLAKE2s (MIME-tools-5.510.tar.gz) = 3bb09a24ba148cc97d8e96341709a6a678bee7802a018b06a1e4fd96b7f2a3b8
SHA512 (MIME-tools-5.510.tar.gz) = 86d110cc3ed3e9744a07a7b671df713708ab70f57aea858a9570bd021102b4cea91a869239f6c40611f1b1fae190e1b6d1bd65b54914ffc3a41fdf9160977328
Size (MIME-tools-5.510.tar.gz) = 417208 bytes
SHA1 (patch-lib_MIME_Decoder_QuotedPrint.pm) = b512ee827e20fe602da35383cd6ce6932291cc49

View File

@ -0,0 +1,26 @@
$NetBSD: patch-lib_MIME_Decoder_QuotedPrint.pm,v 1.1 2023/10/14 01:13:32 markd Exp $
Perl 5.38 bundles MIME::QuotedPrint at version 3.16_01 which is not
numeric, causing spurious warnings on usage.
patch from Niko Tyni <ntyni@debian.org>
+https://bugs.debian.org/1040377
--- lib/MIME/Decoder/QuotedPrint.pm.orig 2022-07-06 14:04:46.000000000 +0000
+++ lib/MIME/Decoder/QuotedPrint.pm
@@ -1,6 +1,7 @@
package MIME::Decoder::QuotedPrint;
use strict;
use warnings;
+use version;
=head1 NAME
@@ -73,7 +74,7 @@ $VERSION = "5.510";
# The following code is horrible. I know. Beat me up. --dfs
BEGIN {
if (!defined(&encode_qp_threearg)) {
- if ($::MIME::QuotedPrint::VERSION >= 3.03) {
+ if (version->parse($::MIME::QuotedPrint::VERSION) >= version->parse(3.03)) {
eval 'sub encode_qp_threearg ( $$$ ) { encode_qp(shift, shift, shift); }';
} else {
eval 'sub encode_qp_threearg ( $$$ ) { encode_qp(shift); }';