aboutsummaryrefslogtreecommitdiff
path: root/math/rpc/Makefile
blob: b74e3e57ea3019b0a2b87f9f881a72b001bb6b19 (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
# ex:ts=8
# New ports collection makefile for:	rpc
# Date created:			Mar 21, 2001
# Whom:				Ying-Chieh Liao <ijliao@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=	rpc
PORTVERSION=	0.98
PORTREVISION=	1
CATEGORIES=	math
MASTER_SITES=	http://www.eecs.umich.edu/~pelzlpj/rpc/

MAINTAINER=	ports@FreeBSD.org
COMMENT=	A full-screen RPN calculator program

BUILD_DEPENDS=	${LOCALBASE}/lib/libccm.so:${PORTSDIR}/math/ccmath
RUN_DEPENDS=	${LOCALBASE}/lib/libccm.so:${PORTSDIR}/math/ccmath

USE_GMAKE=	yes
USE_REINPLACE=	yes	# to avoid cumbersome patching: see below
GNU_CONFIGURE=	yes
CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include" \
		LDFLAGS="-L${LOCALBASE}/lib"

post-patch:
#
# Get rid of inline function body in implementation...
#
	@${REINPLACE_CMD} -e '483,488d' ${WRKSRC}/src/RpcComplex.cpp
	@${REINPLACE_CMD} -e '428,433d' ${WRKSRC}/src/RpcComplexMatrix.cpp
	@${REINPLACE_CMD} -e '591,596d' ${WRKSRC}/src/RpcDouble.cpp
	@${REINPLACE_CMD} -e '350,355d' ${WRKSRC}/src/RpcIntegerConst.cpp
	@${REINPLACE_CMD} -e '394,399d' ${WRKSRC}/src/RpcRealMatrix.cpp
#
# ...and put it right into class declaration instead, to please newer GCC
#
	@${REINPLACE_CMD} -E 's,([[:alnum:]]+ getData\( void \));,inline \1 { return data; },' \
		${WRKSRC}/src/RpcComplex.h ${WRKSRC}/src/RpcComplexMatrix.h \
		${WRKSRC}/src/RpcDouble.h ${WRKSRC}/src/RpcIntegerConst.h \
		${WRKSRC}/src/RpcRealMatrix.h

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

.include <bsd.port.mk>