source: trunk/dports/python/py-ngl/Portfile

Last change on this file was 149328, checked in by ryandesign@…, 18 months ago

py-ngl: fix portindex failure and fix some errors in test phase

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.7 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 149328 2016-06-11 08:49:10Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup python    1.0
6PortGroup compilers 1.0
7
8name                py-ngl
9version             1.3.0b1
10revision            1
11categories-append   science
12platforms           darwin
13license             PyNGL
14maintainers         petr openmaintainer
15
16description         Python module to visualize scientific data
17long_description \
18    PyNGL is a Python language module used to visualize scientific data, \
19    with an emphasis on high-quality 2D visualizations.
20
21homepage            http://www.pyngl.ucar.edu/
22distname            PyNGL-${version}
23
24master_sites        https://www.earthsystemgrid.org/download/fileDownload.htm?logicalFileId=40003c7a-306d-11df-8e89-00c0f03d5b7c&dummy=
25
26checksums           md5     231e0ad8ab7f295483f131367ab856cc \
27                    rmd160  bd4357d46af0a723cd81c16bdb0ecc3df03fa6a2 \
28                    sha256  0666f605033609680f3e7312ae412a5a5b8792bc8f423b3cae3ae3e4af235a25
29
30python.versions     26 27
31
32if {${name} ne ${subport}} {
33    depends_lib-append  port:zlib \
34                        port:libpng \
35                        port:xorg-libX11 \
36                        port:py${python.version}-nio
37
38    # ncarg is not universal, thus py-ngl isn't either
39    universal_variant   no
40
41    patch {
42        reinplace "s|/usr/X11R6/lib|${prefix}/lib|" ${worksrcpath}/setup.py
43        reinplace "s|/usr/bin/env python|${python.bin}|" ${worksrcpath}/examples/pynglex
44        reinplace "s|py_cmd = 'python'|py_cmd = '${python.bin}'|" ${worksrcpath}/examples/pynglex
45    }
46
47    build.env           PNG_PREFIX=${prefix} \
48                        ZLIB_PREFIX=${prefix} \
49                        NCARG_ROOT=${prefix} \
50                        CC=${configure.cc}
51
52    destroot.env        NCARG_ROOT=${prefix}
53
54    compilers.choose    fc f77 f90
55    compilers.setup     require_fortran -dragonegg
56
57    if {[gcc_variant_isset]} {
58        build.env-append    F2CLIBS=gfortran \
59                            F2CLIBS_PREFIX=${prefix}/lib/[gcc_variant_name]
60    } else {
61        # g95
62        configure.fflags-append -fno-second-underscore
63
64        build.env-append    F2CLIBS=f95 \
65                            F2CLIBS_PREFIX=${prefix}/lib/
66    }
67
68    livecheck.type   none
69
70    test.run         yes
71    test.env-append         PYTHONPATH=[glob -nocomplain ${worksrcpath}/build/lib*]
72    test.cmd                ${python.bin} ./build/scripts-${python.branch}/pynglex
73    test.target
74    test.args               -w x11 ngl01p
75} else {
76    livecheck.type   regex
77    livecheck.url    http://www.pyngl.ucar.edu/Download/
78    livecheck.regex  {of PyNGL is ([0-9]\.[0-9]\.[0-9]+)}
79}
Note: See TracBrowser for help on using the repository browser.