# -*- 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 # $Id: Portfile 99750 2012-11-16 09:44:45Z vince@macports.org $ PortSystem 1.0 PortGroup cmake 1.0 name cgal version 4.1 # revision 1 license LGPL-3+ GPL-3+ categories gis science maintainers vince description Computational Geometry Algorithm Library long_description \ The goal of the CGAL is to provide easy access to\ efficient and reliable geometric algorithms in the\ form of a C++ library. CGAL is used in various areas\ needing geometric computation, such as: computer\ graphics, scientific visualization, computer aided\ design and modeling, geographic information systems,\ molecular biology, medical imaging, robotics and\ motion planning, mesh generation, numerical methods... platforms darwin homepage http://www.cgal.org/ fetch.ignore_sslcert yes master_sites https://gforge.inria.fr/frs/download.php/31640 distname CGAL-${version} checksums rmd160 183e1842ab0d30061fc5670f762e6f70d1d003fb \ sha256 878d4c3e579d886c2de05e04e8dc2cc9ebf094c5700ca4187521ef0fb673658e use_bzip2 yes worksrcdir CGAL-${version} depends_lib-append port:boost \ port:mpfr \ port:zlib \ port:gmp \ port:eigen3 #patchfiles patch-CGAL_SetupBoost.cmake.diff configure.args-append -DCGAL_INSTALL_CMAKE_DIR="lib/cmake" \ -DWITH_CGAL_Qt3:BOOL=OFF \ -DWITH_CGAL_Qt4:BOOL=OFF \ -DBoost_DIR:PATH=${prefix} \ -DWITH_Eigen3:BOOL=ONĀ \ -DWITH_ZLIB:BOOL=ON # gcc 4.0 is too old to compile CGAL properly; see if {${configure.compiler} == "gcc-4.0"} { configure.compiler gcc-4.2 if {![file executable ${configure.cc}]} { depends_build-append port:apple-gcc42 configure.compiler apple-gcc-4.2 } } variant demos description {Create demos} requires qt4 { depends_lib-append port:libQGLViewer \ port:ipe \ port:metis patchfiles-append patch-CMakeLists.txt.diff configure.args-append -DWITH_examples:BOOL=ON configure.args-append -DWITH_demos:BOOL=ON configure.args-append -DWITH_QGLViewer:BOOL=ON configure.args-append -DWITH_OpenGL:BOOL=ON # MacPorts installs IPE version 7; make sure to use it. configure.args-append -DWITH_IPE:BOOL=ON # include Qt's CMake defines, just in case configure.args-append ${qt_cmake_defines} build.target-append examples demos use_parallel_build no post-destroot { xinstall -d ${destroot}${prefix}/share/${name} copy ${worksrcpath}/demo ${destroot}${prefix}/share/${name} copy ${worksrcpath}/examples ${destroot}${prefix}/share/${name} eval move [glob ${destroot}${prefix}/share/${name}/demo/*/*.dylib] ${destroot}${prefix}/lib/ delete ${destroot}${prefix}/share/${name}/demo/CMakeFiles \ ${destroot}${prefix}/share/${name}/examples/CMakeFiles eval delete [glob ${destroot}${prefix}/share/${name}/demo/*/CMakeFiles] eval delete [glob ${destroot}${prefix}/share/${name}/demo/*/*/CMakeFiles] eval delete [glob ${destroot}${prefix}/share/${name}/examples/*/CMakeFiles] } } variant debug description {Build with debug symbols} { configure.args-delete -DCMAKE_BUILD_TYPE=Release configure.args-append -DCMAKE_BUILD_TYPE=Debug post-destroot { eval exec dsymutil [glob ${destroot}${prefix}/lib/*.dylib] } } variant qt4 description {Build with Qt4 bindings} { PortGroup qt4 1.0 configure.args-delete -DWITH_CGAL_Qt3:BOOL=OFF \ -DWITH_CGAL_Qt4:BOOL=OFF } livecheck.type regex livecheck.url ${homepage} livecheck.regex CGAL-(\[0-9.\]+)\ is\ released