blob: 453b3ae51e1988ad403845209c8e6bcf2ca9a646 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
# Created by: NAKATA Maho <maho@FreeBSD.org>
PORTNAME= abinit
DISTVERSION= 9.4.2
PORTREVISION= 3
CATEGORIES= science
MAINTAINER= yuri@FreeBSD.org
COMMENT= Full-featured atomic-scale first-principles simulation software
LICENSE= GPLv3
LICENSE_FILE= ${WRKSRC}/COPYING
ONLY_FOR_ARCHS= amd64 powerpc64 powerpc64le
BUILD_DEPENDS= gm4:devel/m4 \
${PYNUMPY} \
${PYTHON_PKGNAMEPREFIX}pygments>=0:textproc/py-pygments@${PY_FLAVOR} \
${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= autoreconf:build blaslapack:netlib fortran gmake gnome localbase:ldflags \
python:3.7+ 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}" \
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= DOCS OPENMP MPI
OPTIONS_DEFAULT= OPENMP MPI
OPENMP_CONFIGURE_ENABLE= openmp
OPENMP_LDFLAGS= -lomp
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
.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.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>
|