Ticket #51020: Portfile

File Portfile, 3.0 KB (added by samuel.bateman@…, 8 years ago)

Portfile for VTK version 7.0.0

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 140079 2015-09-09 10:24:32Z stromnov@macports.org $
3
4PortSystem          1.0
5PortGroup           cmake 1.0
6
7name                vtk
8version             7.0.0
9revision            0
10categories          graphics devel
11platforms           darwin
12license             BSD
13
14set branch          [join [lrange [split ${version} .] 0 1] .]
15
16maintainers         stromnov openmaintainer
17
18description         Visualization Toolkit (VTK)
19
20long_description    Visualization Toolkit (VTK) is an open-source, freely \
21                    available software system for 3D computer graphics, \
22                    image processing and visualization.
23
24homepage            http://www.vtk.org
25master_sites        http://www.vtk.org/files/release/${branch}
26
27distname            VTK-${version}
28
29checksums           rmd160  94b4865f9cb371203039470dcbc5c068b12ab720 \
30                    sha256  78a990a15ead79cdc752e86b83cfab7dbf5b7ef51ba409db02570dbdd9ec32c3
31
32cmake.out_of_source yes
33
34configure.args-delete \
35                    -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON
36
37configure.args-append \
38                    ../${distname}/ \
39                    -DBUILD_EXAMPLES:BOOL=OFF \
40                    -DVTK_WRAP_PYTHON:BOOL=OFF \
41                    -DVTK_WRAP_JAVA:BOOL=OFF \
42                    -DVTK_WRAP_TCL:BOOL=OFF
43
44# As proposed at #46890
45if {${os.major} <= 10} {
46    configure.args-append \
47                        -DIOKit:FILEPATH=/System/Library/Frameworks/IOKit.framework
48}
49
50# As proposed at #46853
51variant qt4 description {Add Qt4 support.} {
52    PortGroup           qt4 1.0
53    configure.args-append \
54                        -DQT_QMAKE_EXECUTABLE:PATH=${qt_qmake_cmd} \
55                        -DVTK_Group_Qt:BOOL=ON
56}
57
58variant qt5 description {Add Qt5 support.} {
59    PortGroup           qt5 1.0
60}
61
62variant python27 conflicts python35 description {Add Python 2.7 support.} {
63    depends_lib-append  port:python27
64    configure.args-delete \
65                        -DVTK_WRAP_PYTHON:BOOL=OFF
66    configure.args-append \
67                        -DVTK_WRAP_PYTHON:BOOL=ON \
68                        -DPYTHON_EXECUTABLE:STRING=${prefix}/bin/python2.7 \
69                        -DVTK_INSTALL_PYTHON_MODULE_DIR=${frameworks_dir}/Python.framework/Versions/2.7/lib/python2.7/site-packages
70}
71
72variant python35 conflicts python27 description {Add Python 3.5 support.} {
73    depends_lib-append  port:python35
74    configure.args-delete \
75                        -DVTK_WRAP_PYTHON:BOOL=OFF
76    configure.args-append \
77                        -DVTK_WRAP_PYTHON:BOOL=ON \
78                        -DPYTHON_EXECUTABLE:STRING=${prefix}/bin/python3.5 \
79                        -DVTK_INSTALL_PYTHON_MODULE_DIR=${frameworks_dir}/Python.framework/Versions/3.5/lib/python3.5/site-packages
80}
81
82#default_variants    +python27
83
84livecheck.type      regex
85livecheck.url       http://www.vtk.org/VTK/resources/software.html
86livecheck.regex     {[vV][tT][kK]-(\d+(?:\.\d+)*)\.[tz]}