aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornivit <nivit@FreeBSD.org>2012-09-06 05:56:12 +0800
committernivit <nivit@FreeBSD.org>2012-09-06 05:56:12 +0800
commita0b7fdb6ab2ad3ad1a74685af8278a8ba814e446 (patch)
tree10262510a9ed368b38af77cead9511a69ef5db8e
parentcf6383d56eb3258e843bedad49d50d6e9999f12b (diff)
downloadfreebsd-ports-gnome-a0b7fdb6ab2ad3ad1a74685af8278a8ba814e446.tar.gz
freebsd-ports-gnome-a0b7fdb6ab2ad3ad1a74685af8278a8ba814e446.tar.zst
freebsd-ports-gnome-a0b7fdb6ab2ad3ad1a74685af8278a8ba814e446.zip
- Update WWW, and remove Author field (pkg-descr)
- Bump PORTREVISION (change pkg-plist) - Convert to the new options framework - Remove LICENSE_FILE variable - Remove address no longer available from MASTER_SITES - Run 2to3 script on examples/docs dir, and include devel/py-virtualenv/files/py3-fix-pkg-plist.inc when Python version >= 3.0 - Rearrange Makefile to support a slave port (Jinja2-doc), that only installs documentation. That is to avoid a circular dependency between this port and textproc/py-sphinx, which is necessary to build docs - Add a test target to Makefile BuildLog: http://goo.gl/yfMhR
-rw-r--r--devel/py-Jinja2/Makefile78
-rw-r--r--devel/py-Jinja2/pkg-descr5
-rw-r--r--devel/py-Jinja2/pkg-plist13
3 files changed, 57 insertions, 39 deletions
diff --git a/devel/py-Jinja2/Makefile b/devel/py-Jinja2/Makefile
index 76725ac6c589..072a0597c82a 100644
--- a/devel/py-Jinja2/Makefile
+++ b/devel/py-Jinja2/Makefile
@@ -7,54 +7,86 @@
PORTNAME= Jinja2
PORTVERSION= 2.6
+PORTREVISION= 1
CATEGORIES= devel python
-MASTER_SITES= CHEESESHOP \
- http://nivi.interfree.it/distfiles/${PORTNAME}/
+MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+PKGNAMESUFFIX?=
MAINTAINER= nivit@FreeBSD.org
-COMMENT= A fast and easy to use stand-alone template engine
+COMMENT?= Fast and easy to use stand-alone template engine
LICENSE= BSD
-LICENSE_FILE= ${WRKSRC}/LICENSE
USE_PYTHON= 2.5+
+.if empty(PKGNAMESUFFIX)
USE_PYDISTUTILS= easy_install
+.endif
-DOCSDIR= ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME}
EXAMPLESDIR= ${PREFIX}/share/examples/${PKGNAMEPREFIX}${PORTNAME}
-OPTIONS= SPEEDUPS "Enable speedups" on
-OPTIONS+= BABEL "Enable Babel extension" off
+OPTIONSFILE= ${PORT_DBDIR}/py-${PORTNAME}/options
+OPTIONS_DEFINE?= BABEL EXAMPLES SPEEDUPS
+OPTIONS_DEFAULT?= BABEL SPEEDUPS
+SPEEDUPS_DESC= Enable speedups
+BABEL_DESC= Enable Babel extension
+
+PY2TO3_CMD= ${LOCALBASE}/bin/2to3-${PYTHON_VER}
+
+.include <bsd.port.options.mk>
-.if !defined(NOPORTEXAMPLES)
+.include <bsd.port.pre.mk>
+
+.if ${PKGNAMESUFFIX} == "-doc"
+BUILD_DEPENDS+= ${PKGNAMEPREFIX}sphinx>=1.1.3:${PORTSDIR}/textproc/py-sphinx
+DOCSDIR= ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME}
+PORT_OPTIONS:= ${PORT_OPTIONS:NEXAMPLES}
+.endif
+
+.if ${PORT_OPTIONS:MBABEL} && ${PYTHON_REL} < 300
+# Actually >= 0.9.8, devel/py-babel doesn't yet build with Py3k
+RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}Babel>=0.9.6:${PORTSDIR}/devel/py-babel
+.endif
+
+.if ${PORT_OPTIONS:MSPEEDUPS}
+RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}MarkupSafe>=0.11:${PORTSDIR}/textproc/py-MarkupSafe
+.endif
+
+.if ${PKGNAMESUFFIX} == "-doc"
+do-build:
+. if ${PYTHON_REL} >= 300
+ @${PY2TO3_CMD} --no-diffs --fix=all --verbose --write ${WRKSRC}/docs
+. endif
+ @cd ${WRKSRC}/docs && ${MAKE} html
+
+do-install:
+ @${MKDIR} ${DOCSDIR}
+ @cd ${WRKSRC}/docs/_build/html && ${COPYTREE_SHARE} . ${DOCSDIR}
+.endif
+
+.if ${PORT_OPTIONS:MEXAMPLES}
post-build:
-# Bytecode Python
+. if ${PYTHON_REL} >= 300
+ ${PY2TO3_CMD} --no-diffs --fix=all --verbose --write ${WRKSRC}/examples
+. endif
${PYTHON_CMD} -m compileall ${WRKSRC}/examples ; \
${PYTHON_CMD} -O -m compileall ${WRKSRC}/examples
-.endif
post-install:
-.if !defined(NOPORTDOCS)
- @${MKDIR} ${DOCSDIR}
- @cd ${WRKSRC}/docs/ && \
- ${FIND} . -type f -regex '.*\.rst' \
- -exec ${INSTALL_DATA} "{}" "${DOCSDIR}/{}" \;
-.endif
-.if !defined(NOPORTEXAMPLES)
@${MKDIR} ${EXAMPLESDIR}
@cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${EXAMPLESDIR}
.endif
-.include <bsd.port.pre.mk>
-.if defined(WITH_SPEEDUPS)
-RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}MarkupSafe>=0.11:${PORTSDIR}/textproc/py-MarkupSafe
+check regression-test test: build
+.if empty(PKGNAMESUFFIX)
+ @cd ${WRKSRC} && ${PYTHON_CMD} ${PYSETUP} test
+.else
+ @${DO_NADA}
.endif
-.if defined(WITH_BABEL)
-# Actually >= 0.9.8
-RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}Babel>=0.9.6:${PORTSDIR}/devel/py-babel
+.if ${PYTHON_REL} >= 320
+.include "${.CURDIR}/../py-virtualenv/files/py3k-fix-pkg-plist.inc"
.endif
.include <bsd.port.post.mk>
diff --git a/devel/py-Jinja2/pkg-descr b/devel/py-Jinja2/pkg-descr
index 125847c4b6ce..c468787a090a 100644
--- a/devel/py-Jinja2/pkg-descr
+++ b/devel/py-Jinja2/pkg-descr
@@ -1,7 +1,6 @@
-Jinja is a sandboxed template engine written in pure Python licensed
+Jinja is a sandboxed template engine written in pure Python licensed
under the BSD license. It provides a Django-like non-XML syntax and
compiles templates into executable python code. It's basically a
combination of Django templates and python code.
-Author: Armin Ronacher
-WWW: http://jinja.pocoo.org/2/
+WWW: http://jinja.pocoo.org/
diff --git a/devel/py-Jinja2/pkg-plist b/devel/py-Jinja2/pkg-plist
index 02a745ce650e..969f11d8a758 100644
--- a/devel/py-Jinja2/pkg-plist
+++ b/devel/py-Jinja2/pkg-plist
@@ -140,18 +140,6 @@
%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/jinja2/visitor.py
%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/jinja2/visitor.pyc
%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/jinja2/visitor.pyo
-%%PORTDOCS%%%%DOCSDIR%%/api.rst
-%%PORTDOCS%%%%DOCSDIR%%/changelog.rst
-%%PORTDOCS%%%%DOCSDIR%%/extensions.rst
-%%PORTDOCS%%%%DOCSDIR%%/faq.rst
-%%PORTDOCS%%%%DOCSDIR%%/index.rst
-%%PORTDOCS%%%%DOCSDIR%%/integration.rst
-%%PORTDOCS%%%%DOCSDIR%%/intro.rst
-%%PORTDOCS%%%%DOCSDIR%%/latexindex.rst
-%%PORTDOCS%%%%DOCSDIR%%/sandbox.rst
-%%PORTDOCS%%%%DOCSDIR%%/switching.rst
-%%PORTDOCS%%%%DOCSDIR%%/templates.rst
-%%PORTDOCS%%%%DOCSDIR%%/tricks.rst
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/basic/cycle.py
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/basic/cycle.pyc
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/basic/cycle.pyo
@@ -212,7 +200,6 @@
%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/basic/templates
%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/basic
%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
-%%PORTDOCS%%@dirrm %%DOCSDIR%%
@dirrm %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/jinja2/testsuite/res/templates/foo
@dirrm %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/jinja2/testsuite/res/templates
@dirrm %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/jinja2/testsuite/res