Ticket #38062: Portfile

File Portfile, 4.3 KB (added by BSeppke (Benjamin Seppke), 11 years ago)

without black or whitelists, just does what it should do...

Line 
1# -*- 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
2# $Id: Portfile 91482 2012-04-02 23:22:24Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6PortGroup           active_variants 1.1
7PortGroup                       cmake 1.0
8
9name                vigra
10version             1.9.0
11categories          graphics
12platforms           darwin
13maintainers         gmail.com:benjamin.seppke
14description         Generic Image Processing Library for C++
15long_description    VIGRA stands for \"Vision with Generic Algorithms\". \
16                    It's a novel computer vision library that puts its \
17                    main emphasis on customizable algorithms and data \
18                    structures. By using template techniques similar to \
19                    those in the C++ Standard Template Library, you can \
20                    easily adapt any VIGRA component to the needs of your \
21                    application, without thereby giving up execution speed.
22homepage            http://hci.iwr.uni-heidelberg.de/vigra/
23master_sites        ${homepage}
24distname            ${name}-${version}-src
25use_parallel_build  yes
26#universal_variant   no
27worksrcdir          ${name}-${version}
28
29checksums           rmd160  84e3f1bc985df1ea928e9aa5adc6e0c153cbdd40 \
30                    sha256  8fbdccb553a4925323098ab27b710fbc87d48f37bf81d404994936a31a31cf01
31
32depends_build       port:cmake
33depends_lib         port:jpeg \
34                    port:tiff \
35                    port:libpng \
36                    port:zlib \
37                    port:openexr \
38                    port:fftw-3-single \
39                    port:hdf5-18
40
41# Correct the INSTALL_NAME_DIR for Python .so modules
42# and patch template names in the accumulator-grammar.
43patchfiles          patch-config-VIGRA_ADD_NUMPY_MODULE.cmake.diff \
44                            patch-include-vigra-accumulator-grammar.hxx.diff
45                           
46# Some additional parameters for cmake. All other params have already been set
47# by the cmake PortGroup
48configure.args-append   -DCMAKE_INSTALL_PREFIX=${prefix} \
49                        -DWITH_OPENEXR=ON \
50                        -DBUILD_SHARED_LIBS=ON
51
52# Restrict the usable compilers to clang and llvm
53# (either XCode >4.0 or MacPorts) and select the
54# macports-clang-3.2 if no appropriate compiler
55# is present:
56if {    [string match *llvm*  "${configure.compiler}"] == 0 \
57         && [string match *clang* "${configure.compiler}"] == 0} {
58    depends_build-append port:clang-3.1
59    configure.compiler macports-clang-3.1
60}
61
62destroot.env-append DESTDIR=${destroot}
63
64post-destroot {
65    if {[variant_isset docs]} {
66        # move documentation to a unversioned directory
67        xinstall -m 755 -d ${destroot}${prefix}/share/doc
68        move ${destroot}${prefix}/doc/${name} \
69             ${destroot}${prefix}/share/doc/${name}
70    }
71    # delete whatever is left in the doc directory
72    delete ${destroot}${prefix}/doc
73}
74
75variant docs description "Build documentation" {}
76if {[variant_isset docs]} {
77    depends_lib-append port:doxygen
78} else {
79    configure.args-append       -DDOXYGEN_DOT_EXECUTABLE= \
80                                                -DDOXYGEN_EXECUTABLE=
81}
82
83
84variant valgrind description "Include support for VALGRIND" {}
85if {[variant_isset valgrind]} {
86    depends_lib-append port:valgrind
87} else {
88    configure.args-append -DWITH_VALGRIND=NO
89}
90
91variant python26 conflicts python27 description "Also build vigranumpy ptyhon26 bindings" {
92        configure.args-append   -DPYTHON_EXECUTABLE=${prefix}/bin/python2.6 \
93                                                -DPYTHON_SPHINX=${prefix}/bin/sphinx-build-2.6
94        depends_lib-append      port:boost \
95                                        port:python26 \
96                                                port:py26-numpy \
97                                        port:py26-sphinx
98        require_active_variants boost python26
99}
100
101variant python27 conflicts python26 description "Also build vigranumpy ptyhon27 bindings" {
102        configure.args-append   -DPYTHON_EXECUTABLE=${prefix}/bin/python2.7 \
103                                                -DPYTHON_SPHINX=${prefix}/bin/sphinx-build-2.7
104        depends_lib-append      port:boost \
105                                        port:python27 \
106                                                port:py27-numpy \
107                                        port:py27-sphinx
108        require_active_variants boost python27
109}
110
111default_variants +python27
112
113if {   ![variant_isset python26] && ![variant_isset python27] } {
114        configure.args-append -DWITH_VIGRANUMPY=NO     
115}
116
117livecheck.type      regex
118livecheck.url       ${homepage}
119livecheck.regex     ${name}-(\[0-9.\]+)-src\\.tar