git: bf6e7c03c11b - main - science/nwchem: Update 7.0.2.20211109 -> 7.0.2.20211110

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Fri, 12 Nov 2021 19:02:12 UTC
The branch main has been updated by yuri:

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

commit bf6e7c03c11b8192a26c6dbca984890604cc7c42
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2021-11-12 19:00:22 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2021-11-12 19:02:09 +0000

    science/nwchem: Update 7.0.2.20211109 -> 7.0.2.20211110
    
    Add LIBXC option to enable libxc interface. Bundled copy of libxc is used.
    Some more QA cases are fixed.
---
 science/nwchem/Makefile | 26 ++++++++++++++++++++------
 science/nwchem/distinfo | 12 +++++++-----
 2 files changed, 27 insertions(+), 11 deletions(-)

diff --git a/science/nwchem/Makefile b/science/nwchem/Makefile
index 4040115ac198..9fe8a9e0d8c9 100644
--- a/science/nwchem/Makefile
+++ b/science/nwchem/Makefile
@@ -1,12 +1,15 @@
 PORTNAME=	nwchem
 DISTVERSIONPREFIX=	v
-DISTVERSION=	7.0.2.20211109
+DISTVERSION=	7.0.2.20211110
 DISTVERSIONSUFFIX=	-release
 MASTER_SITES=	https://www.chemie.uni-bonn.de/pctc/mulliken-center/software/dft-d3/:dftd3 \
-		https://web.archive.org/web/20210527062154if_/https://www.chemie.uni-bonn.de/pctc/mulliken-center/software/dft-d3/:dft3
-DISTFILES=	dftd3.tgz:dft3
+		https://web.archive.org/web/20210527062154if_/https://www.chemie.uni-bonn.de/pctc/mulliken-center/software/dft-d3/:dft3 \
+		https://gitlab.com/libxc/libxc/-/archive/${LIBXC_VERSION}/:libxc
+DISTFILES=	dftd3.tgz:dft3 \
+		libxc-${LIBXC_VERSION}.tar.gz:libxc
 CATEGORIES=	science
 DIST_SUBDIR=	${PORTNAME}-${PORTVERSION}
+EXTRACT_ONLY=	${DISTNAME}.tar.gz
 
 MAINTAINER=	yuri@FreeBSD.org
 COMMENT=	High-performance computational chemistry software
@@ -29,7 +32,7 @@ USE_PERL5=	build
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	nwchemgit
-GH_TAGNAME=	9fcb2bdb8826fd5790eab199cc25c29ef3e534bf
+GH_TAGNAME=	7b21660b82ebd85ef659f6fba7e1e73433b0bd0a
 
 MAKEFILE=	GNUmakefile
 ARCH_64BIT=	${ARCH:C/.*64.*/64/:S/${ARCH}//}
@@ -41,11 +44,14 @@ SUB_FILES=	nwchemrc
 WRKSRC_SUBDIR=	src
 
 BINARY_ALIAS=	gcc=${CC} gfortran=gfortran${GCC_DEFAULT}
+BINARY_ALIAS+=	make=${GMAKE} # only for LIBXC
 
 PLIST_FILES=	bin/nwchem etc/nwchemrc
 
-OPTIONS_DEFINE=		PYTHON
-OPTIONS_DEFAULT=	PYTHON MPICH # the default should be the same as for the MPI option in math/scalapack and devel/ga
+LIBXC_VERSION=	5.1.7 # from src/libext/libxc/build_libxc.sh
+
+OPTIONS_DEFINE=		LIBXC PYTHON
+OPTIONS_DEFAULT=	LIBXC PYTHON MPICH # the default should be the same as for the MPI option in math/scalapack and devel/ga
 OPTIONS_RADIO=		MPI
 OPTIONS_RADIO_MPI=	NOMPI MPICH OPENMPI
 
@@ -60,6 +66,10 @@ OPENMPI_BUILD_DEPENDS=	openmpi>0:net/openmpi
 OPENMPI_RUN_DEPENDS=	openmpi>0:net/openmpi
 OPENMPI_VARS=		CONFLICTS_BUILD=mpich
 
+LIBXC_DESC=		Use libxc
+LIBXC_BUILD_DEPENDS=	cmake:devel/cmake
+LIBXC_MAKE_ENV=		USE_LIBXC=Y
+
 PYTHON_DESC=		Enable Python syntax in input files
 PYTHON_USES=		python
 PYTHON_MAKE_ENV=	PYTHONVERSION=${PYTHON_VER} NWCHEM_MODULES="all python"
@@ -69,6 +79,10 @@ post-extract:
 	# symlink the downloaded dftd3.tgz
 	@${LN} -s ${DISTDIR}/${DIST_SUBDIR}/dftd3.tgz ${WRKSRC}/nwpw/nwpwlib/nwpwxc/
 
+post-extract-LIBXC-on:
+	# symlink the downloaded libxc
+	@${LN} -s ${DISTDIR}/${DIST_SUBDIR}/libxc-${LIBXC_VERSION}.tar.gz ${WRKSRC}/libext/libxc/
+
 post-patch:
 	@${REINPLACE_CMD} 's|nwchrc="/etc/nwchemrc"|nwchrc="${PREFIX}/etc/nwchemrc"|' ${WRKSRC}/util/util_nwchemrc.F
 
diff --git a/science/nwchem/distinfo b/science/nwchem/distinfo
index 92aa80728aa1..14802ae65193 100644
--- a/science/nwchem/distinfo
+++ b/science/nwchem/distinfo
@@ -1,5 +1,7 @@
-TIMESTAMP = 1636484115
-SHA256 (nwchem-7.0.2.20211109/dftd3.tgz) = d97cf9758f61aa81fd85425448fbf4a6e8ce07c12e9236739831a3af32880f59
-SIZE (nwchem-7.0.2.20211109/dftd3.tgz) = 555804
-SHA256 (nwchem-7.0.2.20211109/nwchemgit-nwchem-v7.0.2.20211109-release-9fcb2bdb8826fd5790eab199cc25c29ef3e534bf_GH0.tar.gz) = fae73d7240c55c3c61f9cbff60fb997bf1330f1b6da86c9ceb644bc42457de42
-SIZE (nwchem-7.0.2.20211109/nwchemgit-nwchem-v7.0.2.20211109-release-9fcb2bdb8826fd5790eab199cc25c29ef3e534bf_GH0.tar.gz) = 198917659
+TIMESTAMP = 1636652585
+SHA256 (nwchem-7.0.2.20211110/dftd3.tgz) = d97cf9758f61aa81fd85425448fbf4a6e8ce07c12e9236739831a3af32880f59
+SIZE (nwchem-7.0.2.20211110/dftd3.tgz) = 555804
+SHA256 (nwchem-7.0.2.20211110/libxc-5.1.7.tar.gz) = 2d82b7bcfd8749490f6bb0906acf99fbf03050696dd2213da4b7a7600fc14328
+SIZE (nwchem-7.0.2.20211110/libxc-5.1.7.tar.gz) = 46172191
+SHA256 (nwchem-7.0.2.20211110/nwchemgit-nwchem-v7.0.2.20211110-release-7b21660b82ebd85ef659f6fba7e1e73433b0bd0a_GH0.tar.gz) = d97ceb465553dc059cfa2cf003082783070aaa3b68e298dfd259205eeea98038
+SIZE (nwchem-7.0.2.20211110/nwchemgit-nwchem-v7.0.2.20211110-release-7b21660b82ebd85ef659f6fba7e1e73433b0bd0a_GH0.tar.gz) = 198914856