summaryrefslogtreecommitdiffstats
path: root/math/dislin/Makefile
blob: 75cb70342ccf793ad31e89ca2f49cc0897e6511c (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
61
62
63
64
65
66
67
68
69
70
# New ports collection makefile for:	linux-dislin
# Date created:				2003-12-14
# Whom:					des
#
# $FreeBSD$
#

PORTNAME=	dislin
PORTVERSION=	9.2
CATEGORIES=	math
MASTER_SITES=	ftp://ftp.gwdg.de/pub/grafik/dislin/unix/
DISTNAME=	${PORTNAME}-${PORTVERSION}.fbsd${BINVER}

MAINTAINER=	ports@FreeBSD.org
COMMENT=	A scientific data plotting package

LIB_DEPENDS=	f2c.2:${PORTSDIR}/lang/f2c

RESTRICTED=	free for non-commercial use.
ONLY_FOR_ARCHS=	i386
USE_XLIB=	yes
NO_BUILD=	yes
WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}

MD5_FILE=	${MASTERDIR}/distinfo${BINVER}
PLIST_SUB+=	VER=${PORTVERSION} MAJ=${MAJ}
SUB_FILES=	dislin.sh pkg-message
SUB_LIST+=	DISLIN_DIR=${DISLIN_DIR}
PKGMESSAGE=	${WRKDIR}/pkg-message
DISLIN_DIR=	${PREFIX}/dislin
PROGRAMS=	clink disaps disdrv disdrv_nw disdrv_w disgcl disgif dishlp	\
		disimg disman dismov distif dlink f2clink gclhelp gclhlp gclman
LIBS=		dislin dislin_d
MAJ=		${PORTVERSION:R}

USE_LDCONFIG=	yes

.include <bsd.port.pre.mk>

.if ${OSVERSION} < 600000
BINVER=		-5.4
.else
BINVER=		-6.0
.endif
.if ${OSVERSION} >= 700000
LIB_DEPENDS+=	z.3:${PORTSDIR}/misc/compat6x
.endif

do-install:
	cd ${WRKSRC} && ${SETENV} DISLIN=${DISLIN_DIR} ${SH} INSTALL
	${INSTALL_SCRIPT} ${WRKDIR}/dislin.sh ${DISLIN_DIR}/bin
.for _program in ${PROGRAMS}
	${LN} -s ${DISLIN_DIR}/bin/dislin.sh ${PREFIX}/bin/${_program}
.endfor
.for _lib in ${LIBS}
	${LN} -s ${DISLIN_DIR}/lib/${_lib}-${PORTVERSION}.a	\
		${PREFIX}/lib/lib${_lib}.a
	${LN} -s ${DISLIN_DIR}/lib/${_lib}-${PORTVERSION}.so	\
		${PREFIX}/lib/lib${_lib}.so.${MAJ}
.endfor
	${LN} -s ${LOCALBASE}/lib/libf2c.so ${DISLIN_DIR}/libg2c.so
	${LN} -s ${LOCALBASE}/lib/libf2c.so.2 ${DISLIN_DIR}/libg2c.so.2
	${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${DISLIN_DIR}

post-install:
	@${ECHO_MSG}
	@${CAT} ${PKGMESSAGE}
	@${ECHO_MSG}

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