Ticket #33828: Portfile

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