net-mail/email: Fix building with CFLAGS=-fno-common
authorJeroen Roovers <jer@gentoo.org>
Sun, 17 May 2020 10:16:52 +0000 (12:16 +0200)
committerJeroen Roovers <jer@gentoo.org>
Sun, 17 May 2020 10:17:49 +0000 (12:17 +0200)
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Closes: https://bugs.gentoo.org/707620
Signed-off-by: Jeroen Roovers <jer@gentoo.org>
net-mail/email/email-3.1.3-r1.ebuild [new file with mode: 0644]
net-mail/email/files/email-3.1.3-fno-common.patch [new file with mode: 0644]

diff --git a/net-mail/email/email-3.1.3-r1.ebuild b/net-mail/email/email-3.1.3-r1.ebuild
new file mode 100644 (file)
index 0000000..e8b2a10
--- /dev/null
@@ -0,0 +1,21 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="Advanced CLI tool for sending email"
+HOMEPAGE="https://github.com/deanproxy/eMail"
+SRC_URI="http://www.cleancode.org/downloads/${PN}/${P}.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+
+KEYWORDS="~alpha ~amd64 ~x86"
+PATCHES=(
+       "${FILESDIR}"/${PN}-3.1.3-fno-common.patch
+)
+
+src_install() {
+       default
+       doman email.1
+       dodoc README TODO
+}
diff --git a/net-mail/email/files/email-3.1.3-fno-common.patch b/net-mail/email/files/email-3.1.3-fno-common.patch
new file mode 100644 (file)
index 0000000..ecbc43d
--- /dev/null
@@ -0,0 +1,32 @@
+--- a/include/email.h
++++ b/include/email.h
+@@ -61,11 +61,11 @@
+ /* Globally defined vars */
+-dhash table;
+-char *conf_file;
+-dstrbuf *global_msg;
++extern dhash table;
++extern char *conf_file;
++extern dstrbuf *global_msg;
+-struct mailer_options {
++extern struct mailer_options {
+       bool verbose;
+       bool encoding;
+       short html;
+--- a/src/email.c
++++ b/src/email.c
+@@ -40,6 +40,11 @@
+ #include "error.h"
+ #include "mimeutils.h"
++dhash table;
++char *conf_file;
++dstrbuf *global_msg;
++struct mailer_options Mopts;
++
+ static void
+ defaultDestr(void *ptr)
+ {