# # spec file for package Magics # # Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %bcond_with metview #---eccodes (unconditionally needed) does not build on 32bit archs atm, so simply exclude them: ExcludeArch: %{ix86} %{arm} Name: Magics Version: 4.14.2 Release: 2 Summary: Library and tools to visualize meteorological data and statistics License: Apache-2.0 Group: Productivity/Scientific/Other URL: https://confluence.ecmwf.int/display/MAGP/Magics # Source repository at https://github.com/ecmwf/magics/ Source: https://confluence.ecmwf.int/download/attachments/3473464/%{name}-%{version}-Source.tar.gz # PATCH-FEATURE-OPENSUSE rm-ksh.patch Patch1: rm-ksh.patch # PATCH-FIX-OPENSUSE fix-warnings.patch Patch2: fix-warnings.patch # PATCH-FEATURE-OPENSUSE reproducibility.patch Patch3: reproducibility.patch # PATCH-FEATURE-OPENSUSE reproducibility2.patch Patch4: reproducibility2.patch # PATCH-FEATURE-OPENSUSE python3.patch Patch5: python3.patch # PATCH-FEATURE-OPENSUSE magics-fix-vector-access.patch Patch6: magics-fix-vector-access.patch BuildRequires: cmake >= 2.8.11 BuildRequires: make BuildRequires: gcc-c++ BuildRequires: cairo-devel BuildRequires: eccodes-devel BuildRequires: hdf5-devel >= 1.8.8 BuildRequires: libaec-devel BuildRequires: libgeotiff-devel >= 1.4.2 BuildRequires: libpng-devel BuildRequires: libaec-devel BuildRequires: netcdf-devel BuildRequires: openjpeg2 BuildRequires: openjpeg2-devel BuildRequires: pango-devel BuildRequires: perl BuildRequires: perl-XML-Parser BuildRequires: pkgconfig BuildRequires: sed %if 0%{?suse_version} BuildRequires: fdupes BuildRequires: gcc-fortran BuildRequires: libexpat-devel BuildRequires: libproj-devel BuildRequires: python3-base %else BuildRequires: gcc-gfortran BuildRequires: expat-devel BuildRequires: proj-devel BuildRequires: python3 %endif %if %{with metview} BuildRequires: cmake(Qt5Widgets) %endif %description Latest generation of the ECMWF's Meteorological plotting software. It supports the plotting of contours, wind fields, observations, satellite images, symbols, text, axis and graphs (including boxplots). Input may be GRIB 1 and 2, NetCDF and BUFR. Plots can be saved in various formats, such as PostScript, EPS, PDF, GIF, PNG and SVG. %package devel Summary: Developing package for Magics Group: Development/Libraries/C and C++ Requires: %{name} = %{version}-%{release} %description devel This package contains the files needed for compiling programs using the Magics library. %prep %autosetup -n "%{name}-%{version}-Source" -p1 %build %cmake \ -DECBUILD_LOG_LEVEL=DEBUG \ -DCMAKE_PREFIX_PATH="%{_prefix}" \ -DCMAKE_INSTALL_PREFIX="%{_prefix}" \ -DCMAKE_C_FLAGS:STRING="%{optflags} -I%{_includedir}/libgeotiff" \ -DCMAKE_CXX_FLAGS:STRING="%{optflags} -I%{_includedir}/libgeotiff -Wno-deprecated-declarations -Wno-unused-local-typedefs" \ -DCMAKE_SHARED_LINKER_FLAGS="%{?build_ldflags:%{build_ldflags}} -Wl,--as-needed -Wl,-z,now" \ -DCMAKE_SKIP_RPATH=ON \ -DCMAKE_SKIP_INSTALL_RPATH=ON \ -DENABLE_RPATHS=OFF \ -DENABLE_RELATIVE_RPATHS=OFF \ -DHAVE_BIT_REPRODUCIBLE=ON \ -DINSTALL_LIB_DIR="%{_lib}" \ -DENABLE_CAIRO=ON \ -DENABLE_NETCDF=ON \ -DENABLE_CAIRO=ON \ -DENABLE_GEOTIFF=ON \ -DGEOTIFF_INCLUDE_DIR=%{_includedir}/libgeotiff \ -DMAGICS_EXTRA_LIBRARIES:STRING="%{_libdir}/libtiff.so" \ %if %{with metview} -DENABLE_METVIEW=ON \ -DENABLE_QT5=ON \ %endif -DPYTHON_EXECUTABLE=/usr/bin/python3 \ -DENABLE_FORTRAN=ON \ .. %cmake_build %install %cmake_install #---env-shebangs generate warning / error messages: sed -i -e '1 s|/usr/bin/env python2|/usr/bin/python3|' \ -e '1 s|/usr/bin/env python|/usr/bin/python3|' \ %{buildroot}%{_bindir}/magicsCompatibilityChecker sed -i '1 s|/usr/bin/env perl|/usr/bin/perl|' \ %{buildroot}%{_bindir}/metgram %if 0%{?suse_version} %fdupes %{buildroot}%{_datadir} %endif %check export LD_LIBRARY_PATH=%{buildroot}%{_libdir} export MAGPLUS_HOME=$PWD %ctest %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %license LICENSE %doc AUTHORS NOTICE %{_bindir}/* %{_datadir}/* %{_libdir}/*.so %files devel %{_includedir}/magics %{_libdir}/cmake/magics %changelog * Mon Nov 6 2023 Michael Lampe - bump * Mon Sep 11 2023 Michael Lampe - update to version 4.14.2 * Tue Jun 6 2023 Manfred Schwarb - add patch magics-fix-vector-access.patch to fix runtime errors when compiled with _GLIBCXX_ASSERTIONS, taken from https://github.com/ARPA-SIMC/Magics-rpm * Fri Feb 24 2023 Manfred Schwarb - uodate to version 4.13.0: * undocumented features and fixes * Sat Dec 17 2022 Manfred Schwarb - update to version 4.12.1: * undocumented fixes * Wed May 18 2022 Manfred Schwarb - update to version 4.12.0: * EPSG:3035 projection * Automatic adjustement of the projection according to the data extend * Automatic selection of the best suited projection according to the data extend * Introduction of a new way to work with palette of colour lists. * Thinning of the wind when using NetCDF data. * Wed Mar 30 2022 Manfred Schwarb - update to version 4.11.0: * User defined coastlines: New parameter map_user_layer_land_colour(Default:NONE). If given a colour, the user coastlines will be filled. * Observations plotting using template: fix some small issues. * LineString in GeoJSon: Support the feature Linestring from the GeoJSON format. * Fortran interface: A bug fix when calling popen/pclose several times. * Fri Dec 31 2021 Manfred Schwarb - update to version 4.10.0: * The list of predefined geographical areas has been aligned with the list of geographical areas offered in the opencharts catalogue. * Improve positioning of axis labels in cartesian view. * Improvement to symbol plotting with NetCDF data * Fix issues with multiple calls to the python plot method. * Mon Oct 25 2021 Manfred Schwarb - update to version 4.9.4: * Fix issue with Fortran Bindings [MAGP-1324][SD-53985] * Wed Oct 6 2021 Manfred Schwarb - update to version 4.9.3: * extra fix for the Fortran bindings - update to version 4.9.1: * re-enabled the Fortran bindings, which had been missing since version 4.8.0 * Mon Aug 30 2021 Manfred Schwarb - remove patch c++11.patch, fixed upstream - update to version 4.9.0: * A first implementation of automatic styling for wind is ready to test. * Geopoints items with missing values are now ignored. * Scaling for parameter mudlp has been added - update to version 4.8.0: * fix in the grid_shading method where the maximum value was sometimes unshaded * new global font scaling options for PNG and PDF output * Improved support for wind plotting on tiling mode ( SkinnyWMS) * Improved support for title creation in Metview * Improved automatic styling * Major refactoring of the code * Wed Apr 28 2021 Manfred Schwarb - add patch c++11.patch to fix build errors with GCC 11, taken from debian - update to version 4.6.0: * Support has been added for NetcDF data coded with int64 * Compilation support proj8 * Improved automatic styling and scaling * Metview support: Few fixes in the overlay rules. * Fri Feb 19 2021 Manfred Schwarb - build fix: remove "-Wl,--no-undefined" from CMAKE_SHARED_LINKER_FLAGS - build fix: add "-I%%{_includedir}/libgeotiff" to CMAKE_C_FLAGS and CMAKE_CXX_FLAGS - remove boost and jinja2 as build requirement in spec file - remove treatment of pkgconfig file magics.pc in spec file, no longer existent - update to version 4.5.3: * New palettes have been imported from matplotlib and Colorbrewer * Improvements have been done on the tilted perspective (tpers) projection allowing now to create nice animations * Memory leaks have been found and fixed - update to version 4.5.1: * contour_interpolation_ceiling fixed for rotated grids * small fixes with setting of netCDF dimensions. - update to version 4.5.0: * a major code clean-up has reduced the number of dependencies. The Boost library and Python are not required to install Magics anymore. * fix issue with logging that was degrading observation plotting speed when used from Python * fix issue in python when passing single element array. - update to version 4.4.0: * Magics is now using a new feature of eCodes to display data coded in various projections: polar stereographic, Lambert conformal, Mercator * Improvement in the position of the title for the vertical axis * Bug Fix: in the labelling of the legend (MAGP-1238) - update to version 4.3.3: * [MAGP-1227] - FIX for "Improve cmake tests for proj library and fail for old versions" - update to version 4.3.2: * [MAGP-1227] - Improve cmake tests for proj library and fail for old versions * [MAGP-1232] - Reduce size of release tarball * [MAGP-1233] - FIXED: Disabling NetCDF breaks Magics build - update to version 4.3.1: * This is a hotfix version with a fix for a crash in Metview's interactive plot window * This version is only required if you are building Metview with it - update to version 4.3.0: * Moved to new Proj API (SUP-2809) * Improving plotting of OrcaGrids ( NetCDF) * Improving layout of the automatic legend : Adding a margin option * Adding format option of the grib_info key dataDate * Sun Apr 5 2020 Manfred Schwarb - add patch python3.patch to make all scripts fit for python3 * Tue Mar 31 2020 Stefan BrĂ¼ns - Use openjpeg2 instead of jasper - Spec file cleanup * Sort build dependencies * use %%cmake_* macros * use libboost_test-devel instead of boost-devel catchall * remove unused libnetcdf_c++-devel build dependency * removed Changelog from the package, not updated for years * Fri Jan 24 2020 Manfred Schwarb - update to version 4.2.6: * misc. undocumented fixes * Mon Dec 2 2019 manfred99@gmx.ch - change env shebangs in executables with their actual interpreter - remove patch return.patch, no longer needed - disable python support in spec file. Python interface is now provided as a separate project (https://pypi.org/project/Magics/), please use "pip install Magics" to install the python API. - update to version 4.2.3: * Fixed issues with wind plotting * Fixed small inefficiency in decoding reduced Gaussian grid GRIB fields * ADMIN1 BOUNDARIES - only plot regions in Italy MAGP-1214 * Qt driver: Fix issue with text rendering for met view - update to version 4.2.0: * Minor changes & smaller bug fixes - update to version 4.1.2: * [MAGP-1196] - Magics compilation fails with latest Proj4 6.1 * [MAGP-1195] - Clean large binary files from git history - update to version 4.1.1: * [MAGP-1194] - Compilation fails under Windows due missing namespace - update to version 4.1.0: * Metview: crash when enable cursor data for plot with netcdf geomatrix_vectors [MAGP-1183] * Fixed memory leak in metadata collection when plotting in Metview [MAGP-1182] * Fixing performance issue * [MAGP-1172] Fix Bug in streamlines * [MAGP-1180] Fix automatic axis and Netcdf plotting. * Fix handling of info messages. - update to version 4.0.2: * [MAGP-1158] - Allow compilation with Proj4 6.0 which changes APIs - update to version 4.0.0: * separate Python interface, install via "pip install Magics" or "conda install -c conda-forge Magics" * [MAGP-933] - Contouring: report error when Contour Shade Max Level is smaller than Contour Shade Min Level * [MAGP-1140] - Colours in legend show white separator * [MAGP-1143] - Implement EPSG:32761 * [MAGP-1127] - ODB: allow collecting multiple values per point with valuescollector * [MAGP-1133] - Geopoints: add support for NCOLS formatted geopoints * [MAGP-1148] - Add version function in Python which also works with Magics < 4.0 * [MAGP-1059] - Allow building of Python bindings for version 2 and 3 at the same time * [MAGP-1123] - Integrate code changes from C++ 11/14 code review by Idris * [MAGP-999] - NetCDF: polygon shading crashes when plotting netCDF exported from XArray * [MAGP-1128] - Plotting of curves from netCDF in Metview * [MAGP-1130] - NetCDF: ncbyte encoded data is not correctly decoded * [MAGP-1139] - XSection: wind plotting error * [MAGP-1145] - Thermo: isotherms are not plotted in skew-t above 100 hPa * [MAGP-1146] - Metview related code deactivated by using undefined METVIEW macro * [MAGP-1147] - Python interface - search also MAGPLUS_HOME for library * Fri Dec 14 2018 manfred99@gmx.ch - update to version 3.3.1: * [MAGP-1085] - Python wrapper must catch C++ exceptions and re-throw python exception * [MAGP-1086] - Magics must report systems errors with proper messages * [MAGP-1121] - Contouring: support new reduced Gaussian grid subareas produced by mir * [MAGP-1122] - Thermo: adjust wind area style in skew-t and emagram to changes in tephigram * [MAGP-1125] - NetCDF: support BYTE encoded NetCDF data arrays * [MAGP-502] - Coloured wind arrows with a third field gives wrong or empty plot * [MAGP-1108] - Sea shading does not work in non-cylindrical projections * [MAGP-1113] - GRIB tests fail when Magics is part of the Metview bundle * [MAGP-1115] - Library does not build when NetCDF support is disabled * [MAGP-1124] - Thermo: line on left border of wind area in tephigram is too thick and dark * Fri Nov 16 2018 manfred99@gmx.ch - add patch return.patch: add return statement for non-void functions - update to version 3.2.2: * [MAGP-1117] - Thermo: adjust wind area coordinates in skew-t and emagram to changes in tephigram * Wed Oct 24 2018 manfred99@gmx.ch - update to version 3.2.1: * misc. undocumented fixes * Tue Oct 2 2018 manfred99@gmx.ch - update to version 3.2.0: * New parameter subpage_background_colour to change the colour of the subpage_background , the default is none. * Automatic detection of parameters to apply specific styles : contour_automatic_setting = "ecmwf" , can be used for grib and netcdf data. * Better handling of Netcdf Files, automatic detection of the type of data. * Improved rendering of the cellshading plots. * Improvement of the automatic scaling. * Fix a bug in positional legend. * Improvement of the positioning of the Vertical Axis Title. * Replacement of boost::geometry by Clipper * Sat Jul 14 2018 manfred99@gmx.ch - update to version 3.1.0: * [MAGP-812] - Move Magics to C++14 * [MAGP-970] - Remove dependency to perl * [MAGP-1046] - use eccodes to decode BUFR * [MAGP-1061] - No error message if trying to plot png with no writing permissions * [MAGP-1070] - Build: no longer allow GRIB_API to be used for Magics builds * [MAGP-1075] - Raise dependency to CMake 3.1 * [MAGP-1078] - Add support for Tilted perspective * [MAGP-1053] - Implement SKEW-T diagram * [MAGP-857] - Projections: stray lines in default Geos projection * [MAGP-1060] - Y-axis label overlapping axis tick labels * Sat May 19 2018 manfred99@gmx.ch - switch back to plain "BuildRequires: hdf5-devel", as science project reverted to hdf5 1.10 - update to version 3.0.4: * bug fix: [MAGP-1042] Wave metgram are giving strange result when sea ice voevr is above 30%% * bug fix: [MAGP-1057] Netcdf: SCM NetCDF data fails to plot * bug fix: [MAGP-1058] Tephigram: empty wind plotting * Wed May 9 2018 manfred99@gmx.ch - fix broken build by requiring package hdf5-1_8 - add %%licence tag in spec file - restrict number of parallel make jobs due to OOM crashes * Tue Apr 24 2018 manfred99@gmx.ch - update to version 3.0.3: * Hotfix: Relink with new ecCodes * some undocumented hotfix in src/basic/Layer.cc * Thu Mar 15 2018 manfred99@gmx.ch - update to version 3.0.2: * Hotfix: Fix for two issues identified in Vertical axis and time series * Mon Mar 5 2018 manfred99@gmx.ch - add patch reproducibility2.patch: support for reproducible builds, inspired by eccodes package - delete patch python-type-fix.patch - update to version 3.0.1: * bug fix: [MAGP-1040] Improve legend for gradients colours * bug fix: [MAGP-1038] COASTLINES - remove stray polygon from the Atlantic * bug fix: [MAGP-1004] Implement contour_shade_colour_method=palette * Thu Jan 18 2018 manfred99@gmx.ch - choose python2 for tumbleweed and factory - add patch python-type-fix.patch, from debian - remove patch indent_python.patch, no longer needed - update patch return.patch - update to version 3.0.0: * feature: [MAGP-787] - Bug fixes on the colour gradients : can now be used in metview * feature: [MAGP-902] - Offer Python3 interface * feature: [MAGP-989] - Implement functionaility to plot cyclone database geoJSON output * feature: [MAGP-848] - Enable the possibility to create 1, 4 or 9 threads to produce the contouring * feature: [MAGP-856] - Use Python distutils to install Python modules * feature: [MAGP-901] - Move Python interface from swig to ctypes * feature: [MAGP-915] - Netcdf : handle the time dimesion setting in a better way : ie interpret the CF conventions * feature: [MAGP-987] - Guess netcdf types * feature: [MAGP-1012] - Add Contributions of Meteo-France * bug fix: [MAGP-614] - magics does not compile if numpy is missing, but python is present * bug fix: [MAGP-909] - Plotting over the date line doesn't work with Web Mercator projection (EPSG:3857) * bug fix: [MAGP-1002] - Mercator projection: no Administrative Boundaries and the default geographical area is an extended globe * bug fix: [MAGP-1013] - Check Shading and isoline : double call * Tue Nov 21 2017 manfred99@gmx.ch - refresh patch indent_python.patch - update patch return.patch - delete installfix_python.patch, not needed any more - update to version 2.34.3: * [MAGP-981] Regression : anti-Clockwise is not respected when one of the colours is white * [MAGP-610] Spurious coastline along dateline from South Pole to coast * Wed Aug 9 2017 manfred99@gmx.ch - add reproducibility.patch: changes for bit-identical builds, from debian - add patch tags to spec file * Tue Jul 11 2017 manfred99@gmx.ch - exclude 32bit archs from build, as eccodes does not build on 32bit archs atm - make python support modular and enable it for suse distros only * Mon Jul 3 2017 manfred99@gmx.ch - add installfix_python.patch: fix wrong install path for python items, from Stephan Siemen - update patch return.patch - add indent_python.patch: fix wrong indentation in toolbox.py:458 - update to version 2.34.0: * improvement: [MAGP-955] - Allow user to load a specific shape file as coastlines layers. * improvement: [MAGP-962] - Improve labelling of grid in mollweide and robinson projection, add the possibility to add a frame around these 2 projections. * bug fix: [MAGP-870] - Mercator projection does not allow to set a subdomain or large domain * bug fix: [MAGP-959] - Problem with classic Metgram plot with Magics * bug fix: [MAGP-961] - Fix the setting of colours for magjson when graph_type=area * bug fix: [MAGP-965] - Fix issue with shading and level_list * Sun Jun 25 2017 manfred99@gmx.ch - add fix-warnings.patch: fix warning for redefinition of HAVE_GEOTIFF, from debian - update to version 2.33.0: * feature: [MAGP-904] - Continuous legend * feature: [MAGP-943] - Python interpreter crashes when invalid file name is given * feature: [MAGP-948] - Improve use of json files as input of graph * bug fix: [MAGP-931] - Plotting of winds on rotated_ll grids does not work * bug fix: [MAGP-932] - the parameter map_label_latitude_frequency does not seem to be taken into account fro polar stereographic projection. * bug fix: [MAGP-944] - Marker shading: does not clear between subsequent plots * bug fix: [MAGP-945] - Wind thinning at the edge of the grid is not correct * Tue Jun 13 2017 manfred99@gmx.ch - spec file fixes - rpath removal - remove duplicates with fdupes - enable geotiff support - add patch return.patch: add return statement for non-void functions - add patch rm-ksh.patch: do not depend on ksh, from debian * Tue Jun 6 2017 manfred99@gmx.ch - spec file cleanup