Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Apr 2006 10:30:33 GMT
From:      Antonio Querubin <tony@lava.net>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/96198: [patch] update mtr port to version 0.71
Message-ID:  <200604231030.k3NAUX2M097962@www.freebsd.org>
Resent-Message-ID: <200604231040.k3NAeD4q043632@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         96198
>Category:       ports
>Synopsis:       [patch] update mtr port to version 0.71
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Apr 23 10:40:12 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Antonio Querubin
>Release:        FreeBSD 6.0-RELEASE i386
>Organization:
LavaNet
>Environment:
System: FreeBSD localhost 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Mon Dec 19 04:55:45 HST 2005 root@localhost:/usr/obj/usr/src/sys/GENERIC i386
>Description:
This updates mtr to version 0.71.  Because of build problems using the
distributed configure script, this update includes a patch for
configure.in (renamed to configure.ac) and updates the port Makefile to
remove the deprecated acconfig.h and run autoreconf to rebuild the
configure script.

>How-To-Repeat:
Apply patch below to /usr/ports/net/mtr

>Fix:
diff -ruN mtr.bak/Makefile mtr/Makefile
--- mtr.bak/Makefile    Fri Apr 21 22:40:03 2006
+++ mtr/Makefile        Sat Apr 22 23:55:15 2006
@@ -6,7 +6,7 @@
 #

 PORTNAME=      mtr
-PORTVERSION=   0.70
+PORTVERSION=   0.71
 CATEGORIES=    net ipv6
 MASTER_SITES=  ftp://ftp.bitwizard.nl/mtr/ \
                ftp://ftp.netsw.org/net/ip/audit/packets/ \
@@ -35,6 +35,14 @@
 PKGNAMESUFFIX= -nox11
 CONFIGURE_ARGS=--without-gtk --with-gtk-prefix=/nonexistant
 .endif
+
+# The configure script distributed with 0.71 is broken on FreeBSD so we
+# regenerate it from configure.ac after the patches are applied.
+# acconfig.h contents moved to configure.ac
+post-patch:
+       @${MV} ${WRKSRC}/configure.in ${WRKSRC}/configure.ac
+       @${RM} ${WRKSRC}/acconfig.h
+       cd ${WRKSRC}; autoreconf

 post-install:
        @${ECHO} ""
diff -ruN mtr.bak/distinfo mtr/distinfo
--- mtr.bak/distinfo    Fri Apr 21 22:40:03 2006
+++ mtr/distinfo        Fri Apr 21 22:53:20 2006
@@ -1,3 +1,3 @@
-MD5 (mtr-0.70.tar.gz) = 3011726717c60972ecbbb53c74f31e84
-SHA256 (mtr-0.70.tar.gz) = 2e3ae5b774f24e5d1ffaafe1947295cd9fd3e3a87f8d0ae1ad8808aaba1990c3
-SIZE (mtr-0.70.tar.gz) = 201017
+MD5 (mtr-0.71.tar.gz) = 8c1c9f5db2c599eea3b12bfed8b80618
+SHA256 (mtr-0.71.tar.gz) = b742c46797ba23000e149c99127580d541ed44a69b5bbc44323211665c95e02a
+SIZE (mtr-0.71.tar.gz) = 205442
diff -ruN mtr.bak/files/patch-autoconf mtr/files/patch-autoconf
--- mtr.bak/files/patch-autoconf        Wed Dec 31 14:00:00 1969
+++ mtr/files/patch-autoconf    Sat Apr 22 16:04:46 2006
@@ -0,0 +1,148 @@
+--- INSTALL    2004-08-25 21:56:53.000000000 -1000
++++ INSTALL    2006-04-08 06:13:01.000000000 -1000
+@@ -19,8 +19,8 @@
+ be considered for the next release.  If at some point `config.cache'
+ contains results you don't want to keep, you may remove or edit it.
+
+-   The file `configure.in' is used to create `configure' by a program
+-called `autoconf'.  You only need `configure.in' if you want to change
++   The file `configure.ac' is used to create `configure' by a program
++called `autoconf'.  You only need `configure.ac' if you want to change
+ it or regenerate `configure' using a newer version of `autoconf'.
+
+ The simplest way to compile this package is:
+--- configure.in       2006-03-23 20:37:17.000000000 -1000
++++ configure.in       2006-04-09 02:58:41.000000000 -1000
+@@ -1,4 +1,5 @@
+-AC_INIT(mtr.c)
++AC_INIT
++AC_CONFIG_SRCDIR([mtr.c])
+ AM_INIT_AUTOMAKE(mtr, 0.71)
+
+
+@@ -37,6 +38,7 @@
+
+ AC_CHECK_HEADERS(ncurses.h ncurses/curses.h curses.h cursesX.h sys/types.h)
+ AC_CHECK_HEADERS(sys/xti.h)
++AC_CHECK_HEADERS(netinet/ip6.h)
+
+ AC_CHECK_LIB(m, floor, , AC_MSG_ERROR(No math library found))
+
+@@ -85,24 +87,26 @@
+ AC_CHECK_FUNCS(seteuid)
+ #  AC_CHECK_FUNC(setuid, , AC_MSG_ERROR (I Need either seteuid or setuid))
+
+-AC_CHECK_FUNC(res_mkquery, ,
+-  AC_CHECK_LIB(bind, res_mkquery, ,
+-   AC_CHECK_LIB(resolv, res_mkquery, ,
+-     AC_CHECK_LIB(resolv, __res_mkquery, , AC_MSG_ERROR(No resolver library found)))))
+-LIBS="$LIBS -lresolv"
++#AC_CHECK_FUNC(res_mkquery, ,
++#  AC_CHECK_LIB(bind, res_mkquery, ,
++#   AC_CHECK_LIB(resolv, res_mkquery, ,
++#     AC_CHECK_LIB(resolv, __res_mkquery, , AC_MSG_ERROR(No resolver library found)))))
++#LIBS="$LIBS -lresolv"
++AC_SEARCH_LIBS(res_mkquery, bind resolv, ,
++             AC_MSG_WARN(No resolver library found))
+
+ AC_CHECK_FUNC(herror, , AC_DEFINE(NO_HERROR))
+ AC_CHECK_FUNC(strerror, , AC_DEFINE(NO_STRERROR))
+
+ AC_CHECK_FUNC(getaddrinfo,
+-[if test "$WANTS_IPV6" = "yes"; then
+-      AC_DEFINE([ENABLE_IPV6], [], [Define to enable IPv6])
++[if test "$WANTS_IPV6" = yes -a "$ac_cv_header_netinet_ip6_h" = yes; then
++      AC_DEFINE(ENABLE_IPV6, , [Define to enable IPv6])
+ fi])
+
+ dnl Add C flags to display more warnings
+ AC_MSG_CHECKING(for C flags to get more warnings)
+ ac_save_CFLAGS="$CFLAGS"
+-if test "x$ac_cv_prog_gcc" = "xyes" ; then
++if test "x$ac_cv_c_compiler_gnu" = "xyes" ; then
+   dnl gcc is the easiest C compiler
+   warning_CFLAGS="-Wall"
+ else
+@@ -111,16 +115,14 @@
+     dnl SGI IRIX with the MipsPRO C compiler
+     irix*)
+       CFLAGS="$CFLAGS -fullwarn"
+-      AC_TRY_COMPILE([#include <stdio.h>],[printf("test");],
+-        warning_CFLAGS="-fullwarn",)
++      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], [[printf("test");]])],[warning_CFLAGS="-fullwarn"],[])
+       ;;
+
+     dnl SunOS 4.x with the SparcWorks(?) acc compiler
+     sunos*)
+         if "$CC" = "acc" ; then
+           CFLAGS="$CFLAGS -vc"
+-          AC_TRY_COMPILE([#include <stdio.h>],[printf("test");],
+-            warning_CFLAGS="-vc",)
++          AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], [[printf("test");]])],[warning_CFLAGS="-vc"],[])
+         fi
+       ;;
+
+@@ -138,9 +140,57 @@
+   AC_MSG_RESULT($warning_CFLAGS)
+ fi
+
+-
+-
+-
+-AM_CONFIG_HEADER(config.h)
+-AC_OUTPUT(Makefile img/Makefile)
+-
++AH_TOP(
++/* Define if you don't have the GTK+ libraries available.  */
++#undef NO_GTK
++
++/* Define if you don't have the curses libraries available.  */
++#undef NO_CURSES
++
++/* Define if you don't have the herror() function available.  */
++#undef NO_HERROR
++
++/* Define if you don't have the strerror() function available.  */
++#undef NO_STRERROR
++
++/*  Define the package name.  ("mtr")  */
++#undef PACKAGE
++
++/*  Define the version string.  */
++#undef VERSION
++) # end of AH_TOP
++
++AH_BOTTOM(
++/*  Find the proper type for 8 bits  */
++#if SIZEOF_UNSIGNED_CHAR == 1
++typedef unsigned char uint8;
++#else
++#error No 8 bit type
++#endif
++
++/*  Find the proper type for 16 bits  */
++#if SIZEOF_UNSIGNED_SHORT == 2
++typedef unsigned short uint16;
++#elif SIZEOF_UNSIGNED_INT == 2
++typedef unsigned int uint16;
++#elif SIZEOF_UNSIGNED_LONG == 2
++typedef unsigned long uint16;
++#else
++#error No 16 bit type
++#endif
++
++/*  Find the proper type for 32 bits  */
++#if SIZEOF_UNSIGNED_SHORT == 4
++typedef unsigned short uint32;
++#elif SIZEOF_UNSIGNED_INT == 4
++typedef unsigned int uint32;
++#elif SIZEOF_UNSIGNED_LONG == 4
++typedef unsigned long uint32;
++#else
++#error No 32 bit type
++#endif
++) # end of AH_BOTTOM
++
++AC_CONFIG_HEADERS([config.h])
++AC_CONFIG_FILES([Makefile img/Makefile])
++AC_OUTPUT

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604231030.k3NAUX2M097962>