source: trunk/dports/gis/cgal/Portfile @ 118648

Last change on this file since 118648 was 118648, checked in by vince@…, 6 years ago

Bump to 4.4

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.5 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 118648 2014-04-07 06:22:08Z vince@macports.org $
3
4PortSystem          1.0
5PortGroup           cmake 1.0
6
7name                cgal
8version             4.4
9license             LGPL-3+ GPL-3+
10categories          gis science
11maintainers         vince
12description         Computational Geometry Algorithm Library
13long_description    \
14                    The goal of the CGAL is to provide easy access to\
15                    efficient and reliable geometric algorithms in the\
16                    form of a C++ library. CGAL is used in various areas\
17                    needing geometric computation, such as: computer\
18                    graphics, scientific visualization, computer aided\
19                    design and modeling, geographic information systems,\
20                    molecular biology, medical imaging, robotics and\
21                    motion planning, mesh generation, numerical methods...
22
23platforms           darwin
24homepage            http://www.cgal.org/
25
26fetch.ignore_sslcert     yes
27master_sites        https://gforge.inria.fr/frs/download.php/33524
28
29distname            CGAL-${version}
30checksums           rmd160  a00498ee2c5bcf0a4fd482777a617b2ff0013789 \
31                    sha256  454633765d2f6c95a539612fad679dab9c24f91dbcb4141bc555e8f21d89ffed
32
33use_bzip2           yes
34
35worksrcdir          CGAL-${version}
36depends_lib-append  port:boost \
37                    port:mpfr \
38                    port:zlib \
39                    port:gmp \
40                    port:eigen3
41
42configure.args-append   -DCGAL_INSTALL_CMAKE_DIR="share/CGAL/cmake" \
43                        -DWITH_CGAL_Qt3:BOOL=OFF \
44                        -DWITH_CGAL_Qt4:BOOL=OFF \
45                        -DBoost_DIR:PATH=${prefix} \
46                        -DWITH_Eigen3:BOOL=ON \
47                        -DWITH_ZLIB:BOOL=ON
48
49# gcc 4.0 is too old to compile CGAL properly; see <http://www.cgal.org/FAQ.html#mac_optimization_bug>
50compiler.blacklist-append gcc-4.0
51
52variant perf description    {optimize code for current arch} {
53    configure.compiler      macports-clang-3.3
54    configure.optflags      -O3 -pipe -march=native
55}
56
57variant demos description {Create demos} requires qt4 {
58    depends_lib-append      port:libQGLViewer \
59                            port:ipe \
60                            port:metis \
61                            port:qt4-mac-sqlite3-plugin
62
63    patchfiles-append       patch-CMakeLists.txt.diff
64
65    configure.args-append   -DWITH_examples:BOOL=ON
66    configure.args-append   -DWITH_demos:BOOL=ON
67    configure.args-append   -DWITH_QGLViewer:BOOL=ON
68    configure.args-append   -DWITH_OpenGL:BOOL=ON
69
70  # MacPorts installs IPE version 7; make sure to use it.
71    configure.args-append   -DWITH_IPE:BOOL=ON
72
73  # include Qt's CMake defines, just in case
74    configure.args-append   ${qt_cmake_defines}
75
76    post-configure {
77        # Workaround a bug in the link.txt files of the ipelets demos
78        set ipelink            [glob ${worksrcpath}/demo/CGAL_ipelets/CMakeFiles/*/link.txt]
79        foreach    linkfile ${ipelink} {
80            reinplace -E "s|(.*)|\\1 -lipe|" ${linkfile}
81        }
82    }
83       
84    build.target-append     examples demos
85    use_parallel_build      no
86
87    post-destroot {
88        xinstall -d ${destroot}${prefix}/share/${name}
89        copy ${worksrcpath}/demo ${destroot}${prefix}/share/${name}
90        copy ${worksrcpath}/examples ${destroot}${prefix}/share/${name}
91        eval move [glob ${destroot}${prefix}/share/${name}/demo/*/*.dylib] ${destroot}${prefix}/lib/
92        delete ${destroot}${prefix}/share/${name}/demo/CMakeFiles \
93            ${destroot}${prefix}/share/${name}/examples/CMakeFiles
94        eval delete [glob ${destroot}${prefix}/share/${name}/demo/*/CMakeFiles] 
95        eval delete [glob ${destroot}${prefix}/share/${name}/demo/*/*/CMakeFiles] 
96        eval delete [glob ${destroot}${prefix}/share/${name}/examples/*/CMakeFiles] 
97    }
98}
99
100variant debug description {Build with debug symbols} {
101    configure.args-delete   -DCMAKE_BUILD_TYPE=Release
102    configure.args-append   -DCMAKE_BUILD_TYPE=Debug
103
104    post-destroot {
105        eval exec dsymutil  [glob ${destroot}${prefix}/lib/*.dylib]
106    }
107}
108
109variant qt4 description {Build with Qt4 bindings} {
110    PortGroup               qt4 1.0
111
112    configure.args-delete   -DWITH_CGAL_Qt3:BOOL=OFF \
113                            -DWITH_CGAL_Qt4:BOOL=OFF
114}
115
116livecheck.type      regex
117livecheck.url       ${homepage}
118livecheck.regex     CGAL-(\[0-9.\]+)\ is\ released
Note: See TracBrowser for help on using the repository browser.