summaryrefslogtreecommitdiffstats
path: root/science/felt/Makefile
blob: c61df788e955f3c6f2856061cb53117cbe40ee1e (plain)
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
51
52
53
54
55
56
57
58
59
60
# Created by: Pedro Giffuni
# $FreeBSD$

PORTNAME=	felt
PORTVERSION=	3.07
DISTVERSIONSUFFIX=	.src
CATEGORIES=	science
MASTER_SITES=	SF/${PORTNAME}/FElt/${PORTVERSION}

MAINTAINER=	ports@FreeBSD.org
COMMENT=	System for Finite Element Analysis

LICENSE=	GPLv2

OPTIONS_DEFINE=	DOCS EXAMPLES

WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}

USES=		motif
USE_BZIP2=	yes
USE_GL=		glu glw
HAS_CONFIGURE=	yes
CONFIGURE_ARGS=	--prefix="${PREFIX}" \
		--x-defaults="${LOCALBASE}/lib/X11/app-defaults" \
		--x-includes="${LOCALBASE}/include" \
		--x-libraries="${LOCALBASE}/lib"

MAN1=		burlap.1 corduroy.1 felt.1 patchwork.1 velvet.1 yardstick.1
MAN3=		Drawing.3
MAN4=		corduroy.4 felt.4

DOCSDIR=	${PREFIX}/share/doc/FElt
EXAMPLESDIR=	${PREFIX}/share/examples/FElt

NO_STAGE=	yes
post-patch:
	@${FIND} ${WRKSRC} -name "*.[ch]" | ${XARGS} ${REINPLACE_CMD} -e \
		's|["<]malloc\.h[">]|<stdlib.h>|g'
	@${REINPLACE_CMD} -e \
		'/which CC/s|^|#| ; \
		 /CCOPTS=-O3/s|^.*|CCOPTS=$${CFLAGS}| ; \
		 s|lib/felt|share/felt|' ${WRKSRC}/configure
	@${REINPLACE_CMD} -e \
		's|-lpthread|$$(MOTIFLIB)|' ${WRKSRC}/src/Velvet/Makefile

.include <bsd.port.options.mk>

post-install:
.if ${PORT_OPTIONS:MDOCS}
	@${MKDIR} ${DOCSDIR}
	${INSTALL_DATA} ${WRKSRC}/*.html ${DOCSDIR}
.endif
.if ${PORT_OPTIONS:MEXAMPLES}
	@${MKDIR} ${EXAMPLESDIR}
	${INSTALL_DATA} ${WRKSRC}/examples/README ${EXAMPLESDIR}
	${INSTALL_DATA} ${WRKSRC}/examples/*.ans ${EXAMPLESDIR}
	${INSTALL_DATA} ${WRKSRC}/examples/*.flt ${EXAMPLESDIR}
.endif

.include <bsd.port.mk>
OpenPOWER on IntegriCloud