Subject: pkg/36813: net/irrd: please update to 2.3.4
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Yakovetsky Vladimir <yx@x.ua>
List: pkgsrc-bugs
Date: 08/21/2007 13:40:00
>Number:         36813
>Category:       pkg
>Synopsis:       net/irrd: please update to 2.3.4
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 21 13:40:00 +0000 2007
>Originator:     Yakovetsky Vladimir
>Release:        NetBSD 4.0_BETA2
>Organization:
>Environment:
System: NetBSD darg.x.ua 4.0_BETA2 NetBSD 4.0_BETA2 (darg-1.799.2.7-mp-1.8.8.1) #1: Tue Jul 24 16:42:00 EEST 2007 yx@darg.x.ua:/sys/arch/i386/compile/darg.mp i386
Architecture: i386
Machine: i386
>Description:
	(Updatings in relation to the patched version from PR#36811)

	Summary:
	- update Makefile to 2.3.4
	- merge (-aa and -ad) and update patch-aa
	- remove (obsoleted -ac, and merged -ad) patches
	- suppress some annoying warnings,
	  small cleanups

>How-To-Repeat:

>Fix:
	Makefile diff, and updated patch-aa:

--- net/irrd/Makefile.~1~
+++ net/irrd/Makefile
@@ -1,12 +1,9 @@
 # $NetBSD: Makefile,v 1.37 2007/03/24 19:21:29 joerg Exp $
 
-DISTNAME=	irrd2.2.8
-PKGNAME=	irrd-2.2.8
-PKGREVISION=	3
+PKGNAME=	irrd-2.3.4
+DISTNAME=	irrd2.3.4
 CATEGORIES=	net
-MASTER_SITES=	http://www.irrd.net/ \
-		ftp://ftp.merit.edu/radb/irrd/ \
-		ftp://ftp.merit.edu/radb/irrd/old_releases/
+MASTER_SITES=	http://www.irrd.net/
 EXTRACT_SUFX=	.tgz
 
 MAINTAINER=	kim@tac.nyc.ny.us
@@ -16,7 +13,7 @@
 DEPENDS+=	gnupg-[0-9]*:../../security/gnupg
 DEPENDS+=	wget-[0-9]*:../../net/wget
 
-USE_TOOLS+=		automake flex perl:run
+USE_TOOLS+=		automake autoconf flex perl:run
 
 WRKSRC=			${WRKDIR}/${DISTNAME}/src
 
@@ -28,7 +25,7 @@
 INSTALLATION_DIRS=	${PKGMANDIR}/man8 sbin
 
 pre-configure:
-	cd ${WRKSRC} && aclocal && autoheader && autoconf
+	cd ${WRKSRC} && aclocal && autoheader -W no-obsolete && autoconf
 
 post-install:
 	cd ${WRKSRC}/programs/IRRd && ${MAKE} install-man


:r net/irrd/patches/patch-aa
--- configure.in.~1~
+++ configure.in
@@ -7,31 +7,29 @@
 dnl what OS are we?
 AC_CANONICAL_HOST
 
-dnl initializing defaults
+dnl initializing defaults, if have not --*able-thread option
 dnl I've seen a report that pthread support is shaky in FreeBSD 2.x releases
+AC_ARG_ENABLE(thread,
+	AC_HELP_STRING([--enable-thread], [enable threads]),,
+	[dnl
 case "${host_os}" in
     freebsd2* )
-	disable_thread=yes
+	enable_thread=no
     ;;
     solaris*|linux*|freebsd* )
-	disable_thread=no
+	enable_thread=yes
     ;;
     * ) 
-	disable_thread=yes
+	enable_thread=no
     ;;
-esac
-
-AC_ARG_ENABLE(thread,
-[  --disable-thread        disable thread always],
-[disable_thread=yes],)
-
-AC_ARG_ENABLE(thread,
-[  --enable-thread         enable thread (on non-solaris platform)],
-[disable_thread=no],)
+  esac
+dnl	])
 
 AC_ARG_ENABLE(wall,
-[  --disable-wall          disable -Wall option always],
-[disable_wall=yes],)
+	AC_HELP_STRING([--enable-wall],
+		[turns on all optional warnings (default is NO)]),,
+	[enable_wall=no]dnl
+)
 
 pwd=`pwd`
 pwd=`basename $pwd`
@@ -52,7 +50,7 @@
 
 EXTRA_INCLUDE_DIRS=""
 EXTRA_LIBS=""
-CPPFLAGS="-DFUNCPROTO -I../../include"
+CPPFLAGS="$CPPFLAGS -DFUNCPROTO -I../../include"
 dnl defining FUNCPROTO ensures that struct library uses portotype
 dnl we don't expect non-ANSI (K&R) C compilers to be used
 dnl Some compiles may define __STDC__ by itself which makes it enable, 
@@ -66,7 +64,7 @@
 dnl fi
 
 AC_MSG_CHECKING(for -Wall option)
-if test "$disable_wall" = yes; then
+if test "$enable_wall" != yes; then
    if test "$GCC" != "yes"; then
 dnl shut up SUN WorkShop Compilers
        CFLAGS="$CFLAGS -w"
@@ -83,7 +81,7 @@
 QUANTIFY="quantify"
 PURIFY="purify"
 
-AC_DEFUN(AC_FILE_EXIST, [
+AC_DEFUN([AC_FILE_EXIST], [
 if test -f "$1" >/dev/null 2>&1; then
   ifelse([$2], , :, [$2])
   ifelse([$3], , , [else $3])
@@ -109,28 +107,31 @@
 esac
 
 case "${host_os}" in
-    solaris* )
-	CRYPT_LIB="-lcrypt"
-    ;;
     bsdi* )
         LIBS="$LIBS -lipc"
     ;;
-    freebsd*|netbsd*|openbsd* )
-        if test "$disable_thread" != yes; then
-		LDFLAGS="$LDFLAGS -pthread"
-                THREAD_CFLAGS="-D_THREAD_SAFE -pthread"
-        fi
-	CRYPT_LIB="-lcrypt"
-        ac_pthrlib="c_r"
-    ;;
-    linux* )
+    solaris*|freebsd*|netbsd*|openbsd*|linux* )
 	CRYPT_LIB="-lcrypt"
+	case "${host_os}" in
+	    freebsd*|openbsd* )
+		if test "$enable_thread" = yes; then
+		    LDFLAGS="$LDFLAGS -pthread"
+		    THREAD_CFLAGS="-D_THREAD_SAFE -pthread"
+		fi
+		ac_pthrlib="c_r"
+	    ;;
+	    netbsd* )
+		if test "$enable_thread" = yes; then
+		    LDFLAGS="$LDFLAGS -lpthread"
+		fi
+	    ;;
+	esac
     ;;
     osf* )
 	if test $CC = "cc" ; then
            CPPFLAGS="$CPPFLAGS -taso -pthread"
         fi
-        if test "$disable_thread" != yes; then
+        if test "$enable_thread" = yes; then
 		LDFLAGS="$LDFLAGS -lc_r"
                 THREAD_CFLAGS="-D_THREAD_SAFE"
 	fi
@@ -153,7 +154,7 @@
 AC_SUBST(MAKEDEPCLEAN)
 
 dnl Checks for pthread libraries. (linux has pthread.h only, so ...)
-if test "$disable_thread" = yes; then
+if test "$enable_thread" != yes; then
   AC_MSG_CHECKING(for thread support)
   AC_MSG_RESULT(disabled)
 else
@@ -358,12 +359,12 @@
 AC_CHECK_FUNCS(snprintf)
 AC_CHECK_FUNCS(dirname basename)
 
-AC_DEFUN(AC_TYPE_SOCKLEN_T,
+AC_DEFUN([AC_TYPE_SOCKLEN_T],
 [AC_CACHE_CHECK(for socklen_t in sys/socket.h, ac_cv_type_socklen_t,
 [AC_EGREP_HEADER(socklen_t, sys/socket.h,
   ac_cv_type_socklen_t=yes, ac_cv_type_socklen_t=no)])
 if test $ac_cv_type_socklen_t = no; then
-  AC_DEFINE(socklen_t, int)
+  AC_DEFINE([socklen_t], [int], [Define to int if you have not socklen_t in <sys/socket.h>])
 fi
 ])