From d634b760734a021a654597bf300d8223ee97a563 Mon Sep 17 00:00:00 2001 From: Thierry Thomas Date: Mon, 15 Nov 2004 10:37:05 +0000 Subject: [PATCH] Add triangle 1.5, a Two-Dimensional Quality Mesh Generator and Delaunay Triangulator. --- cad/Makefile | 1 + cad/triangle/Makefile | 36 +++++++++++++++++++++++++++++++ cad/triangle/distinfo | 2 ++ cad/triangle/files/patch-makefile | 20 +++++++++++++++++ cad/triangle/files/patch-showme.c | 11 ++++++++++ cad/triangle/pkg-descr | 11 ++++++++++ 6 files changed, 81 insertions(+) create mode 100644 cad/triangle/Makefile create mode 100644 cad/triangle/distinfo create mode 100644 cad/triangle/files/patch-makefile create mode 100644 cad/triangle/files/patch-showme.c create mode 100644 cad/triangle/pkg-descr diff --git a/cad/Makefile b/cad/Makefile index 318c9a6e0dcd..4ad66d8e03ed 100644 --- a/cad/Makefile +++ b/cad/Makefile @@ -51,6 +51,7 @@ SUBDIR += tkgate SUBDIR += tochnog SUBDIR += transcalc + SUBDIR += triangle SUBDIR += varkon SUBDIR += vipec SUBDIR += xcircuit diff --git a/cad/triangle/Makefile b/cad/triangle/Makefile new file mode 100644 index 000000000000..47d30a03ec00 --- /dev/null +++ b/cad/triangle/Makefile @@ -0,0 +1,36 @@ +# New ports collection makefile for: triangle +# Date created: 16 Octobre 2004 +# Whom: Thierry Thomas +# +# $FreeBSD$ +# + +PORTNAME= triangle +PORTVERSION= 1.5 +CATEGORIES= cad +MASTER_SITES= http://cm.bell-labs.com/netlib/voronoi/ +DISTNAME= ${PORTNAME} +DIST_SUBDIR= ${PORTNAME}-${PORTVERSION} + +MAINTAINER= ports@FreeBSD.org +COMMENT= A Two-Dimensional Quality Mesh Generator and Delaunay Triangulator + +NO_CDROM= Triangle must not be sold for profit + +USE_ZIP= yes +USE_XLIB= yes +MAKEFILE= makefile + +WRKSRC= ${WRKDIR} + +PLIST_FILES= bin/triangle bin/showme + +do-install: + ${INSTALL_PROGRAM} ${PLIST_FILES:S|^bin|${WRKSRC}|} ${PREFIX}/bin + +.if defined(MAINTAINER_MODE) +test: build + (cd ${INSTALL_WRKSRC} && ./triangle -p A.poly && ./showme A.1.poly) +.endif + +.include diff --git a/cad/triangle/distinfo b/cad/triangle/distinfo new file mode 100644 index 000000000000..f46475f032b0 --- /dev/null +++ b/cad/triangle/distinfo @@ -0,0 +1,2 @@ +MD5 (triangle-1.5/triangle.zip) = b21af03259aba872c32daf923a96aa00 +SIZE (triangle-1.5/triangle.zip) = 157525 diff --git a/cad/triangle/files/patch-makefile b/cad/triangle/files/patch-makefile new file mode 100644 index 000000000000..abd4ddd335d2 --- /dev/null +++ b/cad/triangle/files/patch-makefile @@ -0,0 +1,20 @@ +--- makefile.orig Wed Apr 28 05:13:34 2004 ++++ makefile Sat Oct 16 22:54:43 2004 +@@ -18,7 +18,7 @@ + + # CC should be set to the name of your favorite C compiler. + +-CC = cc ++# CC = cc + + # CSWITCHES is a list of all switches passed to the C compiler. I strongly + # recommend using the best level of optimization. I also strongly +@@ -71,7 +71,7 @@ + # + # CSWITCHES = -O -DNO_TIMER -DLINUX -I/usr/X11R6/include -L/usr/X11R6/lib + +-CSWITCHES = -O -DLINUX -I/usr/X11R6/include -L/usr/X11R6/lib ++CSWITCHES = ${CFLAGS} -I${X11BASE}/include -L${X11BASE}/lib + + # TRILIBDEFS is a list of definitions used to compile an object code version + # of Triangle (triangle.o) to be called by another program. The file diff --git a/cad/triangle/files/patch-showme.c b/cad/triangle/files/patch-showme.c new file mode 100644 index 000000000000..7d0ee0736a2e --- /dev/null +++ b/cad/triangle/files/patch-showme.c @@ -0,0 +1,11 @@ +--- ./showme.c.orig Wed Apr 28 05:13:34 2004 ++++ ./showme.c Sat Oct 16 23:00:09 2004 +@@ -106,6 +106,8 @@ + #include + #include + ++#include ++ + /* The following obscenity seems to be necessary to ensure that this program */ + /* will port to Dec Alphas running OSF/1, because their stdio.h file commits */ + /* the unpardonable sin of including stdlib.h. Hence, malloc(), free(), and */ diff --git a/cad/triangle/pkg-descr b/cad/triangle/pkg-descr new file mode 100644 index 000000000000..b6edb5a8d7bc --- /dev/null +++ b/cad/triangle/pkg-descr @@ -0,0 +1,11 @@ +Triangle generates exact Delaunay triangulations, constrained Delaunay +triangulations, Voronoi diagrams, and quality conforming Delaunay +triangulations. The latter can be generated with no small angles, and +are thus suitable for finite element analysis. + +Show Me graphically displays (using X) the contents of geometric files, +especially those generated by Triangle, my two-dimensional quality mesh +generator and Delaunay triangulator. +Show Me can also write PostScript images to files. + +WWW: http://www-2.cs.cmu.edu/~quake/triangle.html