Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Oct 2012 13:07:11 +0000 (UTC)
From:      Guido Falsi <madpilot@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r306673 - head/net-mgmt/mrtg
Message-ID:  <201210301307.q9UD7BEV096249@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: madpilot
Date: Tue Oct 30 13:07:10 2012
New Revision: 306673
URL: http://svn.freebsd.org/changeset/ports/306673

Log:
  - Add GD_PORT knob to allow using localized GD
  - Remove ABI version number from LIB_DEPENDS
  - Trim Makefile headers
  - Convert to new options framework
  
  PR:		ports/173124
  Submitted by:	Alexey V. Panfilov <ports@subnets.ru> (maintainer)
  Feature safe:	yes

Modified:
  head/net-mgmt/mrtg/Makefile   (contents, props changed)

Modified: head/net-mgmt/mrtg/Makefile
==============================================================================
--- head/net-mgmt/mrtg/Makefile	Tue Oct 30 13:02:07 2012	(r306672)
+++ head/net-mgmt/mrtg/Makefile	Tue Oct 30 13:07:10 2012	(r306673)
@@ -1,9 +1,5 @@
-# New ports collection makefile for:	MRTG
-# Date created:				April 18th 1997
-# Whom:	      				James FitzGibbon <jfitz@FreeBSD.org>
-#
+# Created by: James FitzGibbon <jfitz@FreeBSD.org>
 # $FreeBSD$
-#
 
 PORTNAME=	mrtg
 PORTVERSION=	2.17.4
@@ -18,7 +14,10 @@ MASTER_SITES=	http://oss.oetiker.ch/mrtg
 MAINTAINER=	ports@subnets.ru
 COMMENT=	The multi-router traffic grapher
 
-LIB_DEPENDS=	gd.4:${PORTSDIR}/graphics/gd
+# slave ports override with languages specific gd
+GD_PORT?=	graphics/gd
+
+LIB_DEPENDS=	gd:${PORTSDIR}/${GD_PORT}
 RUN_DEPENDS=	p5-SNMP_Session>=0:${PORTSDIR}/net-mgmt/p5-SNMP_Session
 
 CONFIGURE_ARGS=	--with-gd-lib=${LOCALBASE}/lib \
@@ -64,24 +63,18 @@ IMAGES=		favicon.ico mrtg-l.gif mrtg-l.p
 		mrtg-r.gif mrtg-r.png mrtg-ti.gif mrtg-ti.png
 SCRIPTS=	cfgmaker indexmaker mrtg mrtg-traffic-sum
 
-OPTIONS=	IPV6 "Enable IPv6 support" OFF \
-		SNMP "Enable use of SNMPv3" OFF
+OPTIONS_DEFINE=	DOCS EXAMPLES IPV6 SNMPV3
 
-.if !defined(NOPORTDOCS)
 PORTDOCS=	*
-.endif
-
-.if !defined(NOPORTEXAMPLES)
 PORTEXAMPLES=	*
-.endif
 
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
 
-.if defined(WITH_IPV6)
+.if ${PORT_OPTIONS:MIPV6}
 RUN_DEPENDS+=	p5-IO-Socket-INET6>=0:${PORTSDIR}/net/p5-IO-Socket-INET6
 .endif
 
-.if defined(WITH_SNMP)
+.if ${PORT_OPTIONS:MSNMPV3}
 RUN_DEPENDS+=	p5-Net-SNMP>=0:${PORTSDIR}/net-mgmt/p5-Net-SNMP
 .endif
 
@@ -92,11 +85,11 @@ post-patch:
 	@${RM} ${WRKSRC}/lib/mrtg2/BER.pm ${WRKSRC}/lib/mrtg2/SNMP_*.pm
 
 do-install:
-.if !defined(NOPORTDOCS)
+.if ${PORT_OPTIONS:MDOCS}
 	@${MKDIR} ${DOCSDIR}
 	@${INSTALL_DATA} ${DOCS:S,^,${WRKSRC}/,} ${DOCSDIR}/
 .endif
-.if !defined(NOPORTEXAMPLES)
+.if ${PORT_OPTIONS:MEXAMPLES}
 	@${MKDIR} ${EXAMPLESDIR}/doc ${EXAMPLESDIR}/images
 	@${INSTALL_DATA} ${EXAMPLES:S,^,${WRKSRC}/doc/,} ${EXAMPLESDIR}/doc/
 	@${INSTALL_DATA} ${IMAGES:S,^,${WRKSRC}/images/,} ${EXAMPLESDIR}/images/
@@ -113,4 +106,4 @@ post-install:
 	@${SETENV} @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
 	@${CAT} ${PKGMESSAGE}
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>



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