From owner-svn-ports-all@FreeBSD.ORG Sun Oct 7 08:12:54 2012 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 354F01065674; Sun, 7 Oct 2012 08:12:54 +0000 (UTC) (envelope-from rm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E0FD8FC2F; Sun, 7 Oct 2012 08:12:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q978Crjp056912; Sun, 7 Oct 2012 08:12:53 GMT (envelope-from rm@svn.freebsd.org) Received: (from rm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q978CrM7056907; Sun, 7 Oct 2012 08:12:53 GMT (envelope-from rm@svn.freebsd.org) Message-Id: <201210070812.q978CrM7056907@svn.freebsd.org> From: Ruslan Mahmatkhanov Date: Sun, 7 Oct 2012 08:12:53 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r305441 - in head/databases/py-bsddb3: . files X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Oct 2012 08:12:54 -0000 Author: rm Date: Sun Oct 7 08:12:53 2012 New Revision: 305441 URL: http://svn.freebsd.org/changeset/ports/305441 Log: - fix build with python3 [1] - fix packaging list for python >= 3.2.0 (using nivit's solution for devel/py-virtualenv) PR: 170443 Submitted by: Volodymyr Kostyrko [1] Approved by: wen (maintainer) Added: head/databases/py-bsddb3/files/py3k-fix-pkg-plist.inc (contents, props changed) Modified: head/databases/py-bsddb3/Makefile head/databases/py-bsddb3/files/patch-setup3.py Modified: head/databases/py-bsddb3/Makefile ============================================================================== --- head/databases/py-bsddb3/Makefile Sun Oct 7 08:01:14 2012 (r305440) +++ head/databases/py-bsddb3/Makefile Sun Oct 7 08:12:53 2012 (r305441) @@ -1,9 +1,5 @@ -# New ports collection makefile for: py-bsddb3 -# Date created: 22 March 2001 -# Whom: Hye-Shik Chang -# +# Created by: Hye-Shik Chang # $FreeBSD$ -# PORTNAME= bsddb3 PORTVERSION= 5.3.0 @@ -24,6 +20,8 @@ PYDISTUTILS_INSTALLARGS=-c -O1 --prefix= PORTDOCS= * DOCSDIR= ${PREFIX}/share/doc/py-${PORTNAME} +.include + post-patch: ${REINPLACE_CMD} 's,%%DBVERSION%%,${BDB_LIB_NAME},g' ${WRKSRC}/setup2.py ${WRKSRC}/setup3.py ${REINPLACE_CMD} 's,,<${BDB_INCLUDE_DIR}/db.h>,' ${WRKSRC}/Modules/bsddb.h @@ -34,4 +32,8 @@ post-install: (cd ${WRKSRC}/docs && ${COPYTREE_SHARE} \* ${DOCSDIR}) .endif -.include +.if ${PYTHON_REL} >= 320 +.include "${FILESDIR}/py3k-fix-pkg-plist.inc" +.endif + +.include Modified: head/databases/py-bsddb3/files/patch-setup3.py ============================================================================== --- head/databases/py-bsddb3/files/patch-setup3.py Sun Oct 7 08:01:14 2012 (r305440) +++ head/databases/py-bsddb3/files/patch-setup3.py Sun Oct 7 08:12:53 2012 (r305441) @@ -19,7 +19,7 @@ - if not '-ldb' in LIBS: - libname = [dblib] + if not '-l%%DBVERSION%%' in LIBS: -+ libname = [%%DBVERSION%%] ++ libname = ['%%DBVERSION%%'] else: if debug: print("LIBS already contains '-ldb' not adding our own", "'-l"+dblib+"'") libname = [] Added: head/databases/py-bsddb3/files/py3k-fix-pkg-plist.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/py-bsddb3/files/py3k-fix-pkg-plist.inc Sun Oct 7 08:12:53 2012 (r305441) @@ -0,0 +1,14 @@ +# When Python version is 3.2+ we rewrite all the filenames +# of TMPPLIST that end with .py[co], so that they conform +# to PEP 3147 (see http://www.python.org/dev/peps/pep-3147/) +PYMAGICTAG= ${PYTHON_CMD} -c 'import imp; print(imp.get_tag())' +add-plist-post: + @${AWK} '\ + /\.py[co]$$/ && !($$0 ~ "/" pc "/") {id = match($$0, /\/[^\/]+\.py[co]$$/); if (id != 0) {d = substr($$0, 1, RSTART - 1); dirs[d] = 1}; sub(/\.py[co]$$/, "." mt "&"); sub(/[^\/]+\.py[co]$$/, pc "/&"); print; next} \ + /^@dirrm / {d = substr($$0, 8); if (d in dirs) {print $$0 "/" pc}; print $$0; next} \ + {print} \ + END {if (sp in dirs) {print "@dirrm " sp "/" pc}} \ + ' \ + pc="__pycache__" mt="$$(${PYMAGICTAG})" sp="${PYTHON_SITELIBDIR:S,${PYTHONBASE}/,,g}" \ + ${TMPPLIST} > ${TMPPLIST}.pyc_tmp + @${MV} ${TMPPLIST}.pyc_tmp ${TMPPLIST}