Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Jan 2021 00:42:00 +0000 (UTC)
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r559900 - in head/science/abinit: . files
Message-ID:  <202101020042.1020g0jj047329@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yuri
Date: Sat Jan  2 00:42:00 2021
New Revision: 559900
URL: https://svnweb.freebsd.org/changeset/ports/559900

Log:
  science/abinit: Update 8.10.3 -> 9.2.2
  
  PR:		252221
  Submitted by:	thierry

Added:
  head/science/abinit/files/patch-config_m4_sd__levmar.m4   (contents, props changed)
  head/science/abinit/files/patch-config_scripts_makemake   (contents, props changed)
  head/science/abinit/files/patch-shared__common__src__02_clib__md5.c   (contents, props changed)
  head/science/abinit/files/patch-shared_common_src_02__clib_calling__levmar.c   (contents, props changed)
Deleted:
  head/science/abinit/files/patch-Makefile.in
  head/science/abinit/files/patch-src_02__clib_md5.c
Modified:
  head/science/abinit/Makefile
  head/science/abinit/distinfo
  head/science/abinit/pkg-plist

Modified: head/science/abinit/Makefile
==============================================================================
--- head/science/abinit/Makefile	Sat Jan  2 00:39:14 2021	(r559899)
+++ head/science/abinit/Makefile	Sat Jan  2 00:42:00 2021	(r559900)
@@ -2,10 +2,8 @@
 # $FreeBSD$
 
 PORTNAME=	abinit
-DISTVERSION=	8.10.3
-PORTREVISION=	6
+DISTVERSION=	9.2.2
 CATEGORIES=	science
-MASTER_SITES=	LOCAL/yuri/ # https://www.abinit.org/sites/default/files/packages/ has the updated 8.10.3 tarball that doesn't compile
 
 MAINTAINER=	yuri@FreeBSD.org
 COMMENT=	Full-featured atomic-scale first-principles simulation software
@@ -13,33 +11,86 @@ COMMENT=	Full-featured atomic-scale first-principles s
 LICENSE=	GPLv3
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-ONLY_FOR_ARCHS=	amd64 i386
-BROKEN=		fails to build
-BROKEN_i386=	Type mismatch in argument 'block_displ', see https://github.com/abinit/abinit/issues/19
+ONLY_FOR_ARCHS=	amd64
 
-LIB_DEPENDS=	liblapack.so:math/lapack \
-		libblas.so:math/blas
+BUILD_DEPENDS=	gm4:devel/m4	\
+		${PYNUMPY}	\
+		${PY_PYGMENTS}	\
+		${PYTHON_PKGNAMEPREFIX}pandas>0:math/py-pandas@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}graphviz>0:graphics/py-graphviz@${PY_FLAVOR}
+LIB_DEPENDS=	libelpa.so:math/elpa		\
+		libsz.so:science/szip		\
+		libelpa.so:math/elpa		\
+		libxc.so:science/libxc		\
+		libfftw3.so:math/fftw3		\
+		libhdf5.so:science/hdf5		\
+		libxml2.so:textproc/libxml2	\
+		libnetcdf.so:science/netcdf	\
+		libxmlf90.so:textproc/xmlf90	\
+		libwannier.so:science/wannier90	\
+		libnetcdff.so:science/netcdf-fortran
 RUN_DEPENDS=	atompaw:science/atompaw
+TEST_DEPENDS=	${PYNUMPY}	\
+		libyaml>0:textproc/libyaml
 
-USES=		fortran gmake localbase:ldflags
+USES=		autoreconf:build blaslapack:netlib fortran gmake gnome localbase:ldflags	\
+		python:3.6+ shebangfix
+USE_GITHUB=	yes
+USE_GNOME=	libxml2
+SHEBANG_FILES=	config/scripts/* doc/tutorial/paral_gspw_assets/abinit.sub.*
+SHEBANG_GLOB=	*.py
 GNU_CONFIGURE=	yes
-
-CONFIGURE_ENV=	CC_LDFLAGS="${LDFLAGS}" CXX_LDFLAGS="${LDFLAGS}" FC_LDFLAGS="${LDFLAGS}"
-CONFIGURE_ARGS=	--enable-shared --disable-static
+CONFIGURE_ENV=	CC_LDFLAGS="${LDFLAGS}" CXX_LDFLAGS="${LDFLAGS}" FC_LDFLAGS="${LDFLAGS}"	\
+		LINALG_FCFLAGS="-I${LOCALBASE}/include/elpa-2019.05.002/modules"	\
+		LINALG_LIBS="${BLASLIB}  ${LAPACKLIB} -lelpa"	\
+		NETCDF_FORTRAN_FCFLAGS=-I${LOCALBASE}/include	\
+		XMLF90_FCFLAGS=-I${LOCALBASE}/include	\
+		WANNIER90_LIBS="${BLASLIB}  ${LAPACKLIB} -lwannier"
+CONFIGURE_ARGS=	--with-fft --with-libxc --with-libxml2 --with-netcdf	\
+		--with-netcdf-fortran --with-wannier90 --with-xmlf90
 FCFLAGS+=	-ffree-line-length-none
+TEST_TARGET=	tests_abirules tests_buildsys
+TEST_WRKSRC=	${WRKSRC}/abichecks
+PORTDOCS=	*
 
-OPTIONS_DEFINE=			OPENMP MPI
+OPTIONS_DEFINE=			DOCS OPENMP MPI
 OPTIONS_DEFAULT=		OPENMP MPI
 
 OPENMP_CONFIGURE_ENABLE=	openmp
 OPENMP_LDFLAGS=			-lomp
 
-MPI_CONFIGURE_ENABLE=		mpi
-MPI_VARS=			FFLAGS+=-I${LOCALBASE}/include FCFLAGS+=-I${LOCALBASE}/include
-MPI_LDFLAGS=			${LOCALBASE}/lib/libmpich.so ${LOCALBASE}/lib/libmpicxx.so ${LOCALBASE}/lib/libmpifort.so
-MPI_LIB_DEPENDS=		libmpi.so:net/mpich
+MPI_CONFIGURE_WITH=		mpi=yes
+# fftw3 not enabled because libfftw3_mpi is required but not packaged
+MPI_VARS=			FFLAGS+=-I${LOCALBASE}/include FCFLAGS+=-I${LOCALBASE}/include	\
+				CONFIGURE_ENV+=MPI_LIBS="`pkg-config --libs mpich` -lmpifort"	\
+				CONFIGURE_ENV+MPI_LDFLAGS="`pkg-config --libs mpich` -lmpifort"
+MPI_BUILD_DEPENDS=		mpich>0:net/mpich
+MPI_RUN_DEPENDS=		mpich>0:net/mpich
 
-do-test:
-	@cd ${WRKSRC}/tests && ./configure && ${GMAKE} check
+.if defined(WITH_LEVMAR)
+# --with-levmar seems deprecated
+LIB_DEPENDS+=	liblevmar.so:math/levmar
+CONFIGURE_ENV+=	LEVMAR_LIBS="-llevmar ${BLASLIB} ${LAPACKLIB}"
+CONFIGURE_ARGS+=	--with-levmar
+.endif
 
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+.if ${GCC_DEFAULT} >= 10
+FCFLAGS+=	-fallow-argument-mismatch # see https://github.com/abinit/abinit/issues/41
+.endif
+
+pre-configure:
+	(cd ${WRKSRC} && ./autogen.sh)
+
+post-install-DOCS-on:
+	${REINPLACE_CMD} -e 's|/usr/bin/env  python|${PYTHON_CMD}|'	\
+		${WRKSRC}/doc/tutorial/paral_moldyn_assets/diag_moldyn.py
+	${RM} ${WRKSRC}/doc/tutorial/paral_moldyn_assets/diag_moldyn.py.bak
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${CP} -R ${WRKSRC}/doc/tutorial ${STAGEDIR}${DOCSDIR}
+
+pre-test:
+	${TOUCH} ${TEST_WRKSRC}/make.log
+
+.include <bsd.port.post.mk>

Modified: head/science/abinit/distinfo
==============================================================================
--- head/science/abinit/distinfo	Sat Jan  2 00:39:14 2021	(r559899)
+++ head/science/abinit/distinfo	Sat Jan  2 00:42:00 2021	(r559900)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1550812825
-SHA256 (abinit-8.10.3.tar.gz) = 922e38edab95e1763c4d504a927f7ea4e19da3143e5b33c5d6e4b41210bf5a9d
-SIZE (abinit-8.10.3.tar.gz) = 88310400
+TIMESTAMP = 1608996405
+SHA256 (abinit-abinit-9.2.2_GH0.tar.gz) = 29511bbc4f4e318cf3676aafdfea48ce2beb8ab6bd64062bd38d516fc02a8543
+SIZE (abinit-abinit-9.2.2_GH0.tar.gz) = 98949530

Added: head/science/abinit/files/patch-config_m4_sd__levmar.m4
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/abinit/files/patch-config_m4_sd__levmar.m4	Sat Jan  2 00:42:00 2021	(r559900)
@@ -0,0 +1,10 @@
+--- config/m4/sd_levmar.m4.orig	2020-11-10 12:21:53 UTC
++++ config/m4/sd_levmar.m4
+@@ -239,6 +239,7 @@ AC_DEFUN([_SD_LEVMAR_CHECK_USE], [
+   AC_LANG_PUSH([C])
+   AC_LINK_IFELSE([AC_LANG_PROGRAM(
+     [[
++#     include <stddef.h>
+ #     include <levmar.h>
+ 
+       void dfit_function(double *p, double *y, int m, int n, void *adata)

Added: head/science/abinit/files/patch-config_scripts_makemake
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/abinit/files/patch-config_scripts_makemake	Sat Jan  2 00:42:00 2021	(r559900)
@@ -0,0 +1,11 @@
+--- config/scripts/makemake.orig	2020-12-26 16:36:41 UTC
++++ config/scripts/makemake
+@@ -408,7 +408,7 @@ if ( opts.run_clean ):
+   sys.exit(0)
+ 
+ # Get Autotools versions
+-(m4_ret, m4_version) = getstatusoutput("m4 --version | sed 's/o/ /g' ")
++(m4_ret, m4_version) = getstatusoutput("gm4 --version | sed 's/o/ /g' ")
+ (ac_ret, ac_version) = getstatusoutput("autoconf --version")
+ (am_ret, am_version) = getstatusoutput("automake --version")
+ (lt_ret, lt_version) = getstatusoutput("libtool  --version")

Added: head/science/abinit/files/patch-shared__common__src__02_clib__md5.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/abinit/files/patch-shared__common__src__02_clib__md5.c	Sat Jan  2 00:42:00 2021	(r559900)
@@ -0,0 +1,11 @@
+--- shared/common/src/02_clib/md5.c.orig	2017-02-28 12:02:53 UTC
++++ shared/common/src/02_clib/md5.c
+@@ -47,7 +47,7 @@
+ #ifdef HAVE_MALLOC_MALLOC_H
+ #  include <malloc/malloc.h>
+ #else
+-#  include <malloc.h>
++#  include <stdlib.h>
+ #endif
+ 
+ #include "md5.h"

Added: head/science/abinit/files/patch-shared_common_src_02__clib_calling__levmar.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/abinit/files/patch-shared_common_src_02__clib_calling__levmar.c	Sat Jan  2 00:42:00 2021	(r559900)
@@ -0,0 +1,20 @@
+--- shared/common/src/02_clib/calling_levmar.c.orig	2020-11-10 12:21:53 UTC
++++ shared/common/src/02_clib/calling_levmar.c
+@@ -150,7 +150,7 @@ double opts[LM_OPTS_SZ], info[LM_INFO_SZ];
+       /* invoke the optimisation function with box boundaries*/
+       ret=dlevmar_bc_dif(dim_screening, coeffs, yvals, c_ncoeffs, c_nvals, \
+            lower_bounds, upper_bounds, 3000, opts, info, NULL, NULL, \
+-           (void *)&adata); // Box boundary conditions without Jacobian
++           NULL, (void *)&adata); // Box boundary conditions without Jacobian
+     //}
+   //}
+   
+@@ -220,7 +220,7 @@ double opts[LM_OPTS_SZ], info[LM_INFO_SZ];
+       /* invoke the optimisation function with box boundaries*/
+       ret=dlevmar_bc_dif(dre_and_im_screening, coeffs, yvals, c_ncoeffs, c_nvals, \
+            lower_bounds, upper_bounds, 1000, opts, info, NULL, NULL, \
+-           (void *)&adata); // Box boundary conditions without Jacobian
++           NULL, (void *)&adata); // Box boundary conditions without Jacobian
+     //}
+   //}
+   

Modified: head/science/abinit/pkg-plist
==============================================================================
--- head/science/abinit/pkg-plist	Sat Jan  2 00:39:14 2021	(r559899)
+++ head/science/abinit/pkg-plist	Sat Jan  2 00:42:00 2021	(r559900)
@@ -1,8 +1,9 @@
 bin/abinit
+bin/abitk
 bin/aim
 bin/anaddb
+bin/atdep
 bin/band2eps
-bin/bsepostproc
 bin/conducti
 bin/cut3d
 bin/dummy_tests
@@ -17,7 +18,7 @@ bin/mrggkk
 bin/mrgscr
 bin/multibinit
 bin/optic
-bin/tdep
+bin/testtransposer
 bin/ujdet
 bin/vdw_kernelgen
 libdata/pkgconfig/abinit.pc



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