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 90282 2012-02-29 14:35:42Z jmr@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup xcodeversion 1.0 |
---|
6 | |
---|
7 | name gnuplot |
---|
8 | version 4.6.0 |
---|
9 | categories math science |
---|
10 | # the license has some inconvenient requirements that we're not meeting |
---|
11 | # to be allowed to distribute binaries |
---|
12 | license Restrictive |
---|
13 | # luckily nothing has to link against this |
---|
14 | installs_libs no |
---|
15 | platforms darwin |
---|
16 | maintainers nomaintainer |
---|
17 | |
---|
18 | description A command-driven interactive function plotting program |
---|
19 | |
---|
20 | long_description Gnuplot is a command-driven interactive function \ |
---|
21 | plotting program. Plots any number of functions, \ |
---|
22 | built up of C operators, C library functions, and \ |
---|
23 | some things C doesn't have like **, sgn(), etc. \ |
---|
24 | Also support for plotting data files, to compare \ |
---|
25 | actual data to theoretical curves. |
---|
26 | |
---|
27 | homepage http://gnuplot.sourceforge.net/ |
---|
28 | master_sites sourceforge \ |
---|
29 | http://sourceforge.net/projects/gnuplot/files/gnuplot/${version}/:manual |
---|
30 | dist_subdir ${name}/${version} |
---|
31 | |
---|
32 | distfiles-append ${name}.pdf:manual |
---|
33 | extract.only ${distname}.tar.gz |
---|
34 | checksums ${distname}.tar.gz \ |
---|
35 | rmd160 2c06500f45fb81850b45713a2cd0e38f0021b065 \ |
---|
36 | sha256 6e60adb5039a3541f407c2ade670004178b376754c424c13f0be24c7960c17be \ |
---|
37 | ${name}.pdf \ |
---|
38 | rmd160 374614145a7b78e263b0cfbb695eb22d07dede9a \ |
---|
39 | sha256 57bd4d88e1321968ba06f29dfa322b4cd9e6beb4e0f42e1a4775d9c9a41af170 |
---|
40 | |
---|
41 | depends_lib port:expat \ |
---|
42 | port:fontconfig \ |
---|
43 | port:gd2 \ |
---|
44 | port:jpeg \ |
---|
45 | port:pdflib \ |
---|
46 | port:libiconv \ |
---|
47 | port:libpng \ |
---|
48 | port:ncurses \ |
---|
49 | port:readline \ |
---|
50 | port:xpm \ |
---|
51 | port:zlib |
---|
52 | |
---|
53 | patchfiles patch-src-variable_c.diff \ |
---|
54 | patch-wxt-scroll.diff \ |
---|
55 | patch-qt.diff |
---|
56 | |
---|
57 | # Patch for Qt is a bit ugly, but a better patch might be needed upstream for the next Gnuplot release. |
---|
58 | # If one uses Cocoa inside C++ code, there is a conflict between C++ and ObjC syntax, so files have to be split. |
---|
59 | |
---|
60 | platform darwin { |
---|
61 | depends_lib-append port:aquaterm |
---|
62 | } |
---|
63 | |
---|
64 | minimum_xcodeversions {9 3.1} |
---|
65 | |
---|
66 | configure.args --with-readline=${prefix} \ |
---|
67 | --with-gd=${prefix} \ |
---|
68 | --with-pdf=${prefix} \ |
---|
69 | --with-png=${prefix} \ |
---|
70 | --with-x \ |
---|
71 | --enable-datastrings \ |
---|
72 | --enable-histograms \ |
---|
73 | --infodir='\${prefix}/share/info' \ |
---|
74 | --mandir='\${prefix}/share/man' \ |
---|
75 | --disable-wxwidgets \ |
---|
76 | --without-latex \ |
---|
77 | --without-tutorial \ |
---|
78 | --without-cairo \ |
---|
79 | --without-lua |
---|
80 | |
---|
81 | configure.ccache no |
---|
82 | |
---|
83 | variant no_x11 { |
---|
84 | depends_lib-delete port:xpm |
---|
85 | configure.args-delete --with-x |
---|
86 | configure.args-append --without-x |
---|
87 | } |
---|
88 | |
---|
89 | variant luaterm description "Enable Lua terminal" { |
---|
90 | depends_lib-append port:lua |
---|
91 | configure.args-delete --without-lua |
---|
92 | configure.args-append --with-lua |
---|
93 | } |
---|
94 | |
---|
95 | variant pangocairo description "Enable cairo-based terminals" { |
---|
96 | depends_lib-append path:lib/pkgconfig/pango.pc:pango |
---|
97 | configure.args-delete --without-cairo |
---|
98 | } |
---|
99 | |
---|
100 | # TODO: one needs an option to choose between normal and devel version, |
---|
101 | # but only devel version allows building 64-bit binaries |
---|
102 | variant wxwidgets description "Enable wxWidgets front-end" { |
---|
103 | depends_lib-append port:wxWidgets-devel |
---|
104 | configure.args-delete --disable-wxwidgets |
---|
105 | configure.args-append --with-wx-config=${prefix}/bin/wx-config |
---|
106 | } |
---|
107 | # clang compiler doesn't work |
---|
108 | # http://trac.wxwidgets.org/ticket/13565 |
---|
109 | if {[variant_isset wxwidgets]} { |
---|
110 | if {${configure.compiler} == "clang"} { |
---|
111 | configure.compiler llvm-gcc-4.2 |
---|
112 | } |
---|
113 | } |
---|
114 | |
---|
115 | # old version of wxWidgets variant |
---|
116 | #variant wxwidgets description "Enable wxWidgets front-end" { |
---|
117 | # depends_lib-append port:wxWidgets |
---|
118 | # configure.args-delete --disable-wxwidgets |
---|
119 | # configure.args-append --with-wx-config=${prefix}/bin/wx-config |
---|
120 | #} |
---|
121 | #if {[variant_isset wxwidgets]} { |
---|
122 | # # wxWidgets is not universal and is 32-bit only |
---|
123 | # universal_variant no |
---|
124 | # supported_archs i386 ppc |
---|
125 | #} |
---|
126 | |
---|
127 | variant qt description "Enable Qt terminal" { |
---|
128 | depends_lib-append port:qt4-mac |
---|
129 | configure.args-append --enable-qt |
---|
130 | } |
---|
131 | |
---|
132 | variant tutorial description "Build the tutorial (requires a tex install)" { |
---|
133 | depends_lib-append port:texlive-latex-extra |
---|
134 | configure.args-delete --without-tutorial --without-latex |
---|
135 | configure.args-append --with-tutorial |
---|
136 | } |
---|
137 | |
---|
138 | default_variants +luaterm +pangocairo |
---|
139 | |
---|
140 | destroot.destdir prefix=${destroot}${prefix} |
---|
141 | |
---|
142 | post-destroot { |
---|
143 | xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name} |
---|
144 | xinstall -m 0644 ${distpath}/${name}.pdf \ |
---|
145 | ${destroot}${prefix}/share/doc/${name}/ |
---|
146 | } |
---|