# -*- 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 PortSystem 1.0 PortGroup cmake 1.1 PortGroup compiler_blacklist_versions 1.0 PortGroup github 1.0 PortGroup legacysupport 1.1 # clock_gettime legacysupport.newest_darwin_requires_legacy 16 github.setup lfortran lfortran 0.41.0 v revision 0 categories lang fortran maintainers {@barracuda156 gmail.com:vital.had} openmaintainer license BSD description Modern open-source interactive Fortran compiler long_description LFortran is a modern open-source interactive Fortran compiler built on top of LLVM. \ It can execute user’s code interactively to allow exploratory work \ (much like Python, MATLAB or Julia) as well as compile to binaries \ with the goal to run user’s code on modern architectures such as multi-core CPUs and GPUs. homepage https://lfortran.org checksums rmd160 4434e3dc4274506049751362ea763f34d408ab5a \ sha256 46b2deb9f4f9f60fd55002f81e67b7671b9ae91e3c15a06cd368b30b670b0630 \ size 2848432 github.tarball_from archive set port_libfmt libfmt10 cmake.module_path-append \ ${prefix}/lib/${port_libfmt}/cmake depends_build-append port:bash \ port:bison \ port:re2c depends_lib-append path:lib/pkgconfig/RapidJSON.pc:rapidjson \ port:zlib \ port:${port_libfmt} set py_ver 3.12 set py_ver_nodot [string map {. {}} ${py_ver}] depends_lib-append port:python${py_ver_nodot} # Install into meaningful locations: patchfiles-append patch-use-sane-install-dirs.diff \ patch-version.diff # TODO: add CMake config files. # Backport of https://github.com/lfortran/lfortran/commit/8531580bd727a5b1ce4e7da2d0fe5f78460edfa4 patchfiles-append 8531580bd727a5b1ce4e7da2d0fe5f78460edfa4.patch configure.python ${prefix}/bin/python${py_ver} post-patch { reinplace "s|@VERSION@|${version}|" ${worksrcpath}/ci/version.sh reinplace "s|python src|${configure.python} src|g" ${worksrcpath}/build0.sh reinplace "s|/usr/bin/env python|${configure.python}|" ${worksrcpath}/run_tests.py } # FIXME: this is likely wrong: https://github.com/lfortran/lfortran/issues/2689 compiler.cxx_standard 2017 # Use LLVM clangs compiler.blacklist-append {clang} # Avoid very recent clangs, they are known to causes errors: compiler.blacklist-append {macports-clang-1[8-9]} {macports-clang-2[0-9]} configure.args-append -DLFORTRAN_BUILD_ALL=YES \ -DLFORTRAN_STATIC_BIN=NO \ -DWITH_FMT=YES \ -DWITH_JSON=YES \ -DWITH_LLVM=NO \ -DWITH_MACHO=YES \ -DWITH_RUNTIME_LIBRARY=YES \ -DWITH_ZLIB=YES if {${configure.build_arch} ni [list ppc ppc64]} { set llvm_version 17 set llvm_prefix ${prefix}/libexec/llvm-${llvm_version} set llvm_bin ${llvm_prefix}/bin cmake.module_path-append \ ${llvm_prefix}/lib/cmake/llvm depends_lib-append port:llvm-${llvm_version} configure.args-append \ -DLLVM_ROOT:PATH=${llvm_prefix} configure.args-replace \ -DWITH_LLVM=NO -DWITH_LLVM=YES } cmake.build_type Release variant kokkos description "Enable Kokkos support" { depends_lib-append path:lib/libkokkoscore.dylib:kokkos configure.args-append \ -DWITH_KOKKOS=YES } default_variants-append +kokkos # Disabling for now, since one of tests fails. test.run no # Drop this after Macports 2.9.2 is out: test.ignore_archs yes