source: trunk/dports/science/grib_api/Portfile

Last change on this file was 154052, checked in by takeshi@…, 13 months ago

grib_api: update to 1.18.0

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.4 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 154052 2016-10-19 08:46:56Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup cmake     1.0
6PortGroup compilers 1.0
7
8name                grib_api
9version             1.18.0
10platforms           darwin
11maintainers         takeshi
12license             Apache-2
13categories          science
14description         GRIB decoder
15homepage            https://software.ecmwf.int/wiki/display/GRIB/Home
16master_sites        https://software.ecmwf.int/wiki/download/attachments/3473437
17distname            ${name}-${version}-Source
18checksums           rmd160  93846fae559958be1a1ff4f57eec192047baf66a \
19                    sha256  dfffeeb4df715b234907cb12d6729617bed0df0ff023337c2dd3cd20ab58199e
20long_description \
21    The ECMWF GRIB API is an application program interface accessible \
22    from C and FORTRAN programs developed for encoding and decoding   \
23    WMO FM-92 GRIB edition 1 and edition 2 messages. A useful set of  \
24    command line tools is also provided to give quick access to grib messages.
25
26if [fortran_variant_isset] {
27    compilers.choose    fc f77 f90
28}
29compilers.setup     -clang -dragonegg -gfortran -llvm -gcc44 -gcc45 -gcc46
30
31depends_build-append \
32                    bin:bison:bison \
33                    bin:flex:flex \
34                    port:perl5
35depends_lib         port:jasper \
36                    port:hdf5 \
37                    port:openjpeg15 \
38                    port:libpng \
39                    port:netcdf \
40                    port:zlib
41
42fetch.ignore_sslcert yes
43cmake.out_of_source yes
44
45if {![fortran_variant_isset]} {
46    default_variants    +gcc5
47}
48
49configure.args-append \
50                    -DENABLE_FORTRAN=OFF \
51                    -DENABLE_NETCDF=ON \
52                    -DENABLE_PNG=ON \
53                    -DENABLE_PYTHON=OFF \
54                    -DENABLE_TESTS=OFF \
55                    -DJASPER_INCLUDE_DIR=${prefix}/include \
56                    -DJASPER_LIBRARY_RELEASE=${prefix}/lib/libjasper.dylib \
57                    -DHDF5_z_LIBRARY_RELEASE=${prefix}/lib/libz.dylib \
58                    -DNETCDF_CONFIG_EXECUTABLE=${prefix}/bin/nc-config \
59                    -DOPENJPEG_INCLUDE_DIR=${prefix}/include/openjpeg-1.5 \
60                    -DOPENJPEG_LIBRARY=${prefix}/lib/libopenjpeg.dylib \
61                    -DPERL_EXECUTABLE=${prefix}/bin/perl \
62                    -DZLIB_INCLUDE_DIR=${prefix}/include \
63                    -DZLIB_LIBRARY=${prefix}/lib/libz.dylib
64
65if {[variant_isset g95]} {
66    configure.args-append   -DBUILD_SHARED_LIBS=OFF
67}
68
69post-destroot {
70    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
71    xinstall -m 644 {*}[glob ${worksrcpath}/html/*.html] \
72        ${destroot}${prefix}/share/doc/${name}
73}
74
75if {[fortran_variant_isset]} {
76    configure.args-delete   -DENABLE_FORTRAN=OFF
77    configure.args-append   -DENABLE_FORTRAN=ON
78}
79
80variant python27 description {Add support for python27} {
81    depends_lib-append      port:py27-numpy
82    configure.args-delete   -DENABLE_PYTHON=OFF
83    configure.args-append   -DENABLE_PYTHON=ON \
84                            -DPYTHON_CONFIG=${prefix}/bin/python2.7-config \
85                            -DPYTHON_EXECUTABLE=${prefix}/bin/python2.7 \
86}
87
88variant openmp description {Add support for OpenMP} {
89    configure.args-append   -DENABLE_GRIB_OMP_THREADS=ON
90}
91
92livecheck.type  regex
93livecheck.url   ${homepage}
94livecheck.regex "GRIB API version (\\d+(?:\\.\\d+)*)"
Note: See TracBrowser for help on using the repository browser.