ARPA-SIMC / meteosatlib

OpenMTP/HRI/HRIT C++ access libraries, gdal drivers and other tools
GNU General Public License v2.0
8 stars 2 forks source link

Build with meson #41

Closed spanezz closed 2 weeks ago

edigiacomo commented 1 month ago

I have tried to modify the spec file to build the package with Meson but I don't know how to translate the configure command %configure --with-system-pdwt to Meson.

I have tried with a simple

%meson
%meson_build

But I think that it tries to compile the bundled version of PublicDecompWT:

...
2024-10-28 14:19:38 INFO system.fedora40 stdout: Has header "stdint.h" : YES
2024-10-28 14:19:38 INFO system.fedora40 stdout: Found pkg-config: YES (/usr/bin/pkg-config) 2.1.1
2024-10-28 14:19:38 INFO system.fedora40 stdout: Run-time dependency magick++ found: YES 7.1.1
2024-10-28 14:19:38 INFO system.fedora40 stdout: Run-time dependency NetCDF for cpp found: YES 4.9.2
2024-10-28 14:19:38 INFO system.fedora40 stdout: Check usable header "netcdfcpp.h" : YES
2024-10-28 14:19:38 INFO system.fedora40 stdout: Library netcdf_c++ found: YES
2024-10-28 14:19:38 INFO system.fedora40 stdout: Program gdal-config found: YES (/usr/bin/gdal-config)
2024-10-28 14:19:38 INFO system.fedora40 stdout: WARNING: You should add the boolean check kwarg to the run_command call.
2024-10-28 14:19:38 INFO system.fedora40 stdout:          It currently defaults to false,
2024-10-28 14:19:38 INFO system.fedora40 stdout:          but it will default to true in future releases of meson.
2024-10-28 14:19:38 INFO system.fedora40 stdout:          See also: https://github.com/mesonbuild/meson/issues/9300
2024-10-28 14:19:38 INFO system.fedora40 stdout: Run-time dependency eccodes found: YES 2.38.0
2024-10-28 14:19:38 INFO system.fedora40 stdout: 
2024-10-28 14:19:38 INFO system.fedora40 stdout: decompress/meson.build:24:16: ERROR: Include dir PublicDecompWT/DISE/ does not exist.
...
spanezz commented 1 month ago

I have tried to modify the spec file to build the package with Meson but I don't know how to translate the configure command %configure --with-system-pdwt to Meson.

Oops, you're right, I forgot to port that one!

spanezz commented 1 month ago

I have tried to modify the spec file to build the package with Meson but I don't know how to translate the configure command %configure --with-system-pdwt to Meson.

Oops, you're right, I forgot to port that one!

I pushed support for -D system_pdwt=true as a meson option.

Currently:

Alternatively the default could be something else, like:

edigiacomo commented 1 month ago
  • or if -D system_pdwt=true is set and none is installed, error out

This is the only requirement that we need to build the rpm, thanks!

spanezz commented 3 weeks ago
  • or if -D system_pdwt=true is set and none is installed, error out This is the only requirement that we need to build the rpm, thanks!

Pushed!

edigiacomo commented 3 weeks ago

Now I have this error:

msat/meson.build:8:0: ERROR: File config.h does not exist.

See https://simc.arpae.it/moncic-ci/meteosatlib/202411061156/meson/rocky8/build.log