summaryrefslogtreecommitdiff
path: root/graphics/plplot/Makefile
blob: 48d01f48f9b30382c94acab53718d6b2a46dcad2 (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
# $NetBSD: Makefile,v 1.14 2001/04/14 21:43:45 jtb Exp $

DISTNAME=	plplot-5.0.3
CATEGORIES=	graphics
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=plplot/}

MAINTAINER=	packages@netbsd.org
HOMEPAGE=	http://www.plplot.org/
COMMENT=	Scientific plotting package

DEPENDS+=	tcl>=8.3.0:../../lang/tcl
DEPENDS+= 	tk>=8.3.0:../../x11/tk
BUILD_DEPENDS+=	m4>=1.4:../../devel/m4
BUILD_DEPENDS+=	autoconf>=2.13:../../devel/autoconf
BUILD_DEPENDS+=	perl-5.*:../../lang/perl5

GNU_CONFIGURE=	#defined
USE_GMAKE=	#defined
USE_FORTRAN=	#defined
USE_X11=	#defined

EVAL_PREFIX+=	TK_PREFIX=tk TCL_PREFIX=tcl

CONFIGURE_ENV+=	"BIN_DIR=${PREFIX}/bin"
CONFIGURE_ENV+=	"LIB_DIR=${PREFIX}/lib"
CONFIGURE_ENV+=	"INCLUDE_DIR=${PREFIX}/include/plplot"
CONFIGURE_ENV+=	"DATA_DIR=${PREFIX}/libdata/plplot"
CONFIGURE_ENV+=	"DOC_DIR=${PREFIX}/share/doc/plplot"
CONFIGURE_ENV+=	"DEMOS_DIR=${PREFIX}/share/examples/plplot"
CONFIGURE_ENV+=	"TCL_DIR=${PREFIX}/lib/tcl/plplot"
CONFIGURE_ENV+=	"TKINCDIR=${TK_PREFIX}/include"
CONFIGURE_ENV+=	"TKLIBDIR=${TK_PREFIX}/lib"
CONFIGURE_ENV+=	"TCLINCDIR=${TCL_PREFIX}/include"
CONFIGURE_ENV+=	"TCLLIBDIR=${TCL_PREFIX}/lib"
CONFIGURE_ENV+=	"USER_FLAGS_C=${CFLAGS}"
CONFIGURE_ENV+=	"USER_FLAGS_LC=${LDFLAGS}"
CONFIGURE_ENV+=	"USER_FLAGS_CXX=${CXXFLAGS}"
CONFIGURE_ENV+=	"USER_FLAGS_LCXX=${LDFLAGS}"
CONFIGURE_ENV+=	"USER_FLAGS_F=${FFLAGS}"
CONFIGURE_ENV+=	"USER_FLAGS_LF=${LDLAGS}"

CONFIGURE_ARGS+="--with-double"
CONFIGURE_ARGS+="--enable-xwin"
CONFIGURE_ARGS+="--enable-tcl"
CONFIGURE_ARGS+="--enable-tk"
CONFIGURE_ARGS+="--without-shlib"
CONFIGURE_ARGS+="--disable-python"
CONFIGURE_ARGS+="--disable-itcl"
CONFIGURE_ARGS+="--disable-dp"

post-patch:
	for f in ${WRKSRC}/src/plctrl.c; do				\
		${SED} -e 's:@PREFIX@:'${PREFIX}':g'			\
		$$f > $$f.tmp && ${MV} $$f.tmp $$f;			\
	done

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

post-install:
	${INSTALL_DATA} ${WRKSRC}/doc/plplotdoc-0.4.1.dvi 		\
	${PREFIX}/share/doc/plplot
	${INSTALL_DATA_DIR} ${PREFIX}/share/doc/html/plplot
	${INSTALL_DATA} ${WRKSRC}/doc/plplotdoc-html-0.4.1/*.html	\
	${PREFIX}/share/doc/html/plplot

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