mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-19 19:59:43 +00:00
- 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 <c.kworr at gmail dot com> [1] Approved by: wen (maintainer)
This commit is contained in:
parent
44a7392540
commit
39d7429835
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=305441
@ -1,9 +1,5 @@
|
||||
# New ports collection makefile for: py-bsddb3
|
||||
# Date created: 22 March 2001
|
||||
# Whom: Hye-Shik Chang <perky@python.or.kr>
|
||||
#
|
||||
# Created by: Hye-Shik Chang <perky@python.or.kr>
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= bsddb3
|
||||
PORTVERSION= 5.3.0
|
||||
@ -24,6 +20,8 @@ PYDISTUTILS_INSTALLARGS=-c -O1 --prefix=${PREFIX} --berkeley-db=${LOCALBASE}
|
||||
PORTDOCS= *
|
||||
DOCSDIR= ${PREFIX}/share/doc/py-${PORTNAME}
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
post-patch:
|
||||
${REINPLACE_CMD} 's,%%DBVERSION%%,${BDB_LIB_NAME},g' ${WRKSRC}/setup2.py ${WRKSRC}/setup3.py
|
||||
${REINPLACE_CMD} 's,<db\.h>,<${BDB_INCLUDE_DIR}/db.h>,' ${WRKSRC}/Modules/bsddb.h
|
||||
@ -34,4 +32,8 @@ post-install:
|
||||
(cd ${WRKSRC}/docs && ${COPYTREE_SHARE} \* ${DOCSDIR})
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
||||
.if ${PYTHON_REL} >= 320
|
||||
.include "${FILESDIR}/py3k-fix-pkg-plist.inc"
|
||||
.endif
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
@ -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 = []
|
||||
|
14
databases/py-bsddb3/files/py3k-fix-pkg-plist.inc
Normal file
14
databases/py-bsddb3/files/py3k-fix-pkg-plist.inc
Normal file
@ -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}
|
Loading…
Reference in New Issue
Block a user