Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Oct 2022 17:58:30 GMT
From:      Thierry Thomas <thierry@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 33f3c23490c3 - main - science/abinit: fix with libXC 6.0.0
Message-ID:  <202210261758.29QHwUrl083094@gitrepo.freebsd.org>

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

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

commit 33f3c23490c31d982bf5c7d9a4c381e14510f5a1
Author:     Thierry Thomas <thierry@FreeBSD.org>
AuthorDate: 2022-10-24 17:01:55 +0000
Commit:     Thierry Thomas <thierry@FreeBSD.org>
CommitDate: 2022-10-26 17:58:25 +0000

    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)
---
 science/abinit/Makefile                            |  1 +
 ...ared_common_src_33__xc__lowlevel_libxc__tools.c | 35 ++++++++++++++++++++++
 .../files/patch-shared_libpaw_src_libpaw__libxc.c  | 35 ++++++++++++++++++++++
 3 files changed, 71 insertions(+)

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)



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