# -*- 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 compilers 1.0 compilers.choose cc cxx name ensmallen version 2.21.1 categories math devel science license BSD platforms any maintainers {takeshi @tenomoto} {@barracuda156 gmail.com:vital.had} openmaintainer description flexible C++ library for efficient numerical optimization long_description \ ${name} provides a simple set of abstractions \ for writing an objective function to optimize. \ It also provides a large set of standard and cutting-edge optimizers \ that can be used for virtually any numerical optimization task. \ These include full-batch gradient descent techniques, \ small-batch techniques, gradient-free optimizers, and constrained optimization. homepage https://ensmallen.org master_sites ${homepage}/files checksums rmd160 34bf741b4765c9f1296b6c02563d8f484ebef9fe \ sha256 820eee4d8aa32662ff6a7d883a1bcaf4e9bf9ca0a3171d94c5398fe745008750 \ size 1336254 # https://trac.macports.org/ticket/69317 if {![variant_isset tests]} { supported_archs noarch } depends_lib port:armadillo compiler.cxx_standard 2011 configure.args-append \ -DARMADILLO_INCLUDE_DIR=${prefix}/include \ -DARMADILLO_LIBRARY=${prefix}/lib/libarmadillo.dylib variant tests description "Enable testing" { build.target ensmallen_tests pre-test { # This is needed: https://github.com/mlpack/ensmallen/issues/389 if {${os.platform} eq "darwin" && ${configure.cxx_stdlib} ne "libc++"} { move ${cmake.build_dir}/ensmallen_tests \ ${cmake.build_dir}/ensmallen_tests-orig set wrapper [open "${cmake.build_dir}/ensmallen_tests" w 0755] puts ${wrapper} "#!/bin/bash" puts ${wrapper} "" puts ${wrapper} {if [ -n "$DYLD_LIBRARY_PATH" ]; then} puts ${wrapper} " DYLD_LIBRARY_PATH=${prefix}/lib/libgcc:\${DYLD_LIBRARY_PATH}" puts ${wrapper} {else} puts ${wrapper} " DYLD_LIBRARY_PATH=${prefix}/lib/libgcc" puts ${wrapper} {fi} puts ${wrapper} {export DYLD_LIBRARY_PATH} puts ${wrapper} "" puts ${wrapper} {exec "${0}-orig" "$@"} close $wrapper } } test.run yes test.cmd ./ensmallen_tests test.post_args --durations yes test.target }