diff options
author | wjv <wjv@FreeBSD.org> | 2002-04-12 09:38:20 +0000 |
---|---|---|
committer | wjv <wjv@FreeBSD.org> | 2002-04-12 09:38:20 +0000 |
commit | 44c42805911927583c39eb1fe2b5eaa6cef940f2 (patch) | |
tree | d6e2a5d38622dabaec83cacf7ed35d5855a65104 /textproc | |
parent | 52b9662efafb2d258c0248b39bfba7a1bb6d1df4 (diff) | |
download | FreeBSD-ports-44c42805911927583c39eb1fe2b5eaa6cef940f2.zip FreeBSD-ports-44c42805911927583c39eb1fe2b5eaa6cef940f2.tar.gz |
- Add a PKGREQ script to limit dependency to Python 2.0 and greater.
- Bump PORTREVISION (again, sorry)
Diffstat (limited to 'textproc')
-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 d7da90d..0de74db 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 0000000..bf09a35 --- /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 |