# -*- 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 # $Id$ PortSystem 1.0 PortGroup cmake 1.0 PortGroup compilers 1.0 PortGroup perl5 1.0 PortGroup qt4 1.0 perl5.branches 5.24 name magicspp version 2.29.4 revision 1 platforms darwin maintainers takeshi license Apache-2 categories science description ECMWF's Meteorological plotting software homepage http://software.ecmwf.int/wiki/display/MAGP/Magics master_sites https://software.ecmwf.int/wiki/download/attachments/3473464/ distname Magics-${version}-Source checksums rmd160 82c7a98b2a083985ab29bb33743067fbb94c9e74 \ sha256 82bdb4f7e38776776d2155a82d0acaa017402365a043731708345ac4ac00198f long_description \ Magics++ is the latest generation of the ECMWF's Meteorological plotting \ software MAGICS (Meteorological Applications Graphics Integrated Colour System) \ redesigned in C++. Magics++ offers interfaces in Fortran, C, and MagML, \ a plot description language based on XML. The library supports the plotting of \ contours, wind fields, observations, satellite images, symbols, text, axis \ and graphs (including boxplots). Input data can be in GRIB 1 and 2, BUFR and NetCDF \ or retrieved from an ODB database. The produced meteorological plots can be saved \ in various formats, such as PostScript, EPS, PDF, GIF, PNG and SVG. fetch.ignore_sslcert yes compilers.choose fc compilers.setup require_fortran -g95 depends_build-append \ port:flex \ port:pkgconfig \ port:swig-python depends_lib port:libemos \ port:tiff \ port:libgeotiff \ path:lib/pkgconfig/glib-2.0.pc:glib2 \ port:grib_api \ port:netcdf \ port:netcdf-cxx \ port:mesa \ port:xorg-libXau \ port:xorg-libXdmcp \ port:p${perl5.major}-xml-parser \ port:gd2 \ path:lib/pkgconfig/pango.pc:pango \ port:ghostscript \ port:boost \ port:proj \ port:libpng \ port:zlib \ port:jasper \ port:jpeg \ port:openjpeg \ port:expat \ port:hdf5 \ path:lib/pkgconfig/cairo.pc:cairo \ port:gettext \ port:fftw-3 require_active_variants path:lib/pkgconfig/cairo.pc:cairo x11 universal_variant no default_variants-append +python27 patchfiles patch-CMakeLists.txt.diff configure.args-append -DBOOST_ROOT=${prefix} \ -DCMAKE_Fortran_COMPILER=${configure.fc} \ -DENABLE_BUFR=ON \ -DENABLE_CAIRO=ON \ -DENABLE_FORTRAN=OFF \ -DENABLE_GEOTIFF=ON \ -DENABLE_GRIB=ON \ -DENABLE_LARGE_FILE_SUPPORT=ON \ -DENABLE_NETCDF=ON \ -DENABLE_PYTHON=ON \ -DEXPAT_INCLUDE_DIR=${prefix}/include \ -DEXPAT_LIBRARY=${prefix}/lib/libexpat.dylib \ -DGRIB_API_PATH=${prefix} \ -DHDF5_C_COMPILER_EXECUTABLE=${prefix}/bin/h5cc \ -DHDF5_C_INCLUDE_DIR=${prefix}/include \ -DHDF5_DIFF_EXECUTABLE=${prefix}/bin/h5diff \ -DNETCDF_CONFIG_EXECUTABLE=${prefix}/bin/nc-config \ -DNETCDF_netcdf.h_INCLUDE_DIR=${prefix}/include \ -DNETCDF_netcdf_LIBRARY_RELEASE=${prefix}/lib/libnetcdf.dylib \ -DNETCDF_netcdf_c++_LIBRARY_RELEASE=${prefix}/lib/libnetcdf_c++.dylib \ -DNETCDF_netcdfcpp.h_INCLUDE_DIR=${prefix}/include \ -DPERL_EXECUTABLE=${perl5.bin} \ -DPKG_CONFIG_EXECUTABLE=${prefix}/bin/pkg-config \ -DPROJ4_INCLUDE_DIR=${prefix}/include \ -DPROJ4_LIBRARY=${prefix}/lib/libproj.dylib \ -DSWIG_EXECUTABLE=${prefix}/bin/swig post-configure { foreach d {"" Single Double} { reinplace "s|-lcairo|-lcairo -lX11 -ltiff|" ${workpath}/build/src/CMakeFiles/MagPlus${d}.dir/link.txt } foreach d {bufr grib} { reinplace "s|${configure.fc}|${configure.cxx}|" ${workpath}/build/test/CMakeFiles/${d}_fortran.dir/link.txt } } cmake.out_of_source yes post-destroot { file rename ${destroot}${prefix}/share/templates ${destroot}${prefix}/share/magics if {[variant_isset python27]} { file mkdir ${destroot}${frameworks_dir}/Python.framework/Versions/${pyver}/lib/python${pyver}/site-packages file rename ${destroot}${prefix}/lib/python${pyver}/site-packages/Magics ${destroot}${frameworks_dir}/Python.framework/Versions/${pyver}/lib/python${pyver}/site-packages } } if {[fortran_variant_isset]} { configure.args-delete -DENABLE_FORTRAN=OFF configure.args-append -DGFORTRAN_EXECUTABLE=${configure.fc} \ -DGFORTRAN_LIB=${prefix}/lib/[fortran_variant_name]/libgfortran.dylib } if {[variant_isset python27]} { set pyver 2.7 configure.args-delete -DENABLE_PYTHON=OFF configure.args-append -DENABLE_PYTHON=ON configure.args-append -DPYTHON_EXECUTABLE=${prefix}/bin/python${pyver} \ -DPYTHON_CONFIG=${prefix}/bin/python${pyver}-config } variant python27 description {Add support for python27} { depends_lib-append port:py27-numpy } variant metview description {Add support for MetView} { depends_lib-append port:qt4-mac configure.args-append -DENABLE_METVIEW=ON \ -DQT_QMAKE_EXECUTABLE=${qt_qmake_cmd} } livecheck.type regex livecheck.url ${homepage} livecheck.regex {Magics-([0-9]+\.[0-9]+\.[0-9]+)-Source.tar.gz}