Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 May 2021 12:23:39 GMT
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: ec55e2f5214a - main - net-mgmt/mbrowse: reduce overlinking and remove pkg dep
Message-ID:  <202105061223.146CNdUO067084@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by bapt:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ec55e2f5214a088ac0c052c2102bc85fb80947c5

commit ec55e2f5214a088ac0c052c2102bc85fb80947c5
Author:     Baptiste Daroussin <bapt@FreeBSD.org>
AuthorDate: 2021-05-06 12:19:49 +0000
Commit:     Baptiste Daroussin <bapt@FreeBSD.org>
CommitDate: 2021-05-06 12:23:36 +0000

    net-mgmt/mbrowse: reduce overlinking and remove pkg dep
    
    First no ports should ever be depending on pkg directly because it
    prevents building with WITH_PKG=devel, they should depend on
    ${PKG_ORIGIN}.
    Second, netsnmp do not expose the pkg API but only consume it, so
    program linking to netsnmp should not end up being directly linked to
    libpkg!
    
    Patch the configure script to stop asking net-snmp-config for extra libs
    which will faultly bring in linking against -lpkg and -lelf, and remove
    entirely libpkg as a dependency on the package
---
 net-mgmt/mbrowse/Makefile              |  8 ++------
 net-mgmt/mbrowse/files/patch-configure | 12 ++++++++++++
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/net-mgmt/mbrowse/Makefile b/net-mgmt/mbrowse/Makefile
index b06c8224f5d9..986765ca92c6 100644
--- a/net-mgmt/mbrowse/Makefile
+++ b/net-mgmt/mbrowse/Makefile
@@ -2,7 +2,7 @@
 
 PORTNAME=	mbrowse
 PORTVERSION=	0.4.3
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	net-mgmt
 MASTER_SITES=	SF/${PORTNAME}/${PORTVERSION}
 
@@ -13,8 +13,7 @@ LICENSE=	GPLv2
 
 LIB_DEPENDS=	libnetsnmp.so:net-mgmt/net-snmp \
 		libfontconfig.so:x11-fonts/fontconfig \
-		libfreetype.so:print/freetype2 \
-		libpkg.so:ports-mgmt/pkg
+		libfreetype.so:print/freetype2
 
 USES=		gnome pkgconfig ssl
 USE_GNOME=	cairo gdkpixbuf2 gtk20
@@ -22,9 +21,6 @@ GNU_CONFIGURE=	yes
 
 CONFIGURE_ARGS=	--with-snmp-prefix=${PREFIX} --with-snmp-type=net
 
-CPPFLAGS+=	`net-snmp-config --cflags`
-LDFLAGS+=	`net-snmp-config --libs`
-
 PLIST_FILES=	bin/mbrowse
 
 .include <bsd.port.mk>
diff --git a/net-mgmt/mbrowse/files/patch-configure b/net-mgmt/mbrowse/files/patch-configure
new file mode 100644
index 000000000000..4a7bba697d6e
--- /dev/null
+++ b/net-mgmt/mbrowse/files/patch-configure
@@ -0,0 +1,12 @@
+--- configure.orig	2011-01-28 12:10:11 UTC
++++ configure
+@@ -5354,8 +5354,7 @@ $as_echo_n "checking for snmp-type... " >&6; }
+       if test "x$snmp_prefix" != "x" ; then
+         if test -x "$snmp_prefix/bin/net-snmp-config" ; then
+           SNMP_NET_LIBS=`$snmp_prefix/bin/net-snmp-config --netsnmp-libs`
+-          SNMP_EXT_LIBS=`$snmp_prefix/bin/net-snmp-config --external-libs`
+-          SNMP_LIBS="$SNMP_NET_LIBS $SNMP_EXT_LIBS"
++          SNMP_LIBS="$SNMP_NET_LIBS"
+ 	  SNMP_CFLAGS="$SNMP_CFLAGS -DHAVE_NETSNMP"
+         else
+           guess_type="ucd"



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