Ticket #51435: Portfile

File Portfile, 4.3 KB (added by s.t.smith@…, 9 years ago)

Portfile (as modified) attached

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 136969 2015-06-01 12:27:54Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           cmake 1.0
6PortGroup           qt4 1.0
7PortGroup           conflicts_build 1.0
8
9name                orfeotoolbox
10version             4.0.0
11revision            0
12categories          gis graphics
13platforms           darwin
14license             CeCILL
15
16maintainers         gmail.com:julien.malik stromnov openmaintainer
17
18description         OrfeoToolbox - Free library of image processing algorithms
19
20long_description    ORFEO Toolbox (OTB) is distributed as an open source library of image \
21                    processing algorithms. OTB is based on the medical image processing library \
22                    ITK and offers particular functionalities for remote sensing image processing \
23                    in general and for high spatial resolution images in particular. OTB is \
24                    distributed under a free software license CeCILL (similar to GNU GPL) to \
25                    encourage contribution from users and to promote reproducible research.
26
27homepage            http://www.orfeo-toolbox.org/otb/
28master_sites        http://orfeo-toolbox.org/packages/
29
30distname            OTB-${version}
31extract.suffix      .tgz
32
33checksums           rmd160  90ee3e47a79e2bee9525c1a9cbfa050a78e1c360 \
34                    sha256  9875484139b785163c0f0e19e76d458f598fd076b80d0d0aa0e3b59cafcad98e
35
36depends_lib-append  port:tiff \
37                    port:jpeg \
38                    port:libgeotiff \
39                    port:gdal \
40                    port:expat \
41                    port:boost \
42                    port:curl \
43                    port:libkml \
44                    port:tinyxml \
45                    port:muparser \
46                    port:opencv \
47                    port:fftw-3
48
49conflicts_build     libsvm \
50                    openjpeg15 \
51                    OpenSceneGraph \
52                    InsightToolkit
53
54patchfiles-append       patch-Code_ApplicationEngine_otbWrapperApplication.h.diff
55
56use_parallel_build      no
57
58cmake.out_of_source     yes
59
60configure.args-append   -DBUILD_APPLICATIONS=ON \
61                        -DBUILD_EXAMPLES=OFF \
62                        -DBUILD_TESTING=OFF
63
64# The default installation path for library is ${prefix}/lib/otb
65# But the cmake PortGroup is using rpath and CMAKE_INSTALL_NAME_DIR=${prefix}/lib
66configure.args-replace  -DCMAKE_INSTALL_NAME_DIR=${prefix}/lib \
67                        -DCMAKE_INSTALL_NAME_DIR=${prefix}/lib/otb
68
69# Use external libs, where available
70configure.args-append   -DOTB_USE_EXTERNAL_EXPAT=ON \
71                        -DOTB_USE_EXTERNAL_BOOST=ON \
72                        -DOTB_USE_EXTERNAL_TINYXML=ON \
73                        -DOTB_USE_EXTERNAL_LIBKML=ON \
74                        -DOTB_USE_EXTERNAL_MUPARSER=ON \
75                        -DOTB_USE_CURL=ON \
76                        -DOTB_USE_OPENCV=ON
77
78# Use internal ITK (MacPorts ITK is outdated)
79configure.args-append   -DOTB_USE_EXTERNAL_ITK=OFF \
80                        -DOTB_USE_PATENTED=OFF
81
82# Use internal openjpeg (OTB needs 2.0 API, but does not support using the external lib yet)
83configure.args-append   -DOTB_USE_JPEG2000=ON
84
85# Use internal libs (no MacPorts alternatives available)
86configure.args-append   -DOTB_USE_EXTERNAL_OPENTHREADS=OFF \
87                        -DOTB_USE_EXTERNAL_OSSIM=OFF \
88                        -DOTB_USE_SIFTFAST=ON
89
90configure.args-append   -DITK_USE_FFTWF=OFF
91
92variant qt4 description {Wrap QT4} {
93    depends_lib-append      port:qt4-mac
94    configure.args-append   -DOTB_WRAP_QT=ON
95}
96
97variant python27 description {Wrap Python 2.7} {
98    depends_lib-append      port:python27 \
99                            port:swig \
100                            port:swig-python
101
102    patchfiles-append       patch-Code-Wrappers-SWIG-__init__.py.in.diff \
103                            patch-Code-Wrappers-SWIG-CMakeLists.txt.diff
104
105    configure.args-append   -DOTB_WRAP_PYTHON=ON \
106                            -DPYTHON_EXECUTABLE=${prefix}/bin/python2.7 \
107                            -DOTB_INSTALL_PYTHON_DIR=${frameworks_dir}/Python.framework/Versions/2.7/lib/python2.7/site-packages
108}
109
110livecheck.type      regex
111livecheck.url       ${master_sites}
112livecheck.regex     {OTB-(\d+(?:\.\d+)*)\.[tz]}