Ticket #33828: Portfile-ncview.diff

File Portfile-ncview.diff, 4.3 KB (added by rachid.benshila@…, 12 years ago)
  • Portfile

    old new  
     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
    12# $Id: Portfile 85049 2011-10-08 09:53:47Z takeshi@macports.org $
    23
    34PortSystem              1.0
    45
    56name                    ncview
    6 version                 1.93g
     7version                 2.1.1
    78revision                1
    89maintainers             nomaintainer
    910platforms               darwin
    1011categories              science
     12license                 GPL-3
    1113
    1214description             X windows point'n'click NetCDF viewer.
    1315long_description        Ncview is a visual browser for NetCDF format \
     
    2123homepage                http://meteora.ucsd.edu/~pierce/ncview_home_page.html
    2224
    2325master_sites            ftp://cirrus.ucsd.edu/pub/ncview/
    24 checksums               md5     09615ad95fe1f1cc684c24e67bb78a78 \
    25                         sha1    193b1e51d6ad7257bc4050493b708d5c12c16419 \
    26                         rmd160  036f2b6851085243dedadb6d47292b0467ce1426
    2726
    28 patchfiles              patch-Makefile.in.diff patch-configure.diff
    29 depends_lib             port:netcdf port:udunits port:netpbm \
     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 \
    3036                        port:xorg-libXaw port:xorg-libXt port:xorg-libice
    3137
     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
    3247configure.args          --with-netcdf_incdir=${prefix}/include \
    3348                        --with-netcdf_libdir=${prefix}/lib \
    3449                        --with-bindir=${prefix}/bin \
    35                         --with-udunits_incdir=${prefix}/include \
    36                         --with-udunits_libdir=${prefix}/lib \
    37                         --with-ppm_incdir=${prefix}/include/netpbm \
    38                         --with-ppm_libdir=${prefix}/lib \
    39                         --x-includes=${prefix} \
    40                         --x-libraries=${prefix}
    41 
    42 # Makefile does not respect CPPFLAGS
    43 configure.cflags-append -I${prefix}/include/netpbm
    44 
     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                       
    4556use_parallel_build      yes
    4657
    47 destroot.destdir-append MANDIR=${prefix}/share/man/man1
    48 
    4958post-destroot {
    5059    xinstall -m 755 -d ${destroot}${prefix}/lib/ncview
    51     foreach file { 3gauss.ncmap 3saw.ncmap default.ncmap detail.ncmap hotres.ncmap nc_overlay.earth.lat-lon.p8deg nc_overlay.lat-lon-grid.20x60 nc_overlay.lat-lon-grid.10x30 } {
     60    foreach file { 3gauss.ncmap 3saw.ncmap bw.ncmap default.ncmap detail.ncmap hotres.ncmap } {
    5261        xinstall -m 755 ${worksrcpath}/${file} ${destroot}${prefix}/lib/ncview
    5362    }
    5463    xinstall -m 755 -d ${destroot}${prefix}/share/doc/ncview
    5564    xinstall -m 755 ${worksrcpath}/README ${destroot}${prefix}/share/doc/ncview
    56 }
    57 
    58 post-activate {
    59     ui_msg "\n
    60 The MacPorts X11 app-defaults directory is located at:
    61 
    62         ${prefix}/lib/X11/app-defaults
    63 
    64 Therefore, you must set the XFILESEARCHPATH environment variable to your ~/.profile for
    65 your X11 environment to find the MacPorts app-defaults directory:
    66 
    67         export XFILESEARCHPATH=/usr/X11R6/lib/X11/app-defaults/%N:${prefix}/lib/X11/app-defaults/%N
    68 \n"
     65    xinstall -m 755 ${worksrcpath}/data/ncview.1 ${destroot}${prefix}/share/man/man1
    6966}
    7067
    7168livecheck.type              regex
    7269livecheck.url               ${homepage}
    73 livecheck.regex             {New version \(([0-9]+\.[0-9]+[a-z])}
     70livecheck.regex             {New version \(([0-9]+\.[0-9]+\.[0-9])}
     71 No newline at end of file