ports/111148: [maintainer update] Make security/dns-proxy-tor's Tor dependency OPTIONal

Fabian Keil fk at fabiankeil.de
Mon Apr 2 17:30:05 UTC 2007


>Number:         111148
>Category:       ports
>Synopsis:       [maintainer update] Make security/dns-proxy-tor's Tor dependency OPTIONal
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 02 17:30:04 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Fabian Keil
>Release:        RELENG_6
>Organization:
>Environment:
FreeBSD TP51.local 6.2-STABLE FreeBSD 6.2-STABLE #12: Mon Mar 19 19:25:35 CET 2007     fk at TP51.local:/usr/obj/usr/src/sys/THINKPAD  i386
>Description:
The attached security/dns-proxy-tor update is supposed to:

- give the user the option not to depend on Tor
  (in case Tor and dns-proxy-tor run on different systems/jails)
- detect an installed Tor port properly. The previous version would
  register a dependency on security/tor-devel if security/tor
  was already installed. Thanks to Steve Clement for the report. 
- bump the port revision
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -ruN dns-proxy-tor.old/Makefile dns-proxy-tor/Makefile
--- dns-proxy-tor.old/Makefile	Sat Jul 22 21:14:57 2006
+++ dns-proxy-tor/Makefile	Sat Mar 17 18:05:34 2007
@@ -7,6 +7,7 @@
 
 PORTNAME=	dns-proxy-tor
 PORTVERSION=	0.1.0
+PORTREVISION=	1
 CATEGORIES=	security dns
 MASTER_SITES=	http://p56soo2ibjkx23xo.onion/ \
 		http://www.fabiankeil.de/sourcecode/freebsd/
@@ -15,13 +16,36 @@
 MAINTAINER=	fk at fabiankeil.de
 COMMENT=	Resolves DNS requests through Tor
 
-RUN_DEPENDS=	${LOCALBASE}/bin/tor:${PORTSDIR}/security/tor-devel
+OPTIONS= 	TOR_DEVEL	"Depend on tor-devel"	On \
+		TOR		"Depend on tor"		Off
+
 USE_PERL5_RUN=	yes
 USE_RC_SUBR=	${PORTNAME}
 
 DOCSDIR=	${PREFIX}/share/doc/${PORTNAME}
 SUB_FILES=	pkg-message
 
+HAVE_TOR_DEVEL!=	if pkg_info -I tor-devel\* >/dev/null 2>&1 ; then ${ECHO} YES; fi
+.if (${HAVE_TOR_DEVEL} == "YES")
+OPTIONS=	TOR_DEVEL	"Depend on tor-devel (already installed)"	On
+.else
+HAVE_TOR_DEVEL!=	if pkg_info -I tor-\* >/dev/null 2>&1 ; then ${ECHO} YES; fi
+.endif
+.if (defined(HAVE_TOR) && ${HAVE_TOR} == "YES")
+OPTIONS=	TOR		"Depend on tor (already installed)"	On
+.endif
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_TOR_DEVEL)
+.if defined(WITH_TOR)
+IGNORE=	cannot depend on tor and tor-devel at the same time
+.endif
+RUN_DEPENDS+=	${LOCALBASE}/bin/tor:${PORTSDIR}/security/tor-devel
+.elif defined(WITH_TOR)
+RUN_DEPENDS+=	${LOCALBASE}/bin/tor:${PORTSDIR}/security/tor
+.endif
+
 do-build:
 pre-install:
 	PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
@@ -42,4 +66,4 @@
 	${CHOWN} _dns-proxy-tor:_dns-proxy-tor ${PREFIX}/var/run/${PORTNAME}
 	@${CAT} ${PKGMESSAGE}
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>

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



More information about the freebsd-ports-bugs mailing list