Skip to content
Snippets Groups Projects
Commit 4b45db34 authored by Yuri Victorovich's avatar Yuri Victorovich
Browse files

science/psi4: Update 1.6.1-20221122 -> 1.7

parent 6a21f85f
No related branches found
No related tags found
No related merge requests found
PORTNAME= psi4
DISTVERSION= 1.6.1-20221122
PORTREVISION= 1
DISTVERSIONPREFIX= v
DISTVERSION= 1.7
CATEGORIES= science # quantum-chemistry
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
PATCHFILES= f8f1cd0ca7cd13fa25864f9a20666e43d160dbe6.patch:-p1 # include <cerrno> where required for the sake of FreeBSD, see https://github.com/psi4/psi4/pull/2811
MAINTAINER= yuri@FreeBSD.org
COMMENT= Open-source suite of ab initio quantum chemistry programs
WWW= https://psicode.org/
......@@ -15,6 +12,7 @@ LICENSE= LGPL3
LICENSE_FILE= ${WRKSRC}/COPYING
PY_DEPENDS= ${PYTHON_PKGNAMEPREFIX}gau2grid>0:math/py-gau2grid@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}optking>0:science/py-optking@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}qcelemental>0:science/py-qcelemental@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}qcengine>0:science/py-qcengine@${PY_FLAVOR}
BUILD_DEPENDS= boost-libs>0:devel/boost-libs \
......@@ -28,9 +26,7 @@ RUN_DEPENDS= ${PY_DEPENDS} \
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR}
USES= blaslapack:openblas cmake compiler:c++17-lang eigen:3 fortran localbase:ldflags python:3.8+
USE_GITHUB= yes
GH_TAGNAME= 0889d6d34
CMAKE_ARGS= -DLibxc_DIR=${LOCALBASE} \
-DFREEBSD_PYTHON_VER=${PYTHON_VER} \
......@@ -47,13 +43,14 @@ TEST_ENV= ${MAKE_ENV} \
BINARY_ALIAS= python=${PYTHON_CMD} # only for tests
OPTIONS_DEFINE= NATIVE
NATIVE_CMAKE_BOOL= ENABLE_XHOST
post-patch:
# correct the default data dir
@${REINPLACE_CMD} \
-E 's|os.path.sep.join\(\[os.path.abspath\(os.path.dirname\(__file__\)\), "share", "psi4"\]\)|"${DATADIR}"|' \
${WRKSRC}/psi4/run_psi4.py
@${REINPLACE_CMD} \
-E 's|from pathlib import Path|&; os.environ["PSIDATADIR"] = "${DATADIR}"|' \
-E 's|%%DATADIR%%|${DATADIR}|' \
${WRKSRC}/psi4/run_psi4.py
do-install: # project fails to install itself into a stage directory due to a convoluted cmake code structure (DESTDIR isn't handled correctly)
......@@ -73,16 +70,29 @@ do-install: # project fails to install itself into a stage directory due to a co
@${REINPLACE_CMD} -i '' -e "s|__version_long = 'undefined+11'|__version_long = '${DISTVERSION}'|" \
${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/psi4/metadata.py
do-test:
# psi4 sometimes fails to print its version: https://github.com/psi4/psi4/issues/2831
do-test: # tests are generally broken, but virtually all individual tests pass separately
# based on https://psicode.org/psi4manual/master/build_planning.html#faq-minutetests
#@cd ${WRKSRC}/tests/cc36 && ${SETENV} ${TEST_ENV} pytest # pytest-based tests fail, see https://github.com/psi4/psi4/issues/2802
# run samples as tests, this also fails down the line: https://github.com/psi4/psi4/issues/2803
@cd ${WRKSRC} && ( \
for f in $$(${FIND} samples/cc24 -name test.in | ${XARGS} dirname); do \
echo "===> runing test in $$f"; \
(cd $$f && ${SETENV} ${TEST_ENV} ${STAGEDIR}${PREFIX}/bin/psi4 test.in) \
done \
)
#@cd ${WRKSRC}/tests && ${SETENV} ${TEST_ENV} pytest # pytest-based tests fail, see https://github.com/psi4/psi4/issues/2802 https://github.com/psi4/psi4/issues/2830
# samples as tests, this also fails down the line: https://github.com/psi4/psi4/issues/2803
#@cd ${WRKSRC} && ( \
# for f in $$(${FIND} samples/cc24 -name test.in | ${XARGS} dirname); do \
# echo "===> runing test in $$f"; \
# (cd $$f && ${SETENV} ${TEST_ENV} ${STAGEDIR}${PREFIX}/bin/psi4 test.in) \
# done \
#)
# api tests
@cd ${WRKSRC}/tests/pytests && ${SETENV} ${TEST_ENV} pytest
# cli tests
#@cd ${WRKSRC}/tests && ( \
# for f in $$(${FIND} . -name input.dat | ${XARGS} dirname); do \
# echo "===> runing input.dat $$f"; \
# (cd $$f && ${SETENV} ${TEST_ENV} ${STAGEDIR}${PREFIX}/bin/psi4 input.dat) \
# done \
#)
.include <bsd.port.mk>
TIMESTAMP = 1670410303
SHA256 (psi4-psi4-1.6.1-20221122-0889d6d34_GH0.tar.gz) = 2ae56a29a2e6a9677ae6bcf0f302a22086427effee072c8fa58d0f12ee55cdef
SIZE (psi4-psi4-1.6.1-20221122-0889d6d34_GH0.tar.gz) = 44809685
SHA256 (f8f1cd0ca7cd13fa25864f9a20666e43d160dbe6.patch) = 86049226ae985cc526010bf175fd69758ccbcecd02b853ef284b5957e1923d0a
SIZE (f8f1cd0ca7cd13fa25864f9a20666e43d160dbe6.patch) = 1538
TIMESTAMP = 1670538130
SHA256 (psi4-psi4-v1.7_GH0.tar.gz) = 85a2772a148d57423a909fd91f3f9b068ae393b161510e78e7a824fbe3997366
SIZE (psi4-psi4-v1.7_GH0.tar.gz) = 44858533
--- external/upstream/libxc/CMakeLists.txt.orig 2022-11-24 03:25:13 UTC
--- external/upstream/libxc/CMakeLists.txt.orig 2022-12-08 22:28:13 UTC
+++ external/upstream/libxc/CMakeLists.txt
@@ -1,4 +1,4 @@
-find_package(Libxc 5.1.2 CONFIG QUIET COMPONENTS C)
+find_package(Libxc CONFIG REQUIRED COMPONENTS C)
if(${Libxc_FOUND})
get_property(_loc TARGET Libxc::xc PROPERTY LOCATION)
-find_package(Libxc 6.0.0 CONFIG QUIET COMPONENTS C)
+find_package(Libxc REQUIRED CONFIG QUIET COMPONENTS C)
if(NOT ${Libxc_FOUND})
# LibxcConfig.cmake encodes searching only within major version, so need two calls to allow v5 or v6
find_package(Libxc 5.1.2 CONFIG QUIET COMPONENTS C)
--- psi4/CMakeLists.txt.orig 2022-11-24 05:29:32 UTC
--- psi4/CMakeLists.txt.orig 2022-12-06 22:09:19 UTC
+++ psi4/CMakeLists.txt
@@ -207,7 +207,7 @@ else()
message(STATUS "Disabled BrianQC")
endif()
-find_package(Libxc 5.1.2 CONFIG REQUIRED COMPONENTS C)
+find_package(Libxc CONFIG REQUIRED COMPONENTS C)
get_property(_loc TARGET Libxc::xc PROPERTY LOCATION)
list(APPEND _addons ${_loc})
message(STATUS "${Cyan}Using Libxc${ColourReset}: ${_loc} (version ${Libxc_VERSION})")
-find_package(Libxc 6.0.0 CONFIG COMPONENTS C)
+find_package(Libxc REQUIRED CONFIG COMPONENTS C)
if(NOT ${Libxc_FOUND})
find_package(Libxc 5.1.2 CONFIG REQUIRED COMPONENTS C)
endif()
--- psi4/run_psi4.py.orig 2022-12-06 22:09:19 UTC
+++ psi4/run_psi4.py
@@ -37,6 +37,8 @@ import sys
import warnings
from pathlib import Path
+os.environ["PSIDATADIR"] = "%%DATADIR%%"
+
# yapf: disable
parser = argparse.ArgumentParser(description="Psi4: Open-Source Quantum Chemistry", formatter_class=argparse.RawTextHelpFormatter)
parser.add_argument("-i", "--input", default="input.dat",
@@ -126,7 +128,7 @@ if args["inplace"]:
lib_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
if ("PSIDATADIR" not in os.environ.keys()) and (not args["psidatadir"]):
- data_dir = os.path.sep.join([os.path.abspath(os.path.dirname(__file__)), "share", "psi4"])
+ data_dir = "%%DATADIR%%"
os.environ["PSIDATADIR"] = data_dir
elif "CMAKE_INSTALL_LIBDIR" in lib_dir:
......@@ -67,6 +67,7 @@ include/psi4/libmints/multipolepotential.h
include/psi4/libmints/multipoles.h
include/psi4/libmints/multipolesymmetry.h
include/psi4/libmints/nabla.h
include/psi4/libmints/numinthelper.h
include/psi4/libmints/oeprop.h
include/psi4/libmints/onebody.h
include/psi4/libmints/orbitalspace.h
......@@ -223,6 +224,7 @@ include/psi4/times.h
%%PYTHON_SITELIBDIR%%/psi4/driver/procrouting/scf_proc/scf_iterator.py
%%PYTHON_SITELIBDIR%%/psi4/driver/procrouting/scf_proc/subclass_methods.py
%%PYTHON_SITELIBDIR%%/psi4/driver/procrouting/solvent/__init__.py
%%PYTHON_SITELIBDIR%%/psi4/driver/procrouting/solvent/ddx.py
%%PYTHON_SITELIBDIR%%/psi4/driver/procrouting/solvent/efp.py
%%PYTHON_SITELIBDIR%%/psi4/driver/procrouting/solvent/pol_embed.py
%%PYTHON_SITELIBDIR%%/psi4/driver/procrouting/wrappers_cfour.py
......@@ -622,16 +624,24 @@ include/psi4/times.h
%%PYTHON_SITELIBDIR%%/psi4/tests/dfccdl1/test_input.py
%%PYTHON_SITELIBDIR%%/psi4/tests/dfccsd-grad1/input.dat
%%PYTHON_SITELIBDIR%%/psi4/tests/dfccsd-grad1/test_input.py
%%PYTHON_SITELIBDIR%%/psi4/tests/dfccsd-grad2/input.dat
%%PYTHON_SITELIBDIR%%/psi4/tests/dfccsd-grad2/test_input.py
%%PYTHON_SITELIBDIR%%/psi4/tests/dfccsd-t-grad1/input.dat
%%PYTHON_SITELIBDIR%%/psi4/tests/dfccsd-t-grad1/test_input.py
%%PYTHON_SITELIBDIR%%/psi4/tests/dfccsd-t-grad2/input.dat
%%PYTHON_SITELIBDIR%%/psi4/tests/dfccsd-t-grad2/test_input.py
%%PYTHON_SITELIBDIR%%/psi4/tests/dfccsd1/input.dat
%%PYTHON_SITELIBDIR%%/psi4/tests/dfccsd1/test_input.py
%%PYTHON_SITELIBDIR%%/psi4/tests/dfccsdat1/input.dat
%%PYTHON_SITELIBDIR%%/psi4/tests/dfccsdat1/test_input.py
%%PYTHON_SITELIBDIR%%/psi4/tests/dfccsdat2/input.dat
%%PYTHON_SITELIBDIR%%/psi4/tests/dfccsdat2/test_input.py
%%PYTHON_SITELIBDIR%%/psi4/tests/dfccsdl1/input.dat
%%PYTHON_SITELIBDIR%%/psi4/tests/dfccsdl1/test_input.py
%%PYTHON_SITELIBDIR%%/psi4/tests/dfccsdt1/input.dat
%%PYTHON_SITELIBDIR%%/psi4/tests/dfccsdt1/test_input.py
%%PYTHON_SITELIBDIR%%/psi4/tests/dfccsdt2/input.dat
%%PYTHON_SITELIBDIR%%/psi4/tests/dfccsdt2/test_input.py
%%PYTHON_SITELIBDIR%%/psi4/tests/dfep2-1/input.dat
%%PYTHON_SITELIBDIR%%/psi4/tests/dfep2-1/test_input.py
%%PYTHON_SITELIBDIR%%/psi4/tests/dfep2-2/input.dat
......@@ -1157,6 +1167,8 @@ include/psi4/times.h
%%PYTHON_SITELIBDIR%%/psi4/tests/opt13/test_input.py
%%PYTHON_SITELIBDIR%%/psi4/tests/opt14/input.dat
%%PYTHON_SITELIBDIR%%/psi4/tests/opt14/test_input.py
%%PYTHON_SITELIBDIR%%/psi4/tests/opt15/input.dat
%%PYTHON_SITELIBDIR%%/psi4/tests/opt15/test_input.py
%%PYTHON_SITELIBDIR%%/psi4/tests/opt2-fd/input.dat
%%PYTHON_SITELIBDIR%%/psi4/tests/opt2-fd/test_input.py
%%PYTHON_SITELIBDIR%%/psi4/tests/opt2/input.dat
......@@ -1484,6 +1496,7 @@ include/psi4/times.h
%%PYTHON_SITELIBDIR%%/psi4/tests/test_ccresponse.py
%%PYTHON_SITELIBDIR%%/psi4/tests/test_composite.py
%%PYTHON_SITELIBDIR%%/psi4/tests/test_cppe.py
%%PYTHON_SITELIBDIR%%/psi4/tests/test_ddx.py
%%PYTHON_SITELIBDIR%%/psi4/tests/test_dertype.py
%%PYTHON_SITELIBDIR%%/psi4/tests/test_detci_opdm.py
%%PYTHON_SITELIBDIR%%/psi4/tests/test_dfjcosk.py
......@@ -1534,6 +1547,7 @@ include/psi4/times.h
%%PYTHON_SITELIBDIR%%/psi4/tests/test_np_views.py
%%PYTHON_SITELIBDIR%%/psi4/tests/test_openfermion.py
%%PYTHON_SITELIBDIR%%/psi4/tests/test_option.py
%%PYTHON_SITELIBDIR%%/psi4/tests/test_optking.py
%%PYTHON_SITELIBDIR%%/psi4/tests/test_psi4.py
%%PYTHON_SITELIBDIR%%/psi4/tests/test_psi4_qcschema.py
%%PYTHON_SITELIBDIR%%/psi4/tests/test_psi4_qcschema/jatin1.ref
......@@ -1546,6 +1560,7 @@ include/psi4/times.h
%%PYTHON_SITELIBDIR%%/psi4/tests/test_psi4_qcschema/jatin8.ref
%%PYTHON_SITELIBDIR%%/psi4/tests/test_pyside_cubegen.py
%%PYTHON_SITELIBDIR%%/psi4/tests/test_qcel_molparse_to_string.py
%%PYTHON_SITELIBDIR%%/psi4/tests/test_qcfractal.py
%%PYTHON_SITELIBDIR%%/psi4/tests/test_qcng_dftd3_mp2d.py
%%PYTHON_SITELIBDIR%%/psi4/tests/test_qcschema.py
%%PYTHON_SITELIBDIR%%/psi4/tests/test_qcvars.py
......@@ -5092,16 +5107,24 @@ share/cmake/psi4/xhost.cmake
%%DATADIR%%/samples/dfccdl1/test.in
%%DATADIR%%/samples/dfccsd-grad1/input.dat
%%DATADIR%%/samples/dfccsd-grad1/test.in
%%DATADIR%%/samples/dfccsd-grad2/input.dat
%%DATADIR%%/samples/dfccsd-grad2/test.in
%%DATADIR%%/samples/dfccsd-t-grad1/input.dat
%%DATADIR%%/samples/dfccsd-t-grad1/test.in
%%DATADIR%%/samples/dfccsd-t-grad2/input.dat
%%DATADIR%%/samples/dfccsd-t-grad2/test.in
%%DATADIR%%/samples/dfccsd1/input.dat
%%DATADIR%%/samples/dfccsd1/test.in
%%DATADIR%%/samples/dfccsdat1/input.dat
%%DATADIR%%/samples/dfccsdat1/test.in
%%DATADIR%%/samples/dfccsdat2/input.dat
%%DATADIR%%/samples/dfccsdat2/test.in
%%DATADIR%%/samples/dfccsdl1/input.dat
%%DATADIR%%/samples/dfccsdl1/test.in
%%DATADIR%%/samples/dfccsdt1/input.dat
%%DATADIR%%/samples/dfccsdt1/test.in
%%DATADIR%%/samples/dfccsdt2/input.dat
%%DATADIR%%/samples/dfccsdt2/test.in
%%DATADIR%%/samples/dfep2-1/input.dat
%%DATADIR%%/samples/dfep2-1/test.in
%%DATADIR%%/samples/dfep2-2/input.dat
......@@ -5586,6 +5609,8 @@ share/cmake/psi4/xhost.cmake
%%DATADIR%%/samples/opt13/test.in
%%DATADIR%%/samples/opt14/input.dat
%%DATADIR%%/samples/opt14/test.in
%%DATADIR%%/samples/opt15/input.dat
%%DATADIR%%/samples/opt15/test.in
%%DATADIR%%/samples/opt2-fd/input.dat
%%DATADIR%%/samples/opt2-fd/test.in
%%DATADIR%%/samples/opt2/input.dat
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment