<pre style='margin:0'>
Christopher Nielsen (mascguy) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/b8954790a3aad0827d905170bd2017da39c08e1e">https://github.com/macports/macports-ports/commit/b8954790a3aad0827d905170bd2017da39c08e1e</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit b8954790a3aad0827d905170bd2017da39c08e1e
</span>Author: barracuda156 <vital.had@gmail.com>
AuthorDate: Fri May 20 03:55:56 2022 +0800
<span style='display:block; white-space:pre;color:#404040;'> libxc5, new version of libxc
</span>---
science/libxc5/Portfile | 61 ++++++++++++++++++++++++++
science/libxc5/files/patch-cmake-macports.diff | 24 ++++++++++
2 files changed, 85 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/science/libxc5/Portfile b/science/libxc5/Portfile
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..c347944e8c8
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/science/libxc5/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,61 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortSystem 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup cmake 1.1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup compiler_blacklist_versions 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup compilers 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup muniversal 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+name libxc5
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+version 5.2.3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+categories science
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+license MPL-2.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+maintainers nomaintainer
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+description Exchange-correlation functionals for DFT
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+long_description Libxc is a library of exchange-correlation functionals \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for density-functional theory. The aim is to provide \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ a portable, well tested and reliable set of exchange \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ and correlation functionals that can be used by all \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ the ETSF codes and also other codes.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+homepage https://www.tddft.org/programs/libxc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+master_sites https://www.tddft.org/programs/libxc/down.php?file=${version}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+checksums rmd160 6293113e068e9af1409dc3fd7ed82fd5e33b1869 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 7b7a96d8eeb472c7b8cca7ac38eae27e0a8113ef44dae5359b0eb12592b4bcf2 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 45810705
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+distname libxc-${version}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+compiler.c_standard 1999
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# gcc-4.2 builds libxc5, but doesnʼt support -march=native and Fortran
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+compiler.blacklist-append *gcc-4.* {clang < 421}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles patch-cmake-macports.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set libxc5_path ${prefix}/libexec/${name}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+configure.args-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DBUILD_SHARED_LIBS=ON \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DBUILD_TESTING=ON \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DENABLE_CUDA=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DCMAKE_INSTALL_BINDIR=${libxc5_path}/bin \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DCMAKE_INSTALL_INCLUDEDIR=${libxc5_path}/include \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DCMAKE_INSTALL_LIBDIR=${libxc5_path}/lib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant fortran description {Enable Fortran 2003} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ compilers.setup require_fortran
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append -DENABLE_FORTRAN=ON
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+depends_test-append port:bash \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:bzip2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+test.run yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+test.cmd-prepend DYLD_LIBRARY_PATH=${cmake.build_dir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+livecheck.type regex
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+livecheck.url http://www.tddft.org/programs/libxc/download/previous
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+livecheck.regex libxc-(\[0-9.\]+).tar.gz
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/science/libxc5/files/patch-cmake-macports.diff b/science/libxc5/files/patch-cmake-macports.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..1ecefda745d
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/science/libxc5/files/patch-cmake-macports.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,24 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- cmake/autocmake_safeguards.cmake.orig 2022-01-20 03:50:54.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ cmake/autocmake_safeguards.cmake 2022-05-20 01:59:39.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -21,6 +21,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if(NOT cmake_build_type_tolower STREQUAL "debug" AND
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ NOT cmake_build_type_tolower STREQUAL "release" AND
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- NOT cmake_build_type_tolower STREQUAL "relwithdebinfo")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ NOT cmake_build_type_tolower STREQUAL "relwithdebinfo" AND
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ NOT cmake_build_type_tolower STREQUAL "macports")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ message(FATAL_ERROR "Unknown build type \"${CMAKE_BUILD_TYPE}\". Allowed values are Debug, Release, RelWithDebInfo (case-insensitive).")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ endif()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- CMakeLists.txt.orig 2022-05-16 22:37:28.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ CMakeLists.txt 2023-05-26 23:38:55.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -555,8 +555,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # <<< Export Config >>>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# GNUInstallDirs "DATADIR" wrong here; CMake search path wants "share".
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-set(CMAKECONFIG_INSTALL_DIR "share/cmake/${PN}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++set(CMAKECONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/${PN}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure_package_config_file(cmake/${PN}Config.cmake.in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "${CMAKE_CURRENT_BINARY_DIR}/${PN}Config.cmake"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR})
</span></pre><pre style='margin:0'>
</pre>