Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Aug 2024 09:46:15 GMT
From:      Nicola Vitale <nivit@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 70fe5a1c9d64 - main - devel/py-Jinja2: Update to 3.1.4
Message-ID:  <202408200946.47K9kFEN049474@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by nivit:

URL: https://cgit.FreeBSD.org/ports/commit/?id=70fe5a1c9d646e1f0157a04377ddb77f27b1a52a

commit 70fe5a1c9d646e1f0157a04377ddb77f27b1a52a
Author:     Nicola Vitale <nivit@FreeBSD.org>
AuthorDate: 2024-08-20 09:40:50 +0000
Commit:     Nicola Vitale <nivit@FreeBSD.org>
CommitDate: 2024-08-20 09:40:50 +0000

    devel/py-Jinja2: Update to 3.1.4
    
    - This is a security release, which fixes security issues and bugs but
      does not otherwise change behavior and should not result in breaking
      changes. [1]
    - Convert from distutils to pep517
    - Pet portclippy(1)
    
    Reference:      https://github.com/advisories/GHSA-h75v-3vvj-5mfj [1]
    
    Security:       CVE-2024-34064
---
 devel/py-Jinja2/Makefile | 44 ++++++++++++++++++++++++++++++++++++--------
 devel/py-Jinja2/distinfo |  6 +++---
 2 files changed, 39 insertions(+), 11 deletions(-)

diff --git a/devel/py-Jinja2/Makefile b/devel/py-Jinja2/Makefile
index f82665a8e0b7..0794e57d2d3c 100644
--- a/devel/py-Jinja2/Makefile
+++ b/devel/py-Jinja2/Makefile
@@ -1,34 +1,40 @@
 PORTNAME=	Jinja2
-DISTVERSION=	3.1.3
+DISTVERSION=	3.1.4
 CATEGORIES=	devel python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 PKGNAMESUFFIX?=
+DISTNAME=	${PYWHEEL_NAME}-${DISTVERSION}
 
 MAINTAINER=	nivit@FreeBSD.org
 COMMENT=	Fast and easy to use stand-alone template engine
 WWW=		https://jinja.palletsprojects.com/en/3.1.x/
 
 LICENSE=	BSD3CLAUSE
-LICENSE_FILE=	${WRKSRC}/LICENSE.rst
+LICENSE_FILE=	${WRKSRC}/LICENSE.txt
 
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}flit-core>=3.9.0:devel/py-flit-core@${PY_FLAVOR}
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}markupsafe>=2.0.0:textproc/py-markupsafe@${PY_FLAVOR}
 TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}markupsafe>=2.0.0:textproc/py-markupsafe@${PY_FLAVOR}
 
-NO_ARCH=	yes
 .if empty(PKGNAMESUFFIX)
 USES=		cpe python
-USE_PYTHON=	autoplist distutils pytest # 23 tests fail, see https://github.com/pallets/jinja/issues/1757
-
 CPE_VENDOR=	pocoo
+USE_PYTHON=	autoplist pep517 pytest # 23 tests fail, see https://github.com/pallets/jinja/issues/1757
+PEP517_INSTALL_CMD=	${PYTHON_CMD} -m installer --destdir ${STAGEDIR} \
+			--prefix ${PREFIX} \
+			${BUILD_WRKSRC}/dist/${PYWHEEL_NAME}-${DISTVERSION}*.whl
 .endif
 .if ${PKGNAMESUFFIX} == -doc
 USES=		gmake python
 USE_PYTHON=	flavors
 .endif
+PYWHEEL_NAME=	${PORTNAME:tl:C|[-_]+|_|g}
 
 EXAMPLESDIR=	${PREFIX}/share/examples/${PKGNAMEPREFIX}${PORTNAME}
 
+NO_ARCH=	yes
+
 OPTIONS_DEFINE?=	BABEL EXAMPLES
 OPTIONS_DEFAULT?=	BABEL
 BABEL_DESC=		Enable Babel extension
@@ -37,6 +43,28 @@ BABEL_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}Babel>=2.7:devel/py-babel@${PY_FLAVOR}
 
 .include <bsd.port.pre.mk>
 
+.if empty(PKGNAMESUFFIX)
+do-install:
+	@${MKDIR} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
+	@cd ${INSTALL_WRKSRC} && ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${PEP517_INSTALL_CMD}
+	@${PYTHON_CMD} -B ${PORTSDIR}/Mk/Scripts/strip_RECORD.py \
+		${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/${PYWHEEL_NAME}-${DISTVERSION}*.dist-info/RECORD >> ${_PYTHONPKGLIST}
+	@${REINPLACE_CMD} \
+		-e '/\.pyc$$/d' \
+		-e 's|^|${PYTHONPREFIX_SITELIBDIR}/|' \
+		-e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../etc/|etc/|' \
+		-e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../bin/|bin/|' \
+		-e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../include/|include/|' \
+		-e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../lib/|lib/|' \
+		-e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../libdata/|libdata/|' \
+		-e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../libexec/|libexec/|' \
+		-e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../man/|man/|' \
+		-e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../sbin/|sbin/|' \
+		-e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../share/|share/|' \
+			${_PYTHONPKGLIST}
+	@cd ${STAGEDIR}${PREFIX} && ${FIND} lib -name '*.pyc' >> ${_PYTHONPKGLIST}
+.endif
+
 .if ${PKGNAMESUFFIX} == "-doc"
 BUILD_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}importlib-metadata>=0.23:devel/py-importlib-metadata@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}Pallets-Sphinx-Themes>=2.0.2:textproc/py-pallets-sphinx-themes@${PY_FLAVOR} \
@@ -59,12 +87,12 @@ do-install:
 .if ${PORT_OPTIONS:MEXAMPLES}
 PORTEXAMPLES=	*
 post-build:
-	${PYTHON_CMD} -m compileall ${WRKSRC}/examples ; \
-	${PYTHON_CMD} -O -m compileall ${WRKSRC}/examples
+	${PYTHON_CMD} -m compileall ${WRKSRC}/docs/examples ; \
+	${PYTHON_CMD} -O -m compileall ${WRKSRC}/docs/examples
 
 post-install:
 	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
-	(cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR})
+	(cd ${WRKSRC}/docs/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR})
 .endif
 
 check regression-test: build
diff --git a/devel/py-Jinja2/distinfo b/devel/py-Jinja2/distinfo
index 89c26456b217..e3118028209e 100644
--- a/devel/py-Jinja2/distinfo
+++ b/devel/py-Jinja2/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1704965223
-SHA256 (Jinja2-3.1.3.tar.gz) = ac8bd6544d4bb2c9792bf3a159e80bba8fda7f07e81bc3aed565432d5925ba90
-SIZE (Jinja2-3.1.3.tar.gz) = 268261
+TIMESTAMP = 1716822740
+SHA256 (jinja2-3.1.4.tar.gz) = 4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369
+SIZE (jinja2-3.1.4.tar.gz) = 240245



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