Ticket #3688: patch-Portfile.2.diff
File patch-Portfile.2.diff, 3.3 KB (added by cssdev, 16 years ago) |
---|
-
Portfile
1 1 # $Id$ 2 2 3 3 PortSystem 1.0 4 4 5 name VTK 5 version 4.2.6 6 revision 3 6 version 4.4.2 7 7 categories graphics 8 8 maintainers css 9 9 description 3D visualization toolkit … … 15 15 16 16 homepage http://www.vtk.org/ 17 17 platforms darwin freebsd 18 master_sites sourceforge:vtk 19 checksums md5 41382fb3f8d15e76d7464c11045ee7a5 18 master_sites ${homepage}/files/release/4.4/ 19 checksums md5 17a5006c4d7acca3e74d32e0e27f4739 \ 20 sha1 9a68ecefa35f97a79fedd830c369f5b4225d1f55 20 21 21 22 depends_build bin:cmake:cmake 22 distfiles ${name}-4.2-LatestRelease${extract.suffix} 23 distname ${name} 23 worksrcdir ${name} 24 24 25 post-extract {26 set fl [open "| grep VTK_BUILD_VERSION ${worksrcpath}/CMakeLists.txt | grep 6"]27 set data [read $fl]28 close $fl29 if {$data != "SET(VTK_BUILD_VERSION 6)\n"} { ui_msg "$data30 ================================================================31 Warning : the Latest VTK version is not the same as the Portfile32 The build may still succeed but this should be reported as a bug33 ================================================================"34 }35 }36 37 25 configure { system "cd ${worksrcpath} && cmake ${configure.args} ${worksrcpath}" } 38 26 configure.args -D BUILD_SHARED_LIBS:BOOL=ON \ 39 27 -D CMAKE_VERBOSE_MAKEFILE:BOOL=ON \ … … 45 33 -D CMAKE_INSTALL_NAME_DIR:STRING=${prefix}/lib/vtk \ 46 34 -D CMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON 47 35 48 platform darwin 8 { 49 patchfiles patch-vtk3DSImporter.cxx \ 50 patch-vtkAbstractMapper.cxx \ 51 patch-vtkAbstractMapper3D.cxx \ 52 patch-vtkAppendFilter.cxx \ 53 patch-vtkBMPReader.cxx \ 54 patch-vtkBooleanTexture.cxx \ 55 patch-vtkCardinalSpline.cxx \ 56 patch-vtkCocoaGLView.h \ 57 patch-vtkCocoaGLView.mm \ 58 patch-vtkImageReader.cxx \ 59 patch-vtkOSXRenderingTclInit.c \ 60 patch-vtkTkWidgetsInit.cxx 36 platform darwin { 37 if { ${os.major} >= 8 } { 38 # These patches make the code work with gcc4. 39 patchfiles patch-vtk3DSImporter.cxx \ 40 patch-vtkAbstractMapper.cxx \ 41 patch-vtkAbstractMapper3D.cxx \ 42 patch-vtkAppendFilter.cxx \ 43 patch-vtkBMPReader.cxx \ 44 patch-vtkBooleanTexture.cxx \ 45 patch-vtkBranchExtentTranslator.cxx \ 46 patch-vtkCardinalSpline.cxx \ 47 patch-vtkDecimate.cxx \ 48 patch-vtkOSXRenderingTclInit.c \ 49 patch-vtkTkWidgetsInit.cxx 61 50 62 pre-build { 63 reinplace "s;VTK_APPLE_SHARED_FLAGS_NEEDED 1;VTK_APPLE_SHARED_FLAGS_NEEDED 0;" ${worksrcpath}/CMakeLists.txt 64 } 51 pre-build { 52 reinplace "s;VTK_APPLE_SHARED_FLAGS_NEEDED 1;VTK_APPLE_SHARED_FLAGS_NEEDED 0;" ${worksrcpath}/CMakeLists.txt 53 } 54 } 65 55 } 66 56 67 57 variant x11 { 68 depends_build-append port:xorg-libs 58 depends_build-append port:xorg-libs\ 59 port:mesa 69 60 configure.args-delete "-D VTK_USE_COCOA:BOOL=ON" 70 61 configure.args-append -D VTK_USE_COCOA:BOOL=OFF \ 71 62 -D VTK_USE_X:BOOL=ON \ 72 -D OPENGL_gl_LIBRARY:FILEPATH=/usr/X11R6/lib/libGL.dylib \ 73 -D OPENGL_glu_LIBRARY:FILEPATH=/usr/X11R6/lib/libGLU.dylib 63 -D OPENGL_INCLUDE_DIR:PATH=${x11prefix}/include/ \ 64 -D OPENGL_gl_LIBRARY:FILEPATH=${x11prefix}/lib/libGL.dylib \ 65 -D OPENGL_glu_LIBRARY:FILEPATH=${x11prefix}/lib/libGLU.dylib 74 66 } 75 76