jinja: upgraded package to upstream

Upgraded dev-python/jinja to version 2.7.1.
Nothing uses this currently.

BUG=None
TEST=`emerge-link jinja` works

Change-Id: I2e75e9c0a2d8eab9675472b6c10aa2b35db62757
Reviewed-on: https://chromium-review.googlesource.com/191013
Reviewed-by: Jon Salz <jsalz@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
diff --git a/dev-python/jinja/Manifest b/dev-python/jinja/Manifest
index 89aeb6d..7f7f13b 100644
--- a/dev-python/jinja/Manifest
+++ b/dev-python/jinja/Manifest
@@ -1 +1 @@
-DIST Jinja2-2.6.tar.gz 389741 RMD160 77829eabfc71dd6cf7eece1fe5d0b96b21de3b18 SHA1 f122aeb324b2009bbcee341d0f001a047ac4bbe5 SHA256 a85e185375db75c109f99ecde3d55415f035e7068a82252cf4f16c667ac38f49
+DIST Jinja2-2.7.1.tar.gz 377813 SHA256 5cc0a087a81dca1c08368482fb7a92fe2bdd8cfbb22bc0fccfe6c85affb04c8b SHA512 c5d4262f6dfec77c74496f0b3afd88a37fc0573133810cfdc29fadbd9d02bb7af10b2a3ddf3075f8b682629cd41a949dcbccb293b84b0aeff9090b0aa9669e02 WHIRLPOOL 73a78917adc5a455dda971fc2e1d9cc005ac3b1a95c2467950206a37a710d6481cc1a26b9e0105b6c5607acaf96af0bee90a3849836969ab70b316c3f0cda132
diff --git a/dev-python/jinja/files/jinja-2.6-python3.3.patch b/dev-python/jinja/files/jinja-2.6-python3.3.patch
new file mode 100644
index 0000000..29bd38e
--- /dev/null
+++ b/dev-python/jinja/files/jinja-2.6-python3.3.patch
@@ -0,0 +1,15 @@
+diff --git a/jinja2/environment.py b/jinja2/environment.py
+index ebb5454..1b5dc40 100644
+--- a/jinja2/environment.py
++++ b/jinja2/environment.py
+@@ -570,6 +570,10 @@ class Environment(object):
+             py_header = imp.get_magic() + \
+                 u'\xff\xff\xff\xff'.encode('iso-8859-15')
+ 
++            # Python 3.3 added a source filesize to the header
++            if sys.version_info >= (3, 3):
++                py_header += u'\x00\x00\x00\x00'.encode('iso-8859-15')
++
+         def write_file(filename, data, mode):
+             if zip:
+                 info = ZipInfo(filename)
diff --git a/dev-python/jinja/files/jinja-2.7-docs.patch b/dev-python/jinja/files/jinja-2.7-docs.patch
new file mode 100644
index 0000000..d543f54
--- /dev/null
+++ b/dev-python/jinja/files/jinja-2.7-docs.patch
@@ -0,0 +1,53 @@
+From da94a8b504d981cb5f877219811d169823a2095e Mon Sep 17 00:00:00 2001
+From: Armin Ronacher <armin.ronacher@active-4.com>
+Date: Mon, 20 May 2013 14:06:59 +0100
+Subject: [PATCH] Fixed docs not building
+
+---
+ docs/faq.rst       | 2 +-
+ docs/jinjaext.py   | 2 +-
+ docs/templates.rst | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/docs/faq.rst b/docs/faq.rst
+index 4db5079..00a4d0d 100644
+--- a/docs/faq.rst
++++ b/docs/faq.rst
+@@ -157,7 +157,7 @@ Python 2.3 support you either have to use `Jinja 1`_ or other templating
+ engines that still support 2.3.
+ 
+ My Macros are overridden by something
+-------------------------------------
++-------------------------------------
+ 
+ In some situations the Jinja scoping appears arbitrary:
+ 
+diff --git a/docs/jinjaext.py b/docs/jinjaext.py
+index 8395a55..3c217f8 100644
+--- a/docs/jinjaext.py
++++ b/docs/jinjaext.py
+@@ -23,7 +23,7 @@
+ from pygments.token import Keyword, Name, Comment, String, Error, \
+      Number, Operator, Generic
+ from jinja2 import Environment, FileSystemLoader
+-from jinja2.utils import next
++from jinja2._compat import next
+ 
+ 
+ def parse_rst(state, content_offset, doc):
+diff --git a/docs/templates.rst b/docs/templates.rst
+index e0a19fa..4a6a379 100644
+--- a/docs/templates.rst
++++ b/docs/templates.rst
+@@ -579,7 +579,7 @@ Inside of a for-loop block you can access some special variables:
+ | `loop.depth`          | Indicates how deep in deep in a recursive loop    |
+ |                       | the rendering currently is.  Starts at level 1    |
+ +-----------------------+---------------------------------------------------+
+-| `loop.depth0          | Indicates how deep in deep in a recursive loop    |
++| `loop.depth0`         | Indicates how deep in deep in a recursive loop    |
+ |                       | the rendering currently is.  Starts at level 0    |
+ +-----------------------+---------------------------------------------------+
+ 
+-- 
+1.8.1.6
+
diff --git a/dev-python/jinja/jinja-2.6.ebuild b/dev-python/jinja/jinja-2.6.ebuild
deleted file mode 100644
index bc73ec3..0000000
--- a/dev-python/jinja/jinja-2.6.ebuild
+++ /dev/null
@@ -1,74 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/jinja/jinja-2.6.ebuild,v 1.14 2012/05/09 00:15:37 aballier Exp $
-
-EAPI=4
-
-SUPPORT_PYTHON_ABIS="1"
-DISTUTILS_SRC_TEST="setup.py"
-
-inherit distutils
-
-MY_PN=Jinja2
-MY_P=${MY_PN}-${PV}
-
-DESCRIPTION="A small but fast and easy to use stand-alone template engine written in pure python."
-HOMEPAGE="http://jinja.pocoo.org/ http://pypi.python.org/pypi/Jinja2"
-SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="*"
-IUSE="doc examples i18n vim-syntax"
-
-RDEPEND="dev-python/markupsafe
-	dev-python/setuptools
-	i18n? ( >=dev-python/Babel-0.9.3 )"
-DEPEND="${RDEPEND}
-	doc? ( >=dev-python/sphinx-0.6 )"
-
-S=${WORKDIR}/${MY_P}
-
-DOCS="CHANGES"
-PYTHON_MODNAME="jinja2"
-
-DISTUTILS_GLOBAL_OPTIONS=("*-cpython --with-debugsupport")
-
-src_compile(){
-	distutils_src_compile
-
-	if use doc; then
-		einfo "Generation of documentation"
-		pushd docs > /dev/null
-		if [[ "$(python_get_version -f -l --major)" == "3" ]]; then
-			# https://github.com/mitsuhiko/jinja2/issues/115
-			2to3-$(PYTHON -f --ABI) -nw --no-diffs jinjaext.py || die
-		fi
-		PYTHONPATH="$(ls -d ../build-$(PYTHON -f --ABI)/lib*)" emake html
-		popd > /dev/null
-	fi
-}
-
-src_install(){
-	distutils_src_install
-	python_clean_installation_image
-
-	delete_tests() {
-		rm -fr "${ED}$(python_get_sitedir)/jinja2/testsuite"
-	}
-	python_execute_function -q delete_tests
-
-	if use doc; then
-		dohtml -r docs/_build/html/*
-	fi
-
-	if use examples; then
-		insinto /usr/share/doc/${PF}
-		doins -r examples
-	fi
-
-	if use vim-syntax; then
-		insinto /usr/share/vim/vimfiles/syntax
-		doins ext/Vim/*
-	fi
-}
diff --git a/dev-python/jinja/jinja-2.7.1.ebuild b/dev-python/jinja/jinja-2.7.1.ebuild
new file mode 100644
index 0000000..9175ad8
--- /dev/null
+++ b/dev-python/jinja/jinja-2.7.1.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/jinja/jinja-2.7.1.ebuild,v 1.2 2013/09/05 18:46:28 mgorny Exp $
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_6,2_7,3_3} pypy2_0 )
+
+inherit eutils distutils-r1
+
+MY_PN=Jinja2
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="A small but fast and easy to use stand-alone template engine written in pure Python"
+HOMEPAGE="http://jinja.pocoo.org/ http://pypi.python.org/pypi/Jinja2"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="*"
+IUSE="doc examples"
+
+RDEPEND="dev-python/markupsafe[${PYTHON_USEDEP}]
+	dev-python/setuptools[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+	doc? ( >=dev-python/sphinx-0.6 )"
+
+# XXX: handle Babel better?
+
+S=${WORKDIR}/${MY_P}
+PATCHES=( "${FILESDIR}/jinja-2.7-docs.patch" )
+
+wrap_opts() {
+	local mydistutilsargs=()
+
+	if [[ ${EPYTHON} == python* ]]; then
+		mydistutilargs+=( --with-debugsupport )
+	fi
+
+	"${@}"
+}
+
+python_compile() {
+	wrap_opts distutils-r1_python_compile
+}
+
+python_compile_all() {
+	use doc && emake -C docs html
+}
+
+python_test() {
+	esetup.py test
+}
+
+python_install_all() {
+	use doc && local HTML_DOCS=( docs/_build/html/. )
+
+	distutils-r1_python_install_all
+
+	if use examples; then
+		insinto /usr/share/doc/${PF}
+		doins -r examples
+	fi
+
+	insinto /usr/share/vim/vimfiles/syntax
+	doins ext/Vim/*
+}
+
+pkg_postinst() {
+	if ! has_version dev-python/Babel; then
+		elog "For i18n support, please emerge dev-python/Babel."
+	fi
+}
diff --git a/metadata/md5-cache/dev-python/jinja-2.6 b/metadata/md5-cache/dev-python/jinja-2.6
deleted file mode 100644
index df6db97..0000000
--- a/metadata/md5-cache/dev-python/jinja-2.6
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install postinst postrm prepare setup test
-DEPEND=dev-python/markupsafe dev-python/setuptools i18n? ( >=dev-python/Babel-0.9.3 ) doc? ( >=dev-python/sphinx-0.6 ) dev-lang/python
-DESCRIPTION=A small but fast and easy to use stand-alone template engine written in pure python.
-EAPI=4
-HOMEPAGE=http://jinja.pocoo.org/ http://pypi.python.org/pypi/Jinja2
-IUSE=doc examples i18n vim-syntax
-KEYWORDS=*
-LICENSE=BSD
-RDEPEND=dev-python/markupsafe dev-python/setuptools i18n? ( >=dev-python/Babel-0.9.3 ) dev-lang/python
-SLOT=0
-SRC_URI=mirror://pypi/J/Jinja2/Jinja2-2.6.tar.gz
-_eclasses_=distutils	c2658824b3debc637c77b58e1d658fab	multilib	fac675dcccf94392371a6abee62d909f	python	305197b0aa1194fa3ef67ca21f6faa7e	toolchain-funcs	48b38a216afb92db6314d6c3187abea3
-_md5_=cb215b705f0b36ac1cd906a31e22c58e
diff --git a/metadata/md5-cache/dev-python/jinja-2.7.1 b/metadata/md5-cache/dev-python/jinja-2.7.1
new file mode 100644
index 0000000..d9745a1
--- /dev/null
+++ b/metadata/md5-cache/dev-python/jinja-2.7.1
@@ -0,0 +1,13 @@
+DEFINED_PHASES=compile configure install postinst prepare test
+DEPEND=dev-python/markupsafe[python_targets_python2_6(-)?,python_targets_python2_7(-)?,python_targets_python3_3(-)?,python_targets_pypy2_0(-)?,-python_single_target_python2_6(-),-python_single_target_python2_7(-),-python_single_target_python3_3(-),-python_single_target_pypy2_0(-)] dev-python/setuptools[python_targets_python2_6(-)?,python_targets_python2_7(-)?,python_targets_python3_3(-)?,python_targets_pypy2_0(-)?,-python_single_target_python2_6(-),-python_single_target_python2_7(-),-python_single_target_python3_3(-),-python_single_target_pypy2_0(-)] doc? ( >=dev-python/sphinx-0.6 ) python_targets_python2_6? ( >=dev-lang/python-2.6.8-r3:2.6 ) python_targets_python2_7? ( >=dev-lang/python-2.7.3-r2:2.7 ) python_targets_python3_3? ( >=dev-lang/python-3.3.2-r2:3.3 ) python_targets_pypy2_0? ( >=virtual/pypy-2.0.2:2.0 ) dev-lang/python-exec:=[python_targets_python2_6(-)?,python_targets_python2_7(-)?,python_targets_python3_3(-)?,python_targets_pypy2_0(-)?,-python_single_target_python2_6(-),-python_single_target_python2_7(-),-python_single_target_python3_3(-),-python_single_target_pypy2_0(-)]
+DESCRIPTION=A small but fast and easy to use stand-alone template engine written in pure Python
+EAPI=5
+HOMEPAGE=http://jinja.pocoo.org/ http://pypi.python.org/pypi/Jinja2
+IUSE=doc examples python_targets_python2_6 python_targets_python2_7 python_targets_python3_3 python_targets_pypy2_0
+KEYWORDS=*
+LICENSE=BSD
+RDEPEND=dev-python/markupsafe[python_targets_python2_6(-)?,python_targets_python2_7(-)?,python_targets_python3_3(-)?,python_targets_pypy2_0(-)?,-python_single_target_python2_6(-),-python_single_target_python2_7(-),-python_single_target_python3_3(-),-python_single_target_pypy2_0(-)] dev-python/setuptools[python_targets_python2_6(-)?,python_targets_python2_7(-)?,python_targets_python3_3(-)?,python_targets_pypy2_0(-)?,-python_single_target_python2_6(-),-python_single_target_python2_7(-),-python_single_target_python3_3(-),-python_single_target_pypy2_0(-)] python_targets_python2_6? ( >=dev-lang/python-2.6.8-r3:2.6 ) python_targets_python2_7? ( >=dev-lang/python-2.7.3-r2:2.7 ) python_targets_python3_3? ( >=dev-lang/python-3.3.2-r2:3.3 ) python_targets_pypy2_0? ( >=virtual/pypy-2.0.2:2.0 ) dev-lang/python-exec:=[python_targets_python2_6(-)?,python_targets_python2_7(-)?,python_targets_python3_3(-)?,python_targets_pypy2_0(-)?,-python_single_target_python2_6(-),-python_single_target_python2_7(-),-python_single_target_python3_3(-),-python_single_target_pypy2_0(-)]
+SLOT=0
+SRC_URI=mirror://pypi/J/Jinja2/Jinja2-2.7.1.tar.gz
+_eclasses_=distutils-r1	52a35bc5600044dfdf1a3f1fa258dc93	eutils	a108f00cccac414097bcbbbb5de01762	multibuild	c2f33b0eedd7bcfd5bc226baa8da7837	multilib	fac675dcccf94392371a6abee62d909f	multiprocessing	1512bdfe7004902b8cd2c466fc3df772	python-r1	cd956d5a4bac2209a64d0f4851cc115d	python-utils-r1	4fc11614abf37ede29a4eb8aaae8a22a	toolchain-funcs	48b38a216afb92db6314d6c3187abea3
+_md5_=522ae851ab7af739448b1f778a5888e6