aboutsummaryrefslogtreecommitdiff
path: root/math/femlab/Makefile
blob: 93a63124a4c290f91d31046cac9365f0b61d4cb2 (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
44
45
46
47
48
49
50
# New ports collection makefile for:	femlab
# Date created:		19 June 1997
# Whom:			Pedro Giffuni
#
# $FreeBSD$
#

PORTNAME=	femlab
PORTVERSION=	1.1
CATEGORIES=	math cad
MASTER_SITES=	ftp://ftp.md.chalmers.se/pub/Femlab/	\
		ftp://ftp.ifs.hr/pub/SciUtil/
DISTFILES=	femlab-2d-v${PORTVERSION}.tar.gz

MAINTAINER=	ports@FreeBSD.org

BUILD_DEPENDS=	${X11BASE}/lib/libsx.a:${PORTSDIR}/x11/libsx

USE_REINPLACE=	yes
USE_X_PREFIX=	yes

FEMLAB_HOME=	${PREFIX}/lib/X11/femlab

pre-patch:
	@${REINPLACE_CMD} -e 's,<malloc.h>,<stdlib.h>,' \
	${WRKSRC}/source/graph.c ${WRKSRC}/source/y.tab.c \
	${WRKSRC}/source/newdata.c ${WRKSRC}/source/post.c \
	${WRKSRC}/source/kraftwerk.c ${WRKSRC}/source/list.c \
	${WRKSRC}/include/xv.h ${WRKSRC}/fsource/y.tab.c

do-install:
	${MKDIR} ${FEMLAB_HOME}/bin
	${INSTALL_PROGRAM} ${WRKSRC}/source/femlab ${FEMLAB_HOME}/bin
	${INSTALL_PROGRAM} ${WRKSRC}/fsource/meshgen ${FEMLAB_HOME}/bin
	${INSTALL_PROGRAM} ${WRKSRC}/fsource/poisson ${FEMLAB_HOME}/bin
	${MKDIR} ${FEMLAB_HOME}/config
	${INSTALL_DATA} ${WRKSRC}/config/modules ${FEMLAB_HOME}/config
	${SED} -e "s|@@FEMLAB_HOME@@|${FEMLAB_HOME}|" <${FILESDIR}/femlab.sh >${PREFIX}/bin/femlab
	${CHMOD} +x ${PREFIX}/bin/femlab

post-install:
.if !defined(NOPORTDOCS)
	@${MKDIR} ${PREFIX}/share/examples/femlab
	@${INSTALL_DATA} ${WRKSRC}/examples/*.fem ${PREFIX}/share/examples/femlab
	@${MKDIR} ${DOCSDIR}
	@${INSTALL_DATA} ${WRKSRC}/docs/manual.dvi ${DOCSDIR}
	@${INSTALL_DATA} ${WRKSRC}/docs/manual.ps  ${DOCSDIR}
.endif

.include <bsd.port.mk>