source: trunk/dports/science/triangle/Portfile

Last change on this file was 102680, checked in by mmoll@…, 4 years ago

science/triangle: install library and header file, don't install not-so-useful 'showme' program that depends on xorg-libX11

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.2 KB
Line 
1# $Id: Portfile 102680 2013-02-06 19:26:32Z ryandesign@macports.org $
2
3PortSystem              1.0
4
5name                    triangle
6version                 1.6
7revision                4
8categories              science
9license                 Noncommercial Copyleft
10maintainers             nomaintainer
11description             A Two-Dimensional Quality Mesh Generator and Delaunay Triangulator
12long_description        Triangle generates exact Delaunay triangulations, \
13    constrained Delaunay triangulations, conforming Delaunay \
14    triangulations, Voronoi diagrams, and high-quality triangular \
15    meshes. The latter can be generated with no small or large \
16    angles, and are thus suitable for finite element analysis.
17
18platforms               darwin
19
20homepage                http://www.cs.cmu.edu/~quake/triangle.html
21master_sites            http://www.netlib.org/voronoi/
22distname                ${name}
23
24checksums               md5 10aff8d7950f5e0e2fb6dd2e340be2c9 \
25                        sha1 63d11e0b5bf097eb946a4da4ee18ddf279e16fc4 \
26                        rmd160 12be39ae4e34fc14ef3f9982e28a242abe200307
27
28use_zip                 yes
29
30extract.mkdir           yes
31
32post-patch      {
33    reinplace "s/-DLINUX//" ${worksrcpath}/makefile
34    reinplace "s|/usr/X11R6|${prefix}|g" ${worksrcpath}/makefile
35    reinplace "s|CC = cc|CC = ${configure.cc}|g" ${worksrcpath}/makefile
36    reinplace "s|CSWITCHES = -O|CSWITCHES = ${configure.cflags} ${configure.cc_archflags}|" ${worksrcpath}/makefile
37    reinplace "s|trilibrary: \$(BIN)triangle.o \$(BIN)tricall|trilibrary: \$(BIN)triangle.o\\\n\\\t${configure.cc} -dynamiclib -install_name ${prefix}/lib/libtriangle.dylib -o libtriangle.dylib triangle.o|" ${worksrcpath}/makefile
38}
39
40build.target trilibrary triangle
41
42use_configure           no
43
44destroot        {
45    xinstall -d ${destroot}${prefix}/share/doc/${name}
46    xinstall -W ${worksrcpath} triangle ${destroot}${prefix}/bin
47    xinstall -d ${destroot}${prefix}/share/${name}
48    # The port ncarg needs the triangle source files; see http://trac.macports.org/ticket/34706
49    xinstall -m 644 -W ${worksrcpath} triangle.h triangle.c ${destroot}${prefix}/share/${name}
50    xinstall -m 644 -W ${worksrcpath} README ${destroot}${prefix}/share/doc/${name}
51    xinstall -m 644 -W ${worksrcpath} triangle.h ${destroot}${prefix}/include
52    xinstall -m 755 -W ${worksrcpath} libtriangle.dylib ${destroot}${prefix}/lib
53}
54
55livecheck.type  regex
56livecheck.url   ${homepage}
57livecheck.regex Version (1\.\[0-9\]+)
Note: See TracBrowser for help on using the repository browser.