summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-09-09 08:30:00 +0100
committerSam James <sam@gentoo.org>2023-09-09 08:30:00 +0100
commiteaf82ae7d904aca40af8f92eb8eb4fee9ca629d7 (patch)
tree430eee85a5f846ff9a260050c7cdb2764fd9d89e /dev-perl/MIME-tools
parentx11-misc/xscreensaver: fix broken file name (diff)
downloadgentoo-eaf82ae7d904aca40af8f92eb8eb4fee9ca629d7.tar.gz
gentoo-eaf82ae7d904aca40af8f92eb8eb4fee9ca629d7.tar.bz2
gentoo-eaf82ae7d904aca40af8f92eb8eb4fee9ca629d7.zip
dev-perl/MIME-tools: fix compat w/ Perl 5.38
Closes: https://bugs.gentoo.org/913854 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-perl/MIME-tools')
-rw-r--r--dev-perl/MIME-tools/MIME-tools-5.510.0-r1.ebuild43
-rw-r--r--dev-perl/MIME-tools/files/MIME-tools-5.510.0-perl-5.38.patch36
2 files changed, 79 insertions, 0 deletions
diff --git a/dev-perl/MIME-tools/MIME-tools-5.510.0-r1.ebuild b/dev-perl/MIME-tools/MIME-tools-5.510.0-r1.ebuild
new file mode 100644
index 000000000000..5c0348b4b93b
--- /dev/null
+++ b/dev-perl/MIME-tools/MIME-tools-5.510.0-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DIST_AUTHOR=DSKOLL
+DIST_VERSION=5.510
+DIST_EXAMPLES=("examples/*")
+# tests fail when done in parallel
+DIST_TEST="do"
+inherit perl-module
+
+DESCRIPTION="A Perl module for parsing and creating MIME entities"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+
+RDEPEND="
+ >=virtual/perl-File-Path-1
+ >=virtual/perl-File-Spec-0.600.0
+ >=virtual/perl-File-Temp-0.180.0
+ virtual/perl-IO
+ >=virtual/perl-MIME-Base64-2.200.0
+ dev-perl/MailTools
+"
+BDEPEND="${RDEPEND}
+ >=virtual/perl-ExtUtils-MakeMaker-6.420.0
+ test? (
+ dev-perl/Test-Deep
+ )
+"
+
+PERL_RM_FILES=(
+ # Author tests
+ t/02-kwalitee.t
+ t/02-pod.t
+ t/02-pod-coverage.t
+ # Fails under FEATURES="network-sandbox"
+ t/Smtpsend.t
+)
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-5.510.0-perl-5.38.patch
+)
diff --git a/dev-perl/MIME-tools/files/MIME-tools-5.510.0-perl-5.38.patch b/dev-perl/MIME-tools/files/MIME-tools-5.510.0-perl-5.38.patch
new file mode 100644
index 000000000000..4c2cbc39129a
--- /dev/null
+++ b/dev-perl/MIME-tools/files/MIME-tools-5.510.0-perl-5.38.patch
@@ -0,0 +1,36 @@
+https://bugs.gentoo.org/913854
+https://bugs.debian.org/1040377
+https://rt.cpan.org/Public/Bug/Display.html?id=149225
+
+From 5964839271fd856076da6c7ed7822bcd39324c82 Mon Sep 17 00:00:00 2001
+From: Niko Tyni <ntyni@debian.org>
+Date: Sat, 29 Jul 2023 18:54:01 +0100
+Subject: [PATCH] Fix MIME::QuotedPrint version parsing
+
+Perl 5.38 bundles MIME::QuotedPrint at version 3.16_01 which is not
+numeric, causing spurious warnings on usage.
+
+Bug-Debian: https://bugs.debian.org/1040377
+Forwarded: https://rt.cpan.org/Ticket/Display.html?id=149225
+Bug: https://rt.cpan.org/Ticket/Display.html?id=149225
+--- a/lib/MIME/Decoder/QuotedPrint.pm
++++ b/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); }';
+--
+2.39.1