pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/48015: net/mtr: unnecessary runtime dependency on glib



>Number:         48015
>Category:       pkg
>Synopsis:       net/mtr: unnecessary runtime dependency on glib
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jul 04 18:45:00 +0000 2013
>Originator:     VSYakovetsky%gmail.com@localhost
>Release:        NetBSD 6.1.0_PATCH
>Organization:
        
>Environment:
        
        
System: NetBSD eheca.mixnet.ua 6.1.0_PATCH NetBSD 6.1.0_PATCH 
($eheca-1.1066.2.7$) #8: Mon May 20 15:58:23 EEST 2013 
root%eheca.mixnet.ua@localhost:/usr/src/sys/arch/i386/compile/eheca i386
Architecture: i386
Machine: i386
>Description:
net/mtr without gtk:
glib appears to be an unnecessary runtime dependency.

(upstream patch filed under another bug: 
https://bugs.launchpad.net/mtr/+bug/1189174)

>How-To-Repeat:

>Fix:
:r net_mtr-dependencies.patch

diff -ruN net/mtr.orig/Makefile net/mtr/Makefile
--- net/mtr.orig/Makefile       2013-07-04 20:07:14.000000000 +0300
+++ net/mtr/Makefile    2013-07-04 20:55:52.000000000 +0300
@@ -1,7 +1,7 @@
 # $NetBSD: Makefile,v 1.83 2013/07/04 03:41:48 dholland Exp $
 
 DISTNAME=      mtr-0.85
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    net
 MASTER_SITES=  ftp://ftp.bitwizard.nl/mtr/
 
@@ -13,7 +13,7 @@
 PKG_INSTALLATION_TYPES=        overwrite pkgviews
 
 GNU_CONFIGURE=         YES
-USE_TOOLS+=            pkg-config
+USE_TOOLS+=            autoconf automake
 INSTALLATION_DIRS=     ${PKGMANDIR}/man8 sbin share/doc/mtr
 
 .include "options.mk"
@@ -35,11 +35,13 @@
 LIBS+= -lresolv
 .endif
 
+pre-configure:
+       autoreconf -fi ${WRKSRC}
+
 do-install:
        ${INSTALL_PROGRAM} ${WRKSRC}/mtr ${DESTDIR}${PREFIX}/sbin
        ${INSTALL_DATA} ${WRKSRC}/mtr.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8
        ${INSTALL_DATA} ${WRKSRC}/SECURITY ${DESTDIR}${PREFIX}/share/doc/mtr
 
 .include "../../devel/ncurses/buildlink3.mk"
-.include "../../devel/glib2/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff -ruN net/mtr.orig/distinfo net/mtr/distinfo
--- net/mtr.orig/distinfo       2013-07-04 20:29:56.000000000 +0300
+++ net/mtr/distinfo    2013-07-04 21:00:38.000000000 +0300
@@ -3,4 +3,5 @@
 SHA1 (mtr-0.85.tar.gz) = 77204a1a577cfca30c79c43a8fa3daafd280f1b8
 RMD160 (mtr-0.85.tar.gz) = 0ca692799d3b4d4358d02f72787e8705c061c817
 Size (mtr-0.85.tar.gz) = 534196 bytes
+SHA1 (patch-configure.ac) = b3ad807667834b6a90ee09ed26d3a7d3ce5b59a3
 SHA1 (patch-report.c) = 13c834fa841bce84aadc57124b6de6ffbc8766e9
diff -ruN net/mtr.orig/options.mk net/mtr/options.mk
--- net/mtr.orig/options.mk     2013-07-04 20:17:12.000000000 +0300
+++ net/mtr/options.mk  2013-07-04 20:28:53.000000000 +0300
@@ -6,6 +6,7 @@
 .include "../../mk/bsd.options.mk"
 
 .if !empty(PKG_OPTIONS:Mgtk)
+USE_TOOLS+=            pkg-config
 .include "../../x11/gtk2/buildlink3.mk"
 .else
 CONFIGURE_ARGS+=       --without-gtk
diff -ruN net/mtr.orig/patches/patch-configure.ac 
net/mtr/patches/patch-configure.ac
--- net/mtr.orig/patches/patch-configure.ac     1970-01-01 03:00:00.000000000 
+0300
+++ net/mtr/patches/patch-configure.ac  2013-07-04 21:00:32.000000000 +0300
@@ -0,0 +1,56 @@
+$NetBSD$
+
+--- configure.ac.orig  2013-06-06 18:16:10.000000000 +0300
++++ configure.ac       2013-06-09 17:56:42.083994552 +0300
+@@ -42,25 +42,22 @@
+ [  --without-gtk           Do not try to use GTK+ at all],
+ WANTS_GTK=$withval, WANTS_GTK=yes)
+ 
+-AC_ARG_WITH(glib,
+-[  --without-glib          Do not try to use glib at all],
+-WANTS_GLIB=$withval, WANTS_GLIB=yes)
+-
+ AC_ARG_WITH([ipinfo],
+ [  --without-ipinfo        Do not try to use ipinfo lookup at all],
+-[case "${withval}" in
+-  yes) ipinfo=true ;;
+-  no)  ipinfo=false ;;
+-  *) AC_MSG_ERROR([bad value ${withval} for --with-ipinfo]) ;;
+-esac],[ipinfo=true])
+-AM_CONDITIONAL([IPINFO], [test x$ipinfo = xtrue])
+-if test "x$ipinfo" = "xfalse"; then
+-      AC_DEFINE([NO_IPINFO], [1], [Define to disable ipinfo lookup])
+-fi
++[ipinfo="${withval}"], [ipinfo=yes])
++AM_CONDITIONAL([IPINFO], [test x$ipinfo = xyes])
+ 
+ AC_ARG_ENABLE(ipv6,
+ [  --disable-ipv6          Do not enable IPv6],
+ WANTS_IPV6=$enableval, WANTS_IPV6=yes)
++
++m4_ifndef([AM_PATH_GTK_2_0], [m4_defun([AM_PATH_GTK_2_0], [AC_MSG_ERROR([
++  Could not locate the gtk2 automake macros, these are usually located in
++    .../share/aclocal/gtk-2.0.m4
++  Before running bootstrap try setting the environment variable
++    ACLOCAL_PATH="/own/dir"
++  or configure --without-gtk.
++])])])
+    
+ if test "x$WANTS_GTK" = "xyes"; then
+         AM_PATH_GTK_2_0(2.6.0, CFLAGS="$CFLAGS $GTK_CFLAGS"
+@@ -71,11 +68,10 @@
+ else
+       AC_DEFINE(NO_GTK)
+       GTK_OBJ=""
+-      if test "x$WANTS_GLIB" = "xyes"; then
+-              PKG_CHECK_MODULES([GLIB], [glib-2.0])
+-      else
+-              AC_DEFINE(NO_GLIB, 1, [Define if you don't have the glib 
libraries available.])
+-      fi
++fi
++
++if test "x$ipinfo" = "xno"; then
++      AC_DEFINE([NO_IPINFO], [1], [Define to disable ipinfo lookup])
+ fi
+ 
+ AC_CHECK_FUNC(socket, , 

>Unformatted:
        
        


Home | Main Index | Thread Index | Old Index