net-nntp/newspost: port to EAPI 7

Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2021-04-20 01:50:38 +01:00
parent f5649b3697
commit ec5cfb0142
4 changed files with 24 additions and 25 deletions

View File

@@ -1,5 +1,5 @@
--- base/socket.c.orig Tue Jan 18 11:08:02 2005
+++ base/socket.c Tue Jan 18 11:10:08 2005
--- a/base/socket.c
+++ b/base/socket.c
@@ -126,7 +126,7 @@
i = 0;

View File

@@ -1,6 +1,5 @@
diff -ur newspost-2.1.1.orig/base/newspost.c newspost-2.1.1/base/newspost.c
--- newspost-2.1.1.orig/base/newspost.c 2003-04-23 18:33:23.000000000 +0300
+++ newspost-2.1.1/base/newspost.c 2009-08-06 14:46:41.000000000 +0300
--- a/base/newspost.c
+++ b/base/newspost.c
@@ -342,7 +342,7 @@
file = fopen(filename, "r");
if (file != NULL) {
@@ -10,9 +9,8 @@ diff -ur newspost-2.1.1.orig/base/newspost.c newspost-2.1.1/base/newspost.c
if(line == NULL){
text_buffer = buff_add(text_buffer, "\r\n");
continue;
diff -ur newspost-2.1.1.orig/base/utils.c newspost-2.1.1/base/utils.c
--- newspost-2.1.1.orig/base/utils.c 2009-08-06 14:44:35.000000000 +0300
+++ newspost-2.1.1/base/utils.c 2009-08-06 14:45:20.000000000 +0300
--- a/base/utils.c
+++ b/base/utils.c
@@ -43,7 +43,7 @@
return NULL;
}
@@ -22,9 +20,8 @@ diff -ur newspost-2.1.1.orig/base/utils.c newspost-2.1.1/base/utils.c
int c = fgetc(file);
buff = buff_free(buff);
while(TRUE){
diff -ur newspost-2.1.1.orig/base/utils.h newspost-2.1.1/base/utils.h
--- newspost-2.1.1.orig/base/utils.h 2003-02-08 17:09:41.000000000 +0200
+++ newspost-2.1.1/base/utils.h 2009-08-06 14:45:13.000000000 +0300
--- a/base/utils.h
+++ b/base/utils.h
@@ -26,7 +26,7 @@
file_entry * file_entry_alloc();
file_entry * file_entry_free(file_entry *fe);
@@ -34,9 +31,8 @@ diff -ur newspost-2.1.1.orig/base/utils.h newspost-2.1.1/base/utils.h
Buff *buff_add(Buff *buff, char *data, ... );
Buff * buff_free(Buff *buff);
Buff *buff_create(Buff *buff, char *data, ... );
diff -ur newspost-2.1.1.orig/ui/options.c newspost-2.1.1/ui/options.c
--- newspost-2.1.1.orig/ui/options.c 2003-04-23 18:33:33.000000000 +0300
+++ newspost-2.1.1/ui/options.c 2009-08-06 14:46:31.000000000 +0300
--- a/ui/options.c
+++ b/ui/options.c
@@ -332,7 +332,7 @@
file = fopen(filename->data, "r");
if (file != NULL) {

View File

@@ -1,5 +1,5 @@
--- newspost-2.1.1.orig/base/nntp.c
+++ newspost-2.1.1/base/nntp.c
--- a/base/nntp.c
+++ b/base/nntp.c
@@ -26,6 +26,10 @@
*** Public Routines
**/
@@ -56,8 +56,8 @@
}
buff = buff_add(buff, "From: %s\r\n", data->from->data);
--- newspost-2.1.1.orig/base/utils.c
+++ newspost-2.1.1/base/utils.c
--- a/base/utils.c
+++ b/base/utils.c
@@ -44,7 +44,7 @@
}

View File

@@ -1,9 +1,9 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=5
EAPI=7
inherit epatch toolchain-funcs
inherit toolchain-funcs
DESCRIPTION="A usenet binary autoposter for unix"
HOMEPAGE="http://newspost.unixcab.org/"
@@ -12,13 +12,16 @@ SRC_URI="http://newspost.unixcab.org/download/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux ~ppc-macos"
IUSE=""
PATCHES=(
# Should fix some problems with unexpected server replies, cf. bug 185468
"${FILESDIR}"/${P}-nntp.patch
"${FILESDIR}"/CAN-2005-0101.patch
"${FILESDIR}"/${P}-glibc-2.10.patch
)
src_prepare() {
# Should fix some problems with unexpected server replies, cf. bug 185468
epatch "${FILESDIR}"/${P}-nntp.patch
epatch "${FILESDIR}"/CAN-2005-0101.patch
epatch "${FILESDIR}"/${P}-glibc-2.10.patch
default
sed -e "/-strip newspost/d" -i Makefile || die
}