summaryrefslogtreecommitdiffstats
path: root/math/gracetmpl/Makefile
blob: b895beb85a89e7fbb002632c4c0c54b25aa04b68 (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
# ex:ts=8
# Ports collection makefile for:	GraceTMPL
# Date created:			Oct 28, 2003
# Whom:				ijliao
#
# $FreeBSD$
#

PORTNAME=	gracetmpl
PORTVERSION=	0.3.1
PORTREVISION=	3
CATEGORIES=	math print
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=	${PORTNAME}

BUILD_DEPENDS=	${PYTHON_SITELIBDIR}/Numeric.pth:${PORTSDIR}/math/py-numeric
RUN_DEPENDS=	${PYTHON_SITELIBDIR}/Numeric.pth:${PORTSDIR}/math/py-numeric

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Provide an easy way to use existing grace-files as a template

USE_REINPLACE=	yes
USE_GETOPT_LONG=	yes
USE_PYTHON=	yes
USE_GMAKE=	yes
ALL_TARGET=	all pythonwrap
INSTALL_TARGET=	install python_install

.include <bsd.port.pre.mk>

.if ${OSVERSION} < 500041
CFLAGS+=	"${CPPFLAGS}"
MAKE_ENV=	LDFLAGS="${LDFLAGS}"
.endif

post-extract:
	@${CP} -f ${WRKSRC}/Makefile.defs.tmpl ${WRKSRC}/Makefile.defs

post-patch:
	@${REINPLACE_CMD} -e "s|^PREFIX|#PREFIX|" ${WRKSRC}/Makefile.defs
	@${REINPLACE_CMD} -e "s@\(gracetmpl\.a\)@lib\1@g" \
		-e "s|make|${GMAKE}|" -e "s|install -D|install|" \
		-e "s|^CPPFLAGS =|CPPFALGS+=|" ${WRKSRC}/Makefile
	@${REINPLACE_CMD} -e "s|values\.h|float.h|" ${WRKSRC}/gracetmpl.cpp

.if !defined(NOPORTDOCS)
post-install:
	@${MKDIR} ${DOCSDIR}
	@${CP} ${WRKSRC}/doc/html/* ${DOCSDIR}
.endif

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