#2 gdl to use eccodes
Closed a year ago by jdekloe. Opened 5 years ago by jdekloe.
rpms/ jdekloe/gdl master  into  rawhide

file added
+11
@@ -0,0 +1,11 @@ 

+ --- gdl-0.9.8/CMakeModules/FindGrib.cmake.orig	2018-03-26 11:57:27.000000000 +0200

+ +++ gdl-0.9.8/CMakeModules/FindGrib.cmake	2018-06-21 13:32:24.287919031 +0200

+ @@ -9,7 +9,7 @@

+  #

+  

+  

+ -find_library(GRIB_LIBRARIES NAMES grib_api)

+ +find_library(GRIB_LIBRARIES NAMES eccodes)

+  find_path(GRIB_INCLUDE_DIR NAMES grib_api.h)

+  include(FindPackageHandleStandardArgs)

+  # since there's no grib_api.pc let's check if this installation of grib required jasper and jpeg

file modified
+19 -3
@@ -1,10 +1,12 @@ 

  Name:           gdl

  Version:        0.9.8

- Release:        1%{?dist}

+ Release:        2%{?dist}

  Summary:        GNU Data Language

  

  Group:          Applications/Engineering

  License:        GPLv2+

+ # note that upstreamed has moved to github now, see:

+ # https://github.com/gnudatalanguage/gdl

  URL:            http://gnudatalanguage.sourceforge.net/

  Source0:        http://downloads.sourceforge.net/gnudatalanguage/%{name}-%{version}.tgz

  Source1:        gdl.csh
@@ -34,6 +36,9 @@ 

  Patch9:         gdl-vector.patch

  # Fix test_save_restore segfault with gcc 8

  Patch10:        gdl-saverestore.patch

+ # Try to use eccodes as replacement for grib_api

+ # see: https://github.com/gnudatalanguage/gdl/pull/390

+ Patch11:        gdl-eccodes.patch

  

  #RHEL5 doesn't have the needed antlr version/headers, has old plplot

  %if 0%{?rhel} == 5
@@ -55,10 +60,15 @@ 

  BuildRequires:  netcdf-devel, hdf5-devel, libjpeg-devel

  BuildRequires:  python2-devel, python2-numpy, python2-matplotlib

  BuildRequires:  fftw-devel, hdf-static

- %if 0%{?fedora} >= 21

+ %if 0%{?fedora} >= 28

+ # skip architectures on which eccodes does not yet build

+ %ifarch i686 ppc64 s390x armv7hl

  BuildRequires:  grib_api-devel

  %else

- %if 0%{?fedora} || 0%{?rhel} >= 6

+ BuildRequires:  eccodes-devel

+ %endif

+ %else

+ %if 0%{?rhel} >= 6

  BuildRequires:  grib_api-static

  %endif

  %endif
@@ -134,6 +144,8 @@ 

  %patch8 -p1 -b .warnings

  %patch9 -p1 -b .vector

  %patch10 -p1 -b .saverestore

+ %patch11 -p1 -b .eccodes

+ 

  # Stray link

  rm src/gdl

  
@@ -263,6 +275,10 @@ 

  

  

  %changelog

+ * Sat Aug 11 2018 Jos de Kloe <josdekloe@gmail.com> - 0.9.8-2

+ - replace buildrequires grib_api by buildrequires eccodes

+   on architectures that have a working eccodes

+ 

  * Sun May 20 2018 Orion Poplawski <orion@cora.nwra.com> - 0.9.8-1

  - Update to 0.9.8

  - Drop parallel make for now

Hi Orion,

currently there is an issue with eccodes, i.e. if it is installed gdl gets uninstalled, see this remark:
https://bodhi.fedoraproject.org/updates/FEDORA-2018-319630b14f

I think this should be solved by moving gdl to use eccodes in stead of grib_api, so I tried to update gdl to allow this. Upstream has not implemented this yet, so I had to patch one of the cmake files as well. This change seems to work for me if I do a local mock build for f29/rawhide. Unfortunately I don't get a koji build running on this forked repo. If I try a "fedpkg scratch-build" it fails because git tries to pull from the original gdl repo at https://src.fedoraproject.org/rpms/gdl so it cannot find my commit. Do you know how to circumvent that? The documentation does not mention this use case at all I think.

Anyway, be carefull with this pull request since eccodes does not yet build on all architectures. Maybe some switches could be used to only replace grib_api for eccodes when it is available?

1 new commit added

  • add exceptions for architecture on which eccodes does not yet build
5 years ago

Pull-Request has been closed by jdekloe

a year ago