Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Sep 2012 21:56:13 +0000 (UTC)
From:      Nicola Vitale <nivit@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r303726 - head/devel/py-Jinja2
Message-ID:  <201209052156.q85LuDPO008456@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: nivit
Date: Wed Sep  5 21:56:12 2012
New Revision: 303726
URL: http://svn.freebsd.org/changeset/ports/303726

Log:
  - 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

Modified:
  head/devel/py-Jinja2/Makefile   (contents, props changed)
  head/devel/py-Jinja2/pkg-descr   (contents, props changed)
  head/devel/py-Jinja2/pkg-plist   (contents, props changed)

Modified: head/devel/py-Jinja2/Makefile
==============================================================================
--- head/devel/py-Jinja2/Makefile	Wed Sep  5 21:48:20 2012	(r303725)
+++ head/devel/py-Jinja2/Makefile	Wed Sep  5 21:56:12 2012	(r303726)
@@ -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>

Modified: head/devel/py-Jinja2/pkg-descr
==============================================================================
--- head/devel/py-Jinja2/pkg-descr	Wed Sep  5 21:48:20 2012	(r303725)
+++ head/devel/py-Jinja2/pkg-descr	Wed Sep  5 21:56:12 2012	(r303726)
@@ -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/

Modified: head/devel/py-Jinja2/pkg-plist
==============================================================================
--- head/devel/py-Jinja2/pkg-plist	Wed Sep  5 21:48:20 2012	(r303725)
+++ head/devel/py-Jinja2/pkg-plist	Wed Sep  5 21:56:12 2012	(r303726)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209052156.q85LuDPO008456>