source: trunk/dports/math/gnuplot/Portfile @ 139469

Last change on this file since 139469 was 139469, checked in by jmr@…, 5 years ago

ncurses: update to 6.0, rev bump dependents due to new ABI

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 6.3 KB
Line 
1# -*- 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
2# $Id: Portfile 139469 2015-08-18 01:10:17Z jmr@macports.org $
3
4PortSystem          1.0
5PortGroup           texlive         1.0
6PortGroup           xcodeversion    1.0
7PortGroup           wxWidgets       1.0
8
9name                gnuplot
10version             5.0.1
11revision            1
12categories          math science
13# the license has some inconvenient requirements that we're not meeting
14# to be allowed to distribute binaries
15license             Restrictive
16# luckily nothing has to link against this
17installs_libs       no
18platforms           darwin
19maintainers         mojca openmaintainer
20
21description         A command-driven interactive function plotting program
22
23long_description    Gnuplot is a command-driven interactive function \
24                    plotting program. Plots any number of functions, \
25                    built up of C operators, C library functions, and \
26                    some things C does not have like **, sgn(), etc. \
27                    Also support for plotting data files, to compare \
28                    actual data to theoretical curves.
29
30homepage            http://gnuplot.sourceforge.net/
31master_sites        sourceforge:project/gnuplot/gnuplot/${version}
32dist_subdir         ${name}/${version}
33
34checksums           rmd160  cf2b952af27b0c4ce88ce5d796b07e1c6af4b620 \
35                    sha256  7cbc557e71df581ea520123fb439dea5f073adcc9010a2885dc80d4ed28b3c47
36
37depends_build       path:bin/pkg-config:pkgconfig
38
39depends_lib         port:expat \
40                    port:fontconfig \
41                    port:gd2 \
42                    port:jpeg \
43                    port:libcaca \
44                    port:libcerf \
45                    port:libiconv \
46                    port:libpng \
47                    port:ncurses \
48                    port:readline \
49                    port:zlib
50
51minimum_xcodeversions \
52                    {9 3.1}
53
54patchfiles          patch-configure.diff
55
56configure.args      --with-caca=${prefix} \
57                    --with-gd=${prefix} \
58                    --with-readline=${prefix} \
59                    --without-aquaterm \
60                    --without-x \
61                    --infodir='\${prefix}/share/info' \
62                    --mandir='\${prefix}/share/man' \
63                    --disable-wxwidgets \
64                    --without-bitmap-terminals \
65                    --without-cairo \
66                    --without-latex \
67                    --without-lua \
68                    --without-pdf \
69                    --without-qt \
70                    --without-tutorial \
71                    --with-cwdrc
72
73variant aquaterm description "Enable AquaTerm terminal" {
74    depends_lib-append          port:aquaterm
75    configure.args-replace      --without-aquaterm --with-aquaterm
76    configure.cflags-append     "-F${frameworks_dir}"
77    configure.ldflags-append    "-F${frameworks_dir}"
78}
79
80variant x11 {
81    configure.args-replace      --without-x --with-x
82    depends_lib-append          port:xpm
83}
84
85variant luaterm description "Enable lua-based terminals" {
86    depends_lib-append          port:lua
87    configure.args-replace      --without-lua --with-lua
88}
89
90variant pangocairo description "Enable cairo-based terminals" {
91    configure.args-delete       --without-cairo
92}
93
94variant pdflib description "Enable pdflib-based pdf terminal" {
95    depends_lib-append          port:pdflib
96    configure.args-replace      --without-pdf --with-pdf=${prefix}
97}
98
99variant wxwidgets description "Enable wxt terminal" {
100    wxWidgets.use               wxWidgets-3.0
101    depends_lib-append          port:${wxWidgets.port}
102    configure.args-replace      --disable-wxwidgets --with-wx=${wxWidgets.wxdir}
103}
104
105variant qt conflicts qt5 description "Enable qt terminal with Qt 4" {
106    depends_lib-append          port:qt4-mac
107    configure.args-replace      --without-qt --with-qt=qt4
108}
109
110variant qt5 conflicts qt description "Enable qt terminal with Qt 5" {
111    depends_lib-append          port:qt5-mac
112    configure.env-append        "PKG_CONFIG_PATH=${prefix}/libexec/qt5-mac/lib/pkgconfig"
113
114    configure.args-replace      --without-qt --with-qt=qt5
115}
116
117
118# Ideally one would enable just PMB by default, but '--with-bitmap-terminals'
119# enables lots of other obsolete terminals which clutter the output of 'set term'.
120variant old_bitmap_terminals description "Enable PBM (Portable Bit Map) and other older bitmap terminals" {
121    configure.args-replace      --without-bitmap-terminals --with-bitmap-terminals
122}
123
124default_variants                +aquaterm +luaterm +pangocairo +wxwidgets +x11
125
126if {[variant_isset pangocairo] || [variant_isset wxwidgets]} {
127    depends_lib-append          path:lib/pkgconfig/pango.pc:pango
128}
129
130# Building and installing TeX macro files for TikZ could/should be done by gnuplot's Makefile,
131# but without a patch that would require a dependency on texlive.
132# Apart from that the files would fly to the wrong place in TDS,
133# so that plain TeX and ConTeXt could not find them (an upstream bug).
134# So we 'manually' generate and copy the necessary files.
135post-build {
136    if {[variant_isset luaterm]} {
137        system -W ${worksrcpath}/share/LaTeX "${prefix}/bin/lua ../../term/lua/gnuplot-tikz.lua style"
138    }
139}
140
141post-destroot {
142    if {[variant_isset luaterm]} {
143        set texmf ${destroot}${texlive_texmfports}
144        set luadir ${worksrcpath}/share/LaTeX
145        xinstall -d -m 0755 ${texmf}/tex/context/third/gnuplot-lua-tikz
146        xinstall -d -m 0755 ${texmf}/tex/generic/gnuplot-lua-tikz
147        xinstall -d -m 0755 ${texmf}/tex/latex/gnuplot-lua-tikz
148        xinstall -d -m 0755 ${texmf}/tex/plain/gnuplot-lua-tikz
149
150        xinstall -m 0644 ${luadir}/t-gnuplot-lua-tikz.tex      ${texmf}/tex/context/third/gnuplot-lua-tikz
151        xinstall -m 0644 ${luadir}/gnuplot-lua-tikz-common.tex ${texmf}/tex/generic/gnuplot-lua-tikz
152        xinstall -m 0644 ${luadir}/gnuplot-lua-tikz.sty        ${texmf}/tex/latex/gnuplot-lua-tikz
153        xinstall -m 0644 ${luadir}/gnuplot-lua-tikz.tex        ${texmf}/tex/plain/gnuplot-lua-tikz
154    }
155
156    set destdocdir ${destroot}${prefix}/share/doc/${name}
157    xinstall -d -m 0755 ${destdocdir}
158    xinstall -m 0644 ${worksrcpath}/docs/${name}.pdf ${destdocdir}
159
160    # copy demo files
161    file copy ${worksrcpath}/demo ${destdocdir}
162    foreach {makefile} {Makefile Makefile.in Makefile.am Makefile.am.in} {
163        delete ${destdocdir}/demo/${makefile}
164    }
165}
Note: See TracBrowser for help on using the repository browser.