# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 # $Id$ PortSystem 1.0 PortGroup texlive 1.0 PortGroup xcodeversion 1.0 PortGroup wxWidgets 1.0 name gnuplot version 5.0.5 categories math science # the license has some inconvenient requirements that we're not meeting # to be allowed to distribute binaries license Restrictive # luckily nothing has to link against this installs_libs no platforms darwin maintainers mojca openmaintainer description A command-driven interactive function plotting program long_description Gnuplot is a command-driven interactive function \ plotting program. Plots any number of functions, \ built up of C operators, C library functions, and \ some things C does not have like **, sgn(), etc. \ Also support for plotting data files, to compare \ actual data to theoretical curves. homepage http://gnuplot.sourceforge.net/ master_sites sourceforge:project/gnuplot/gnuplot/${version} dist_subdir ${name}/${version} checksums rmd160 928acb77e084fbe62babfd6c33af0ec15577dad7 \ sha256 25f3e0bf192e01115c580f278c3725d7a569eb848786e12b455a3fda70312053 depends_build path:bin/pkg-config:pkgconfig depends_lib port:expat \ port:fontconfig \ port:gd2 \ port:jpeg \ path:lib/libcaca.dylib:libcaca \ port:libcerf \ port:libiconv \ port:libpng \ port:ncurses \ port:readline \ port:zlib minimum_xcodeversions \ {9 3.1} patchfiles patch-configure.diff # patch-src-qtterminal-qt_conversion.cpp.diff configure.args --with-caca=${prefix} \ --with-gd=${prefix} \ --with-readline=${prefix} \ --without-aquaterm \ --without-x \ --infodir='\${prefix}/share/info' \ --mandir='\${prefix}/share/man' \ --disable-wxwidgets \ --without-bitmap-terminals \ --without-cairo \ --without-latex \ --without-lua \ --without-pdf \ --without-qt \ --without-tutorial \ --with-cwdrc variant aquaterm description "Enable AquaTerm terminal" { depends_lib-append port:aquaterm configure.args-replace --without-aquaterm --with-aquaterm configure.cflags-append "-F${frameworks_dir}" configure.ldflags-append "-F${frameworks_dir}" } variant x11 { configure.args-replace --without-x --with-x depends_lib-append port:xpm } variant luaterm description "Enable lua-based terminals" { depends_lib-append port:lua configure.args-replace --without-lua --with-lua } variant pangocairo description "Enable cairo-based terminals" { configure.args-delete --without-cairo } variant pdflib description "Enable pdflib-based pdf terminal" { depends_lib-append port:pdflib configure.args-replace --without-pdf --with-pdf=${prefix} } variant wxwidgets description "Enable wxt terminal" { wxWidgets.use wxWidgets-3.0 depends_lib-append port:${wxWidgets.port} configure.args-replace --disable-wxwidgets --with-wx=${wxWidgets.wxdir} } variant qt conflicts qt5 description "Enable qt terminal with Qt 4" { PortGroup qt4 1.0 configure.args-replace --without-qt --with-qt=qt4 } variant qt5 conflicts qt description "Enable qt terminal with Qt 5" { if { ${configure.cxx_stdlib} ne "libc++" } { ui_warn "Gnuplot should be compiled against libc++ if you want to use Qt 5." } depends_lib-append port:qt5-qtbase \ port:qt5-qtsvg \ port:qt5-qttools configure.args-replace --without-qt --with-qt=qt5 } # Ideally one would enable just PMB by default, but '--with-bitmap-terminals' # enables lots of other obsolete terminals which clutter the output of 'set term'. variant old_bitmap_terminals description "Enable PBM (Portable Bit Map) and other older bitmap terminals" { configure.args-replace --without-bitmap-terminals --with-bitmap-terminals } default_variants +aquaterm +luaterm +pangocairo +wxwidgets +x11 if {[variant_isset pangocairo] || [variant_isset wxwidgets]} { depends_lib-append path:lib/pkgconfig/pango.pc:pango } # Building and installing TeX macro files for TikZ could/should be done by gnuplot's Makefile, # but without a patch that would require a dependency on texlive. # Apart from that the files would fly to the wrong place in TDS, # so that plain TeX and ConTeXt could not find them (an upstream bug). # So we 'manually' generate and copy the necessary files. post-build { if {[variant_isset luaterm]} { system -W ${worksrcpath}/share/LaTeX "${prefix}/bin/lua ../../term/lua/gnuplot-tikz.lua style" } } post-destroot { if {[variant_isset luaterm]} { set texmf ${destroot}${texlive_texmfports} set luadir ${worksrcpath}/share/LaTeX xinstall -d -m 0755 ${texmf}/tex/context/third/gnuplot-lua-tikz xinstall -d -m 0755 ${texmf}/tex/generic/gnuplot-lua-tikz xinstall -d -m 0755 ${texmf}/tex/latex/gnuplot-lua-tikz xinstall -d -m 0755 ${texmf}/tex/plain/gnuplot-lua-tikz xinstall -m 0644 ${luadir}/t-gnuplot-lua-tikz.tex ${texmf}/tex/context/third/gnuplot-lua-tikz xinstall -m 0644 ${luadir}/gnuplot-lua-tikz-common.tex ${texmf}/tex/generic/gnuplot-lua-tikz xinstall -m 0644 ${luadir}/gnuplot-lua-tikz.sty ${texmf}/tex/latex/gnuplot-lua-tikz xinstall -m 0644 ${luadir}/gnuplot-lua-tikz.tex ${texmf}/tex/plain/gnuplot-lua-tikz } set destdocdir ${destroot}${prefix}/share/doc/${name} xinstall -d -m 0755 ${destdocdir} xinstall -m 0644 ${worksrcpath}/docs/${name}.pdf ${destdocdir} # copy demo files file copy ${worksrcpath}/demo ${destdocdir} foreach {makefile} {Makefile Makefile.in Makefile.am Makefile.am.in} { delete ${destdocdir}/demo/${makefile} } }