# -*- 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$ PortSystem 1.0 name eigen3 version 3.2.0 revision 0 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} homepage http://eigen.tuxfamily.org/ platforms darwin master_sites http://bitbucket.org/eigen/eigen/get/ distname ${version} # Eigen seems to like to stealth update; keeping this around for the next time # 3.0.4 was stealth updated; see #32613 #dist_subdir ${name}/${version}_32613 use_bzip2 yes checksums \ rmd160 47f27c61968c50e8e67ea124268b95953ff3e625 \ sha256 011f78960d939227f9276173d0c4cc0053bb9e0a7356539a9a6c7c89d984fab6 conflicts eigen3-devel livecheck.type regex livecheck.url ${homepage}index.php?title=Main_Page livecheck.regex {stable release.*Eigen (\d+(?:\.\d+)*).} subport eigen3-devel { conflicts eigen3 # No current development version (other than rolling snapshot) version 3.2.0 revision 0 # rc version seen as older than beta epoch 1 distname ${version} checksums \ rmd160 47f27c61968c50e8e67ea124268b95953ff3e625 \ sha256 011f78960d939227f9276173d0c4cc0053bb9e0a7356539a9a6c7c89d984fab6 livecheck.regex \ {development release.*Eigen (([\d]|\.|beta|rc|-)+)\.} } # Install via CMake by default. Slower than a header-only install, but makes # other CMake-based builds happy default_variants +cmake # Variants variant gcc44 description {Use MacPorts' gcc44 compilers for +blas} \ conflicts gcc45 gcc46 gcc47 gcc48 gcc49 { configure.compiler macports-gcc-4.4 } variant gcc45 description {Use MacPorts' gcc45 compilers for +blas} \ conflicts gcc44 gcc46 gcc47 gcc48 gcc49 { configure.compiler macports-gcc-4.5 } variant gcc46 description {Use MacPorts' gcc46 compilers for +blas} \ conflicts gcc44 gcc45 gcc47 gcc48 gcc49 { configure.compiler macports-gcc-4.6 } variant gcc47 description {Use MacPorts' gcc47 compilers for +blas} \ conflicts gcc44 gcc45 gcc46 gcc48 gcc49 { configure.compiler macports-gcc-4.7 } variant gcc48 description {Use MacPorts' gcc48 compilers for +blas} \ conflicts gcc44 gcc45 gcc46 gcc47 gcc49 { configure.compiler macports-gcc-4.8 } variant gcc49 description {Use MacPorts' gcc49 compilers for +blas} \ conflicts gcc44 gcc45 gcc46 gcc47 gcc48 { configure.compiler macports-gcc-4.9 } variant doc \ description \ {Place local documentation into /share/doc/eigen3/html}\ requires cmake { depends_build-append port:doxygen \ port:texlive-latex \ path:bin/dot:graphviz build.target-append doc } variant blas description \ {Build eigen-based blas (libeigen_blas*) : needs +gcc4N} \ requires cmake { if {![variant_isset gcc44] && ![variant_isset gcc45] && ![variant_isset gcc46] && ![variant_isset gcc47] && ![variant_isset gcc48] && ![variant_isset gcc49]} { ui_error "eigen3: To use +blas please select +gcc4\[456789\]!!!" return -code error } else { PortGroup muniversal 1.0 build.target-append blas universal_variant yes configure.universal_args "" } } if {([variant_isset gcc44] || [variant_isset gcc45] || [variant_isset gcc46] || [variant_isset gcc47] || [variant_isset gcc48] || [variant_isset gcc49]) && ![variant_isset blas]} { ui_warn "eigen3: gcc4* only impacts +blas" } variant cmake description \ {CMake-based install: Disabling removes CMake support} { # Not using cmake portgroup as it sets -DCMAKE_OSX_ARCHITECTURES # in a way we don't seem to be able disable. set cmake_share_module_dir ${prefix}/share/cmake/modules depends_build-append port:cmake configure.cmd cmake configure.pre_args -DCMAKE_INSTALL_PREFIX=${prefix} configure.args -DCMAKE_VERBOSE_MAKEFILE=ON \ -DCMAKE_COLOR_MAKEFILE=ON \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \ -DCMAKE_INSTALL_NAME_DIR=${prefix}/lib \ -DCMAKE_SYSTEM_PREFIX_PATH=\"${prefix}\;/usr\" \ -DCMAKE_MODULE_PATH=${cmake_share_module_dir} \ -Wno-dev # Out of source build configure.args-append ../eigen_src # Enable test cases if we've actually configured 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} } # Conditional phase modifications if {![variant_isset blas]} { # No architecture-dependent files installed; set noarch supported_archs noarch } # Are we doing a header-only or cmake (for 'port test' or +doc/+blas) build? if {![variant_isset cmake]} { # We can skip everything and just copy the headers -- fast! use_configure no build {} destroot { set incldir ${destroot}${prefix}/include/${name} xinstall -d ${incldir} file copy ${workpath}/eigen_src/Eigen ${incldir} file copy ${workpath}/eigen_src/unsupported ${incldir} } # Fail with message if user tries to test test.run yes test { ui_error "!!! TESTING IS UNSUPPORTED WITHOUT +cmake VARIANT !!!" } } # Phase modifications pre-extract { file mkdir ${worksrcpath} } # Avoid issues when archive changes the top-level directory name extract.post_args-append -C ${worksrcpath} --strip-components 1 post-patch { # Move directory for out-of-source build move ${worksrcpath} ${workpath}/eigen_src file mkdir ${worksrcpath} } # Install licenses and documentation (if +doc) 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/${name} xinstall -d ${docdir} xinstall -m 644 -W ${workpath}/eigen_src \ 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 ${worksrcpath}${sfx}/doc/html ${docdir} } } if {[variant_isset blas]} { set libdir ${destroot}${sfx}${prefix}/lib xinstall -d ${libdir} eval file copy \ [glob ${worksrcpath}${sfx}/blas/libeigen_blas*] ${libdir} } } }