From 1fba4e27a20f4244dab6da3ffb7f1f9de0bdbe47 Mon Sep 17 00:00:00 2001 From: ziggi Date: Wed, 2 Jun 2021 14:04:50 +0000 Subject: [PATCH] add math/gnuplot --- math/gnuplot/Makefile | 80 +++++++++++++++ math/gnuplot/distinfo | 3 + math/gnuplot/files/patch-configure | 117 ++++++++++++++++++++++ math/gnuplot/files/patch-docs-Makefile.in | 30 ++++++ math/gnuplot/files/patch-src-command.c | 10 ++ math/gnuplot/pkg-descr | 19 ++++ math/gnuplot/pkg-plist | 40 ++++++++ 7 files changed, 299 insertions(+) create mode 100644 math/gnuplot/Makefile create mode 100644 math/gnuplot/distinfo create mode 100644 math/gnuplot/files/patch-configure create mode 100644 math/gnuplot/files/patch-docs-Makefile.in create mode 100644 math/gnuplot/files/patch-src-command.c create mode 100644 math/gnuplot/pkg-descr create mode 100644 math/gnuplot/pkg-plist diff --git a/math/gnuplot/Makefile b/math/gnuplot/Makefile new file mode 100644 index 00000000..726ca439 --- /dev/null +++ b/math/gnuplot/Makefile @@ -0,0 +1,80 @@ +# $FreeBSD: head/math/gnuplot/Makefile 518826 2019-12-02 06:14:00Z glewis $ + +PORTNAME= gnuplot +PORTVERSION= 5.2.8 +CATEGORIES= math graphics +MASTER_SITES= SF + +MAINTAINER= glewis@FreeBSD.org +COMMENT?= Command-line driven graphing utility + +USES+= compiler:c++11-lang iconv pkgconfig readline +GNU_CONFIGURE= yes +LDFLAGS+= -L${LOCALBASE}/lib ${ICONV_LIB} +CONFIGURE_ARGS+= --with-readline=gnu +CONFIGURE_ARGS+= --without-linux-vga +CONFIGURE_ARGS+= --without-lisp-files +CONFIGURE_ARGS+= --without-tutorial +CONFIGURE_ARGS+= --with-bitmap-terminals +CONFIGURE_ARGS+= --with-qt=no + +#CONFIGURE_ARGS+= --disable-x11-mbfonts +#CONFIGURE_ARGS+= --disable-x11-external +CONFIGURE_ARGS+= --disable-wxwidgets +#CONFIGURE_ARGS+= --without-x +CONFIGURE_ARGS+= --without-ggi +#CONFIGURE_ARGS+= --without-gd +CONFIGURE_ARGS+= --without-caca +CONFIGURE_ARGS+= --without-wx +CONFIGURE_ARGS+= --without-gpic +CONFIGURE_ARGS+= --without-mif +CONFIGURE_ARGS+= --without-cairo +CONFIGURE_ARGS+= --without-lua +CONFIGURE_ARGS+= --without-latex +CONFIGURE_ARGS+= --without-kpsexpand + +CONFIGURE_ARGS+= --with-gd=${LOCALBASE} + +CONFIGURE_ARGS+= --without-mif +CONFIGURE_ARGS+= --without-kpsexpand +CONFIGURE_ARGS+= --without-latex +CONFIGURE_ARGS+= ac_cv_prog_KPSEXPAND=${LOCALBASE}/bin/kpsexpand +CONFIGURE_ARGS+= ac_cv_prog_PLAINTEX=${LOCALBASE}/bin/tex +CONFIGURE_ARGS+= ac_cv_prog_LATEX=${LOCALBASE}/bin/latex +CONFIGURE_ARGS+= ac_cv_prog_PDFLATEX=${LOCALBASE}/bin/pdflatex + +TEST_TARGET= check +PORTDOCS= * +PORTEXAMPLES= * + +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 + +#.if defined(LITE) +#post-stage: +# @cd ${STAGEDIR}${PREFIX} && ${RMDIR} libexec/gnuplot/5.2 libexec/gnuplot +#.endif + +.include diff --git a/math/gnuplot/distinfo b/math/gnuplot/distinfo new file mode 100644 index 00000000..b5c55dad --- /dev/null +++ b/math/gnuplot/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1575266871 +SHA256 (gnuplot-5.2.8.tar.gz) = 60a6764ccf404a1668c140f11cc1f699290ab70daa1151bb58fed6139a28ac37 +SIZE (gnuplot-5.2.8.tar.gz) = 5340677 diff --git a/math/gnuplot/files/patch-configure b/math/gnuplot/files/patch-configure new file mode 100644 index 00000000..246bcdf6 --- /dev/null +++ b/math/gnuplot/files/patch-configure @@ -0,0 +1,117 @@ +--- configure.orig 2017-11-23 11:59:30.644837000 -0800 ++++ configure 2017-11-23 12:01:09.450617000 -0800 +@@ -11246,12 +11246,12 @@ + pkg_cv_LUA_CFLAGS="$LUA_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ +- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua5.3\""; } >&5 +- ($PKG_CONFIG --exists --print-errors "lua5.3") 2>&5 ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua-5.3\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "lua-5.3") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then +- pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua5.3" 2>/dev/null` ++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua-5.3" 2>/dev/null` + else + pkg_failed=yes + fi +@@ -11264,12 +11264,12 @@ + pkg_cv_LUA_LIBS="$LUA_LIBS" + else + if test -n "$PKG_CONFIG" && \ +- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua5.3\""; } >&5 +- ($PKG_CONFIG --exists --print-errors "lua5.3") 2>&5 ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua-5.3\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "lua-5.3") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then +- pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua5.3" 2>/dev/null` ++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua-5.3" 2>/dev/null` + else + pkg_failed=yes + fi +@@ -11288,9 +11288,9 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "lua5.3"` ++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "lua-5.3"` + else +- LUA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "lua5.3"` ++ LUA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "lua-5.3"` + fi + # Put the nasty error message in config.log where it belongs + echo "$LUA_PKG_ERRORS" >&5 +@@ -11739,7 +11739,7 @@ + LUA_LIBS=$pkg_cv_LUA_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + $as_echo "yes" >&6; } +- LUA=lua5.3 ++ LUA=lua53 + fi + elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +@@ -11754,12 +11754,12 @@ + pkg_cv_LUA_CFLAGS="$LUA_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ +- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua5.3\""; } >&5 +- ($PKG_CONFIG --exists --print-errors "lua5.3") 2>&5 ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua-5.3\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "lua-5.3") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then +- pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua5.3" 2>/dev/null` ++ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua-5.3" 2>/dev/null` + else + pkg_failed=yes + fi +@@ -11772,12 +11772,12 @@ + pkg_cv_LUA_LIBS="$LUA_LIBS" + else + if test -n "$PKG_CONFIG" && \ +- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua5.3\""; } >&5 +- ($PKG_CONFIG --exists --print-errors "lua5.3") 2>&5 ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua-5.3\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "lua-5.3") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then +- pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua5.3" 2>/dev/null` ++ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua-5.3" 2>/dev/null` + else + pkg_failed=yes + fi +@@ -11796,9 +11796,9 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "lua5.3"` ++ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "lua-5.3"` + else +- LUA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "lua5.3"` ++ LUA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "lua-5.3"` + fi + # Put the nasty error message in config.log where it belongs + echo "$LUA_PKG_ERRORS" >&5 +@@ -12247,7 +12247,7 @@ + LUA_LIBS=$pkg_cv_LUA_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + $as_echo "yes" >&6; } +- LUA=lua5.3 ++ LUA=lua53 + fi + else + LUA_CFLAGS=$pkg_cv_LUA_CFLAGS +@@ -12290,7 +12290,7 @@ + return 0; + } + _ACEOF +-for ac_lib in '' lua lua5.3 lua5.2 lua5.1; do ++for ac_lib in '' lua lua53 lua5.2 lua5.1; do + if test -z "$ac_lib"; then + ac_res="none required" + else diff --git a/math/gnuplot/files/patch-docs-Makefile.in b/math/gnuplot/files/patch-docs-Makefile.in new file mode 100644 index 00000000..e74d9081 --- /dev/null +++ b/math/gnuplot/files/patch-docs-Makefile.in @@ -0,0 +1,30 @@ +--- docs/Makefile.in.orig 2017-11-06 10:23:52.000000000 -0800 ++++ docs/Makefile.in 2017-11-23 12:14:18.710252000 -0800 +@@ -907,7 +907,7 @@ + $(GNUPLOT_EXE): + ( cd ../src ; $(MAKE) gnuplot$(EXEEXT) ) + @BUILD_LUA_TRUE@$(LUA_HELP): $(top_srcdir)/term/lua/gnuplot-tikz.lua +-@BUILD_LUA_TRUE@ $(AM_V_GEN) $(LUA) $< termhelp > $@ ++@BUILD_LUA_TRUE@ $(AM_V_GEN) $(LUA) $(top_srcdir)/term/lua/gnuplot-tikz.lua termhelp > $@ + + allterm.h: $(CORETERM) $(LUA_HELP) + $(AM_V_GEN) for e in `egrep "^[ ]*START_HELP" $(CORETERM) |\ +@@ -933,15 +933,15 @@ + + grotxt: gnuplot.txt + gnuplot.txt: gnuplot.ms $(srcdir)/titlepag.ms +- $(AM_V_GEN) groff -s -p -t -e -ms -Tlatin1 $< > $@ ++ $(AM_V_GEN) groff -s -p -t -e -ms -Tlatin1 gnuplot.ms > $@ + + grodvi: gnuplot-groff.dvi + gnuplot-groff.dvi: gnuplot.ms $(srcdir)/titlepag.ms +- $(AM_V_GEN) groff -s -p -t -e -ms -Tdvi $< > $@ ++ $(AM_V_GEN) groff -s -p -t -e -ms -Tdvi gnuplot.ms > gnuplot.dvi + + grops: gnuplot-groff.ps + gnuplot-groff.ps: gnuplot.ms $(srcdir)/titlepag.ms +- $(AM_V_GEN) groff -s -p -t -e -ms -Tps $< > $@ ++ $(AM_V_GEN) groff -s -p -t -e -ms -Tps gnuplot.ms > gnuplot.ps + + ### doc2xxx dependencies + gnuplot.ms: doc2ms$(EXEEXT) $(srcdir)/gnuplot.doc diff --git a/math/gnuplot/files/patch-src-command.c b/math/gnuplot/files/patch-src-command.c new file mode 100644 index 00000000..1f55428c --- /dev/null +++ b/math/gnuplot/files/patch-src-command.c @@ -0,0 +1,10 @@ +--- src/command.c.orig 2017-11-01 18:12:31.201708000 -0700 ++++ src/command.c 2017-11-01 18:13:03.695758000 -0700 +@@ -119,6 +119,7 @@ + + #ifndef _Windows + # include "help.h" ++# include + #endif /* _Windows */ + + #ifdef _Windows diff --git a/math/gnuplot/pkg-descr b/math/gnuplot/pkg-descr new file mode 100644 index 00000000..9ec6973b --- /dev/null +++ b/math/gnuplot/pkg-descr @@ -0,0 +1,19 @@ +Gnuplot is a portable multi-platform command-line driven graphing utility. It +was originally created to allow scientists and students to visualize +mathematical functions and data interactively, but has grown to support many +non-interactive uses such as web scripting. It is also used as a plotting engine +by third-party applications like Octave. Gnuplot has been supported and under +active development since 1986. + +Gnuplot supports many types of plots in either 2D or 3D. It can draw using +lines, points, boxes, contours, vector fields, surfaces, and various associated +text. It also supports various specialized plot types. Gnuplot supports many +different types of output: interactive screen terminals (with mouse and hotkey +input), direct output to pen plotters or modern printers, and output to many +file formats (eps, emf, fig, jpeg, LaTeX, pdf, png, postscript, ...). Gnuplot is +easily extensible to include new output modes. Recent additions include +interactive terminals based on wxWidgets (usable on multiple platforms), and Qt. +Mouseable plots embedded in web pages can be generated using the svg or HTML5 +canvas terminal drivers. + +WWW: http://www.gnuplot.info/ diff --git a/math/gnuplot/pkg-plist b/math/gnuplot/pkg-plist new file mode 100644 index 00000000..aaf8ca10 --- /dev/null +++ b/math/gnuplot/pkg-plist @@ -0,0 +1,40 @@ +bin/gnuplot +%%X11%%libexec/gnuplot/5.2/gnuplot_x11 +man/man1/gnuplot-ja.1.gz +man/man1/gnuplot.1.gz +%%DATADIR%%/5.2/PostScript/8859-1.ps +%%DATADIR%%/5.2/PostScript/8859-15.ps +%%DATADIR%%/5.2/PostScript/8859-2.ps +%%DATADIR%%/5.2/PostScript/8859-9.ps +%%DATADIR%%/5.2/PostScript/aglfn.txt +%%DATADIR%%/5.2/PostScript/cp1250.ps +%%DATADIR%%/5.2/PostScript/cp1251.ps +%%DATADIR%%/5.2/PostScript/cp1252.ps +%%DATADIR%%/5.2/PostScript/cp437.ps +%%DATADIR%%/5.2/PostScript/cp850.ps +%%DATADIR%%/5.2/PostScript/cp852.ps +%%DATADIR%%/5.2/PostScript/koi8r.ps +%%DATADIR%%/5.2/PostScript/koi8u.ps +%%DATADIR%%/5.2/PostScript/prologue.ps +%%DATADIR%%/5.2/PostScript/utf-8.ps +%%X11%%%%DATADIR%%/5.2/app-defaults/Gnuplot +%%DATADIR%%/5.2/colors_default.gp +%%DATADIR%%/5.2/colors_mono.gp +%%DATADIR%%/5.2/colors_podo.gp +%%DATADIR%%/5.2/gnuplot.gih +@sample %%DATADIR%%/5.2/gnuplotrc.sample +%%DATADIR%%/5.2/js/README +%%DATADIR%%/5.2/js/canvasmath.js +%%DATADIR%%/5.2/js/canvastext.js +%%DATADIR%%/5.2/js/gnuplot_common.js +%%DATADIR%%/5.2/js/gnuplot_dashedlines.js +%%DATADIR%%/5.2/js/gnuplot_mouse.css +%%DATADIR%%/5.2/js/gnuplot_mouse.js +%%DATADIR%%/5.2/js/gnuplot_svg.js +%%DATADIR%%/5.2/js/grid.png +%%DATADIR%%/5.2/js/help.png +%%DATADIR%%/5.2/js/nextzoom.png +%%DATADIR%%/5.2/js/previouszoom.png +%%DATADIR%%/5.2/js/return.png +%%DATADIR%%/5.2/js/textzoom.png +%%DATADIR%%/5.2/lua/gnuplot-tikz.lua