aboutsummaryrefslogtreecommitdiff
path: root/science/abinit
diff options
context:
space:
mode:
authorThierry Thomas <thierry@FreeBSD.org>2022-10-24 17:01:55 +0000
committerThierry Thomas <thierry@FreeBSD.org>2022-10-26 17:58:25 +0000
commit33f3c23490c31d982bf5c7d9a4c381e14510f5a1 (patch)
treee5d89ac9d5b44428f43bd64eb6f765f0cc951d64 /science/abinit
parent03d71457daf4199968677541f84614f3a4adedd3 (diff)
downloadports-33f3c23490c31d982bf5c7d9a4c381e14510f5a1.tar.gz
ports-33f3c23490c31d982bf5c7d9a4c381e14510f5a1.zip
science/abinit: fix with libXC 6.0.0
See <https://github.com/abinit/abinit/issues/55#issuecomment-1288757862>. Note: this is fixed in soon-to-come ABINITv9.8. This patch is just in case libXC is committed before. PR: 267357 Approved by: yuri (maintainer)
Diffstat (limited to 'science/abinit')
-rw-r--r--science/abinit/Makefile1
-rw-r--r--science/abinit/files/patch-shared_common_src_33__xc__lowlevel_libxc__tools.c35
-rw-r--r--science/abinit/files/patch-shared_libpaw_src_libpaw__libxc.c35
3 files changed, 71 insertions, 0 deletions
diff --git a/science/abinit/Makefile b/science/abinit/Makefile
index ee08d0408c99..451d43bd23ae 100644
--- a/science/abinit/Makefile
+++ b/science/abinit/Makefile
@@ -1,5 +1,6 @@
PORTNAME= abinit
DISTVERSION= 9.6.2
+PORTREVISION= 1
CATEGORIES= science
MAINTAINER= yuri@FreeBSD.org
diff --git a/science/abinit/files/patch-shared_common_src_33__xc__lowlevel_libxc__tools.c b/science/abinit/files/patch-shared_common_src_33__xc__lowlevel_libxc__tools.c
new file mode 100644
index 000000000000..a8a5148e399e
--- /dev/null
+++ b/science/abinit/files/patch-shared_common_src_33__xc__lowlevel_libxc__tools.c
@@ -0,0 +1,35 @@
+--- shared/common/src/33_xc_lowlevel/libxc_tools.c.orig 2021-11-09 07:25:16 UTC
++++ shared/common/src/33_xc_lowlevel/libxc_tools.c
+@@ -70,8 +70,8 @@ void xc_get_family_constants(int *xc_cst_family_unknow
+ *xc_cst_family_mgga = XC_FAMILY_MGGA;
+ *xc_cst_family_lca = XC_FAMILY_LCA;
+ *xc_cst_family_oep = XC_FAMILY_OEP;
+-#if ( XC_MAJOR_VERSION > 5 )
+-/* ==== libXC v6.0 and later ==== */
++#if ( XC_MAJOR_VERSION > 6 )
++/* ==== After libXC v6.0 ==== */
+ *xc_cst_family_hyb_gga = -11;
+ *xc_cst_family_hyb_mgga = -11;
+ #else
+@@ -137,8 +137,8 @@ void xc_get_hybrid_constants(int *xc_cst_hyb_none,
+ int *xc_cst_hyb_double_hybrid,
+ int *xc_cst_hyb_mixture)
+ {
+-#if ( XC_MAJOR_VERSION > 5 )
+-/* ==== libXC v6.0 and later ==== */
++#if ( XC_MAJOR_VERSION > 6 )
++/* ==== After libXC v6.0 ==== */
+ *xc_cst_hyb_none = XC_HYB_NONE;
+ *xc_cst_hyb_fock = XC_HYB_FOCK;
+ *xc_cst_hyb_pt2 = XC_HYB_PT2;
+@@ -348,8 +348,8 @@ void xc_func_set_density_threshold(XC(func_type) *xc_f
+ * ===============================================================
+ */
+ int xc_func_is_hybrid_from_id(int func_id)
+-#if ( XC_MAJOR_VERSION > 5 )
+-/* ==== libXC v6.0 and later ==== */
++#if ( XC_MAJOR_VERSION > 6 )
++/* ==== After libXC v6.0 ==== */
+ {xc_func_type func; int result=0;
+ if(xc_func_init(&func,func_id,XC_UNPOLARIZED)==0)
+ {if (func.hyb_number_terms>0)
diff --git a/science/abinit/files/patch-shared_libpaw_src_libpaw__libxc.c b/science/abinit/files/patch-shared_libpaw_src_libpaw__libxc.c
new file mode 100644
index 000000000000..f92ef919d312
--- /dev/null
+++ b/science/abinit/files/patch-shared_libpaw_src_libpaw__libxc.c
@@ -0,0 +1,35 @@
+--- shared/libpaw/src/libpaw_libxc.c.orig 2021-11-09 07:25:16 UTC
++++ shared/libpaw/src/libpaw_libxc.c
+@@ -67,8 +67,8 @@ void libpaw_xc_get_family_constants(int *xc_cst_family
+ *xc_cst_family_mgga = XC_FAMILY_MGGA;
+ *xc_cst_family_lca = XC_FAMILY_LCA;
+ *xc_cst_family_oep = XC_FAMILY_OEP;
+-#if ( XC_MAJOR_VERSION > 5 )
+-/* ==== libXC v6.0 and later ==== */
++#if ( XC_MAJOR_VERSION > 6 )
++/* ==== After libXC v6.0 ==== */
+ *xc_cst_family_hyb_gga = -11;
+ *xc_cst_family_hyb_mgga = -11;
+ #else
+@@ -134,8 +134,8 @@ void libpaw_xc_get_hybrid_constants(int *xc_cst_hyb_no
+ int *xc_cst_hyb_double_hybrid,
+ int *xc_cst_hyb_mixture)
+ {
+-#if ( XC_MAJOR_VERSION > 5 )
+-/* ==== libXC v6.0 and later ==== */
++#if ( XC_MAJOR_VERSION > 6 )
++/* ==== After libXC v6.0 ==== */
+ *xc_cst_hyb_none = XC_HYB_NONE;
+ *xc_cst_hyb_fock = XC_HYB_FOCK;
+ *xc_cst_hyb_pt2 = XC_HYB_PT2;
+@@ -345,8 +345,8 @@ void libpaw_xc_func_set_density_threshold(XC(func_type
+ * ===============================================================
+ */
+ int libpaw_xc_func_is_hybrid_from_id(int func_id)
+-#if ( XC_MAJOR_VERSION > 5 )
+-/* ==== libXC v6.0 and later ==== */
++#if ( XC_MAJOR_VERSION > 6 )
++/* ==== After libXC v6.0 ==== */
+ {xc_func_type func; int result=0;
+ if(xc_func_init(&func,func_id,XC_UNPOLARIZED)==0)
+ {if (func.hyb_number_terms>0)