summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--news/nntp/Makefile5
-rw-r--r--news/nntp/files/patch-Makefile23
-rw-r--r--news/nntp/files/patch-xfer-nntpxfer.c15
3 files changed, 27 insertions, 16 deletions
diff --git a/news/nntp/Makefile b/news/nntp/Makefile
index 878f89610fc5..c6e7403bf383 100644
--- a/news/nntp/Makefile
+++ b/news/nntp/Makefile
@@ -25,6 +25,7 @@ MAN1= nntpxmit.1
MAN8= nntpd.8c acttimes.8c
PLIST_SUB+= NEWSBIN=${NEWSBIN:S=${PREFIX}/==}
PLIST_SUB+= NEWSCTL=${NEWSCTL:S=${PREFIX}/==}
+CFLAGS+= -I${LOCALBASE}/include
MODIFY= conf.h Makefile
DOCSFILES1= AUTHORIZE CHANGES README README-conf.h SYSLOG doc/rfc977
@@ -35,6 +36,10 @@ NEWSCTL?= ${PREFIX}/news/lib
NEWSARTS?= /var/news
NEWSOV?= /var/news/over.view
+MAKE_ENV+= DBLIBS="${LOCALBASE}/lib/libcnews.a -lcrypt -lutil"
+MAKE_ENV+= ETCDIR="${LOCALBASE}/sbin" BINDIR="${NEWSBIN}"
+MAKE_ENV+= MANDIR="${LOCALBASE}/man"
+
post-extract:
@${CP} ${WRKSRC}/conf.h.dist ${WRKSRC}/conf.h
diff --git a/news/nntp/files/patch-Makefile b/news/nntp/files/patch-Makefile
index c6bd394338ff..2f4ccb5088be 100644
--- a/news/nntp/files/patch-Makefile
+++ b/news/nntp/files/patch-Makefile
@@ -1,31 +1,26 @@
--- Makefile.orig Tue Jan 9 08:30:24 1996
-+++ Makefile Sun Jan 9 09:35:59 2000
++++ Makefile Thu Dec 5 09:59:23 2002
@@ -4,7 +4,7 @@
# The program that knows how to deal with makefiles. [Uncomment if needed.]
# MAKE=make
# set CFLAGS to be -Ipath/to/special/includes if needed
-CFLAGS= -O
-+CFLAGS+= -I/usr/local/include
++#CFLAGS= -O
#Uncomment the following for Solaris (and similiar SVR4 systems)
#NETLIBS = -lsocket -lnsl
#Uncomment the following if the previous one does not work
-@@ -13,6 +13,7 @@
- #DBLIBS = -ldbz
- #DBLIBS = /usr/local/lib/dbz.o #/usr/local/lib/dbzdbm.o
- #DBLIBS = -ldbm
-+DBLIBS = /usr/local/lib/libcnews.a -lcrypt -lutil
- # add the resolver library if needed
- #RESLIB = -lresolv
- # add the kmem library if needed
-@@ -21,9 +21,9 @@
+@@ -20,11 +20,11 @@
#Uncomment the following for Solaris (and similiar SVR4 systems)
#KVMLIB = -lelf
# Where nntpd is going to live
-ETCDIR = /etc
-+ETCDIR = /usr/local/sbin
++#ETCDIR = /usr/local/sbin
# Where nntpxmit and nntpxfer is going to live
-BINDIR = /usr/local/bin
-+BINDIR = /usr/local/news/cnewsbin
++#BINDIR = /usr/local/news/cnewsbin
# Where manual pages live
- MANDIR = /usr/local/man
+-MANDIR = /usr/local/man
++#MANDIR = /usr/local/man
#
+ LIBS = $(DBLIBS) $(RESLIB) $(NETLIBS) $(KVMLIB)
+ SUBMAKEFLAGS="LIBS=${LIBS}" "CFLAGS=${CFLAGS}" "ETCDIR=${ETCDIR}" "BINDIR=${BINDIR}" "MANDIR=${MANDIR}"
diff --git a/news/nntp/files/patch-xfer-nntpxfer.c b/news/nntp/files/patch-xfer-nntpxfer.c
index c29c37bdbe4d..0578f6860768 100644
--- a/news/nntp/files/patch-xfer-nntpxfer.c
+++ b/news/nntp/files/patch-xfer-nntpxfer.c
@@ -1,5 +1,5 @@
---- xfer/nntpxfer.c.orig Mon Nov 4 05:18:32 2002
-+++ xfer/nntpxfer.c Mon Nov 4 05:25:19 2002
+--- xfer/nntpxfer.c.orig Thu Dec 5 10:04:30 2002
++++ xfer/nntpxfer.c Thu Dec 5 10:07:22 2002
@@ -60,6 +60,9 @@
#include <sys/time.h>
#endif
@@ -22,3 +22,14 @@
char *artlist[MAX_ARTICLES];
int server; /* stream socket to the nntp server */
FILE * rd_fp, * wr_fp;
+@@ -649,8 +656,10 @@
+ errmsg(code)
+ int code;
+ {
++#ifndef __FreeBSD__
+ extern int sys_nerr;
+ extern char *sys_errlist[];
++#endif
+ static char ebuf[6+5+1];
+
+ if (code > sys_nerr || code < 0) {