ports/156419: [update] dns/ldns - add an option to install python bindings

Emanuel Haupt ehaupt at FreeBSD.org
Fri Apr 15 13:20:06 UTC 2011


>Number:         156419
>Category:       ports
>Synopsis:       [update] dns/ldns - add an option to install python bindings
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 15 13:20:05 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Emanuel Haupt
>Release:        FreeBSD 8.1-STABLE i386
>Organization:
>Environment:
System: FreeBSD freefall.freebsd.org 8.1-STABLE FreeBSD 8.1-STABLE #2 r215627: Sun Nov 21 13:36:51 UTC 2010 simon at freefall.freebsd.org:/usr/obj/usr/src/sys/FREEFALL i386


	
>Description:
I need the python bindings for updating one of my ports. The following
tinderbox-tested patch provides an OPTIONS flag to install the python bindings
for dns/ldns.

Also add an additional distfile mirror.

>How-To-Repeat:
	
>Fix:

	

--- ldns.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/dns/ldns/Makefile,v
retrieving revision 1.23
diff -u -r1.23 Makefile
--- Makefile	17 Mar 2011 09:30:22 -0000	1.23
+++ Makefile	15 Apr 2011 13:11:43 -0000
@@ -8,7 +8,8 @@
 PORTNAME=	ldns
 PORTVERSION=	1.6.9
 CATEGORIES=	dns
-MASTER_SITES=	http://www.nlnetlabs.nl/downloads/ldns/
+MASTER_SITES=	http://www.nlnetlabs.nl/downloads/ldns/ \
+		CRITICAL
 
 MAINTAINER=	jaap at NLnetLabs.nl
 COMMENT=	A library for programs conforming to DNS RFCs and drafts
@@ -24,7 +25,8 @@
 		EXAMPLES "With example programs" Off \
 		DRILL "With drill program" Off \
 		GOST "GOST signatures enabled (requires openssl >= 1.0.0)" Off \
-		ECDSA "With highly experimental ECDSA support" Off
+		ECDSA "With highly experimental ECDSA support" Off \
+		PYLDNS "Build python bindings" Off
 
 .include <bsd.port.pre.mk>
 
@@ -255,6 +257,17 @@
 CONFIGURE_ARGS+=	--enable-ecdsa
 .endif
 
+.if defined(WITH_PYLDNS)
+USE_PYTHON=		yes
+.include "${PORTSDIR}/Mk/bsd.python.mk"
+CONFIGURE_ARGS+=	--with-pyldns
+BUILD_DEPENDS+=		${LOCALBASE}/bin/swig:${PORTSDIR}/devel/swig13
+INSTALL_TARGET+=	install-pyldns
+PLIST_SUB+=		PYLDNS=""
+.else
+PLIST_SUB+=		PYLDNS="@comment "
+.endif
+
 .if ${OSVERSION} < 700000
 NO_SHA2=		--disable-sha2
 CONFIGURE_ARGS+=	${NO_SHA2}
Index: pkg-plist
===================================================================
RCS file: /home/pcvs/ports/dns/ldns/pkg-plist,v
retrieving revision 1.9
diff -u -r1.9 pkg-plist
--- pkg-plist	26 Jan 2011 11:28:03 -0000	1.9
+++ pkg-plist	15 Apr 2011 13:11:43 -0000
@@ -55,4 +55,10 @@
 lib/libldns.la
 lib/libldns.so
 lib/libldns.so.1
+%%PYLDNS%%%%PYTHON_SITELIBDIR%%/_ldns.so.1
+%%PYLDNS%%%%PYTHON_SITELIBDIR%%/ldns.py
+%%PYLDNS%%%%PYTHON_SITELIBDIR%%/_ldns.so
+%%PYLDNS%%%%PYTHON_SITELIBDIR%%/_ldns.la
+%%PYLDNS%%%%PYTHON_SITELIBDIR%%/_ldns.a
+%%PYLDNS%%@dirrm %%PYTHON_SITELIBDIR%%/ldns
 @dirrm include/ldns
--- ldns.patch ends here ---


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



More information about the freebsd-ports-bugs mailing list