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 75743 2011-02-06 19:23:17Z michaelld@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name vigra |
---|
7 | version 1.8.0 |
---|
8 | revision 1 |
---|
9 | categories graphics |
---|
10 | platforms darwin |
---|
11 | maintainers gmail.com:benjamin.seppke |
---|
12 | description Generic Image Processing Library for C++ |
---|
13 | long_description VIGRA stands for \"Vision with Generic Algorithms\". \ |
---|
14 | It's a novel computer vision library that puts its \ |
---|
15 | main emphasis on customizable algorithms and data \ |
---|
16 | structures. By using template techniques similar to \ |
---|
17 | those in the C++ Standard Template Library, you can \ |
---|
18 | easily adapt any VIGRA component to the needs of your \ |
---|
19 | application, without thereby giving up execution speed. |
---|
20 | homepage http://hci.iwr.uni-heidelberg.de/vigra/ |
---|
21 | master_sites ${homepage} |
---|
22 | distname ${name}-${version}-src |
---|
23 | use_parallel_build yes |
---|
24 | #universal_variant no |
---|
25 | worksrcdir ${name}-${version} |
---|
26 | |
---|
27 | checksums md5 15c5544448e529ee60020758ab6be264 \ |
---|
28 | sha1 09f1d506c2748ebeb7d9f1c77ce387f9e7b837d2 \ |
---|
29 | rmd160 99d781da6e0ca94ce3404e1bcb3adeb9e43a2017 |
---|
30 | |
---|
31 | depends_lib port:jpeg \ |
---|
32 | port:tiff \ |
---|
33 | port:libpng \ |
---|
34 | port:zlib \ |
---|
35 | port:fftw-3 \ |
---|
36 | port:hdf5-18 |
---|
37 | |
---|
38 | # correct the INSTALL_NAME_DIR for Python .so modules |
---|
39 | patchfiles patch-config-VIGRA_ADD_NUMPY_MODULE.cmake.diff |
---|
40 | |
---|
41 | configure.cmd cmake |
---|
42 | |
---|
43 | configure.args -DSKIP_BUILD_RPATH=TRUE \ |
---|
44 | -DCMAKE_VERBOSE_MAKEFILE=ON \ |
---|
45 | -DCMAKE_BUILD_TYPE=Release \ |
---|
46 | -DCMAKE_SYSTEM_PREFIX_PATH=\"${prefix}\;/usr\" \ |
---|
47 | -DCMAKE_INSTALL_PREFIX=${prefix} \ |
---|
48 | -DCMAKE_INSTALL_NAME_DIR=${prefix}/lib \ |
---|
49 | -DCMAKE_INCLUDE_PATH=${prefix}/include \ |
---|
50 | -DCMAKE_LIBRARY_PATH=${prefix}/lib \ |
---|
51 | -DJPEG_INCLUDE_DIR=${prefix}/include \ |
---|
52 | -DPNG_PNG_INCLUDE_DIR=${prefix}/include \ |
---|
53 | -DTIFF_INCLUDE_DIR=${prefix}/include \ |
---|
54 | -Wno-dev \ |
---|
55 | -DBUILD_SHARED_LIBS=ON |
---|
56 | configure.post_args . |
---|
57 | |
---|
58 | destroot.env-append DESTDIR=${destroot} |
---|
59 | |
---|
60 | post-destroot { |
---|
61 | # fix location of documentation to include version. |
---|
62 | # remove documentation if no variant is set. |
---|
63 | # for now since NumPy variant does not work, just |
---|
64 | # move what can be moved and delete the rest. |
---|
65 | if {[variant_isset docs]} { |
---|
66 | # move documentation to a versioned directory |
---|
67 | xinstall -m 755 -d ${destroot}${prefix}/share/doc |
---|
68 | move ${destroot}${prefix}/doc/${name} \ |
---|
69 | ${destroot}${prefix}/share/doc/${name}-${version} |
---|
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 \ |
---|
80 | -DBUILD_doc=OFF \ |
---|
81 | -DDOXYGEN_DOT_EXECUTABLE= \ |
---|
82 | -DDOXYGEN_DOT_PATH= \ |
---|
83 | -DDOXYGEN_EXECUTABLE= |
---|
84 | } |
---|
85 | |
---|
86 | variant valgrind description "Include support for VALGRIND" {} |
---|
87 | if {[variant_isset valgrind]} { |
---|
88 | depends_lib-append port:valgrind |
---|
89 | } else { |
---|
90 | configure.args-append -DWITH_VALGRIND=NO |
---|
91 | } |
---|
92 | |
---|
93 | # just like it's done in games/PlasmaClient and other ports that |
---|
94 | # require Boost::Python. |
---|
95 | if {![file exists ${prefix}/lib/libboost_python-mt.dylib]} { |
---|
96 | # just disable NUMPY bindings via a CMake flag |
---|
97 | configure.args-append -DWITH_VIGRANUMPY=NO |
---|
98 | |
---|
99 | pre-fetch { |
---|
100 | ui_msg " |
---|
101 | **** |
---|
102 | **** To get NUMPY bindings, ${name} requires the port 'boost' to |
---|
103 | **** be installed with the variant +python26. If you want NUMPY |
---|
104 | **** bindings, then please do the following first: |
---|
105 | **** |
---|
106 | **** sudo port install boost +python26 |
---|
107 | **** |
---|
108 | **** and then try installing ${name} again. |
---|
109 | **** |
---|
110 | " |
---|
111 | } |
---|
112 | } else { |
---|
113 | # assume Python version 2.6, no matter what the user has actually |
---|
114 | # installed via "port install boost +pythonXY". |
---|
115 | set python_version "2.6" |
---|
116 | |
---|
117 | # append cmake flags |
---|
118 | configure.args-append \ |
---|
119 | -DPYTHON_EXECUTABLE=${prefix}/bin/python${python_version} \ |
---|
120 | -DPYTHON_SPHINX=${prefix}/bin/sphinx-build-${python_version} |
---|
121 | |
---|
122 | # make sure dependencies are installed |
---|
123 | set python_version_join [join [split ${python_version} "."] ""] |
---|
124 | depends_lib-append port:boost \ |
---|
125 | port:python${python_version_join} \ |
---|
126 | port:py${python_version_join}-numpy \ |
---|
127 | port:py${python_version_join}-sphinx |
---|
128 | } |
---|
129 | |
---|
130 | livecheck.type regex |
---|
131 | livecheck.url ${homepage} |
---|
132 | livecheck.regex ${name}-(\[0-9.\]+)-src\\.tar |
---|