Remove unneeded mirror restriction (code is GPL-2).
Add patch from upstream bugtracker for compatibility with current perl.
Closes: https://bugs.gentoo.org/531320
Closes: https://bugs.gentoo.org/540946
Closes: https://bugs.gentoo.org/565098
Signed-off-by: Hanno Boeck <hanno@gentoo.org>
Package-Manager: Portage-2.3.78, Repoman-2.3.17
DIST MHonArc-2.6.18.tar.bz2 1546854 BLAKE2B dd403ef742ee3cf2ce3d4490a489d88fb4ba8814456d0ecfae347c4dfd5fc5a61593b9def93edcafadae5e32e9afd5853ac0bf584b8f0060962d1b6b3fb1f04f SHA512 816acfd5c68db274848859ea60c8fb47a12daadea5d8dc8acd12018b72c8ff22133ef7e366edb005ef309f7a74f2b4dfdb7ad5fe9256eb850bebaeb165be5511
+DIST MHonArc-2.6.19.tar.bz2 1577790 BLAKE2B 07c207c9684fd4a4f53a26ea18dc52c3136e7a5dc9623b121a8ef87b22fd19061d3fe91a48c691ba0776d7783dd3b80155e5c64518aa3050c0f0156537aa298b SHA512 17d9db58bf0a312ede435acba11a24ca73538f2031f24913fba28c8232b51b252e64a9bb55321aef26e3a2833a95939bdccaba51cb221fa1bc83d1980e60e7e0
--- /dev/null
+diff --git a/lib/mhamain.pl b/lib/mhamain.pl
+index 80980a2..d04dcc6 100644
+--- a/lib/mhamain.pl
++++ b/lib/mhamain.pl
+@@ -1562,7 +1562,7 @@ sub signal_catch {
+ ##
+ sub defineIndex2MsgId {
+ no warnings qw(deprecated);
+- if (!defined(%Index2MsgId)) {
++ if (!%Index2MsgId) {
+ foreach (keys %MsgId) {
+ $Index2MsgId{$MsgId{$_}} = $_;
+ }
+diff --git a/lib/mhopt.pl b/lib/mhopt.pl
+index 02fb05e..939109b 100644
+--- a/lib/mhopt.pl
++++ b/lib/mhopt.pl
+@@ -865,7 +865,7 @@ sub update_data_1_to_2 {
+ sub update_data_2_1_to_later {
+ no warnings qw(deprecated);
+ # we can preserve filter arguments
+- if (defined(%main::MIMEFiltersArgs)) {
++ if (%main::MIMEFiltersArgs) {
+ warn qq/ preserving MIMEARGS...\n/;
+ %readmail::MIMEFiltersArgs = %main::MIMEFiltersArgs;
+ $IsDefault{'MIMEARGS'} = 0;
--- /dev/null
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit perl-module
+
+DESCRIPTION="Perl Mail-to-HTML Converter"
+HOMEPAGE="https://www.mhonarc.org/"
+SRC_URI="https://www.mhonarc.org/release/MHonArc/tar/MHonArc-${PV}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~mips ~ppc ~x86"
+# Warrants IUSE examples, and here it is + ? IUSE doc; see also extras folder with html docs
+IUSE="examples"
+
+S="${WORKDIR}/${P/mhonarc/MHonArc}"
+mydoc="README.txt"
+
+# From upstream bugtracker: https://savannah.nongnu.org/bugs/?49997
+PATCHES=( "${FILESDIR}/mhonarc-fix-perl-defined-bugs.diff" )
+
+src_install() {
+ sed -e "s|-prefix |-docpath '${D}/usr/share/doc/${PF}/html' -prefix '${D}'|g" -i Makefile || die 'sed on Makefile failed'
+ sed -e "s|installsitelib|installvendorlib|g" -i install.me || die 'sed on install.me failed'
+ perl-module_src_install
+ if use examples; then
+ docompress -x usr/share/doc/${PF}/examples
+ insinto usr/share/doc/${PF}/
+ doins -r examples/
+ fi
+}