source: trunk/dports/graphics/vtk44/Portfile

Last change on this file was 83159, checked in by ryandesign@…, 6 years ago

vtk44: use port:-style dependency for cmake

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.7 KB
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 83159 2011-08-26 18:07:52Z ryandesign@macports.org $
3
4PortSystem  1.0
5
6name        vtk44
7version     4.4.2
8
9revision    0
10set branch  [join [lrange [split ${version} .] 0 1] .]
11
12categories  graphics
13maintainers css
14description 3D visualization toolkit
15long_description    An open source, freely available software system  \
16    for 3D computer graphics, image processing, and visualization     \
17    used by thousands of researchers and developers around the world. \
18    VTK consists of a C++ class library, and several interpreted      \
19    interface layers including Tcl/Tk, Java, and Python. (This port   \
20    does not currently provide wrappers for these languages.)
21
22homepage        http://www.vtk.org/
23master_sites    http://www.vtk.org/files/release/${branch}
24
25distname          VTK-${version}
26worksrcdir        VTK
27
28checksums       md5 17a5006c4d7acca3e74d32e0e27f4739 \
29                    sha1 9a68ecefa35f97a79fedd830c369f5b4225d1f55
30
31platforms       darwin freebsd
32
33depends_build   port:cmake
34
35configure {
36    system "cd ${worksrcpath} && cmake ${configure.args} ${worksrcpath};"
37}
38
39configure.args  \
40    -DBUILD_SHARED_LIBS:BOOL=ON \
41    -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
42    -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
43    -DVTK_USE_HYBRID:BOOL=ON \
44    -DVTK_USE_CARBON:BOOL=OFF \
45    -DVTK_USE_COCOA:BOOL=ON \
46    -DCMAKE_SKIP_RPATH:BOOL=OFF \
47    -DCMAKE_INSTALL_NAME_DIR:STRING=${prefix}/lib/${distname} \
48    -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON
49
50platform darwin {
51    # These patches make the code work with gcc4.
52    patchfiles \
53        patch-vtk3DSImporter.cxx \
54        patch-vtkAbstractMapper.cxx \
55        patch-vtkAbstractMapper3D.cxx \
56        patch-vtkAppendFilter.cxx \
57        patch-vtkBMPReader.cxx \
58        patch-vtkBooleanTexture.cxx \
59        patch-vtkBranchExtentTranslator.cxx \
60        patch-vtkCardinalSpline.cxx \
61        patch-vtkCocoaGLView.h \
62        patch-vtkCocoaGLView.mm \
63        patch-vtkCocoaRenderWindow.mm \
64        patch-vtkDecimate.cxx \
65        patch-vtkOSXRenderingTclInit.c \
66        patch-vtkTkWidgetsInit.cxx
67
68    pre-build {
69        reinplace "s;VTK_APPLE_SHARED_FLAGS_NEEDED 1;VTK_APPLE_SHARED_FLAGS_NEEDED 0;" ${worksrcpath}/CMakeLists.txt
70    }
71}
72
73variant x11 description {build VTK with MacPorts X11} {
74    depends_lib-append port:mesa port:Xft2 port:xorg-libXScrnSaver port:xorg-libXt
75    configure.args-delete \
76        -DVTK_USE_COCOA:BOOL=ON
77    configure.args-append \
78        -DVTK_USE_COCOA:BOOL=OFF \
79        -DVTK_USE_X:BOOL=ON \
80        -DOPENGL_INCLUDE_DIR:PATH=${prefix}/include \
81        -DOPENGL_gl_LIBRARY:FILEPATH=${prefix}/lib/libGL.dylib \
82        -DOPENGL_glu_LIBRARY:FILEPATH=${prefix}/lib/libGLU.dylib
83}
84
Note: See TracBrowser for help on using the repository browser.