aboutsummaryrefslogtreecommitdiffstats
path: root/math/mathex/Makefile
blob: 78b5e0e1d93ecb64466235a9e04e7f2606ce5982 (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
PORTNAME=	mathex
DISTVERSION=	0.3-b
CATEGORIES=	math science devel
MASTER_SITES=	SF/sscilib/mathex

MAINTAINER=	thierry@FreeBSD.org
COMMENT=	C++ library to parse/evaluate mathematical expressions
WWW=		https://sscilib.sourceforge.net/

LICENSE=	LGPL21
LICENSE_FILE=	${WRKSRC}/license.txt

USES=		dos2unix zip
DOS2UNIX_FILES=	makefile

WRKSRC=		${WRKDIR}/${PORTNAME}
MAKEFILE=	makefile
ALL_TARGET=	${PORTNAME}
USE_LDCONFIG=	yes

PLIST_FILES=	${PREFIX}/include/mathex.h	\
		${PREFIX}/lib/lib${PORTNAME}.so	\
		${PREFIX}/lib/lib${PORTNAME}.so.0
EXAMPLES_PLIST_FILES=	${PROGS:C|^|${PREFIX}/bin/|}

PROGS=		curvetest inttest tabletest userfunctest

OPTIONS_DEFINE=	EXAMPLES

post-build:
	(cd ${WRKSRC} &&	\
	${CXX} ${LDFLAGS} -shared -o lib${PORTNAME}.so.0 -Wl,-soname,lib${PORTNAME}.so.0 ${PORTNAME}.o)

do-install:
	${INSTALL_DATA} ${WRKSRC}/mathex.h ${STAGEDIR}${PREFIX}/include/
	${INSTALL_LIB} ${WRKSRC}/lib${PORTNAME}.so.0 ${STAGEDIR}${PREFIX}/lib/
	${LN} -s lib${PORTNAME}.so.0 ${STAGEDIR}${PREFIX}/lib/lib${PORTNAME}.so

do-install-EXAMPLES-on:
.for p in ${PROGS}
	${INSTALL_PROGRAM} ${WRKSRC}/${p} ${STAGEDIR}${PREFIX}/bin/
.endfor

.include <bsd.port.mk>