[137865] trunk/dports/science/grib_api/Portfile
takeshi at macports.org
takeshi at macports.org
Mon Jun 22 05:06:53 PDT 2015
Revision: 137865
https://trac.macports.org/changeset/137865
Author: takeshi at macports.org
Date: 2015-06-22 05:06:53 -0700 (Mon, 22 Jun 2015)
Log Message:
-----------
grib_api: update to 1.13.1. switch to CMake
Modified Paths:
--------------
trunk/dports/science/grib_api/Portfile
Modified: trunk/dports/science/grib_api/Portfile
===================================================================
--- trunk/dports/science/grib_api/Portfile 2015-06-22 10:44:40 UTC (rev 137864)
+++ trunk/dports/science/grib_api/Portfile 2015-06-22 12:06:53 UTC (rev 137865)
@@ -2,11 +2,11 @@
# $Id$
PortSystem 1.0
+PortGroup cmake 1.0
PortGroup compilers 1.0
name grib_api
-version 1.13.0
-revision 1
+version 1.13.1
platforms darwin
maintainers takeshi
license Apache-2
@@ -14,79 +14,64 @@
description GRIB decoder
homepage https://software.ecmwf.int/wiki/display/GRIB/Home
master_sites https://software.ecmwf.int/wiki/download/attachments/3473437
-checksums md5 3fdae4e771c486e5f660a073de1ecd8a \
- sha1 1b44c535034d890942b534ec3470fb48bdf0dfac \
- rmd160 dfb23972864bc619e06d4b3ad99ba14ed383b113
+checksums md5 2d76933cd11ed33ff4141717a8761070 \
+ sha1 5cc9ef0318a36d7461038575f67d5385426e5d14 \
+ rmd160 9cb2e4cdb9651d637f15eb061310648286535ebf
long_description \
The ECMWF GRIB API is an application program interface accessible \
from C and FORTRAN programs developed for encoding and decoding \
WMO FM-92 GRIB edition 1 and edition 2 messages. A useful set of \
command line tools is also provided to give quick access to grib messages.
-compilers.choose fc f77 f90
-compilers.setup -dragonegg
+if [fortran_variant_isset] {
+ compilers.choose fc f77 f90
+}
+compilers.setup -clang -dragonegg -gfortran -llvm
+depends_build bin:bison:bison \
+ bin:flex:flex \
+ bin:perl:perl5
depends_lib port:jasper \
+ port:hdf5 \
port:openjpeg15 \
port:libpng \
- port:netcdf
+ port:netcdf \
+ port:zlib
-fetch.ignore_sslcert yes
+fetch.ignore_sslcert yes
+cmake.out_of_source yes
-post-patch {
- if {${os.major} == 8} {
- reinplace "s| -Wl,-rpath \$fortranlibdir||" ${worksrcpath}/configure
- }
-# avoid installation to non-existent directory 'none'
- reinplace "s|'none'|''|" ${worksrcpath}/configure
-# avoid auto detection of g95 or gfortran that may prevent generation of shared library
- reinplace "s|g95|''|" ${worksrcpath}/configure
- reinplace "s|gfortran|''|" ${worksrcpath}/configure
-# avoid duplicated symbol error
- reinplace "s|-fno-common||" ${worksrcpath}/configure
-}
+configure.args -DENABLE_FORTRAN=OFF \
+ -DENABLE_NETCDF=ON \
+ -DENABLE_PNG=ON \
+ -DENABLE_PYTHON=OFF \
+ -DENABLE_TESTS=OFF \
+ -DJASPER_INCLUDE_DIR=${prefix}/include \
+ -DJASPER_LIBRARY_RELEASE=${prefix}/lib/libjasper.dylib \
+ -DHDF5_z_LIBRARY_RELEASE=${prefix}/lib/libz.dylib \
+ -DNETCDF_CONFIG_EXECUTABLE=${prefix}/bin/nc-config \
+ -DOPENJPEG_INCLUDE_DIR=${prefix}/include/openjpeg-2.1 \
+ -DOPENJPEG_LIBRARY=${prefix}/lib/libopenjp2.dylib \
+ -DPERL_EXECUTABLE=${prefix}/bin/perl \
+ -DZLIB_INCLUDE_DIR=${prefix}/include \
+ -DZLIB_LIBRARY=${prefix}/lib/libz.dylib
-configure.cppflags-append -I${prefix}/include/openjpeg-1.5
-configure.args --disable-dependency-tracking \
- --datadir=${prefix}/share \
- --disable-fortran \
- --with-ifs-samples=${prefix}/share/${name}/ifs_samples \
- --with-jasper=${prefix} \
- --with-openjpeg=${prefix} \
- --with-png-support=${prefix} \
- --disable-python \
- --with-netcdf=${prefix}
-
-test.run yes
-test.target check
-
post-destroot {
xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
eval xinstall -m 644 [glob ${worksrcpath}/html/*.html] \
${destroot}${prefix}/share/doc/${name}
- foreach b {parser points} {
- file rename ${destroot}${prefix}/bin/${b} ${destroot}${prefix}/bin/grib_${b}
+ file rename ${destroot}${prefix}/bin/parser ${destroot}${prefix}/bin/grib_parser
+ foreach c {grib_api-targets.cmake grib_api-targets-relwithdebinfo.cmake} {
+ reinplace "s|parser|grib_parser|g" ${destroot}${prefix}/share/${name}/cmake/${c}
}
}
variant emos description {deprecated to remove dependency to emos} {
}
-set gcc_versions {43 44 45 46 47 48 49}
-
if {[fortran_variant_isset]} {
- configure.args-delete --disable-fortran
- if {[variant_isset g95]} {
- configure.args-append --with-fortranlibdir=${prefix}/lib \
- --with-fortranlibs=-lf95
- } else {
- configure.args-append --with-fortranlibs=-lgfortran
- foreach ver_no_dot ${gcc_versions} {
- if {[variant_isset gcc${ver_no_dot}]} {
- configure.args-append --with-fortranlibdir=${prefix}/lib/gcc${ver_no_dot}
- }
- }
- }
+ configure.args-delete -DENABLE_FORTRAN=OFF
+ configure.args-append -DENABLE_FORTRAN=ON
}
# TODO: Remove after 2016-01-04.
@@ -95,10 +80,10 @@
variant python27 description {Add support for python27} {
depends_lib-append port:py27-numpy
- configure.args-delete --disable-python
- configure.args-append --enable-python
- configure.env-append PYTHON=${prefix}/bin/python2.7 \
- PYTHON_CONFIG=${prefix}/bin/python2.7-config
+ configure.args-delete -DENABLE_PYTHON=OFF
+ configure.args-append -DENABLE_PYTHON=ON \
+ -DPYTHON_CONFIG=${prefix}/bin/python2.7-config \
+ -DPYTHON_EXECUTABLE=${prefix}/bin/python2.7 \
}
livecheck.type regex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150622/3343978b/attachment.html>
More information about the macports-changes
mailing list