aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2014-01-28 21:39:01 +0800
committerbapt <bapt@FreeBSD.org>2014-01-28 21:39:01 +0800
commited64ca765842b989ba3a224735510357cd65ec07 (patch)
tree07ffe673f31e88b781ae1a5f9922337524f89efe
parentb200cbd6c8f50a363515cd3ee902ea56271307ed (diff)
downloadfreebsd-ports-gnome-ed64ca765842b989ba3a224735510357cd65ec07.tar.gz
freebsd-ports-gnome-ed64ca765842b989ba3a224735510357cd65ec07.tar.zst
freebsd-ports-gnome-ed64ca765842b989ba3a224735510357cd65ec07.zip
Support stage
Use options helpers Modernize lib_depends
-rw-r--r--math/gnuplot/Makefile101
-rw-r--r--math/gnuplot/pkg-plist2
2 files changed, 32 insertions, 71 deletions
diff --git a/math/gnuplot/Makefile b/math/gnuplot/Makefile
index a3d40986a7e1..bf5e956070b6 100644
--- a/math/gnuplot/Makefile
+++ b/math/gnuplot/Makefile
@@ -18,6 +18,8 @@ CONFIGURE_ARGS+=--with-lasergnu \
--without-lisp-files \
--without-tutorial \
--with-bitmap-terminals
+PORTDOCS= *
+PORTEXAMPLES= *
OPTIONS_DEFINE= CAIRO DOCS EXAMPLES GD GRIDBOX PDF PLOT TEX THINSPLINES WX X11
GRIDBOX_DESC= Use the gridbox optimization for hidden3d
@@ -27,59 +29,37 @@ THINSPLINES_DESC= Enable thin plate splines for grids in dgrid3d
WX_DESC= wxWidgets (formerly wxWindows) support
OPTIONS_DEFAULT=CAIRO GD PLOT TEX WX X11
+OPTIONS_SUB= yes
-MAN1= gnuplot.1 lasergnu.1
+CAIRO_LIB_DEPENDS= libcairo.so:${PORTSDIR}/graphics/cairo
+CAIRO_USE= GNOME=pango
+CAIRO_CONFIGURE_WITH= cairo
-NO_STAGE= yes
-.include <bsd.port.options.mk>
+GD_LIB_DEPENDS= libgd.so:${PORTSDIR}/graphics/gd
+GD_CONFIGURE_ON= --with-gd=${LOCALBASE}
+GD_CONFIGURE_OFF+= --without-gd
-.if ${PORT_OPTIONS:MCAIRO}
-LIB_DEPENDS+= cairo:${PORTSDIR}/graphics/cairo
-USE_GNOME+= pango
-.else
-CONFIGURE_ARGS+= --without-cairo
-.endif
+GRIDBOX_CONFIGURE_OFF= --disable-h3d-quadtree --enable-h3d-gridbox
-.if ${PORT_OPTIONS:MGD}
-LIB_DEPENDS+= gd:${PORTSDIR}/graphics/gd
-CONFIGURE_ARGS+= --with-gd=${LOCALBASE}
-.else
-CONFIGURE_ARGS+= --without-gd
-.endif
+PDF_LIB_DEPENDS= libpdf.so:${PORTSDIR}/print/pdflib
+PDF_CONFIGURE_ON= --with-pdf=${LOCALBASE}
+PDF_CONFIGURE_OFF= --without-pdf
-.if ! ${PORT_OPTIONS:MGRIDBOX}
-CONFIGURE_ARGS+= --disable-h3d-quadtree --enable-h3d-gridbox
-.endif
+PLOT_USE= XORG=xaw,xmu,xt,xext
+PLOT_LIB_DEPENDS= libplot.so:${PORTSDIR}/graphics/plotutils
+PLOT_CONFIGURE_ON= --with-plot=${LOCALBASE}
+PLOT_CONFIGURE_OFF= --without-plot
-.if ${PORT_OPTIONS:MPDF}
-LIB_DEPENDS+= pdf:${PORTSDIR}/print/pdflib
-CONFIGURE_ARGS+= --with-pdf=${LOCALBASE}
-.else
-CONFIGURE_ARGS+= --without-pdf
-.endif
+TEX_USE= TEX=base,texmf,latex
+TEX_CONFIGURE_ON= --with-kpsexpand \
+ --with-texdir=${LOCALBASE}/share/texmf/tex/latex/gnuplot
+TEX_CONFIGURE_OFF= --without-kpexpand
-.if ${PORT_OPTIONS:MPLOT}
-USE_XORG+= xaw xmu xt xext
-LIB_DEPENDS+= plot:${PORTSDIR}/graphics/plotutils
-CONFIGURE_ARGS+= --with-plot=${LOCALBASE}
-.else
-CONFIGURE_ARGS+= --without-plot
-.endif
+THINSPLINES_CONFIGURE_ENABLE= thin-splines
-.if ${PORT_OPTIONS:MTEX}
-USE_TEX= base texmf latex
-CONFIGURE_ARGS+= --with-kpsexpand \
- --with-texdir=${LOCALBASE}/share/texmf/tex/latex/gnuplot
-PLIST_SUB+= TEX=""
-.else
-PLIST_SUB+= TEX="@comment "
-.endif
+X11_USE= XORG=x11
-.if ${PORT_OPTIONS:MTHINSPLINES}
-CONFIGURE_ARGS+= --enable-thin-splines
-.else
-CONFIGURE_ARGS+= --disable-thin-splines
-.endif
+.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MWX}
USE_WX= 2.5-2.8
@@ -88,21 +68,6 @@ WX_CONF_ARGS= absolute
CONFIGURE_ARGS+= --disable-wxwidgets
.endif
-.if ${PORT_OPTIONS:MX11}
-USE_XORG= x11
-PLIST_SUB+= X11=""
-.else
-CONFIGURE_ARGS+= --without-x
-PLIST_SUB+= X11="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MDOCS}
-PORTDOCS= *
-.endif
-.if ${PORT_OPTIONS:MEXAMPLES}
-PORTEXAMPLES= *
-.endif
-
post-patch:
.if ! ${PORT_OPTIONS:MTEX}
@${REINPLACE_CMD} -e \
@@ -118,19 +83,13 @@ post-build:
.endif
post-install:
- ${INSTALL_SCRIPT} ${WRKSRC}/src/lasergnu ${PREFIX}/bin
-.if !defined(NOPORTEXAMPLES)
- @${MKDIR} ${EXAMPLESDIR}
- cd ${WRKSRC}/demo && ${FIND} . \
- | ${CPIO} -pdmu -R ${SHAREOWN}:${SHAREGRP} ${EXAMPLESDIR}
-.endif
-
-.if ${PORT_OPTIONS:MDOCS}
- @${MKDIR} ${DOCSDIR}/psdoc
+ ${INSTALL_SCRIPT} ${WRKSRC}/src/lasergnu ${STAGEDIR}${PREFIX}/bin
+ @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+ cd ${WRKSRC}/demo && ${COPYTREE_SHARE} . ${EXAMPLESDIR}
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}/psdoc
cd ${WRKSRC}/docs && ${INSTALL_DATA} gnuplot.txt gnuplot.dvi \
- gnuplot.ps ${DOCSDIR}
- cd ${WRKSRC}/docs/psdoc && ${INSTALL_DATA} README ps_* ${DOCSDIR}/psdoc
-.endif
+ gnuplot.ps ${STAGEDIR}${DOCSDIR}
+ cd ${WRKSRC}/docs/psdoc && ${INSTALL_DATA} README ps_* ${STAGEDIR}${DOCSDIR}/psdoc
check test: build
@( cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_ARGS} check ; )
diff --git a/math/gnuplot/pkg-plist b/math/gnuplot/pkg-plist
index ea766503deeb..ce5e21d35874 100644
--- a/math/gnuplot/pkg-plist
+++ b/math/gnuplot/pkg-plist
@@ -1,6 +1,8 @@
bin/gnuplot
bin/lasergnu
%%X11%%libexec/gnuplot/4.6/gnuplot_x11
+man/man1/gnuplot.1.gz
+man/man1/lasergnu.1.gz
%%DATADIR%%/4.6/PostScript/8859-1.ps
%%DATADIR%%/4.6/PostScript/8859-15.ps
%%DATADIR%%/4.6/PostScript/8859-2.ps