summaryrefslogtreecommitdiff
path: root/lang/python
diff options
context:
space:
mode:
authorSofian Brabez <sbz@FreeBSD.org>2012-10-03 09:18:51 +0000
committerSofian Brabez <sbz@FreeBSD.org>2012-10-03 09:18:51 +0000
commit4beca75f6c1c86f18c3d24873ea13b022adb6d41 (patch)
tree9c98da22d85c4f381dcdff2459daa94d1eaa9128 /lang/python
parent- Update to 3.96 (diff)
- Add pkgng support
Notes
Notes: svn path=/head/; revision=305194
Diffstat (limited to 'lang/python')
-rw-r--r--lang/python/Makefile12
1 files changed, 10 insertions, 2 deletions
diff --git a/lang/python/Makefile b/lang/python/Makefile
index 33b66f9df5ea..b6f47d05dc20 100644
--- a/lang/python/Makefile
+++ b/lang/python/Makefile
@@ -30,6 +30,14 @@ PORTUPGRADE_CMD= ${LOCALBASE}/sbin/portupgrade
PORTUPGRADE_CMD= ${LOCALBASE}/sbin/portmaster
.endif
+.if defined(WITH_PKGNG)
+PKG_LIST= ${PKG_BIN} query -a '%n-%v'
+PKG_LIST_FILES= ${PKG_INFO} -l
+.else
+PKG_LIST= ${PKG_INFO} -Ea
+PKG_LIST_FILES= ${PKG_INFO} -L
+.endif
+
upgrade-site-packages:
@if [ ! -x ${PORTUPGRADE_CMD} ]; then \
${ECHO_MSG} "Please install ports-mgmt/portupgrade."; \
@@ -41,8 +49,8 @@ upgrade-site-packages:
GREP_ARGS="$${GREP_ARGS} -e lib/python$$ver"; \
done; \
UPD=""; \
- for pkg in `${PKG_INFO} -Ea`; do \
- ${PKG_INFO} -L $${pkg} | ${GREP} $${GREP_ARGS} && \
+ for pkg in `${PKG_LIST}`; do \
+ ${PKG_LIST_FILES} $${pkg} | ${GREP} $${GREP_ARGS} && \
UPD="$${UPD} $${pkg}"; \
done; \
if [ "$${UPD}" ]; then \