Ticket #46297: paraview_Portfile

File paraview_Portfile, 3.2 KB (added by jjstickel (Jonathan Stickel), 9 years ago)
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:
3
4PortSystem          1.0
5
6PortGroup           cmake 1.0
7PortGroup           qt4 1.0
8
9name                paraview
10version             4.2.0
11# versions 4.3.1 and 4.4.0 have some issues; see Notes section of https://github.com/OpenFOAM/ThirdParty-dev/
12
13# should "graphics" be the primary group?
14categories          science graphics
15platforms           darwin
16license             BSD
17
18set branch          [join [lrange [split ${version} .] 0 1] .]
19
20maintainers         gmail.com:jjstickel openmaintainer
21
22description         3D data analysis and visualization application
23
24long_description    ParaView is an open-source, multi-platform data \
25    analysis and visualization application. ParaView users can quickly \
26    build visualizations to analyze their data using qualitative and \
27    quantitative techniques. The data exploration can be done \
28    interactively in 3D or programmatically using ParaViews batch \
29    processing capabilities.
30
31homepage    http://www.paraview.org/
32master_sites    http://www.paraview.org/files/v${branch}/
33
34distname    ParaView-v${version}-source
35
36checksums           sha256  ac26cc5fe5ce82d27531727a01242353d40984826eaa580edea0791887a07b6b \
37                    rmd160  c326c70e15c2555ddf0700020b8f62c5f69b7a92
38
39depends_build-append    port:readline \
40    port:gmake \
41    port:netcdf \
42    port:qt4-mac-sqlite3-plugin \
43    port:zlib
44
45cmake.out_of_source yes
46
47configure.pre_args-delete\
48    -DCMAKE_INSTALL_PREFIX=${prefix}
49
50configure.args-delete \
51    -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
52    -DCMAKE_INSTALL_RPATH=${prefix}/lib \
53    -DCMAKE_INSTALL_NAME_DIR=${prefix}/lib
54
55# ${destroot} needs to be part of MACOSX_APP_INSTALL_PREFIX; see further
56# comments below, JJS 12/21/15
57configure.args-append \
58    -DBUILD_TESTING:BOOL=OFF \
59    -DMACOSX_APP_INSTALL_PREFIX=${destroot}${applications_dir} \
60    -DZLIB_LIBRARY_RELEASE=${prefix}/lib/libz.dylib
61
62# I do not understand why, but the default "destroot" makes a mess of things;
63# even setting full path of MACOSX_APP_INSTALL_PREFIX above and an empty
64# DESTDIR deos not work; JJS 12/21/15
65destroot {
66    system "cd ${build.dir} && make install"
67}
68
69variant python27 description {Add Python 2.7 support.} {
70    depends_lib-append  port:py27-matplotlib
71    configure.args-append \
72        -DPARAVIEW_ENABLE_PYTHON:BOOL=ON \
73        -DPYTHON_EXECUTABLE=${prefix}/bin/python2.7 \
74        -DPYTHON_INCLUDE_DIR=${prefix}/Library/Frameworks/Python.framework/Versions/2.7/Headers/ \
75        -DPYTHON_LIBRARY=${prefix}/lib/libpython2.7.dylib
76
77    notes-append\
78        "\n Currently paraview installs as an app, including the Python modules. To use with macports python, add /Applications/Macports/paraview.app/Contents/Python/:/Applications/MacPorts/paraview.app/Contents/Libraries/ to PYTHONPATH and /Applications/MacPorts/paraview.app/Contents/Libraries/ to DYLD_LIBRARY_PATH. Also, simultaneous use of Mayavi may result in segfault."
79}
80
81variant ffmpeg description {Add support for FFMPEG} {
82    depends_lib-append port:ffmpeg
83    configure.args-append -DPARAVIEW_ENABLE_FFMPEG:BOOL=ON
84}
85
86default_variants    +python27 +ffmpeg