# -*- 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 github 1.0 PortGroup cmake 1.1 PortGroup legacysupport 1.1 github.setup symengine symengine 0.11.2 v revision 1 categories math science license MIT maintainers {mcalhoun @MarcusCalhoun-Lopez} openmaintainer description a fast symbolic manipulation library long_description ${name} is {*}${description}, written in C++. checksums rmd160 c90599698e404b6f9fbba09c7803d6ce7bf6e133 \ sha256 f6972acd6a65354f6414e69460d2e175729470632bdac05919bc2f7f32e48cbd \ size 897965 github.tarball_from archive # LLVM_MINIMUM_REQUIRED_VERSION is set to 3.8 # see https://github.com/symengine/symengine/blob/master/CMakeLists.txt # mimic LLVM requirements uses by MacPorts base # see https://github.com/macports/macports-ports/blob/master/_resources/port1.0/compilers/clang_compilers.tcl if {${os.major} >= 11 || ${os.platform} ne "darwin"} { set llvm_version 15 } elseif {${os.major} >= 10} { set llvm_version 11 } elseif {${os.major} >= 9} { set llvm_version 7.0 } else { set llvm_version none } if {${configure.build_arch} in [list ppc ppc64]} { # PowerPC systems prefer GCC compilers set llvm_version none } compiler.cxx_standard 2014 depends_lib-append port:gmp \ port:mpfr \ port:libmpc \ port:flint if {${llvm_version} ne "none"} { depends_lib-append port:llvm-${llvm_version} } if {[variant_isset debug]} { cmake.build_type Debug } else { cmake.build_type Release } # symengine sets its own optimization flags configure.optflags configure.args-append -DBUILD_SHARED_LIBS=ON \ -DBUILD_FOR_DISTRIBUTION=ON \ -DBUILD_TESTS=OFF \ -DBUILD_BENCHMARKS=OFF # see https://github.com/symengine/symengine/blob/master/README.md#recommended-options-to-build configure.args-append -DWITH_GMP=ON \ -DWITH_MPFR=ON \ -DWITH_MPC=ON \ -DINTEGER_CLASS=flint if {${llvm_version} ne "none"} { configure.args-append -DWITH_LLVM=ON } else { configure.args-append -DWITH_LLVM=OFF } configure.args-append -DWITH_SYMENGINE_THREAD_SAFE=ON # see https://github.com/symengine/symengine/issues/1671 configure.args-append -DWITH_COTIRE=OFF # use MP's clang based on above LLVM version for consistency with used includes/libs if {${llvm_version} ne "none"} { compiler.blacklist clang *gcc* compiler.fallback macports-clang-${llvm_version} compiler.whitelist macports-clang-${llvm_version} cmake.module_path-append ${prefix}/libexec/llvm-${llvm_version}/lib/cmake/llvm } # mirrors setings in llvm-11 legacysupport.use_static yes # futimens legacysupport.newest_darwin_requires_legacy 16 if {${configure.build_arch} in [list i386 ppc] && [string match *gcc* ${configure.compiler}]} { # ___atomic_store_8 configure.ldflags-append -latomic } variant tests description {Enable tests} { test.run yes configure.args-replace -DBUILD_TESTS=OFF \ -DBUILD_TESTS=ON test.args-append DYLD_LIBRARY_PATH=${cmake.build_dir}/symengine }