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

Last change on this file since 112438 was 112438, checked in by mojca@…, 6 years ago

gnuplot: upgrade to 4.6.4

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 7.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 112438 2013-10-23 09:48:08Z mojca@macports.org $
3
4PortSystem                  1.0
5PortGroup                   elisp           1.0
6PortGroup                   texlive         1.0
7PortGroup                   xcodeversion    1.0
8PortGroup                   wxWidgets       1.0
9
10name                        gnuplot
11version                     4.6.4
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
34distfiles-append            ${name}.pdf
35extract.only                ${distname}.tar.gz
36checksums                   ${distname}.tar.gz \
37                            rmd160  a2dcc9d7768b9fbd12fa0993c6d40d059f57215e \
38                            sha256  843a2019bcc89f76520ac2c88ada900917f28b90f809a47da50a1cffc9190431 \
39                            ${name}.pdf \
40                            rmd160  3823c6f35f035857fc226fa5741cc04834fddce5 \
41                            sha256  31ad310bf307067e0dcbd0e51fb05846d45ad8ca772e58387a1bd3acbcbaaa7e
42
43depends_build               path:bin/pkg-config:pkgconfig
44
45depends_lib                 port:expat \
46                            port:fontconfig \
47                            port:gd2 \
48                            port:jpeg \
49                            port:pdflib \
50                            port:libiconv \
51                            port:libpng \
52                            port:ncurses \
53                            port:readline \
54                            port:zlib
55
56patchfiles                  patch-configure-aquaterm.diff
57
58minimum_xcodeversions       {9 3.1}
59
60configure.args              --with-readline=${prefix} \
61                            --with-gd=${prefix} \
62                            --with-pdf=${prefix} \
63                            --with-png=${prefix} \
64                            --without-aquaterm \
65                            --without-x \
66                            --enable-datastrings \
67                            --enable-histograms \
68                            --infodir='\${prefix}/share/info' \
69                            --mandir='\${prefix}/share/man' \
70                            --without-lisp-files \
71                            --disable-wxwidgets \
72                            --without-bitmap-terminals \
73                            --without-latex \
74                            --without-tutorial \
75                            --without-cairo \
76                            --without-lua
77
78variant aquaterm description "Enable AquaTerm terminal" {
79    depends_lib-append      port:aquaterm
80    configure.args-delete   --without-aquaterm
81    configure.args-append   --with-aquaterm=${frameworks_dir}
82}
83
84variant x11 {
85    configure.args-delete   --without-x
86    configure.args-append   --with-x
87    depends_lib-append      port:xpm
88}
89
90variant emacs description "An emacs mode for working with gnuplot" {
91    depends_build-append    port:${emacs_binary_provider} 
92    configure.env-append    EMACS=${emacs_binary}
93    configure.args-delete   --without-lisp-files
94    configure.args-append   --with-lisp-files --with-lispdir=${emacs_lispdir}
95}
96
97variant luaterm description "Enable lua-based terminals" {
98    depends_lib-append      port:lua
99    configure.args-delete   --without-lua
100    configure.args-append   --with-lua
101}
102
103variant pangocairo description "Enable cairo-based terminals" {
104    depends_lib-append      path:lib/pkgconfig/pango.pc:pango
105    configure.args-delete   --without-cairo
106}
107
108variant wxwidgets description "Enable wxt terminal" {
109    wxWidgets.use           wxWidgets-3.0
110    depends_lib-append      port:${wxWidgets.port} path:lib/pkgconfig/pango.pc:pango
111    configure.args-delete   --disable-wxwidgets
112    configure.args-append   --with-wx-config=${wxWidgets.wxdir}
113}
114
115# remove in September 2014
116variant wxwidgets30     description "Legacy compatibility variant" {}
117variant wxwidgets_devel description "Legacy compatibility variant" {}
118
119variant qt description "Enable qt terminal" {
120    depends_lib-append      port:qt4-mac
121    configure.args-append   --enable-qt
122}
123
124# Ideally one would enable just PMB by default, but '--with-bitmap-terminals'
125# enables lots of other obsolete terminals which clutter the output of 'set term'.
126variant old_bitmap_terminals description "Enable PBM (Portable Bit Map) and other older bitmap terminals" {
127    configure.args-delete   --without-bitmap-terminals
128    configure.args-append   --with-bitmap-terminals
129}
130
131default_variants            +aquaterm +luaterm +pangocairo +wxwidgets +x11
132
133if {[variant_isset wxwidgets30] || [variant_isset wxwidgets_devel]} {
134    default_variants-append +wxwidgets
135}
136
137# Building and installing TeX macro files for TikZ could/should be done by gnuplot's Makefile,
138# but without a patch that would require a dependency on texlive.
139# Apart from that the files would fly to the wrong place in TDS,
140# so that plain TeX and ConTeXt could not find them (an upstream bug).
141# So we 'manually' generate and copy the necessary files.
142post-build {
143    if {[variant_isset luaterm]} {
144        system -W ${workpath}/${distname}/share/LaTeX "${prefix}/bin/lua ../../term/lua/gnuplot-tikz.lua style"
145    }
146}
147
148post-destroot {
149    if {[variant_isset luaterm]} {
150        set texmf ${destroot}${texlive_texmfports}
151        set luadir ${workpath}/${distname}/share/LaTeX
152        xinstall -d -m 0755 ${texmf}/tex/context/third/gnuplot-lua-tikz
153        xinstall -d -m 0755 ${texmf}/tex/generic/gnuplot-lua-tikz
154        xinstall -d -m 0755 ${texmf}/tex/latex/gnuplot-lua-tikz
155        xinstall -d -m 0755 ${texmf}/tex/plain/gnuplot-lua-tikz
156
157        xinstall -m 0644 ${luadir}/t-gnuplot-lua-tikz.tex      ${texmf}/tex/context/third/gnuplot-lua-tikz
158        xinstall -m 0644 ${luadir}/gnuplot-lua-tikz-common.tex ${texmf}/tex/generic/gnuplot-lua-tikz
159        xinstall -m 0644 ${luadir}/gnuplot-lua-tikz.sty        ${texmf}/tex/latex/gnuplot-lua-tikz
160        xinstall -m 0644 ${luadir}/gnuplot-lua-tikz.tex        ${texmf}/tex/plain/gnuplot-lua-tikz
161    }
162
163    set destdocdir ${destroot}${prefix}/share/doc/${name}
164    xinstall -d -m 0755 ${destdocdir}
165    xinstall -m 0644 ${distpath}/${name}.pdf ${destdocdir}
166
167    # copy demo files
168    file copy ${workpath}/${distname}/demo ${destdocdir}
169    foreach {makefile} {Makefile Makefile.in Makefile.am Makefile.am.in} {
170        delete ${destdocdir}/demo/${makefile}
171    }
172}
173
174livecheck.url http://sourceforge.net/projects/gnuplot/files/
175livecheck.regex "gnuplot/.*/gnuplot-(.*)[quotemeta ${extract.suffix}]"
Note: See TracBrowser for help on using the repository browser.