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 120160 2014-05-17 15:00:01Z mojca@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup elisp 1.0 |
---|
6 | PortGroup texlive 1.0 |
---|
7 | PortGroup xcodeversion 1.0 |
---|
8 | PortGroup wxWidgets 1.0 |
---|
9 | |
---|
10 | name gnuplot |
---|
11 | version 5.0.rc1 |
---|
12 | categories math science |
---|
13 | # the license has some inconvenient requirements that we're not meeting |
---|
14 | # to be allowed to distribute binaries |
---|
15 | license Restrictive |
---|
16 | # luckily nothing has to link against this |
---|
17 | installs_libs no |
---|
18 | platforms darwin |
---|
19 | maintainers mojca openmaintainer |
---|
20 | |
---|
21 | description A command-driven interactive function plotting program |
---|
22 | |
---|
23 | long_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 | |
---|
30 | homepage http://gnuplot.sourceforge.net/ |
---|
31 | master_sites sourceforge:project/gnuplot/gnuplot/${version} |
---|
32 | dist_subdir ${name}/${version} |
---|
33 | |
---|
34 | checksums rmd160 2f3b83e27492889ecb888b57382066b423ce1229 \ |
---|
35 | sha256 0943f29f3a954fd2ee2cacd4f881e7471dccd18742ce117e41b225864219bd8a \ |
---|
36 | |
---|
37 | depends_build path:bin/pkg-config:pkgconfig |
---|
38 | |
---|
39 | depends_lib port:expat \ |
---|
40 | port:fontconfig \ |
---|
41 | port:gd2 \ |
---|
42 | port:jpeg \ |
---|
43 | port:libcaca \ |
---|
44 | port:libiconv \ |
---|
45 | port:libpng \ |
---|
46 | port:ncurses \ |
---|
47 | port:readline \ |
---|
48 | port:zlib |
---|
49 | |
---|
50 | minimum_xcodeversions {9 3.1} |
---|
51 | |
---|
52 | configure.args --with-readline=${prefix} \ |
---|
53 | --with-gd=${prefix} \ |
---|
54 | --with-caca=${prefix} \ |
---|
55 | --without-aquaterm \ |
---|
56 | --without-x \ |
---|
57 | --infodir='\${prefix}/share/info' \ |
---|
58 | --mandir='\${prefix}/share/man' \ |
---|
59 | --with-cwdrc \ |
---|
60 | --disable-wxwidgets \ |
---|
61 | --without-bitmap-terminals \ |
---|
62 | --without-cairo \ |
---|
63 | --without-latex \ |
---|
64 | --without-lua \ |
---|
65 | --without-pdf \ |
---|
66 | --without-qt \ |
---|
67 | --without-tutorial |
---|
68 | |
---|
69 | # --without-lisp-files \ |
---|
70 | |
---|
71 | variant aquaterm description "Enable AquaTerm terminal" { |
---|
72 | depends_lib-append port:aquaterm |
---|
73 | configure.args-delete --without-aquaterm |
---|
74 | configure.cflags-append "-F${frameworks_dir}" |
---|
75 | configure.ldflags-append "-F${frameworks_dir}" |
---|
76 | configure.args-append --with-aquaterm |
---|
77 | } |
---|
78 | |
---|
79 | variant x11 { |
---|
80 | configure.args-delete --without-x |
---|
81 | configure.args-append --with-x |
---|
82 | depends_lib-append port:xpm |
---|
83 | } |
---|
84 | |
---|
85 | # don't know how to implement that |
---|
86 | # variant emacs description "An emacs mode for working with gnuplot" { |
---|
87 | # depends_build-append port:${emacs_binary_provider} |
---|
88 | # configure.env-append EMACS=${emacs_binary} |
---|
89 | # configure.args-delete --without-lisp-files |
---|
90 | # configure.args-append --with-lisp-files --with-lispdir=${emacs_lispdir} |
---|
91 | # } |
---|
92 | |
---|
93 | variant luaterm description "Enable lua-based terminals" { |
---|
94 | depends_lib-append port:lua |
---|
95 | configure.args-delete --without-lua |
---|
96 | configure.args-append --with-lua |
---|
97 | } |
---|
98 | |
---|
99 | variant pangocairo description "Enable cairo-based terminals" { |
---|
100 | depends_lib-append path:lib/pkgconfig/pango.pc:pango |
---|
101 | configure.args-delete --without-cairo |
---|
102 | } |
---|
103 | |
---|
104 | variant pdflib description "Enable pdflib-based pdf terminal" { |
---|
105 | depends_lib-append port:pdflib |
---|
106 | configure.args-replace --without-pdf --with-pdf=${prefix} |
---|
107 | } |
---|
108 | |
---|
109 | variant 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=${wxWidgets.wxdir} |
---|
114 | } |
---|
115 | |
---|
116 | # remove in September 2014 |
---|
117 | variant wxwidgets30 description "Legacy compatibility variant" {} |
---|
118 | variant wxwidgets_devel description "Legacy compatibility variant" {} |
---|
119 | |
---|
120 | variant qt description "Enable qt terminal" { |
---|
121 | depends_lib-append port:qt4-mac |
---|
122 | configure.args-replace --without-qt --with-qt=qt4 |
---|
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'. |
---|
127 | variant 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 | |
---|
132 | default_variants +aquaterm +luaterm +pangocairo +wxwidgets +x11 |
---|
133 | |
---|
134 | if {[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. |
---|
143 | post-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 | |
---|
149 | post-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 ${workpath}/${distname}/docs/${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 | } |
---|