# -*- 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 91482 2012-04-02 23:22:24Z ryandesign@macports.org $ PortSystem 1.0 PortGroup active_variants 1.1 PortGroup cmake 1.0 name vigra version 1.9.0 categories graphics platforms darwin maintainers gmail.com:benjamin.seppke description Generic Image Processing Library for C++ long_description VIGRA stands for \"Vision with Generic Algorithms\". \ It's a novel computer vision library that puts its \ main emphasis on customizable algorithms and data \ structures. By using template techniques similar to \ those in the C++ Standard Template Library, you can \ easily adapt any VIGRA component to the needs of your \ application, without thereby giving up execution speed. homepage http://hci.iwr.uni-heidelberg.de/vigra/ master_sites ${homepage} distname ${name}-${version}-src use_parallel_build yes #universal_variant no worksrcdir ${name}-${version} checksums rmd160 84e3f1bc985df1ea928e9aa5adc6e0c153cbdd40 \ sha256 8fbdccb553a4925323098ab27b710fbc87d48f37bf81d404994936a31a31cf01 depends_build port:cmake depends_lib port:jpeg \ port:tiff \ port:libpng \ port:zlib \ port:openexr \ port:fftw-3-single \ port:hdf5-18 # Correct the INSTALL_NAME_DIR for Python .so modules # and patch template names in the accumulator-grammar. patchfiles patch-config-VIGRA_ADD_NUMPY_MODULE.cmake.diff \ patch-include-vigra-accumulator-grammar.hxx.diff # Some additional parameters for cmake. All other params have already been set # by the cmake PortGroup configure.args-append -DCMAKE_INSTALL_PREFIX=${prefix} \ -DWITH_OPENEXR=ON \ -DBUILD_SHARED_LIBS=ON # Restrict the usable compilers to clang and llvm # (either XCode >4.0 or MacPorts) and select the # macports-clang-3.2 if no appropriate compiler # is present: if { [string match *llvm* "${configure.compiler}"] == 0 \ && [string match *clang* "${configure.compiler}"] == 0} { depends_build-append port:clang-3.1 configure.compiler macports-clang-3.1 } destroot.env-append DESTDIR=${destroot} post-destroot { if {[variant_isset docs]} { # move documentation to a unversioned directory xinstall -m 755 -d ${destroot}${prefix}/share/doc move ${destroot}${prefix}/doc/${name} \ ${destroot}${prefix}/share/doc/${name} } # delete whatever is left in the doc directory delete ${destroot}${prefix}/doc } variant docs description "Build documentation" {} if {[variant_isset docs]} { depends_lib-append port:doxygen } else { configure.args-append -DDOXYGEN_DOT_EXECUTABLE= \ -DDOXYGEN_EXECUTABLE= } variant valgrind description "Include support for VALGRIND" {} if {[variant_isset valgrind]} { depends_lib-append port:valgrind } else { configure.args-append -DWITH_VALGRIND=NO } variant python26 conflicts python27 description "Also build vigranumpy ptyhon26 bindings" { configure.args-append -DPYTHON_EXECUTABLE=${prefix}/bin/python2.6 \ -DPYTHON_SPHINX=${prefix}/bin/sphinx-build-2.6 depends_lib-append port:boost \ port:python26 \ port:py26-numpy \ port:py26-sphinx require_active_variants boost python26 } variant python27 conflicts python26 description "Also build vigranumpy ptyhon27 bindings" { configure.args-append -DPYTHON_EXECUTABLE=${prefix}/bin/python2.7 \ -DPYTHON_SPHINX=${prefix}/bin/sphinx-build-2.7 depends_lib-append port:boost \ port:python27 \ port:py27-numpy \ port:py27-sphinx require_active_variants boost python27 } default_variants +python27 if { ![variant_isset python26] && ![variant_isset python27] } { configure.args-append -DWITH_VIGRANUMPY=NO } livecheck.type regex livecheck.url ${homepage} livecheck.regex ${name}-(\[0-9.\]+)-src\\.tar