From 805e4d2c2d6946e593f5901679cc41e97462e68b Mon Sep 17 00:00:00 2001 From: Rolf Eike Beer Date: Sat, 5 Oct 2019 10:50:40 +0200 Subject: [PATCH] net-mail/queue-fix: bump to EAPI 7 Signed-off-by: Rolf Eike Beer (cherry picked from commit 42cff3a3eb45b12ff77be1cad5db5ae3776c7e2c) Signed-off-by: Robin H. Johnson Closes: https://github.com/gentoo/gentoo/pull/13151 --- .../queue-fix/files/queue-fix-1.4-errno.patch | 25 +++++++++++ .../files/queue-fix-1.4-stdlib.patch | 39 ++++++++++++++++++ net-mail/queue-fix/queue-fix-1.4-r3.ebuild | 41 +++++++++++++++++++ 3 files changed, 105 insertions(+) create mode 100644 net-mail/queue-fix/files/queue-fix-1.4-errno.patch create mode 100644 net-mail/queue-fix/files/queue-fix-1.4-stdlib.patch create mode 100644 net-mail/queue-fix/queue-fix-1.4-r3.ebuild diff --git a/net-mail/queue-fix/files/queue-fix-1.4-errno.patch b/net-mail/queue-fix/files/queue-fix-1.4-errno.patch new file mode 100644 index 000000000000..d11716bcd731 --- /dev/null +++ b/net-mail/queue-fix/files/queue-fix-1.4-errno.patch @@ -0,0 +1,25 @@ +From d741f95ed6c983919a7ed3080c15064f6fb44e61 Mon Sep 17 00:00:00 2001 +From: Rolf Eike Beer +Date: Sat, 5 Oct 2019 10:39:59 +0200 +Subject: [PATCH 2/2] fix declaration of errno + +--- + error.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/error.h b/error.h +index 01bd3dc..5d98c6b 100644 +--- a/error.h ++++ b/error.h +@@ -1,7 +1,7 @@ + #ifndef ERROR_H + #define ERROR_H + +-extern int errno; ++#include + + extern int error_intr; + extern int error_nomem; +-- +2.16.4 + diff --git a/net-mail/queue-fix/files/queue-fix-1.4-stdlib.patch b/net-mail/queue-fix/files/queue-fix-1.4-stdlib.patch new file mode 100644 index 000000000000..02842a3bfdbd --- /dev/null +++ b/net-mail/queue-fix/files/queue-fix-1.4-stdlib.patch @@ -0,0 +1,39 @@ +From 29dd8f91cf83441aba074dae5af10fe09d095f6b Mon Sep 17 00:00:00 2001 +From: Rolf Eike Beer +Date: Sat, 5 Oct 2019 10:39:21 +0200 +Subject: [PATCH 1/2] include stdlib.h for exit() and malloc() + +--- + alloc.c | 4 ++-- + queue-fix.c | 1 + + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/alloc.c b/alloc.c +index c661453..0ed63b5 100644 +--- a/alloc.c ++++ b/alloc.c +@@ -1,7 +1,7 @@ + #include "alloc.h" + #include "error.h" +-extern char *malloc(); +-extern void free(); ++ ++#include + + #define ALIGNMENT 16 /* XXX: assuming that this alignment is enough */ + #define SPACE 4096 /* must be multiple of ALIGNMENT */ +diff --git a/queue-fix.c b/queue-fix.c +index be9b080..b164dfb 100644 +--- a/queue-fix.c ++++ b/queue-fix.c +@@ -9,6 +9,7 @@ + #include + #include + #include ++#include + #include "stralloc.h" + #include "direntry.h" + #include "fmt.h" +-- +2.16.4 + diff --git a/net-mail/queue-fix/queue-fix-1.4-r3.ebuild b/net-mail/queue-fix/queue-fix-1.4-r3.ebuild new file mode 100644 index 000000000000..3b3b852d8449 --- /dev/null +++ b/net-mail/queue-fix/queue-fix-1.4-r3.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit fixheadtails toolchain-funcs + +DESCRIPTION="Qmail Queue Repair Application with support for big-todo" +HOMEPAGE="http://www.netmeridian.com/e-huss/" +SRC_URI="http://www.netmeridian.com/e-huss/${P}.tar.gz + mirror://qmail/queue-fix-todo.patch" + +LICENSE="all-rights-reserved public-domain" # includes code from qmail +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~s390 ~sh ~sparc ~x86" +RESTRICT="mirror bindist" + +PDEPEND="virtual/qmail" + +PATCHES=( + "${DISTDIR}"/queue-fix-todo.patch + "${FILESDIR}"/${P}-stdlib.patch + "${FILESDIR}"/${P}-errno.patch +) + +src_unpack() { + default + ht_fix_file "${S}"/Makefile* +} + +src_configure() { + echo "$(tc-getCC) ${CFLAGS}" > conf-cc + echo "$(tc-getCC) ${LDFLAGS}" > conf-ld + sed -e "s#'ar #'$(tc-getAR) #" -e "s#'ranlib #'$(tc-getRANLIB) #" -i make-makelib.sh || die +} + +src_install () { + dobin queue-fix + + einstalldocs +} -- 2.26.2