summaryrefslogtreecommitdiff
path: root/math/rlab/Makefile
blob: f8a2b5da0c602398e9ed5ff21993bbb5c8ff6cf2 (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
# $NetBSD: Makefile,v 1.4 2001/02/05 09:01:00 tron Exp $

DISTNAME=		rlab-2.1.05
CATEGORIES=		math
MASTER_SITES=		${MASTER_SITE_SOURCEFORGE:=rlab/}

MAINTAINER=		jtb@netbsd.org
HOMEPAGE=		http://rlab.sourceforge.net/

DEPENDS+=		boehm-gc>=5.3:../../devel/boehm-gc
DEPENDS+=		readline>=4.0:../../devel/readline
DEPENDS+=		superlu-[0-9]*:../../math/superlu
BUILD_DEPENDS+=		${LOCALBASE}/bin/autoconf:../../devel/autoconf

GNU_CONFIGURE=		YES
USE_FORTRAN=		YES

EVAL_PREFIX+=		GC_PREFIX=boehm-gc
CONFIGURE_ARGS+=	"--with-GC=${GC_PREFIX}"
CONFIGURE_ARGS+=	"--enable-SUPERLU"

PLIST_SRC=		${PKGDIR}/PLIST

.include "../../mk/bsd.prefs.mk"

RLAB_PLOT_PKG?=		gnuplot
.if (${RLAB_PLOT_PKG} == "plplot")
DEPENDS+=		plplot>=5.0.1:../../graphics/plplot
EVAL_PREFIX+=		PLPLOT_PREFIX=plplot TCL_PREFIX=tcl TK_PREFIX=tk
CONFIGURE_ARGS+=	"--with-tk=${TK_PREFIX}"
CONFIGURE_ARGS+=	"--with-plplot=${PLPLOT_PREFIX}"
CONFIGURE_ARGS+=	"--with-tcl=${TCL_PREFIX}"
PLIST_SRC+=		${PKGDIR}/PLIST.plplot
.elif (${RLAB_PLOT_PKG} == "plotmtv")
DEPENDS+=		plotmtv-[0-9]*:../../graphics/plotmtv
CONFIGURE_ARGS+=	"--with-plotmtv=yes"
PLIST_SRC+=		${PKGDIR}/PLIST.plotmtv
.elif (${RLAB_PLOT_PKG} == "pgraf")
DEPENDS+=		pgraf-[0-9]*:../../graphics/pgraf
EVAL_PREFIX+=		PGRAF_PREFIX=pgraf
CONFIGURE_ARGS+=	"--with-pgraf=yes"
PLIST_SRC+=		${PKGDIR}/PLIST.pgraf
.else
DEPENDS+=		gnuplot>=3.5:../../graphics/gnuplot
CONFIGURE_ARGS+=	"--with-gnuplot=yes"
PLIST_SRC+=		${PKGDIR}/PLIST.gnuplot
.endif

pre-configure:
	(cd ${WRKSRC} && ${LOCALBASE}/bin/autoconf)

post-install:
.if (${RLAB_PLOT_PKG} == "pgraf")
	${INSTALL_DATA} ${PGRAF_PREFIX}/share/examples/pgraf/pgraf.r \
	${PREFIX}/share/rlab/rlib
	${INSTALL_DATA} ${PGRAF_PREFIX}/share/examples/pgraf/pgdemo.r \
	${PREFIX}/share/rlab/examples
.endif

.include "../../mk/bsd.pkg.mk"