diff options
author | Johann Visagie <wjv@FreeBSD.org> | 2002-04-12 09:38:20 +0000 |
---|---|---|
committer | Johann Visagie <wjv@FreeBSD.org> | 2002-04-12 09:38:20 +0000 |
commit | 9929338062ca0bf39e950c01a4605a02fbcbd74e (patch) | |
tree | 3ad4e092bc0e9ebdfe4017b160a6d9996186c038 /textproc/py-asv | |
parent | - Remove PYTHON_VERSION=python2.1 restriction (diff) |
- Add a PKGREQ script to limit dependency to Python 2.0 and greater.
- Bump PORTREVISION (again, sorry)
Notes
Notes:
svn path=/head/; revision=57614
Diffstat (limited to 'textproc/py-asv')
-rw-r--r-- | textproc/py-asv/Makefile | 5 | ||||
-rw-r--r-- | textproc/py-asv/pkg-req | 17 |
2 files changed, 21 insertions, 1 deletions
diff --git a/textproc/py-asv/Makefile b/textproc/py-asv/Makefile index d7da90d8bbb6..0de74db32593 100644 --- a/textproc/py-asv/Makefile +++ b/textproc/py-asv/Makefile @@ -7,7 +7,7 @@ PORTNAME= asv PORTVERSION= 0.4 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= textproc python MASTER_SITES= http://tratt.net/laurie/python/asv/releases/ PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -22,6 +22,9 @@ do-build: @${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py ${WRKSRC} @${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py ${WRKSRC} +pre-install: + @ ${SH} ${PKGREQ} INSTALL + do-install: @printf '#!/bin/sh\n${PYTHON_CMD} ${ASV_BASEDIR}/ASV.py "$$@"\n' \ > ${WRKDIR}/asv.sh diff --git a/textproc/py-asv/pkg-req b/textproc/py-asv/pkg-req new file mode 100644 index 000000000000..bf09a351750d --- /dev/null +++ b/textproc/py-asv/pkg-req @@ -0,0 +1,17 @@ +#!/bin/sh + +PATH=$PATH:/usr/local/bin + +if [ "x$1" = "xINSTALL" -o "x$2" = "xINSTALL" ]; then + PYTHON_GT=`python -c 'import string, sys; \ + print string.split(sys.version)[0] >= "2.0"'` + if [ "x${PYTHON_GT}" = "x1" ]; then + exit 0 + else + echo "-----------------------------------------------------------" + echo "ASV requires Python version 2.0 or greater -" + echo " please update your Python installation before proceeding." + echo "-----------------------------------------------------------" + exit 1 + fi +fi |