aboutsummaryrefslogtreecommitdiffstats
path: root/math/gnuplot/Makefile
blob: 695cbe1a8e8bb25a3efd6f806f3b38443c59af71 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# $FreeBSD$

PORTNAME=   gnuplot
PORTVERSION=    5.2.2
CATEGORIES= math graphics
MASTER_SITES=   SF

MAINTAINER= glewis@FreeBSD.org
COMMENT=    Command-line driven graphing utility

LICENSE=    Gnuplot
LICENSE_NAME=   Gnuplot license
LICENSE_FILE=   ${WRKSRC}/Copyright
LICENSE_PERMS=  dist-mirror pkg-mirror auto-accept

USES+=      groff iconv jpeg lua:53 pkgconfig readline
USE_TEX=    kpathsea
USE_GNOME+= atk cairo gtk20 gdkpixbuf2
USE_WX=     2.8
USE_XORG+=  x11
LIB_DEPENDS+=   libfontconfig.so:x11-fonts/fontconfig \
        libfreetype.so:print/freetype2 \
        libgd.so:graphics/gd \
        libpng.so:graphics/png \
        libtiff.so:graphics/tiff
GNU_CONFIGURE=  yes
LDFLAGS+=   -L${LOCALBASE}/lib ${ICONV_LIB}
CONFIGURE_ARGS+=--with-readline=gnu \
        --with-kpsexpand \
        --without-linux-vga \
        --without-lisp-files \
        --without-tutorial \
        --with-bitmap-terminals \
        --with-gd=${LOCALBASE} \
        --with-gpic \
        --with-mif \
        --with-latex \
        --with-qt=no \
        ac_cv_prog_KPSEXPAND=${LOCALBASE}/bin/kpsexpand \
        ac_cv_prog_PLAINTEX=${LOCALBASE}/bin/tex \
        ac_cv_prog_LATEX=${LOCALBASE}/bin/latex \
        ac_cv_prog_PDFLATEX=${LOCALBASE}/bin/pdflatex
TEST_TARGET=    check
PORTDOCS=   *
PORTEXAMPLES=   *

OPTIONS_DEFINE= DOCS EXAMPLES GRIDBOX
GRIDBOX_DESC=       Use the gridbox optimization for hidden3d

GRIDBOX_CONFIGURE_OFF=  --disable-h3d-quadtree --enable-h3d-gridbox

post-patch:
    @${REINPLACE_CMD} -e \
        '/^install:/s/install-am//' ${WRKSRC}/share/LaTeX/Makefile.in
    @${REINPLACE_CMD} -e \
        's|)/@PACKAGE@/@PKG_MAJOR@|)|g' ${WRKSRC}/src/Makefile.in
    @${REINPLACE_CMD} -e \
        's|luaL_checkint(|(int)luaL_checkinteger(|' ${WRKSRC}/term/lua.trm

post-build-DOCS-on:
    @cd ${WRKSRC}/docs && ${MAKE} groff

pre-install:
    ${MKDIR} ${STAGEDIR}${DATADIR}/5.2 ; \
        ${INSTALL_DATA} ${WRKSRC}/share/gnuplotrc \
        ${STAGEDIR}${DATADIR}/5.2/gnuplotrc.sample

post-install:
    @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
    cd ${WRKSRC}/demo && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}

post-install-DOCS-on:
    @${MKDIR} ${STAGEDIR}${DOCSDIR}/psdoc
    cd ${WRKSRC}/docs && ${INSTALL_DATA} gnuplot.txt gnuplot.dvi \
        gnuplot.ps ${STAGEDIR}${DOCSDIR}
    cd ${WRKSRC}/docs/psdoc && ${INSTALL_DATA} README ps_* ${STAGEDIR}${DOCSDIR}/psdoc

.include <bsd.port.mk>