aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2026-08-06 21:41:18 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2026-08-06 22:22:59 +0000
commitbe36033521d0b4bd595a271cfb0cfe99bea4f4a3 (patch)
tree274623865e9459ad9a904b9aa04a81457434607b
parentf2ae92ee013545ddfdf3071caad1418b24a7b6ed (diff)
science/fleur: update 8.0 → 8.1
The latest wannier90 release isn't compatible with this fleur release so it was switched to the submodule with the older wannier90 lib.
-rw-r--r--science/fleur/Makefile74
-rw-r--r--science/fleur/distinfo8
-rw-r--r--science/fleur/files/patch-cmake_tests_test__Wannier90.cmake22
3 files changed, 77 insertions, 27 deletions
diff --git a/science/fleur/Makefile b/science/fleur/Makefile
index 67c088aedafc..c5b57b33f8d3 100644
--- a/science/fleur/Makefile
+++ b/science/fleur/Makefile
@@ -1,72 +1,98 @@
PORTNAME= fleur
-DISTVERSION= 8.0
-PORTREVISION= 1
+DISTVERSION= 8.1
CATEGORIES= science # chemistry
+#MASTER_SITES= https://iffgit.fz-juelich.de/fleur/fleur/-/archive/MaX-R${DISTVERSION}/
+MASTER_SITES= LOCAL/yuri # same as unversioned tarball linked from https://www.flapw.de/master/downloads/#download-via-configure-script: it only downloads from a browser, and fails with fetch/wget
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= yuri@FreeBSD.org
COMMENT= FLAPW code for atomic computations in quantum chemistry and physics
-WWW= https://www.flapw.de/master/
+WWW= https://www.flapw.de/master/ \
+ https://iffgit.fz-juelich.de/fleur/fleur
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
-BROKEN_aarch64= Fatal Error: Cannot find an intrinsic module named 'ieee_arithmetic' at (1)
+BROKEN_aarch64= fatal error: cannot find an intrinsic module named 'ieee_arithmetic' at (1)
LIB_DEPENDS= libfftw3.so:math/fftw3 \
libhdf5.so:science/hdf5 \
liblapack.so:math/lapack \
libopenblas.so:math/openblas
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pytest-html>0:devel/py-pytest-html@${PY_FLAVOR}
-USES= cmake:noninja fortran gnome localbase:ldflags python:test tar:tgz
+USES= cmake:noninja fortran gnome localbase:ldflags python:test
USE_GNOME= libxml2
-USE_GITLAB= yes
-GL_SITE= https://iffgit.fz-juelich.de
-GL_TAGNAME= 37fc75f41f56787c99e7635a2f7a909a6488a1e9
+#USE_GITLAB= yes
+#GL_SITE= https://iffgit.fz-juelich.de
+#GL_TAGNAME= 6960e037c34e5b704cd79718ec34c7147ccbf06a16fef397c7e3316f47e99a39
-FFLAGS= -I${LOCALBASE}/include
-LDFLAGS+= -llapack -lopenblas -lxml2 # to fix missing symbols, see https://iffgit.fz-juelich.de/fleur/fleur/-/issues/670
+USE_GITHUB= nodefault
+GH_TUPLE= wannier-developers:wannier90:v3.1.0:wannier90/external/wannier90/src
+
+WRKSRC= ${WRKDIR}/fleur-release
-OPTIONS_DEFINE= HDF5 KPLIB MPI SCALAPACK ELPA LIBXC WANNIER
-OPTIONS_DEFAULT= MPI SCALAPACK ELPA WANNIER # HDF5 KPLIB LIBXC
+OPTIONS_DEFINE= HDF5 KPLIB MPI SCALAPACK ELPA LIBXC #WANNIER WANNIER exernal wannier90 is not compatible and is replaced with submodule
+OPTIONS_DEFAULT= MPI SCALAPACK ELPA #WANNIER # HDF5 KPLIB LIBXC
HDF5_CMAKE_BOOL= CLI_FLEUR_USE_HDF5
HDF5_CMAKE_ON= -DHDF5_INCLUDE_DIRS=${LOCALBASE}/include
HDF5_LIB_DEPENDS= libhdf5.so:science/hdf5
-HDF5_BROKEN= Missing hdf5.mod in hdf5 # hdf5 doesn't include Fortran binding
+HDF5_BROKEN= missing hdf5.mod in hdf5 # hdf5 doesn't include Fortran binding
KPLIB_DESC= Use kpLib library
#KPLIB_CMAKE_BOOL= CLI_FLEUR_USE_KPLIB
KPLIB_DEPENDS= libkplib.so:science/kplib
-KPLIB_BROKEN= Fails to find the pre-installed libkplib.so library, see https://iffgit.fz-juelich.de/fleur/fleur/-/issues/691
+KPLIB_BROKEN= fails to find the pre-installed libkplib.so library, see https://iffgit.fz-juelich.de/fleur/fleur/-/issues/691
MPI_CMAKE_BOOL= CLI_FLEUR_USE_MPI
MPI_LDFLAGS= -lmpich -lmpifort
MPI_LIB_DEPENDS= libmpich.so:net/mpich
-MPI_VARS= SUFFIX=_MPI
SCALAPACK_DESC= Use the ScaLAPACK Scalable LAPACK library
-SCALAPACK_CMAKE_BOOL= FLEUR_USE_SCALAPACK # no such variable, see https://iffgit.fz-juelich.de/fleur/fleur/-/issues/692, it works only through LDFLAGS set below
-SCALAPACK_VARS= FFLAGS+=-fallow-argument-mismatch
+SCALAPACK_CMAKE_BOOL= FLEUR_USE_SCALAPACK # no such variable, see https://iffgit.fz-juelich.de/fleur/fleur/-/issues/692, it works only through FLEUR_LIBRARIES set below
SCALAPACK_LDFLAGS= -lscalapack
SCALAPACK_LIB_DEPENDS= libscalapack.so:math/scalapack
SCALAPACK_IMPLIES= MPI
ELPA_DESC= Use libelpa, Eigenvalue SoLver for Petaflop Applications
-ELPA_CMAKE_BOOL= FLEUR_USE_ELPA # no such variable, see https://iffgit.fz-juelich.de/fleur/fleur/-/issues/689, it works only through FFLAGS set below
-ELPA_VARS= FFLAGS+=-I${LOCALBASE}/include/elpa-2021.11.001/modules
+ELPA_CMAKE_BOOL= FLEUR_USE_ELPA # no such variable, see https://iffgit.fz-juelich.de/fleur/fleur/-/issues/689, it works only through FLEUR_LIBRARIES set below
ELPA_LDFLAGS= -lelpa
ELPA_LIB_DEPENDS= libelpa.so:math/elpa
LIBXC_DESC= Use libxc library
LIBXC_CMAKE_BOOL= CLI_FLEUR_USE_LIBXC
LIBXC_LIB_DEPENDS= libxc.so:science/libxc
-LIBXC_BROKEN= Silently links with libxc when CLI_FLEUR_USE_LIBXC=OFF, see https://iffgit.fz-juelich.de/fleur/fleur/-/issues/690
+LIBXC_BROKEN= silently links with libxc when CLI_FLEUR_USE_LIBXC=OFF, see https://iffgit.fz-juelich.de/fleur/fleur/-/issues/690
+
+#WANNIER_DESC= Use Wannier library
+#WANNIER_CMAKE_BOOL= CLI_FLEUR_USE_WANNIER
+#WANNIER_LIB_DEPENDS= libwannier90.so:science/wannier90
-WANNIER_DESC= Use Wannier library
-WANNIER_CMAKE_BOOL= CLI_FLEUR_USE_WANNIER
-WANNIER_LIB_DEPENDS= libwannier.so:science/wannier90
+.include <bsd.port.options.mk>
+
+FFLAGS= -I${LOCALBASE}/include
+FLEUR_LIBRARIES= -L${LOCALBASE}/lib;-ldl;-lfftw3;-lxml2;-llapack;-lopenblas
+.if ${PORT_OPTIONS:MMPI}
+SUFFIX= _MPI
+FLEUR_LIBRARIES:= ${FLEUR_LIBRARIES};-lmpich;-lmpifort
+.endif
+.if ${PORT_OPTIONS:MSCALAPACK}
+FFLAGS+= -fallow-argument-mismatch
+FLEUR_LIBRARIES:= ${FLEUR_LIBRARIES};-lscalapack
+.endif
+.if ${PORT_OPTIONS:MELPA}
+FFLAGS+= -I${LOCALBASE}/include/elpa-2021.11.001/modules
+FLEUR_LIBRARIES:= ${FLEUR_LIBRARIES};-lelpa
+.endif
+#.if ${PORT_OPTIONS:MWANNIER}
+#FLEUR_LIBRARIES:= ${FLEUR_LIBRARIES};-lwannier90
+#.endif
+
+CMAKE_ARGS= -DFLEUR_LIBRARIES:STRING="${FLEUR_LIBRARIES}"
+LDFLAGS+= -llapack -lopenblas -lxml2 # to fix missing symbols, see https://iffgit.fz-juelich.de/fleur/fleur/-/issues/670
EXECUTABLES= bin/fleur${SUFFIX} \
bin/inpgen
@@ -82,6 +108,6 @@ do-test:
# was: 9 testcases are known to fail, see https://iffgit.fz-juelich.de/fleur/fleur/-/issues/671
@cd ${WRKSRC}/testing && pytest tests --build_dir=${TEST_WRKSRC}
-# tests fail to run: INTERNALERROR> pluggy._manager.PluginValidationError: unknown hook 'pytest_html_report_title' in plugin <module 'conftest' from '/usr/ports/science/fleur/work/fleur-447eed3b7ec3de5fcdfbd232cd1eda4caefb51d3/testing/conftest.py'>
+# tests as of 8.1: 54 passed, 1 skipped, 24 deselected, 2 warnings in 249.24s (0:04:09)
.include <bsd.port.mk>
diff --git a/science/fleur/distinfo b/science/fleur/distinfo
index 37eeba16a5dd..326c777e0114 100644
--- a/science/fleur/distinfo
+++ b/science/fleur/distinfo
@@ -1,3 +1,5 @@
-TIMESTAMP = 1776702279
-SHA256 (fleur-fleur-37fc75f41f56787c99e7635a2f7a909a6488a1e9_GL0.tar.gz) = 8da19e0fe4156028517b5711826635dc73eb921c84731bfa6b7cf55299a8ec42
-SIZE (fleur-fleur-37fc75f41f56787c99e7635a2f7a909a6488a1e9_GL0.tar.gz) = 36732297
+TIMESTAMP = 1786047963
+SHA256 (fleur-8.1.tar.gz) = e800d11d63be68fd45a6a9568866536fd6ffb6d0cd734ce22917908ad9da6245
+SIZE (fleur-8.1.tar.gz) = 36142137
+SHA256 (wannier-developers-wannier90-v3.1.0_GH0.tar.gz) = 40651a9832eb93dec20a8360dd535262c261c34e13c41b6755fa6915c936b254
+SIZE (wannier-developers-wannier90-v3.1.0_GH0.tar.gz) = 101211573
diff --git a/science/fleur/files/patch-cmake_tests_test__Wannier90.cmake b/science/fleur/files/patch-cmake_tests_test__Wannier90.cmake
new file mode 100644
index 000000000000..f5c52fdf88a3
--- /dev/null
+++ b/science/fleur/files/patch-cmake_tests_test__Wannier90.cmake
@@ -0,0 +1,22 @@
+--- cmake/tests/test_Wannier90.cmake.orig 2026-04-28 12:13:48 UTC
++++ cmake/tests/test_Wannier90.cmake
+@@ -1,9 +1,10 @@
+ #first try if Wannier90 already works
++if (FALSE) # disable search for wannier90 library because latest version isn't compatible with FLEUR
+ try_compile(FLEUR_USE_WANN ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/cmake/tests/test_Wannier90.f90
+ LINK_LIBRARIES ${FLEUR_LIBRARIES}
+ )
+ set(FLEUR_WANNIER90_LIBRARIES ${FLEUR_LIBRARIES})
+-foreach(ADD_String "-lwannier" )
++foreach(ADD_String "-lwannier90" )
+ if (NOT FLEUR_USE_WANN)
+ set(TEST_LIBRARIES "${ADD_String};${FLEUR_LIBRARIES}")
+
+@@ -21,6 +22,7 @@ message("Wannier90 1.2 Library found:${FLEUR_USE_WANN}
+ endforeach()
+
+ message("Wannier90 1.2 Library found:${FLEUR_USE_WANN}")
++endif() # disable search for wannier90 library because latest version isn't compatible with FLEUR
+
+ if (DEFINED CLI_FLEUR_USE_WANNIER)
+ if (CLI_FLEUR_USE_WANNIER)