ports/52385: news/newsx: upgrading to 1.6-pre and unbreaking / inn-2.4.0.

Thierry Thomas thierry at pompo.net
Sat May 17 22:10:06 UTC 2003


>Number:         52385
>Category:       ports
>Synopsis:       news/newsx: upgrading to 1.6-pre and unbreaking / inn-2.4.0.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 17 15:10:04 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Thierry Thomas
>Release:        FreeBSD 4.8-STABLE i386
>Organization:
Kabbale Eros
>Environment:
System: FreeBSD graf.pompo.net 4.8-STABLE FreeBSD 4.8-STABLE #0: Tue Apr 29 18:16:35 CEST 2003 thierry at graf.pompo.net:/usr/obj/mntsrc/src/sys/GRAF020727 i386


	
>Description:
	If you have built a binary of newsx against inn-2.3.5 (or before),
	it still runs fine.

	However, it's not possible to build this port with inn-2.4.0.

	Newsx-1.6-pre is a pre-version, but I have been using it without
	problem for several months. The patch against putarticle.c is just
	a work-around to build it when inn-2.4.0 has been installed, but
	several warnings remain.

	Note: this PR supersedes PR ports/52301.
	
>How-To-Repeat:
	cd news/newsx
	make

>Fix:
	Please apply the following patch.

	New files:
		- patch-configure;
		- patch-src_putarticle.c.

	Removed files:
		- patch-aclocal.m4;
		- patch-configure.in;
		- patch-src_logmsg.c.

--- newsx.diff begins here ---
diff -urN news/newsx.orig/Makefile news/newsx/Makefile
--- news/newsx.orig/Makefile	Sat Feb 22 22:18:50 2003
+++ news/newsx/Makefile	Sat May 17 23:23:24 2003
@@ -6,10 +6,11 @@
 #
 
 PORTNAME=	newsx
-PORTVERSION=	1.4.8
+PORTVERSION=	1.6
 CATEGORIES=	news
-MASTER_SITES=	ftp://ftp.kvaleberg.com/pub/
-DISTNAME=	${PORTNAME}-${PORTVERSION:S/.8/pl6/}
+#MASTER_SITES=	ftp://ftp.kvaleberg.com/pub/
+MASTER_SITES=	http://home.powertech.no/egilkv/
+DISTNAME=	${PORTNAME}-${PORTVERSION:S/$/pre/}
 
 MAINTAINER=	thierry at pompo.net
 COMMENT=	A program to fetch news from and post news to a remote NNTP server
@@ -20,22 +21,17 @@
 BUILD_DEPENDS=	${LOCALBASE}/news/lib/libinn.a:${PORTSDIR}/news/inn
 .endif
 
-USE_AUTOMAKE=	yes
 USE_REINPLACE=	yes
-CONFIGURE_ENV=	PATH="${PATH}:${LOCALBASE}/news/bin"
 .if !defined(WITH_CNEWS)
 .if !defined(WITHOUT_INN_2-X)
 CONFIGURE_ENV+=	CPPFLAGS="-I${LOCALBASE}/news/include"
-CONFIGURE_ARGS=	--with-newslib=${LOCALBASE}/news/lib
 .endif
 .endif
 
-HDR_DIR=	${LOCALBASE}/news/include
-
 DOCS=		AUTHORS COPYING ChangeLog FAQ INSTALL NEWS README TODO
 
 post-patch:
-	@${REINPLACE_CMD} -e "s:%%LOCALBASE%%:${LOCALBASE}:" ${WRKSRC}/configure.in
+	@${REINPLACE_CMD} -e "s:%%LOCALBASE%%:${LOCALBASE}:g" ${WRKSRC}/configure
 
 pre-configure:
 	@${ECHO} "*********************************************************"
@@ -44,6 +40,9 @@
 	@${ECHO} "${PORTSDIR}/news/inn, and then try building this port"
 	@${ECHO} "again."
 	@${ECHO} "*********************************************************"
+
+pre-install:
+	@${STRIP_CMD} ${WRKSRC}/src/newsx
 
 post-install:
 .if !defined(NOPORTDOCS)
diff -urN news/newsx.orig/distinfo news/newsx/distinfo
--- news/newsx.orig/distinfo	Sat Feb 23 15:23:48 2002
+++ news/newsx/distinfo	Fri Jan 24 21:51:25 2003
@@ -1 +1 @@
-MD5 (newsx-1.4pl6.tar.gz) = bbd6fcd33cdc9469b81f1e168fb2478c
+MD5 (newsx-1.6pre.tar.gz) = f22bc3e86bf1cc6f4c1a8368a477df9d
diff -urN news/newsx.orig/files/patch-aclocal.m4 news/newsx/files/patch-aclocal.m4
--- news/newsx.orig/files/patch-aclocal.m4	Sun Jul  7 20:19:52 2002
+++ news/newsx/files/patch-aclocal.m4	Thu Jan  1 01:00:00 1970
@@ -1,11 +0,0 @@
---- aclocal.m4.orig	Tue Jan 29 21:32:47 2002
-+++ aclocal.m4	Sun Jul  7 18:21:47 2002
-@@ -39,7 +39,7 @@
- AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
- AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
- AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
--AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-+AM_MISSING_PROG(AUTOHEADER, autoheader213, $missing_dir)
- AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
- AC_REQUIRE([AC_PROG_MAKE_SET])])
- 
diff -urN news/newsx.orig/files/patch-configure news/newsx/files/patch-configure
--- news/newsx.orig/files/patch-configure	Thu Jan  1 01:00:00 1970
+++ news/newsx/files/patch-configure	Sat May 17 23:23:07 2003
@@ -0,0 +1,31 @@
+--- configure.orig	Wed Jan 22 09:15:31 2003
++++ configure	Sat May 17 23:22:41 2003
+@@ -253,7 +253,7 @@
+ #
+ # Initializations.
+ #
+-ac_default_prefix=/usr/local
++ac_default_prefix=%%LOCALBASE%%
+ ac_config_libobj_dir=.
+ cross_compiling=no
+ subdirs=
+@@ -1710,15 +1710,15 @@
+ 
+ 
+ VISIT="/usr/lib/news /var/news/etc /usr/spool/news /usr/share/news \
+- /var/db/news /usr/local/news/control /usr/local/news /local/news /etc/news \
+- /usr/local/news/bin/control /usr/local/lib/news /news /usr/local/inn \
++ /var/db/news %%LOCALBASE%%/news/control %%LOCALBASE%%/news /local/news /etc/news \
++ %%LOCALBASE%%/news/bin/control %%LOCALBASE%%/lib/news /news %%LOCALBASE%%/inn \
+  /var/lib/news /usr/lib /var/spool/news"
+ 
+ NEWSUMASK=002
+ INN_EXTENDEDDBZ=0
+ 
+-RNEWS_PATH=/usr/bin/rnews
+-INEWS_PATH=/usr/bin/inews
++RNEWS_PATH=%%LOCALBASE%%/news/bin/rnews
++INEWS_PATH=%%LOCALBASE%%/news/bin/inews
+ 
+ 
+ # Check whether --with-newshome or --without-newshome was given.
diff -urN news/newsx.orig/files/patch-configure.in news/newsx/files/patch-configure.in
--- news/newsx.orig/files/patch-configure.in	Mon Aug  5 01:26:09 2002
+++ news/newsx/files/patch-configure.in	Thu Jan  1 01:00:00 1970
@@ -1,20 +0,0 @@
---- configure.in.orig	Tue Jan 29 20:15:19 2002
-+++ configure.in	Mon Jul 15 21:46:55 2002
-@@ -167,7 +167,7 @@
- dnl
- AC_INIT(FAQ)
- 
--AM_INIT_AUTOMAKE(newsx, 1.4pl6)
-+AM_INIT_AUTOMAKE(newsx, 1.4pl8)
- AM_CONFIG_HEADER(config.h)
- dnl Only most recent year required:
- COPYRIGHT="Copyright 2002 Egil Kvaleberg <egil at kvaleberg.no>"
-@@ -189,7 +189,7 @@
- dnl  Default list of locations to visit in search of the
- dnl  news configuration file
- dnl
--VISIT="/usr/lib/news /var/news/etc /usr/spool/news /usr/share/news \
-+VISIT="%%LOCALBASE%%/news/lib /usr/lib/news /var/news/etc /usr/spool/news /usr/share/news \
-  /var/db/news /usr/local/news/control /usr/local/news /local/news /etc/news \
-  /usr/local/news/bin/control /usr/local/lib/news /news /usr/local/inn \
-  /var/lib/news /usr/lib"
diff -urN news/newsx.orig/files/patch-src_logmsg.c news/newsx/files/patch-src_logmsg.c
--- news/newsx.orig/files/patch-src_logmsg.c	Mon Aug  5 01:26:09 2002
+++ news/newsx/files/patch-src_logmsg.c	Thu Jan  1 01:00:00 1970
@@ -1,74 +0,0 @@
---- src/logmsg.c.orig	Wed Feb 14 07:55:40 2001
-+++ src/logmsg.c	Mon Jul 15 21:38:30 2002
-@@ -1,4 +1,4 @@
--/*  VER 079  TAB P   $Id: logmsg.c,v 1.10.2.1 2001/02/14 06:55:40 egil Exp $
-+/*  VER 080  TAB P   $Id: logmsg.c,v 1.10.2.1 2001/02/14 06:55:40 egil Exp $
-  *
-  *  handle error messages and such...
-  *
-@@ -60,9 +60,9 @@
-     /* 
-      *  try to make a surrogate 
-      *  we assume that on those architectures where this trick
--     *  doesn't work there we will surely have stdarg.h or varargs.h
-+     *  doesn't work there we will surely be stdarg.h or varargs.h
-      */
--#define vsprintf(buf,  fmt, ap) sprintf(buf,  fmt, arg1, arg2, arg3, arg4)
-+#define vsnprintf(buf,siz,fmt,ap) snprintf(buf,siz,fmt, arg1,arg2,arg3,arg4)
- #define vfprintf(file, fmt, ap) fprintf(file, fmt, arg1, arg2, arg3, arg4)
- #endif
- 
-@@ -156,7 +156,7 @@
- #endif
- {
-     int e;
--    char buf[BUFSIZ]; /* BUG: do we risk overwriting it? */
-+    char buf[BUFSIZ];
- 
- #if HAVE_VPRINTF
-     va_list ap;
-@@ -176,34 +176,33 @@
-     case L_ERRno:
-     case L_ERR:
- 	e = errno;
--	vsprintf(buf, fmt, ap);
--	if (type == L_ERRno) {
--	    sprintf(buf + strlen (buf), ": %s", str_error(e));
--	}
--	strcat(buf, "\n");
-+	vsnprintf(buf, sizeof(buf), fmt, ap);
- #if HAVE_SYSLOG_H
- 	if (!debug_opt) {
--	    syslog(LOG_ERR, buf);
-+	    syslog(LOG_ERR, "%s%s%s\n", buf,
-+					((type==L_ERRno) ? ": ":""),
-+					((type==L_ERRno) ? str_error(e):""));
- 	} else 
- #endif
- 	{
- 	    clean_line();
--	    fprintf(stderr, "%s: %s", pname, buf);
-+	    fprintf(stderr, "%s: %s%s%s\n", pname, buf,
-+					((type==L_ERRno) ? ": ":""),
-+					((type==L_ERRno) ? str_error(e):""));
- 	    fflush(stderr);
- 	}
- 	break;
- 
-     case L_INFO:
--	vsprintf(buf, fmt, ap);
--	strcat(buf, "\n");
-+	vsnprintf(buf, sizeof(buf), fmt, ap);
- #if HAVE_SYSLOG_H
- 	if (!debug_opt) {
--	    syslog(LOG_INFO, buf);
-+	    syslog(LOG_INFO, "%s\n", buf);
- 	} else 
- #endif
- 	{
- 	    clean_line();
--	    fprintf(stderr, "%s", buf);
-+	    fprintf(stderr, "%s\n", buf);
- 	    fflush(stderr);
- 	}
- 	break;
diff -urN news/newsx.orig/files/patch-src_putarticle.c news/newsx/files/patch-src_putarticle.c
--- news/newsx.orig/files/patch-src_putarticle.c	Thu Jan  1 01:00:00 1970
+++ news/newsx/files/patch-src_putarticle.c	Sat May 17 21:50:08 2003
@@ -0,0 +1,14 @@
+--- src/putarticle.c.orig	Wed Jan 22 08:30:59 2003
++++ src/putarticle.c	Sat May 17 21:43:03 2003
+@@ -128,6 +128,11 @@
+ #define MAILFOLDER_TAG "From "
+ #define MAILFOLDER_TAG_LEN 5
+ 
++/*
++ *  fix for inn-2.4.0 (it has been removed from inn/config.h)
++ */
++typedef int	BOOL;
++
+ /* for log etc. */
+ static char msgid[NNTP_STRLEN];
+ static char msgsender[NNTP_STRLEN];
--- newsx.diff ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list