Ticket #54035: Portfile

File Portfile, 2.9 KB (added by thiagoveloso (Thiago V. dos Santos), 7 years ago)
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
3PortSystem              1.0
4
5name                    ncview
6version                 2.1.7
7revision                11
8maintainers             nomaintainer
9platforms               darwin
10categories              science
11license                 GPL-3
12
13description             X windows point'n'click NetCDF viewer.
14long_description        Ncview is a visual browser for NetCDF format \
15                        files. Typically you would use ncview to get \
16                        a quick and easy, push-button look at your \
17                        NetCDF files. You can view simple movies of \
18                        the data, view along various dimensions, take \
19                        a look at the actual data values, change color \
20                        maps, invert the data, etc.
21
22homepage                http://meteora.ucsd.edu/~pierce/ncview_home_page.html
23
24master_sites            ftp://cirrus.ucsd.edu/pub/ncview/
25
26checksums               rmd160  6308916cb309e2f2f809b4d4b47ad89263714885 \
27                        sha256  8aaf98fad15790313739520b88e17748617be504f0a2b0322a62144e390db1dd
28
29patchfiles              patch-configure.diff
30
31depends_lib             port:expat \
32                        port:udunits2 \
33                        port:netcdf \
34                        port:libpng \
35                        port:xorg-libXaw \
36                        port:xorg-libXt \
37                        port:xorg-libice
38
39pre-configure {
40    set nc4 [exec ${prefix}/bin/nc-config --has-nc4]
41    if {${nc4} != "yes"} {
42        ui_error "Install netcdf +netcdf4 first. Run:"
43        ui_error "    port install netcdf +netcdf4"
44        return -code error "netcdf +netcdf4 not installed"
45    }
46}
47
48configure.args          --with-netcdf_incdir=${prefix}/include \
49                        --with-netcdf_libdir=${prefix}/lib \
50                        --with-nc-config=${prefix}/nc-config \
51                        --with-udunits2_incdir=${prefix}/include/udunits2 \
52                        --with-udunits2_libdir=${prefix}/lib \
53                        --with-png_incdir=${prefix}/include \
54                        --with-png_libdir=${prefix}/lib \
55                        --x-libraries=${prefix}/lib \
56                        --x-includes=${prefix}/include
57
58use_parallel_build      yes
59
60post-destroot {
61    xinstall -m 755 -d ${destroot}${prefix}/lib/${name}
62    xinstall -m 755 -W ${worksrcpath} 3gauss.ncmap 3saw.ncmap bw.ncmap default.ncmap detail.ncmap hotres.ncmap ${destroot}${prefix}/lib/${name}
63   
64    xinstall -m 755 ${worksrcpath}/data/ncview.1 ${destroot}${prefix}/share/man/man1
65   
66    set docdir ${prefix}/share/doc/${subport}
67    xinstall -m 755 -d ${destroot}${docdir}
68    xinstall -m 755 -W ${worksrcpath} README ${destroot}${docdir}
69}
70
71livecheck.type              regex
72livecheck.url               ${homepage}
73livecheck.regex             {New version \(([^)]+)\)}