ports/158303: databases/tdb doesn't need to always include python

Darren Pilgrim darren.pilgrim at gmail.com
Sun Jun 26 05:00:25 UTC 2011


>Number:         158303
>Category:       ports
>Synopsis:       databases/tdb doesn't need to always include python
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jun 26 05:00:24 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Darren Pilgrim
>Release:        8.1-RELEASE-p4
>Organization:
>Environment:
FreeBSD [hostname redacted] 8.1-RELEASE-p4 FreeBSD 8.1-RELEASE-p4 #0: Sat Jun 18 20:32:25 PDT 2011     root@[hostname redacted]:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
The databases/tdb port (part of Samba) sets USE_PYTHON when it doesn't need to.  The port uses waf[1] as part of its build-tools; however, the port provides waf as a compiled binary and the Makefile references it directly, thus removing the need for USE_PYTHON unless you explicitly need the python tdb library in addition to libtdb.  Samba uses only libtdb--a fact I confirmed by removing the python components from databases/tdb then installing net/samba35.

Attached is a patch to the Makefile to move the various python bits into an OPTIONS menu.  With that patch applied, I am able to successfully build, install and run net/samba35 with the PYTHONLIB option unchecked.

1: http://code.google.com/p/waf/
>How-To-Repeat:
n/a
>Fix:
n/a

Patch attached with submission follows:

--- Makefile.old	2011-06-25 21:49:25.400806840 -0700
+++ Makefile	2011-06-25 21:51:20.991628644 -0700
@@ -7,7 +7,7 @@
 
 PORTNAME=		tdb
 PORTVERSION=		1.2.1
-PORTREVISION=		1
+PORTREVISION=		2
 PORTEPOCH=		1
 CATEGORIES=		databases
 MASTER_SITES=		ftp://ftp.samba.org/pub/%SUBDIR%/ \
@@ -20,7 +20,6 @@
 
 CONFLICTS=		*samba3[0-4]-3.*
 
-USE_PYTHON=		yes
 USE_GMAKE=		yes
 USE_LDCONFIG=		yes
 GNU_CONFIGURE=		yes
@@ -35,7 +34,6 @@
 AUTOCONF_ARGS=		${IPATHS}
 PKGCONFIGDIR?=		${PREFIX}/libdata/pkgconfig
 PKGCONFIGDIR_REL?=	${PKGCONFIGDIR:S|^${PREFIX}/||}
-PYTHON_SITELIBDIR_REL?=	${PYTHONPREFIX_SITELIBDIR:S|^${PREFIX}/||}
 
 CONFIGURE_ENV+=		XSLTPROC="/usr/bin/true"
 
@@ -50,8 +48,17 @@
 			lib/libtdb.a \
 			lib/libtdb.so \
 			lib/libtdb.so.1 \
-			${PKGCONFIGDIR_REL}/tdb.pc \
-			${PYTHON_SITELIBDIR_REL}/tdb.so
+			${PKGCONFIGDIR_REL}/tdb.pc
+
+OPTIONS=	PYTHONLIB	"Include Python tdb library" on
+
+.include <bsd.port.options.mk>
+
+.if defined(WITH_PYTHONLIB)
+USE_PYTHON=		yes
+PYTHON_SITELIBDIR_REL?= ${PYTHONPREFIX_SITELIBDIR:S|^${PREFIX}/||}
+PLIST_FILES+=		${PYTHON_SITELIBDIR_REL}/tdb.so
+.endif
 
 pre-install:
 .for man in ${MAN8}


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



More information about the freebsd-ports-bugs mailing list