Ticket #33596: gnuplot.2.Portfile

File gnuplot.2.Portfile, 5.7 KB (added by mojca (Mojca Miklavec), 12 years ago)

Portfile for gnuplot 4.6, now with working Qt terminal

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 90282 2012-02-29 14:35:42Z jmr@macports.org $
3
4PortSystem                  1.0
5PortGroup                   xcodeversion 1.0
6
7name                        gnuplot
8version                     4.6.0
9categories                  math science
10# the license has some inconvenient requirements that we're not meeting
11# to be allowed to distribute binaries
12license                     Restrictive
13# luckily nothing has to link against this
14installs_libs               no
15platforms                   darwin
16maintainers                 nomaintainer
17
18description                 A command-driven interactive function plotting program
19
20long_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
27homepage                    http://gnuplot.sourceforge.net/
28master_sites                sourceforge \
29                            http://sourceforge.net/projects/gnuplot/files/gnuplot/${version}/:manual
30dist_subdir                 ${name}/${version}
31
32distfiles-append            ${name}.pdf:manual
33extract.only                ${distname}.tar.gz
34checksums                   ${distname}.tar.gz \
35                            rmd160  2c06500f45fb81850b45713a2cd0e38f0021b065 \
36                            sha256  6e60adb5039a3541f407c2ade670004178b376754c424c13f0be24c7960c17be \
37                            ${name}.pdf \
38                            rmd160  374614145a7b78e263b0cfbb695eb22d07dede9a \
39                            sha256  57bd4d88e1321968ba06f29dfa322b4cd9e6beb4e0f42e1a4775d9c9a41af170
40
41depends_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
53patchfiles                  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
60platform darwin {
61    depends_lib-append      port:aquaterm
62}
63
64minimum_xcodeversions       {9 3.1}
65
66configure.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
81configure.ccache            no
82
83variant no_x11 {
84    depends_lib-delete      port:xpm
85    configure.args-delete   --with-x
86    configure.args-append   --without-x
87}
88
89variant 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
95variant 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
102variant 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
109if {[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
127variant qt description "Enable Qt terminal" {
128    depends_lib-append      port:qt4-mac
129    configure.args-append   --enable-qt
130}
131
132variant 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
138default_variants            +luaterm +pangocairo
139
140destroot.destdir            prefix=${destroot}${prefix}
141
142post-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}