# -*- 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           github 1.0
PortGroup           mpi 1.0
PortGroup           boost 1.0

github.setup        ALPSCore ALPSCore 2.2.0 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            13

categories          science
platforms           darwin
license             GPL-2
maintainers         {umich.edu:galexv @galexv}

description         A package for the simulation of condensed matter physics problems: Core Libraries
long_description    ALPSCore contains the core libraries of the applications and libraries \
                    for physics simulations, ALPS. The package is maintained by the UMich group, \
                    for more information see alpscore.org

homepage            http://alpscore.org

checksums           rmd160  7ef9f655f55a21658da9d7af00025d2eb7ab5a9a \
                    sha256  01ae0c7be844d4497da96bd8b329bced3eeb4dce1101f193206e9b1c0c68068f \
                    size 1405042


depends_lib         port:hdf5  \
                    path:share/pkgconfig/eigen3.pc:eigen3

compiler.cxx_standard   2011

compilers.choose    cc cxx
mpi.setup           -gcc

boost.version       1.71

configure.args      -DTesting=ON \
                    -DExtensiveTesting=OFF \
                    -DBOOST_ROOT=[boost::install_area] \
                    -DENABLE_MPI=OFF\
                    -DMPIEXEC:STRING="${mpi.exec}" \
                    -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF \
                    -DCMAKE_SKIP_RPATH:BOOL=OFF \
                    -DTestXMLOutput=TRUE \
                    -DDocumentation=OFF

if {[mpi_variant_isset]} {
  configure.args-replace -DENABLE_MPI=OFF -DENABLE_MPI=ON
}

cmake.out_of_source yes
# Our CMake scripts manage optimization flags
cmake.build_type    RelWithDebInfo
configure.optflags  ""
configure.cflags-delete   -DNDEBUG
configure.cxxflags-delete -DNDEBUG
configure.cppflags-delete -DNDEBUG

test.run            yes
test.target         test
