ECMWF is discontinuing support for grib-api, and has replaced it with eccodes.
Eccodes, however, provides full backward compatibility with grib-api.
Hence, I include Conflicts, Replaces, and Provides entries for grib-api, grib-api-fortran and grib-api-bin in the eccodes, eccodes-fortran and eccodes-bin sections for the eccodes.info file.
The SplitOff of eccodes-fortran and eccodes-fortran-shlibs is meant to avoid that non-Fortran users of eccodes would need to install gcc6.
The eccodes.info file creates 5 packages:
eccodes, eccodes-shlibs, eccodes-bin, eccodes-fortran, eccodes-fortran-shlibs
The output of dpkg -L for each of these packages is attached as *.lst.
No PathFile was needed.
fink -m build passed without warnings/errors.
The running of the tests requires external data that are normally downloaded during "ctest", but this is avoided by untarring a predownloaded tarball first, which is referenced in the eccodes.info file.
As with grib-api, I'm happy to keep sheparding eccodes packages for the Fink project.
Provides:
back to the grib-api equivalent because they're not really equivalent.*Depends:
fields to use the multiline format and ABC sort the entries (keep the %N-foo as the first line).Separately from the proposed changes, on 10.11 I get lots of failures
Also,
libeccodes.dylib
andlibeccodes_f90.dylib
are now unversioned in the -shlibs packages. This is guaranteed to cause problems with shared libraries.This patch from Debian https://anonscm.debian.org/cgit/debian-science/packages/eccodes.git/tree/debian/patches/static-libs.patch makes the dylibs be versioned (libeccodes.0.dylib). It also creates the static .a library, but that can either be removed post-build or the patch edited to only apply the versioning change (I think it's the two "VERSION 0" and "CFLAGS" lines that are sufficient/necessary).
About the tests. I've seen those failures when during ctest the new binaries cannot be found. That's why I put in the PATH and DYLD_LIBRARY_PATH. Maybe I should make the PATH more specific to avoid looking somewhere else and finding the wrong binaries. It will be difficult to make sure it will work for you too, because it does work for me, even when the old grib-api was still installed.
I had not managed myself to make the library versioned. I'll follow your suggestion.
I had looked to get things running with openjp2.7. I'll try again. Maybe this time I'll succeed.
I'll take up your other suggesions as well.
Let's try again. I did take up all your suggestions (thanks!):
Depends and BuildDepends: Spread over multiple lines, and alphabetized.
Versioned libraries (updated from the Debian patch in order not to make static libraries).
Put links to versioned libraries in eccodes and eccodes-fortran.
Used openjp2.7 instead of openjpeg1.
Updated ctest command, hopefully to make it work for you as well.
Removed Provides: lines.
Find encloded the new PatchFile and updated Info file. I hope this works better. It passed "fink -m rebuild" for me.
Diff:
Looks good. Thanks.
Also, the tests passed when I had eccodes-shlibs and eccodes-fortran-shlibs installed, so something (most likely SIP) is blocking the PATH and DYLD_LIBRARY_PATH settings.