git: b31f2fdb7c31 - main - science/py-gpaw: Update 21.6.0 -> 22.1.0

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Thu, 13 Jan 2022 10:25:43 UTC
The branch main has been updated by yuri:

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

commit b31f2fdb7c3160909555a13d39c47154e31efb98
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-01-13 10:25:05 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-01-13 10:25:40 +0000

    science/py-gpaw: Update 21.6.0 -> 22.1.0
---
 science/py-gpaw/Makefile             | 10 ++++++++--
 science/py-gpaw/distinfo             |  6 +++---
 science/py-gpaw/files/patch-setup.py | 11 +++++++++++
 3 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/science/py-gpaw/Makefile b/science/py-gpaw/Makefile
index e09977d865b7..77235ee12e84 100644
--- a/science/py-gpaw/Makefile
+++ b/science/py-gpaw/Makefile
@@ -1,6 +1,5 @@
 PORTNAME=	gpaw
-DISTVERSION=	21.6.0
-PORTREVISION=	1
+DISTVERSION=	22.1.0
 CATEGORIES=	science python
 MASTER_SITES=	CHEESESHOP
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -24,6 +23,7 @@ RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}ase>0:science/py-ase@${PY_FLAVOR} \
 
 USES=		gettext-runtime localbase python:3.7+ shebangfix
 USE_PYTHON=	distutils concurrent autoplist
+
 SHEBANG_FILES=	tools/*
 
 LDFLAGS=	-lmpi # otherwise: ImportError: /usr/local/lib/python3.8/site-packages/_gpaw.cpython-38.so: Undefined symbol "MPI_Comm_rank"
@@ -34,4 +34,10 @@ post-patch:
 post-install:
 	@${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/_gpaw*.so
 
+do-test: install
+	@${ECHO} "== Performing a test calculation on one CPU =="
+	@gpaw test
+	@${ECHO} "== Performing a test calculation on 8 CPUs =="
+	@gpaw -P 8 test
+
 .include <bsd.port.mk>
diff --git a/science/py-gpaw/distinfo b/science/py-gpaw/distinfo
index 3686570ac626..f2e375e3ef4c 100644
--- a/science/py-gpaw/distinfo
+++ b/science/py-gpaw/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1628472882
-SHA256 (gpaw-21.6.0.tar.gz) = 5bb805bf514a7b04e3fdfce6f7864d150032badc5cd2805c57513af982d7a9cc
-SIZE (gpaw-21.6.0.tar.gz) = 1534942
+TIMESTAMP = 1642067411
+SHA256 (gpaw-22.1.0.tar.gz) = 2d2509e9e4b23205f5576ddfd1b0e9d9ac8cea1cf80ae1216af29513bd3cc42a
+SIZE (gpaw-22.1.0.tar.gz) = 1625694
diff --git a/science/py-gpaw/files/patch-setup.py b/science/py-gpaw/files/patch-setup.py
new file mode 100644
index 000000000000..09638fa49406
--- /dev/null
+++ b/science/py-gpaw/files/patch-setup.py
@@ -0,0 +1,11 @@
+--- setup.py.orig	2022-01-12 10:11:02 UTC
++++ setup.py
+@@ -113,7 +113,7 @@ if compiler is not None:
+         from sysconfig import get_config_vars
+ 
+     # If CC is set then the following hack will not work
+-    assert not os.environ.get('CC'), 'Please unset CC'
++    #assert not os.environ.get('CC'), 'Please unset CC'
+ 
+     vars = get_config_vars()
+     for key in ['CC', 'LDSHARED']: