source: trunk/dports/math/gnuplot/Portfile

Last change on this file was 153813, checked in by mojca@…, 9 months ago

gnuplot: update to 5.0.5

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 6.5 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 153813 2016-10-12 09:15:22Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           texlive         1.0
6PortGroup           xcodeversion    1.0
7PortGroup           wxWidgets       1.0
8
9name                gnuplot
10version             5.0.5
11categories          math science
12# the license has some inconvenient requirements that we're not meeting
13# to be allowed to distribute binaries
14license             Restrictive
15# luckily nothing has to link against this
16installs_libs       no
17platforms           darwin
18maintainers         mojca openmaintainer
19
20description         A command-driven interactive function plotting program
21
22long_description    Gnuplot is a command-driven interactive function \
23                    plotting program. Plots any number of functions, \
24                    built up of C operators, C library functions, and \
25                    some things C does not have like **, sgn(), etc. \
26                    Also support for plotting data files, to compare \
27                    actual data to theoretical curves.
28
29homepage            http://gnuplot.sourceforge.net/
30master_sites        sourceforge:project/gnuplot/gnuplot/${version}
31dist_subdir         ${name}/${version}
32
33checksums           rmd160  928acb77e084fbe62babfd6c33af0ec15577dad7 \
34                    sha256  25f3e0bf192e01115c580f278c3725d7a569eb848786e12b455a3fda70312053
35
36depends_build       path:bin/pkg-config:pkgconfig
37
38depends_lib         port:expat \
39                    port:fontconfig \
40                    port:gd2 \
41                    port:jpeg \
42                    path:lib/libcaca.dylib:libcaca \
43                    port:libcerf \
44                    port:libiconv \
45                    port:libpng \
46                    port:ncurses \
47                    port:readline \
48                    port:zlib
49
50minimum_xcodeversions \
51                    {9 3.1}
52
53patchfiles          patch-configure.diff
54#                   patch-src-qtterminal-qt_conversion.cpp.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    PortGroup qt4 1.0
107    configure.args-replace      --without-qt --with-qt=qt4
108}
109
110variant qt5 conflicts qt description "Enable qt terminal with Qt 5" {
111    if { ${configure.cxx_stdlib} ne "libc++" } {
112        ui_warn "Gnuplot should be compiled against libc++ if you want to use Qt 5."
113    }
114
115    depends_lib-append          port:qt5-qtbase \
116                                port:qt5-qtsvg \
117                                port:qt5-qttools
118
119    configure.args-replace      --without-qt --with-qt=qt5
120}
121
122
123# Ideally one would enable just PMB by default, but '--with-bitmap-terminals'
124# enables lots of other obsolete terminals which clutter the output of 'set term'.
125variant old_bitmap_terminals description "Enable PBM (Portable Bit Map) and other older bitmap terminals" {
126    configure.args-replace      --without-bitmap-terminals --with-bitmap-terminals
127}
128
129default_variants                +aquaterm +luaterm +pangocairo +wxwidgets +x11
130
131if {[variant_isset pangocairo] || [variant_isset wxwidgets]} {
132    depends_lib-append          path:lib/pkgconfig/pango.pc:pango
133}
134
135# Building and installing TeX macro files for TikZ could/should be done by gnuplot's Makefile,
136# but without a patch that would require a dependency on texlive.
137# Apart from that the files would fly to the wrong place in TDS,
138# so that plain TeX and ConTeXt could not find them (an upstream bug).
139# So we 'manually' generate and copy the necessary files.
140post-build {
141    if {[variant_isset luaterm]} {
142        system -W ${worksrcpath}/share/LaTeX "${prefix}/bin/lua ../../term/lua/gnuplot-tikz.lua style"
143    }
144}
145
146post-destroot {
147    if {[variant_isset luaterm]} {
148        set texmf ${destroot}${texlive_texmfports}
149        set luadir ${worksrcpath}/share/LaTeX
150        xinstall -d -m 0755 ${texmf}/tex/context/third/gnuplot-lua-tikz
151        xinstall -d -m 0755 ${texmf}/tex/generic/gnuplot-lua-tikz
152        xinstall -d -m 0755 ${texmf}/tex/latex/gnuplot-lua-tikz
153        xinstall -d -m 0755 ${texmf}/tex/plain/gnuplot-lua-tikz
154
155        xinstall -m 0644 ${luadir}/t-gnuplot-lua-tikz.tex      ${texmf}/tex/context/third/gnuplot-lua-tikz
156        xinstall -m 0644 ${luadir}/gnuplot-lua-tikz-common.tex ${texmf}/tex/generic/gnuplot-lua-tikz
157        xinstall -m 0644 ${luadir}/gnuplot-lua-tikz.sty        ${texmf}/tex/latex/gnuplot-lua-tikz
158        xinstall -m 0644 ${luadir}/gnuplot-lua-tikz.tex        ${texmf}/tex/plain/gnuplot-lua-tikz
159    }
160
161    set destdocdir ${destroot}${prefix}/share/doc/${name}
162    xinstall -d -m 0755 ${destdocdir}
163    xinstall -m 0644 ${worksrcpath}/docs/${name}.pdf ${destdocdir}
164
165    # copy demo files
166    file copy ${worksrcpath}/demo ${destdocdir}
167    foreach {makefile} {Makefile Makefile.in Makefile.am Makefile.am.in} {
168        delete ${destdocdir}/demo/${makefile}
169    }
170}
Note: See TracBrowser for help on using the repository browser.