#4 updated try to build gdl with eccodes
Closed a year ago by jdekloe. Opened 5 years ago by jdekloe.
rpms/ jdekloe/gdl f28  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

add exceptions for architecture on which eccodes does not yet build

Hi Orion,
here is an updated try from me to get gdl to build withn eccodes.
I added a check to fall back to good old grib_api for those architectures for which eccodes does not yet build, and has ExcludeArch statements.
I hope this helps getting things working again for this package?
See also https://bugzilla.redhat.com/show_bug.cgi?id=1595643

Unfortunately I cannot test it with koji, since fedpkg scratch-build seems not to work at all on forked projects. It tries to pull commits from the main project, which obviously does not work,

Pull-Request has been closed by jdekloe

a year ago