aboutsummaryrefslogtreecommitdiff
path: root/math/triangle/Makefile
blob: c455b2e1c196da1db6e2f827c87edd7b14407ce2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
PORTNAME=	triangle
PORTVERSION=	1.6
PORTREVISION=	5
CATEGORIES=	math
MASTER_SITES=	NL/voronoi
DISTNAME=	${PORTNAME}
DIST_SUBDIR=	${PORTNAME}-${PORTVERSION}

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Two-Dimensional Quality Mesh Generator and Delaunay Triangulator
WWW=		https://www.cs.cmu.edu/~quake/triangle.html

# Converted from NO_CDROM
LICENSE=	triangle
LICENSE_NAME=	triangle
LICENSE_TEXT=	No commercial use without prior arrangement with the author
LICENSE_PERMS=	dist-mirror pkg-mirror auto-accept

USES=		zip xorg
NO_WRKSUBDIR=	yes
MAKEFILE=	makefile
USE_XORG=	x11
USE_LDCONFIG=	yes

PLIST_FILES=	bin/${PORTNAME} bin/showme \
		include/${PORTNAME}.h \
		lib/lib${PORTNAME}.so \
		lib/lib${PORTNAME}.so.${PORTVERSION}

post-build:
	@cd ${WRKSRC} && ${CC} ${CFLAGS} ${LDFLAGS} -DTRILIBRARY -shared -fPIC -Wl,-soname,lib${PORTNAME}.so.${PORTVERSION} -o lib${PORTNAME}.so.${PORTVERSION} ${PORTNAME}.c

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${WRKSRC}/showme ${STAGEDIR}${PREFIX}/bin
	${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.h ${STAGEDIR}${PREFIX}/include
	${INSTALL_DATA} ${WRKSRC}/lib${PORTNAME}.so.${PORTVERSION} ${STAGEDIR}${PREFIX}/lib
	cd ${STAGEDIR}${PREFIX}/lib && ${LN} -s lib${PORTNAME}.so.${PORTVERSION} lib${PORTNAME}.so
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/lib${PORTNAME}.so.${PORTVERSION}

do-test:
	@cd ${INSTALL_WRKSRC} && ./${PORTNAME} -p A.poly && ./showme A.1.poly

.include <bsd.port.mk>