# -*- 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 # $Id: Portfile 153081 2016-09-23 21:09:30Z eborisch@macports.org $ PortSystem 1.0 PortGroup compilers 1.0 PortGroup cmake 1.0 PortGroup bitbucket 1.0 name eigen3 license MPL-2 LGPL-3+ categories math science maintainers eborisch \ openmaintainer description A C++ template library for linear algebra: vectors, \ matrices, and related algorithms. long_description ${description} platforms darwin livecheck.url http://eigen.tuxfamily.org use_bzip2 yes depends_build-append port:pkgconfig subport eigen3-devel {} if {${subport} eq ${name}} { bitbucket.setup eigen eigen 3.2.9 revision 0 name eigen3 conflicts eigen3-devel patchfiles unsupported.patch livecheck.regex {Eigen (\d+(\.\d+)+) released} checksums \ rmd160 0cbbc6c41414f0170d50ba40dc7b959f92587cef \ sha256 4d1e036ec1ed4f4805d5c6752b76072d67538889f4003fadf2f6e00a825845ff } else { # No current development version (other than rolling snapshot) bitbucket.setup eigen eigen 3.3-rc1 revision 0 name eigen3-devel conflicts eigen3 livecheck.regex {development release.*>(\d+((-[a-z]+|\.)\d+)+)<} # rc version seen as older than beta epoch 1 checksums \ rmd160 15d771891b1f01304817fe6cb7335bea0d192397 \ sha256 ec5109cb4cfa2c7b728172d859f7ffef86ee35de78d3d40bbcc2ff78d8dcc854 } homepage http://eigen.tuxfamily.org/ variant doc description \ {Place local documentation into /share/doc/eigen3/html} { depends_build-append port:doxygen \ port:texlive-latex \ path:bin/dot:graphviz build.target-append doc } variant blas description \ {Build eigen's blas (libeigen_blas*) : needs +gccNN, +g95, or +gfortran} { PortGroup muniversal 1.0 build.target-append blas universal_variant yes configure.universal_args "" } configure.env-append PKG_CONFIG_LIBDIR=${prefix}/lib/pkgconfig cmake.out_of_source yes test.run yes test.target check test.env-append EIGEN_MAKE_ARGS=-j{build.jobs} \ EIGEN_CTEST_ARGS=-j{build.jobs} # Enable parallel builds build.env-append EIGEN_MAKE_ARGS=-j{build.jobs} ### END CMAKE SUPPORT # Setup compilers support / requirements if {[variant_isset blas]} { compilers.choose cc cxx cpp fc f77 f90 compilers.setup require_fortran } elseif {[variant_isset doc]} { compilers.choose cc cxx cpp compilers.setup } else { # No architecture-dependent files installed; set noarch supported_archs noarch compilers.setup } ### Extra phases pre-extract { file mkdir ${worksrcpath} } # Avoid issues when archive changes the top-level directory name extract.post_args-append -C ${worksrcpath} --strip-components 1 # Install licenses and (if +doc) documentation pre-destroot { set build_suffix {} if {![info exists universal_archs_to_use]} { lappend build_suffix "" } else { set dash "-" foreach arch ${universal_archs_to_use} { lappend build_suffix ${dash}${arch} } } foreach sfx ${build_suffix} { set docdir ${destroot}${sfx}${prefix}/share/doc/eigen3 xinstall -d ${docdir} xinstall -m 644 -W ${worksrcpath} \ COPYING.GPL COPYING.LGPL ${docdir} # Install documentation if requested if {[variant_isset doc]} { if {[string equal ${sfx} [lindex ${build_suffix} 0]]} { # The documentation created is slightly different for each arch # which makes muniversal hiccup. Just copy one set of docs # into destroot directories. file copy ${cmake.build_dir}${sfx}/doc/html ${docdir} } } if {[variant_isset blas]} { set libdir ${destroot}${sfx}${prefix}/lib xinstall -d ${libdir} eval file copy \ [glob ${cmake.build_dir}${sfx}/blas/libeigen_blas*] ${libdir} } } } post-destroot { # Grab extra items install doesn't out of unsupported foreach n {README.txt bench} { file copy ${worksrcpath}/unsupported/${n} \ ${destroot}${prefix}/include/eigen3/unsupported } # Install FindEigen3.cmake file xinstall -d ${destroot}${cmake_share_module_dir} xinstall -m 444 ${worksrcpath}/cmake/FindEigen3.cmake \ ${destroot}${cmake_share_module_dir} } notes " This product includes software developed by the University of Chicago, as\ Operator of Argonne National Laboratory. "