summaryrefslogtreecommitdiff
path: root/databases/py-bsddb3/files
diff options
context:
space:
mode:
authorRuslan Makhmatkhanov <rm@FreeBSD.org>2012-10-07 08:12:53 +0000
committerRuslan Makhmatkhanov <rm@FreeBSD.org>2012-10-07 08:12:53 +0000
commit39d7429835d4511582039dd5e282befef07a1a3f (patch)
treec8766753d1578f7a69a997f44aabc8761129b0ba /databases/py-bsddb3/files
parent- Update to 1.7-8 (diff)
- 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)
Diffstat (limited to 'databases/py-bsddb3/files')
-rw-r--r--databases/py-bsddb3/files/patch-setup3.py2
-rw-r--r--databases/py-bsddb3/files/py3k-fix-pkg-plist.inc14
2 files changed, 15 insertions, 1 deletions
diff --git a/databases/py-bsddb3/files/patch-setup3.py b/databases/py-bsddb3/files/patch-setup3.py
index 0ca781085917..f93ce03ad7be 100644
--- a/databases/py-bsddb3/files/patch-setup3.py
+++ b/databases/py-bsddb3/files/patch-setup3.py
@@ -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 = []
diff --git a/databases/py-bsddb3/files/py3k-fix-pkg-plist.inc b/databases/py-bsddb3/files/py3k-fix-pkg-plist.inc
new file mode 100644
index 000000000000..93acb972e248
--- /dev/null
+++ b/databases/py-bsddb3/files/py3k-fix-pkg-plist.inc
@@ -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}