Tweak math/qtiplot version 0.9.8.9_8
[dports.git] / math / gnuplot / Makefile
1 # $FreeBSD$
2
3 PORTNAME=       gnuplot
4 PORTVERSION=    4.6.6
5 CATEGORIES=     math graphics
6 MASTER_SITES=   SF
7
8 MAINTAINER=     glewis@FreeBSD.org
9 COMMENT=        Command-line driven graphing utility
10
11 USES=           iconv
12 GNU_CONFIGURE=  yes
13 LDFLAGS+=       -L${LOCALBASE}/lib ${ICONV_LIB}
14 CONFIGURE_ARGS+=--with-lasergnu \
15                 --with-readline=gnu \
16                 --without-linux-vga \
17                 --without-lisp-files \
18                 --without-tutorial \
19                 --with-bitmap-terminals
20 PORTDOCS=       *
21 PORTEXAMPLES=   *
22
23 OPTIONS_DEFINE= CAIRO DOCS EXAMPLES GD GRIDBOX PDF PLOT TEX THINSPLINES WX X11
24 GRIDBOX_DESC=           Use the gridbox optimization for hidden3d
25 PLOT_DESC=              Enable plot support
26 TEX_DESC=               Search kpsexpand at run-time
27 THINSPLINES_DESC=       Enable thin plate splines for grids in dgrid3d
28 WX_DESC=                wxWidgets (formerly wxWindows) support
29
30 OPTIONS_DEFAULT=CAIRO GD PLOT TEX WX X11
31 OPTIONS_SUB=    yes
32
33 CAIRO_LIB_DEPENDS=      libcairo.so:${PORTSDIR}/graphics/cairo
34 CAIRO_USE=      GNOME=pango
35 CAIRO_CONFIGURE_WITH=   cairo
36
37 GD_LIB_DEPENDS= libgd.so:${PORTSDIR}/graphics/gd
38 GD_CONFIGURE_ON=        --with-gd=${LOCALBASE}
39 GD_CONFIGURE_OFF+=      --without-gd
40
41 GRIDBOX_CONFIGURE_OFF=  --disable-h3d-quadtree --enable-h3d-gridbox
42
43 PDF_LIB_DEPENDS=        libpdf.so:${PORTSDIR}/print/pdflib
44 PDF_CONFIGURE_ON=       --with-pdf=${LOCALBASE}
45 PDF_CONFIGURE_OFF=      --without-pdf
46
47 PLOT_USE=               XORG=xaw,xmu,xt,xext
48 PLOT_LIB_DEPENDS=       libplot.so:${PORTSDIR}/graphics/plotutils
49 PLOT_CONFIGURE_ON=      --with-plot=${LOCALBASE}
50 PLOT_CONFIGURE_OFF=     --without-plot
51
52 TEX_USE=        TEX=base,texmf,latex,dvipsk
53 TEX_CONFIGURE_ON=       --with-kpsexpand \
54                         --with-texdir=${LOCALBASE}/share/texmf/tex/latex/gnuplot
55 TEX_CONFIGURE_OFF=      --without-kpexpand
56
57 THINSPLINES_CONFIGURE_ENABLE=   thin-splines
58
59 X11_USE=        XORG=x11
60
61 .include <bsd.port.options.mk>
62
63 .if ${PORT_OPTIONS:MWX}
64 # Version 3.x of WX currently cause gnuplot to crash.
65 # Do not update without this without testing.
66 USE_WX=                 2.8
67 WX_UNICODE=             yes
68 WX_CONF_ARGS=           absolute
69 .else
70 CONFIGURE_ARGS+=        --disable-wxwidgets
71 .endif
72
73 post-patch:
74 .if ! ${PORT_OPTIONS:MTEX}
75         @${REINPLACE_CMD} -e \
76                 '/^install:/s/install-am//' ${WRKSRC}/share/LaTeX/Makefile.in
77 .endif
78         @${REINPLACE_CMD} -e \
79                 's|)/@PACKAGE@/@PKG_MAJOR@|)|g' ${WRKSRC}/src/Makefile.in
80         @${FIND} "${WRKSRC}" -name '*.orig' -delete
81
82 .if ${PORT_OPTIONS:MDOCS}
83 post-build:
84         @cd ${WRKSRC}/docs && ${MAKE} groff
85 .endif
86
87 post-install:
88         ${INSTALL_SCRIPT} ${WRKSRC}/src/lasergnu ${STAGEDIR}${PREFIX}/bin
89         @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
90         cd ${WRKSRC}/demo && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}
91 .if ${PORT_OPTIONS:MDOCS}
92         @${MKDIR} ${STAGEDIR}${DOCSDIR}/psdoc
93         cd ${WRKSRC}/docs && ${INSTALL_DATA} gnuplot.txt gnuplot.dvi \
94                 gnuplot.ps ${STAGEDIR}${DOCSDIR}
95         cd ${WRKSRC}/docs/psdoc && ${INSTALL_DATA} README ps_* ${STAGEDIR}${DOCSDIR}/psdoc
96 .endif
97
98 check test: build
99         @( cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_ARGS} check ; )
100
101 .include <bsd.port.mk>