From 5972a103acba7a5780859be4ef41e0311ca08079 Mon Sep 17 00:00:00 2001 From: Jeroen Roovers Date: Thu, 28 May 2020 10:58:01 +0200 Subject: [PATCH] net-mail/smtptools: Fix building with CFLAGS=-fno-common Package-Manager: Portage-2.3.100, Repoman-2.3.22 Closes: https://bugs.gentoo.org/707142 Signed-off-by: Jeroen Roovers --- .../files/smtptools-0.2.3-cleanups.patch | 12 ++++---- .../files/smtptools-0.2.3-fno-common.patch | 11 ++++++++ net-mail/smtptools/smtptools-0.2.3-r1.ebuild | 28 +++++++++++++++++++ 3 files changed, 45 insertions(+), 6 deletions(-) create mode 100644 net-mail/smtptools/files/smtptools-0.2.3-fno-common.patch create mode 100644 net-mail/smtptools/smtptools-0.2.3-r1.ebuild diff --git a/net-mail/smtptools/files/smtptools-0.2.3-cleanups.patch b/net-mail/smtptools/files/smtptools-0.2.3-cleanups.patch index 6873cf390255..3ea1d43712a0 100644 --- a/net-mail/smtptools/files/smtptools-0.2.3-cleanups.patch +++ b/net-mail/smtptools/files/smtptools-0.2.3-cleanups.patch @@ -1,5 +1,5 @@ ---- smtptools/usmtpd.c -+++ smtptools/usmtpd.c +--- a/usmtpd.c ++++ b/usmtpd.c @@ -60,8 +60,8 @@ /* run */ static const char *reminfo; /* run */ static const char *relayclient; @@ -41,16 +41,16 @@ if (rblcheck) do_rbl_check(&o); ---- smtptools/relaydb.c -+++ smtptools/relaydb.c +--- a/relaydb.c ++++ b/relaydb.c @@ -1,4 +1,5 @@ #include "config.h" +#include #include #include #include ---- smtptools/uostr.h -+++ smtptools/uostr.h +--- a/uostr.h ++++ b/uostr.h @@ -1,6 +1,7 @@ #ifndef UOSTR_H #define UOSTR_H diff --git a/net-mail/smtptools/files/smtptools-0.2.3-fno-common.patch b/net-mail/smtptools/files/smtptools-0.2.3-fno-common.patch new file mode 100644 index 000000000000..34435ec7ccee --- /dev/null +++ b/net-mail/smtptools/files/smtptools-0.2.3-fno-common.patch @@ -0,0 +1,11 @@ +--- a/uostr.h ++++ b/uostr.h +@@ -14,7 +14,7 @@ + uostr_t *uostr_alloc P__((void)); /* mallocs a uostr_t and inits with 0 */ + void uostr_free P__((uostr_t *)); /* free(uostr_t), after free(uostr_t->data) */ + void uostr_freedata P__((uostr_t *)); /* free(uostr_t->data) */ +-void (*uostr_xallocfn) P__((const char *)); /* called by x-functions in case of oom */ ++extern void (*uostr_xallocfn) P__((const char *)); /* called by x-functions in case of oom */ + void uostr_xallocerr P__((const char *fn)) UO_ATTRIB_NORET; /* internal function, leave alone */ + + /* be careful - if u->data is NULL then u->len and u->size need not to contain any information */ diff --git a/net-mail/smtptools/smtptools-0.2.3-r1.ebuild b/net-mail/smtptools/smtptools-0.2.3-r1.ebuild new file mode 100644 index 000000000000..4c93c7172b36 --- /dev/null +++ b/net-mail/smtptools/smtptools-0.2.3-r1.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools + +DESCRIPTION="A collection of tools to send or receive mails with SMTP" +HOMEPAGE="https://www.ohse.de/uwe/software/smtptools.html" +SRC_URI="ftp://ftp.ohse.de/uwe/releases/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~x86" + +RDEPEND="!net-mail/qtools" +PATCHES=( + "${FILESDIR}"/${P}-cleanups.patch + "${FILESDIR}"/${P}-fno-common.patch +) + +src_prepare() { + eapply "${FILESDIR}"/${P}-autotools.patch + mv configure.{in,ac} || die + rm acconfig.h || die + + default + eautoreconf +} -- 2.26.2