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

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

revbump the wxWidgets dependents

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