summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas K. Hüttel <dilfridge@gentoo.org>2017-01-14 13:46:52 +0100
committerAndreas K. Hüttel <dilfridge@gentoo.org>2017-01-14 13:47:26 +0100
commit2d7412d412cb0b50072fb730943a42c37af595b4 (patch)
tree66ec7c318cb0487d5fe2edc8afb8fee441e07c22 /dev-perl/MIME-Lite-HTML
parentkde-apps/kdenlive: Restore 16.12.0 for now (diff)
downloadgentoo-2d7412d412cb0b50072fb730943a42c37af595b4.tar.gz
gentoo-2d7412d412cb0b50072fb730943a42c37af595b4.tar.bz2
gentoo-2d7412d412cb0b50072fb730943a42c37af595b4.zip
dev-perl/MIME-Lite-HTML: New package, bug 382635
Includes patches from https://github.com/SysPete/MIME-Lite-HTML to get the tests working. Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'dev-perl/MIME-Lite-HTML')
-rw-r--r--dev-perl/MIME-Lite-HTML/MIME-Lite-HTML-1.240.0.ebuild32
-rw-r--r--dev-perl/MIME-Lite-HTML/Manifest1
-rw-r--r--dev-perl/MIME-Lite-HTML/files/MIME-Lite-HTML-1.240.0-tests1.patch96
-rw-r--r--dev-perl/MIME-Lite-HTML/files/MIME-Lite-HTML-1.240.0-tests2.patch54
-rw-r--r--dev-perl/MIME-Lite-HTML/metadata.xml8
5 files changed, 191 insertions, 0 deletions
diff --git a/dev-perl/MIME-Lite-HTML/MIME-Lite-HTML-1.240.0.ebuild b/dev-perl/MIME-Lite-HTML/MIME-Lite-HTML-1.240.0.ebuild
new file mode 100644
index 00000000000..f8fcb8e2257
--- /dev/null
+++ b/dev-perl/MIME-Lite-HTML/MIME-Lite-HTML-1.240.0.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+DIST_AUTHOR=ALIAN
+DIST_VERSION=1.24
+inherit perl-module
+
+DESCRIPTION="Provide routine to transform a HTML page in a MIME-Lite mail"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+RDEPEND="
+ dev-perl/HTML-Parser
+ dev-perl/libwww-perl
+ dev-perl/MIME-Lite
+ dev-perl/URI
+"
+DEPEND="${RDEPEND}
+ virtual/perl-ExtUtils-MakeMaker
+ test? ( virtual/perl-Test-Simple )
+"
+
+PATCHES=(
+ "${FILESDIR}/${P}-tests1.patch"
+ "${FILESDIR}/${P}-tests2.patch"
+)
+
+DIST_TEST=do
diff --git a/dev-perl/MIME-Lite-HTML/Manifest b/dev-perl/MIME-Lite-HTML/Manifest
new file mode 100644
index 00000000000..f7653856e69
--- /dev/null
+++ b/dev-perl/MIME-Lite-HTML/Manifest
@@ -0,0 +1 @@
+DIST MIME-Lite-HTML-1.24.tar.gz 63640 SHA256 db603ccbf6653bcd28cfa824d72e511ead019fc8afb9f1854ec872db2d3cd8da SHA512 06d0392c5ef7628e10d47be979edbd431f04850e8bfdde6deb8507fd962cab27feaeb119b542faf13a2f1849df751afc8cbabd3cba17ac3aec4dc4042fb83960 WHIRLPOOL 2d8691c3b7abeb958dec881e952a9495800d1334a1c5066f264464cad3b167c4b4e68f29bcac8327904a5739b5d03eaef9b6f7c3531e071d30ee7f6260bb732f
diff --git a/dev-perl/MIME-Lite-HTML/files/MIME-Lite-HTML-1.240.0-tests1.patch b/dev-perl/MIME-Lite-HTML/files/MIME-Lite-HTML-1.240.0-tests1.patch
new file mode 100644
index 00000000000..a9e1bdb0b02
--- /dev/null
+++ b/dev-perl/MIME-Lite-HTML/files/MIME-Lite-HTML-1.240.0-tests1.patch
@@ -0,0 +1,96 @@
+From 0a67f501c8af5585af7fec08cbe0964b1a235b93 Mon Sep 17 00:00:00 2001
+From: Peter Mottram <peter@sysnix.com>
+Date: Thu, 12 May 2016 16:48:38 +0200
+Subject: [PATCH] force header ordering in tests and ignore blank lines in
+ diffs
+
+This fixes effects of hash randomisation and line-break changes in
+MIME::Lite.
+---
+ t/20create_image_part.t | 7 +++++++
+ t/50generic.t | 20 +++++++++++++-------
+ 2 files changed, 20 insertions(+), 7 deletions(-)
+
+diff --git a/t/20create_image_part.t b/t/20create_image_part.t
+index 0df935f..4de4440 100644
+--- a/t/20create_image_part.t
++++ b/t/20create_image_part.t
+@@ -8,6 +8,13 @@ use Cwd;
+
+ # For create ref file, use perl -Iblib/lib t/20create_image_part.t 1
+
++MIME::Lite->field_order(
++ 'mime-version', 'content-id',
++ 'content-location', 'content-transfer-encoding',
++ 'content-type', 'subject',
++ 'to', 'from'
++);
++
+ my $t = "/var/tmp/mime-lite-html-tests";
+ my $p = cwd;
+ my $o = (system("ln -s $p/t $t")==0);
+diff --git a/t/50generic.t b/t/50generic.t
+index 5ba7895..76b879d 100644
+--- a/t/50generic.t
++++ b/t/50generic.t
+@@ -10,6 +10,12 @@ use Cwd;
+ URI::URL->strict(1);
+ }
+
++MIME::Lite->field_order(
++ 'mime-version', 'content-id',
++ 'content-location', 'content-transfer-encoding',
++ 'content-type', 'subject',
++ 'to', 'from'
++);
+
+ # For create ref file, use perl -Iblib/lib t/50generic.t 1
+
+@@ -47,11 +53,11 @@ foreach my $it ('cid', 'location', 'extern') {
+ or die "Can't create $f.created_by_test:$!";
+ print PROD $rep;
+ close(PROD);
+- my $r = `diff $ref $f.created_by_test`;
++ my $r = `diff -B $ref $f.created_by_test`;
+ cmp_ok($mailHTML->size, ">", (stat($ref))[7], "Same size");
+ cmp_ok($mailHTML->size*0.945, "<", (stat($ref))[7], "Same size");
+ is($r, "", $ref);
+- unlink("$f.created_by_test");
++ #unlink("$f.created_by_test");
+ }
+ # for create ref file
+ elsif ($ARGV[0]) {
+@@ -88,11 +94,11 @@ foreach my $it ('cid', 'location', 'extern') {
+ or die "Can't create $f.created_by_test:$!";
+ print PROD $rep;
+ close(PROD);
+- my $r = `diff $ref $f.created_by_test`;
++ my $r = `diff -B $ref $f.created_by_test`;
+ cmp_ok($mailHTML->size, ">", (stat($ref))[7], "Same size");
+ cmp_ok($mailHTML->size*0.945, "<", (stat($ref))[7], "Same size");
+ is($r, "", $ref);
+- unlink("$f.created_by_test");
++ #unlink("$f.created_by_test");
+ }
+ # for create ref file
+ elsif ($ARGV[0]) {
+@@ -130,11 +136,11 @@ foreach my $it ('cid', 'location', 'extern') {
+ or die "Can't create $f.created_by_test:$!";
+ print PROD $rep;
+ close(PROD);
+- my $r = `diff $ref $f.created_by_test`;
++ my $r = `diff -B $ref $f.created_by_test`;
+ cmp_ok($mailHTML->size, ">", (stat($ref))[7], "Same size");
+ cmp_ok($mailHTML->size*0.945, "<", (stat($ref))[7], "Same size");
+ is($r, "", $ref);
+- unlink("$f.created_by_test");
++ #unlink("$f.created_by_test");
+ }
+ # for create ref file
+ elsif ($ARGV[0]) {
+@@ -156,4 +162,4 @@ my $mailHTML = new MIME::Lite::HTML
+ my %vars = ( 'perl' => 'fast', 'lng' => 'Ruby');
+ cmp_ok($mailHTML->fill_template('Perl is <? $perl ?>, <? $lng ?> suck',\%vars),
+ 'eq', 'Perl is fast, Ruby suck',"Call of fill_template do his job");
+-unlink($t);
++#unlink($t);
diff --git a/dev-perl/MIME-Lite-HTML/files/MIME-Lite-HTML-1.240.0-tests2.patch b/dev-perl/MIME-Lite-HTML/files/MIME-Lite-HTML-1.240.0-tests2.patch
new file mode 100644
index 00000000000..3ed9a518049
--- /dev/null
+++ b/dev-perl/MIME-Lite-HTML/files/MIME-Lite-HTML-1.240.0-tests2.patch
@@ -0,0 +1,54 @@
+Paths fixed in the patch- dilfridge@gentoo.org
+
+From 770933ee2c194160a9ab3320468d3b672973d3d8 Mon Sep 17 00:00:00 2001
+From: Peter Mottram <peter@sysnix.com>
+Date: Thu, 12 May 2016 16:50:35 +0200
+Subject: [PATCH] fix breakage introduced in MIME::Lite v3.029
+
+See commit:
+
+https://github.com/rjbs/MIME-Lite/commit/4608623af9126f53f38b723c4e9f38bbcd07d866
+
+and original ticket:
+
+https://rt.cpan.org/Public/Bug/Display.html?id=35979
+---
+ lib/MIME/Lite/HTML.pm | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/lib/MIME/Lite/HTML.pm b/lib/MIME/Lite/HTML.pm
+index bc06640..6839bf4 100755
+--- a/HTML.pm
++++ b/HTML.pm
+@@ -463,7 +463,6 @@ sub build_mime_object {
+ 'Data' => $html);
+ $part->attr("content-type"=> "text/html; charset=".$self->{_htmlcharset});
+ # Remove some header for Eudora client in HTML and related part
+- $part->replace("MIME-Version" => "");
+ $part->replace('X-Mailer' =>"");
+ $part->replace('Content-Disposition' =>"");
+ # only html, no images & no txt
+@@ -480,7 +479,6 @@ sub build_mime_object {
+ $txt_part->attr("content-type" =>
+ "text/plain; charset=".$self->{_textcharset});
+ # Remove some header for Eudora client
+- $txt_part->replace("MIME-Version" => "");
+ $txt_part->replace("X-Mailer" => "");
+ $txt_part->replace("Content-Disposition" => "");
+ # only text, no html
+@@ -516,7 +514,6 @@ sub build_mime_object {
+ # Create related part
+ my $rel = new MIME::Lite ('Type'=>'multipart/related');
+ $rel->replace("Content-transfer-encoding" => "");
+- $rel->replace("MIME-Version" => "");
+ $rel->replace("X-Mailer" => "");
+ # Attach text part to alternative part
+ $mail->attach($txt_part);
+@@ -656,7 +653,6 @@ sub create_image_part {
+
+ # Remove header for Eudora client
+ $mail->replace("X-Mailer" => "");
+- $mail->replace("MIME-Version" => "");
+ $mail->replace("Content-Disposition" => "");
+ return $mail;
+ }
diff --git a/dev-perl/MIME-Lite-HTML/metadata.xml b/dev-perl/MIME-Lite-HTML/metadata.xml
new file mode 100644
index 00000000000..51930499ab6
--- /dev/null
+++ b/dev-perl/MIME-Lite-HTML/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>perl@gentoo.org</email>
+ <name>Gentoo Perl Project</name>
+ </maintainer>
+</pkgmetadata>