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 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | PortGroup active_variants 1.1 |
---|
7 | PortGroup cmake 1.0 |
---|
8 | |
---|
9 | name vigra |
---|
10 | version 1.9.0 |
---|
11 | categories graphics |
---|
12 | platforms darwin |
---|
13 | maintainers gmail.com:benjamin.seppke |
---|
14 | description Generic Image Processing Library for C++ |
---|
15 | long_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. |
---|
22 | homepage http://hci.iwr.uni-heidelberg.de/vigra/ |
---|
23 | master_sites ${homepage} |
---|
24 | distname ${name}-${version}-src |
---|
25 | use_parallel_build yes |
---|
26 | #universal_variant no |
---|
27 | worksrcdir ${name}-${version} |
---|
28 | |
---|
29 | checksums rmd160 84e3f1bc985df1ea928e9aa5adc6e0c153cbdd40 \ |
---|
30 | sha256 8fbdccb553a4925323098ab27b710fbc87d48f37bf81d404994936a31a31cf01 |
---|
31 | |
---|
32 | depends_build port:cmake |
---|
33 | depends_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. |
---|
43 | patchfiles 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 |
---|
48 | configure.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: |
---|
56 | if { [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 | |
---|
62 | destroot.env-append DESTDIR=${destroot} |
---|
63 | |
---|
64 | post-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 | |
---|
75 | variant docs description "Build documentation" {} |
---|
76 | if {[variant_isset docs]} { |
---|
77 | depends_lib-append port:doxygen |
---|
78 | } else { |
---|
79 | configure.args-append -DDOXYGEN_DOT_EXECUTABLE= \ |
---|
80 | -DDOXYGEN_EXECUTABLE= |
---|
81 | } |
---|
82 | |
---|
83 | |
---|
84 | variant valgrind description "Include support for VALGRIND" {} |
---|
85 | if {[variant_isset valgrind]} { |
---|
86 | depends_lib-append port:valgrind |
---|
87 | } else { |
---|
88 | configure.args-append -DWITH_VALGRIND=NO |
---|
89 | } |
---|
90 | |
---|
91 | variant 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 | |
---|
101 | variant 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 | |
---|
111 | default_variants +python27 |
---|
112 | |
---|
113 | if { ![variant_isset python26] && ![variant_isset python27] } { |
---|
114 | configure.args-append -DWITH_VIGRANUMPY=NO |
---|
115 | } |
---|
116 | |
---|
117 | livecheck.type regex |
---|
118 | livecheck.url ${homepage} |
---|
119 | livecheck.regex ${name}-(\[0-9.\]+)-src\\.tar |
---|