- Update to 6.6.5 and unbreak [1]

- Move flags from patch into MAKE_ARGS
- Drop dependency on GNU make

PR:		ports/66090 [1]
Submitted by:	Sean Farley
Approved by:	maintainer
This commit is contained in:
Volker Stolz 2004-05-07 14:38:46 +00:00
parent 7c844f2fea
commit 6be9db7569
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=108623
7 changed files with 40 additions and 120 deletions

View file

@ -6,8 +6,7 @@
#
PORTNAME= nn
PORTVERSION= 6.6.2
PORTREVISION= 2
PORTVERSION= 6.6.5
CATEGORIES= news
MASTER_SITES= ftp://ftp.nndev.org/pub/nn-6.6/%SUBDIR%/
MASTER_SITE_SUBDIR= . old
@ -16,7 +15,7 @@ EXTRACT_SUFX= .tar.Z
MAINTAINER= jooji@nickelkid.com
COMMENT= Newsreader
USE_GMAKE= yes
MAKE_ARGS= CC="${CC}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS} -s"
MAN1= nn.1 nncheck.1 nngoback.1 nngrab.1 nngrep.1 nnpost.1 \
nntidy.1 nnview.1 nnacct.1m nnadmin.1m nnstats.1m nnusage.1m
@ -24,10 +23,6 @@ MAN8= nnmaster.8 nnspew.8
.include <bsd.port.pre.mk>
.if ${OSVERSION} >= 501000
BROKEN= "Does not compile"
.endif
pre-patch:
@${CP} ${WRKSRC}/config.h-dist ${WRKSRC}/config.h.unparsed

View file

@ -1,2 +1,2 @@
MD5 (nn-6.6.2.tar.Z) = 527cb8fb6410170bd53d09c2767329ac
SIZE (nn-6.6.2.tar.Z) = 830437
MD5 (nn-6.6.5.tar.Z) = 90761c1325a82a729f668e8a2c364845
SIZE (nn-6.6.5.tar.Z) = 826135

View file

@ -1,9 +1,9 @@
--- chset.c.orig Tue Jan 25 09:33:52 2000
+++ chset.c Tue Jan 25 09:34:51 2000
+++ chset.c Wed Apr 28 17:47:59 2004
@@ -18,6 +18,7 @@
"iso-8859-7", 8,
"iso-8859-8", 8,
"iso-8859-9", 8,
"iso-8859-15", 8,
+ "koi8-r", 8,
"unknown", 0,
NULL, 0,

View file

@ -1,35 +1,14 @@
--- Makefile.orig Mon Jul 2 06:54:34 2001
+++ Makefile Sun Oct 27 16:54:54 2002
@@ -18,17 +18,16 @@
#
# Use /lib/cpp or /usr/ccs/lib/cpp for CPP on Solaris or SVR4 machines.
-CC = gcc
+CC ?= gcc
CPP = $(CC) -E
#CPP = /lib/cpp
#CFLAGS = -O2 # -g # -I/usr/local/lib/malloc-debug -DMALLOC_FUNC_CHECK
-CFLAGS = -O # -g -Wall -ansi -pedantic
+#CFLAGS = -O # -g -Wall -ansi -pedantic
#-Wall -Wcomment \
#-Wtraditional -Wshadow \
#-Wpointer-arith -Wcast-qual -Wcast-align -Wconversion \
#-Waggregate-return -Wmissing-prototypes -Wnested-externs
-#LDFLAGS = -s # -lmalloc # /usr/local/lib/malloc-debug/libmalloc.a
-MAKE = make
+LDFLAGS = -s # -lmalloc # /usr/local/lib/malloc-debug/libmalloc.a
SHELL = /bin/sh
@@ -63,6 +62,7 @@
-e '/^#/d' \
--- Makefile.orig Thu Feb 7 22:14:41 2002
+++ Makefile Wed Apr 28 17:47:59 2004
@@ -63,6 +64,7 @@
-e 's/^ / /' \
-e '/^[ \f ]$$/d' \
-e '/^[ \/]*[*]/d' | \
+ unexpand | \
sed -n -e '/^..*$$/p' > ymakefile
rm -f MF.c
@@ -97,3 +97,5 @@
@@ -97,3 +99,5 @@
man/nn.1.D: man/nn.1
sh SPLITNN1

View file

@ -1,11 +0,0 @@
--- xmakefile.orig Fri Dec 7 07:06:27 2001
+++ xmakefile Fri Dec 7 07:06:38 2001
@@ -65,7 +65,7 @@
* Notice: ymakefile is made from xmakefile by the Makefile.
*
-#ifndef DOMAIN
+#ifndef DOMAIN_FILE
CC = YOU_BLEW_IT READ_THE_INSTRUCTIONS_AGAIN
#else
CC = COMPILER

View file

@ -1,6 +1,6 @@
--- nntp.c.orig Tue Oct 9 11:39:11 2001
+++ nntp.c Mon Jun 10 10:15:02 2002
@@ -37,6 +37,7 @@
--- nntp.c.orig Sat Jan 25 00:10:39 2003
+++ nntp.c Wed Apr 28 17:47:59 2004
@@ -39,6 +39,7 @@
#include <errno.h>
#include <pwd.h>
#include <ctype.h>
@ -8,18 +8,20 @@
#ifdef NOV
#include "hash.h"
@@ -88,6 +89,7 @@
@@ -63,6 +64,7 @@
static int connect_server(void);
static void debug_msg __APROTO((char *prefix, char *str));
static void io_error __APROTO((void));
static void find_server __APROTO((void));
+char * find_domain(char *domainFile);
+char *find_domain __APROTO((char *domainFile));
static int get_server_line __APROTO((char *string, int size));
static int get_server __APROTO((char *string, int size));
static int get_socket __APROTO((void));
@@ -319,6 +321,49 @@
@@ -212,6 +214,50 @@
sys_error("Failed to find name of NNTP server!");
}
/*
+
+/*
+ * find_domain Get the domain name for posting from a named file.
+ * Handle blank lines and comments.
+ *
@ -33,8 +35,7 @@
+ */
+
+char *
+find_domain(domainFile)
+char *domainFile;
+find_domain(char *domainFile)
+{
+ register FILE *fp;
+ register char *cp;
@ -62,52 +63,35 @@
+ return (NULL);
+}
+
+/*
+
/*
* get_server_line: get a line from the server.
*
* Expects to be connected to the server.
@@ -634,7 +679,7 @@
can_post = 0;
break;
default:
- nn_exitmsg(1, line);
+ nn_exitmsg(1, "%s", line);
/* NOTREACHED */
}
}
@@ -1726,7 +1771,7 @@
* Phil Lapsley <phil@ucbvax.berkeley.edu>
*/
-static char host_name[256];
+static char host_name[MAXHOSTNAMELEN];
/*
* gen_frompath -- generate From: and Path: lines, in the form
@@ -1745,6 +1790,7 @@
#ifndef HIDDENNET
char *cp;
#endif
@@ -1415,15 +1461,24 @@
gen_frompath()
{
struct passwd *passwd;
+ char *domain;
+ char *fromFormat = "From: <%s@%s>\r\n";
passwd = getpwuid(getuid());
fprintf(nntp_out, "From: ");
passwd = getpwuid(getuid());
@@ -1772,9 +1818,15 @@
DOMAIN);
#endif /* HIDDENNET */
#else
fprintf(nntp_out, "%s ", full_name());
- fprintf(nntp_out, "<%s@%s>\r\n",
- passwd->pw_name,
- host_name);
- domain);
+ domain = find_domain(DOMAIN_FILE);
+ if (domain == NULL)
+ fprintf(nntp_out, "From: <%s@%s>\r\n",
+ if (domain == NULL) {
+ fprintf(nntp_out, fromFormat,
+ passwd->pw_name,
+ host_name);
+ else
+ fprintf(nntp_out, "From: <%s@%s>\r\n",
+ } else {
+ fprintf(nntp_out, fromFormat,
+ passwd->pw_name,
+ domain);
#endif
+ }
#ifdef HIDDENNET
/* Only the login name - nntp server will add uucp name */

View file

@ -1,27 +0,0 @@
--- global.c.orig Mon Jun 10 10:29:25 2002
+++ global.c Mon Jun 10 10:30:51 2002
@@ -585,20 +585,20 @@
off_t len1, len2;
if ((fd1 = open(work, O_RDONLY, 0)) < 0) {
- nn_exitmsg("%s %s", work, strerror(errno));
+ msg("%s %s", work, strerror(errno));
return(2);
}
if ((fd2 = open(copy, O_RDONLY, 0)) < 0) {
- nn_exitmsg("%s %s", copy, strerror(errno));
+ msg("%s %s", copy, strerror(errno));
return(2);
}
if (fstat(fd1, &sb1)) {
- nn_exitmsg("%s %s", work, strerror(errno));
+ msg("%s %s", work, strerror(errno));
return(2);
}
if (fstat(fd2, &sb2)) {
- nn_exitmsg("%s %s", copy, strerror(errno));
+ msg("%s %s", copy, strerror(errno));
return(2);
}