View | Details | Raw Unified | Return to bug 252221 | Differences between
and this patch

Collapse All | Expand All

(-)science/abinit/Makefile (-18 / +63 lines)
Lines 2-11 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	abinit
4
PORTNAME=	abinit
5
DISTVERSION=	8.10.3
5
DISTVERSION=	9.2.2
6
PORTREVISION=	6
7
CATEGORIES=	science
6
CATEGORIES=	science
8
MASTER_SITES=	LOCAL/yuri/ # https://www.abinit.org/sites/default/files/packages/ has the updated 8.10.3 tarball that doesn't compile
9
7
10
MAINTAINER=	yuri@FreeBSD.org
8
MAINTAINER=	yuri@FreeBSD.org
11
COMMENT=	Full-featured atomic-scale first-principles simulation software
9
COMMENT=	Full-featured atomic-scale first-principles simulation software
Lines 13-45 Link Here
13
LICENSE=	GPLv3
11
LICENSE=	GPLv3
14
LICENSE_FILE=	${WRKSRC}/COPYING
12
LICENSE_FILE=	${WRKSRC}/COPYING
15
13
16
ONLY_FOR_ARCHS=	amd64 i386
14
ONLY_FOR_ARCHS=	amd64
17
BROKEN=		fails to build
18
BROKEN_i386=	Type mismatch in argument 'block_displ', see https://github.com/abinit/abinit/issues/19
19
15
20
LIB_DEPENDS=	liblapack.so:math/lapack \
16
BUILD_DEPENDS=	gm4:devel/m4	\
21
		libblas.so:math/blas
17
		${PYNUMPY}	\
18
		${PY_PYGMENTS}	\
19
		${PYTHON_PKGNAMEPREFIX}pandas>0:math/py-pandas@${PY_FLAVOR} \
20
		${PYTHON_PKGNAMEPREFIX}graphviz>0:graphics/py-graphviz@${PY_FLAVOR}
21
LIB_DEPENDS=	libelpa.so:math/elpa		\
22
		libsz.so:science/szip		\
23
		libelpa.so:math/elpa		\
24
		libxc.so:science/libxc		\
25
		libfftw3.so:math/fftw3		\
26
		libhdf5.so:science/hdf5		\
27
		libxml2.so:textproc/libxml2	\
28
		libnetcdf.so:science/netcdf	\
29
		libxmlf90.so:textproc/xmlf90	\
30
		libwannier90.so:science/wannier90	\
31
		libnetcdff.so:science/netcdf-fortran
22
RUN_DEPENDS=	atompaw:science/atompaw
32
RUN_DEPENDS=	atompaw:science/atompaw
33
TEST_DEPENDS=	${PYNUMPY}	\
34
		libyaml>0:textproc/libyaml
23
35
24
USES=		fortran gmake localbase:ldflags
36
USE_GITHUB=	yes
37
38
USES=		autoreconf:build blaslapack:netlib fortran gmake gnome localbase:ldflags	\
39
		python:3.6+ shebangfix
40
USE_GNOME=	libxml2
41
SHEBANG_FILES=	config/scripts/* doc/tutorial/paral_gspw_assets/abinit.sub.*
42
SHEBANG_GLOB=	*.py
25
GNU_CONFIGURE=	yes
43
GNU_CONFIGURE=	yes
26
44
CONFIGURE_ENV=	CC_LDFLAGS="${LDFLAGS}" CXX_LDFLAGS="${LDFLAGS}" FC_LDFLAGS="${LDFLAGS}"	\
27
CONFIGURE_ENV=	CC_LDFLAGS="${LDFLAGS}" CXX_LDFLAGS="${LDFLAGS}" FC_LDFLAGS="${LDFLAGS}"
45
		LINALG_FCFLAGS="-I${LOCALBASE}/include/elpa-2019.05.002/modules"	\
28
CONFIGURE_ARGS=	--enable-shared --disable-static
46
		LINALG_LIBS="${BLASLIB}  ${LAPACKLIB} -lelpa"	\
47
		NETCDF_FORTRAN_FCFLAGS=-I${LOCALBASE}/include	\
48
		XMLF90_FCFLAGS=-I${LOCALBASE}/include	\
49
		WANNIER90_LIBS="${BLASLIB}  ${LAPACKLIB} -lwannier90"
50
CONFIGURE_ARGS=	--with-fft --with-libxc --with-libxml2 --with-netcdf	\
51
		--with-netcdf-fortran --with-wannier90 --with-xmlf90
29
FCFLAGS+=	-ffree-line-length-none
52
FCFLAGS+=	-ffree-line-length-none
53
TEST_TARGET=	tests_abirules tests_buildsys
54
TEST_WRKSRC=	${WRKSRC}/abichecks
55
PORTDOCS=	*
30
56
31
OPTIONS_DEFINE=			OPENMP MPI
57
OPTIONS_DEFINE=			DOCS OPENMP MPI
32
OPTIONS_DEFAULT=		OPENMP MPI
58
OPTIONS_DEFAULT=		OPENMP MPI
33
59
34
OPENMP_CONFIGURE_ENABLE=	openmp
60
OPENMP_CONFIGURE_ENABLE=	openmp
35
OPENMP_LDFLAGS=			-lomp
61
OPENMP_LDFLAGS=			-lomp
36
62
37
MPI_CONFIGURE_ENABLE=		mpi
63
MPI_CONFIGURE_WITH=		mpi=yes
38
MPI_VARS=			FFLAGS+=-I${LOCALBASE}/include FCFLAGS+=-I${LOCALBASE}/include
64
# fftw3 not enabled because libfftw3_mpi is required but not packaged
39
MPI_LDFLAGS=			${LOCALBASE}/lib/libmpich.so ${LOCALBASE}/lib/libmpicxx.so ${LOCALBASE}/lib/libmpifort.so
65
MPI_VARS=			FFLAGS+=-I${LOCALBASE}/include FCFLAGS+=-I${LOCALBASE}/include	\
66
				CONFIGURE_ENV+=MPI_LIBS="`pkg-config --libs mpich` -lmpifort"	\
67
				CONFIGURE_ENV+MPI_LDFLAGS="`pkg-config --libs mpich` -lmpifort"
40
MPI_LIB_DEPENDS=		libmpi.so:net/mpich
68
MPI_LIB_DEPENDS=		libmpi.so:net/mpich
41
69
42
do-test:
70
.if defined(WITH_LEVMAR)
43
	@cd ${WRKSRC}/tests && ./configure && ${GMAKE} check
71
# --with-levmar seems deprecated
72
LIB_DEPENDS+=	liblevmar.so:math/levmar
73
CONFIGURE_ENV+=	LEVMAR_LIBS="-llevmar ${BLASLIB} ${LAPACKLIB}"
74
CONFIGURE_ARGS+=	--with-levmar
75
.endif
44
76
77
pre-configure:
78
	(cd ${WRKSRC} && ./autogen.sh)
79
80
post-install-DOCS-on:
81
	${REINPLACE_CMD} -e 's|/usr/bin/env  python|${PYTHON_CMD}|'	\
82
		${WRKSRC}/doc/tutorial/paral_moldyn_assets/diag_moldyn.py
83
	${RM} ${WRKSRC}/doc/tutorial/paral_moldyn_assets/diag_moldyn.py.bak
84
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
85
	${CP} -R ${WRKSRC}/doc/tutorial ${STAGEDIR}${DOCSDIR}
86
87
pre-test:
88
	${TOUCH} ${TEST_WRKSRC}/make.log
89
45
.include <bsd.port.mk>
90
.include <bsd.port.mk>
(-)science/abinit/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1550812825
1
TIMESTAMP = 1608996405
2
SHA256 (abinit-8.10.3.tar.gz) = 922e38edab95e1763c4d504a927f7ea4e19da3143e5b33c5d6e4b41210bf5a9d
2
SHA256 (abinit-abinit-9.2.2_GH0.tar.gz) = 29511bbc4f4e318cf3676aafdfea48ce2beb8ab6bd64062bd38d516fc02a8543
3
SIZE (abinit-8.10.3.tar.gz) = 88310400
3
SIZE (abinit-abinit-9.2.2_GH0.tar.gz) = 98949530
(-)science/abinit/files/patch-Makefile.in (-11 lines)
Lines 1-11 Link Here
1
--- Makefile.in.orig	2018-06-14 05:16:42 UTC
2
+++ Makefile.in
3
@@ -876,7 +876,7 @@ AM_DISTCHECK_CONFIGURE_FLAGS = \
4
   @abi_ac_distcheck@ \
5
   PYFLAGS="@PYFLAGS@ -B"
6
 
7
-SUBDIRS = fallbacks src abichecks tests
8
+SUBDIRS = fallbacks src abichecks
9
 
10
 # Additional files to clean
11
 CLEANFILES = config.optim config.fc_info.tmp
(-)science/abinit/files/patch-config_m4_sd__levmar.m4 (+10 lines)
Line 0 Link Here
1
--- config/m4/sd_levmar.m4.orig	2020-11-10 12:21:53 UTC
2
+++ config/m4/sd_levmar.m4
3
@@ -239,6 +239,7 @@ AC_DEFUN([_SD_LEVMAR_CHECK_USE], [
4
   AC_LANG_PUSH([C])
5
   AC_LINK_IFELSE([AC_LANG_PROGRAM(
6
     [[
7
+#     include <stddef.h>
8
 #     include <levmar.h>
9
 
10
       void dfit_function(double *p, double *y, int m, int n, void *adata)
(-)science/abinit/files/patch-config_scripts_makemake (+11 lines)
Line 0 Link Here
1
--- config/scripts/makemake.orig	2020-12-26 16:36:41 UTC
2
+++ config/scripts/makemake
3
@@ -408,7 +408,7 @@ if ( opts.run_clean ):
4
   sys.exit(0)
5
 
6
 # Get Autotools versions
7
-(m4_ret, m4_version) = getstatusoutput("m4 --version | sed 's/o/ /g' ")
8
+(m4_ret, m4_version) = getstatusoutput("gm4 --version | sed 's/o/ /g' ")
9
 (ac_ret, ac_version) = getstatusoutput("autoconf --version")
10
 (am_ret, am_version) = getstatusoutput("automake --version")
11
 (lt_ret, lt_version) = getstatusoutput("libtool  --version")
(-)science/abinit/files/patch-shared__common__src__02_clib__md5.c (-2 / +2 lines)
Lines 1-5 Link Here
1
--- src/02_clib/md5.c.orig	2017-02-28 12:02:53 UTC
1
--- shared/common/src/02_clib/md5.c.orig	2017-02-28 12:02:53 UTC
2
+++ src/02_clib/md5.c
2
+++ shared/common/src/02_clib/md5.c
3
@@ -47,7 +47,7 @@
3
@@ -47,7 +47,7 @@
4
 #ifdef HAVE_MALLOC_MALLOC_H
4
 #ifdef HAVE_MALLOC_MALLOC_H
5
 #  include <malloc/malloc.h>
5
 #  include <malloc/malloc.h>
(-)science/abinit/files/patch-shared_common_src_02__clib_calling__levmar.c (+20 lines)
Line 0 Link Here
1
--- shared/common/src/02_clib/calling_levmar.c.orig	2020-11-10 12:21:53 UTC
2
+++ shared/common/src/02_clib/calling_levmar.c
3
@@ -150,7 +150,7 @@ double opts[LM_OPTS_SZ], info[LM_INFO_SZ];
4
       /* invoke the optimisation function with box boundaries*/
5
       ret=dlevmar_bc_dif(dim_screening, coeffs, yvals, c_ncoeffs, c_nvals, \
6
            lower_bounds, upper_bounds, 3000, opts, info, NULL, NULL, \
7
-           (void *)&adata); // Box boundary conditions without Jacobian
8
+           NULL, (void *)&adata); // Box boundary conditions without Jacobian
9
     //}
10
   //}
11
   
12
@@ -220,7 +220,7 @@ double opts[LM_OPTS_SZ], info[LM_INFO_SZ];
13
       /* invoke the optimisation function with box boundaries*/
14
       ret=dlevmar_bc_dif(dre_and_im_screening, coeffs, yvals, c_ncoeffs, c_nvals, \
15
            lower_bounds, upper_bounds, 1000, opts, info, NULL, NULL, \
16
-           (void *)&adata); // Box boundary conditions without Jacobian
17
+           NULL, (void *)&adata); // Box boundary conditions without Jacobian
18
     //}
19
   //}
20
   
(-)science/abinit/files/patch-src_02__clib_md5.c (-11 lines)
Lines 1-11 Link Here
1
--- src/02_clib/md5.c.orig	2017-02-28 12:02:53 UTC
2
+++ src/02_clib/md5.c
3
@@ -47,7 +47,7 @@
4
 #ifdef HAVE_MALLOC_MALLOC_H
5
 #  include <malloc/malloc.h>
6
 #else
7
-#  include <malloc.h>
8
+#  include <stdlib.h>
9
 #endif
10
 
11
 #include "md5.h"
(-)science/abinit/pkg-plist (-2 / +3 lines)
Lines 1-8 Link Here
1
bin/abinit
1
bin/abinit
2
bin/abitk
2
bin/aim
3
bin/aim
3
bin/anaddb
4
bin/anaddb
5
bin/atdep
4
bin/band2eps
6
bin/band2eps
5
bin/bsepostproc
6
bin/conducti
7
bin/conducti
7
bin/cut3d
8
bin/cut3d
8
bin/dummy_tests
9
bin/dummy_tests
Lines 17-23 Link Here
17
bin/mrgscr
18
bin/mrgscr
18
bin/multibinit
19
bin/multibinit
19
bin/optic
20
bin/optic
20
bin/tdep
21
bin/testtransposer
21
bin/ujdet
22
bin/ujdet
22
bin/vdw_kernelgen
23
bin/vdw_kernelgen
23
libdata/pkgconfig/abinit.pc
24
libdata/pkgconfig/abinit.pc

Return to bug 252221