From 4978efbc47e17d6278288e96b7006fc8ff84cca1 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Fri, 17 Jul 2020 22:49:53 -0600 Subject: [PATCH] Change link order to fix issue with gdal and g2clib (bz#1856959) --- Site.local.ncl | 2 +- ncl-gdal.patch | 23 +++++++++++++++++++++++ ncl.spec | 10 +++++++++- 3 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 ncl-gdal.patch diff --git a/Site.local.ncl b/Site.local.ncl index 9ac1760..5de1297 100644 --- a/Site.local.ncl +++ b/Site.local.ncl @@ -13,7 +13,7 @@ #define CAIROlib -lcairo -lfreetype #define BuildGDAL 1 #define GDALlib -lgdal -lproj -#define GRIB2lib -l@g2clib@ +#define GRIB2lib -l@g2clib@ -ljasper #define BuildHDFEOS 0 #define BuildHDFEOS5 0 #define BuildTRIANGLE 0 diff --git a/ncl-gdal.patch b/ncl-gdal.patch new file mode 100644 index 0000000..1fee0ed --- /dev/null +++ b/ncl-gdal.patch @@ -0,0 +1,23 @@ +diff -up ncl-6.6.2/ni/src/ncl/yMakefile.gdal ncl-6.6.2/ni/src/ncl/yMakefile +--- ncl-6.6.2/ni/src/ncl/yMakefile.gdal 2019-02-27 16:44:39.000000000 -0700 ++++ ncl-6.6.2/ni/src/ncl/yMakefile 2020-07-17 21:53:50.743277471 -0600 +@@ -198,14 +198,14 @@ EXTRA_CLDFLAGS = $(DEV_LIB_SEARCH) $(EXT + #endif + + #if defined(SUN) +-# EXTRA_LIBS = $(NCDFLIBS) $(HDFEOS5LIB) $(NETCDF4LIB) $(HDFEOSLIB) $(HDFLIB) $(HDF5LIB) $(GDALLIB) $(GRIDSPECLIB) $(UDUNITSLIB) $(V5DLIB) $(GRIB2LIB) $(PNGLIB) $(CAIROLIB) $(SPHERELIB) $(FFTPACK5LIB) -fast -xlic_lib=sunperf -lnsl -lintl -lsocket -ldl -lw -lfui +-EXTRA_LIBS = $(NCDFLIBS) $(HDFEOS5LIB) $(NETCDF4LIB) $(HDFEOSLIB) $(HDFLIB) $(HDF5LIB) $(GDALLIB) $(GRIDSPECLIB) $(OpenCLLIB) $(UDUNITSLIB) $(V5DLIB) $(GRIB2LIB) $(PNGLIB) $(CAIROLIB) $(EEMDLIB) $(EXTERNALLIBS) -lnsl -lintl -lsocket -ldl -lw ++# EXTRA_LIBS = $(NCDFLIBS) $(HDFEOS5LIB) $(NETCDF4LIB) $(HDFEOSLIB) $(HDFLIB) $(HDF5LIB) $(GRIB2LIB) $(GDALLIB) $(GRIDSPECLIB) $(UDUNITSLIB) $(V5DLIB) $(PNGLIB) $(CAIROLIB) $(SPHERELIB) $(FFTPACK5LIB) -fast -xlic_lib=sunperf -lnsl -lintl -lsocket -ldl -lw -lfui ++EXTRA_LIBS = $(NCDFLIBS) $(HDFEOS5LIB) $(NETCDF4LIB) $(HDFEOSLIB) $(HDFLIB) $(HDF5LIB) $(GRIB2LIB) $(GDALLIB) $(GRIDSPECLIB) $(OpenCLLIB) $(UDUNITSLIB) $(V5DLIB) $(PNGLIB) $(CAIROLIB) $(EEMDLIB) $(EXTERNALLIBS) -lnsl -lintl -lsocket -ldl -lw + #elif defined(AIX) +-EXTRA_LIBS = $(NCDFLIBS) $(HDFEOS5LIB) $(NETCDF4LIB) $(HDFEOSLIB) $(HDFLIB) $(HDF5LIB) $(GDALLIB) $(GRIDSPECLIB) $(OpenCLLIB) $(UDUNITSLIB) $(V5DLIB) $(GRIB2LIB) $(PNGLIB) $(CAIROLIB) $(EEMDLIB) $(EXTERNALLIBS) -lxlf90 -lxlopt ++EXTRA_LIBS = $(NCDFLIBS) $(HDFEOS5LIB) $(NETCDF4LIB) $(HDFEOSLIB) $(HDFLIB) $(HDF5LIB) $(GRIB2LIB) $(GDALLIB) $(GRIDSPECLIB) $(OpenCLLIB) $(UDUNITSLIB) $(V5DLIB) $(PNGLIB) $(CAIROLIB) $(EEMDLIB) $(EXTERNALLIBS) -lxlf90 -lxlopt + #elif (defined(IRIX) || defined(IRIX64)) +-EXTRA_LIBS = $(NCDFLIBS) $(HDFEOS5LIB) $(NETCDF4LIB) $(HDFEOSLIB) $(HDFLIB) $(HDF5LIB) $(GDALLIB) $(GRIDSPECLIB) $(OpenCLLIB) $(UDUNITSLIB) $(V5DLIB) $(GRIB2LIB) $(PNGLIB) $(CAIROLIB) $(EEMDLIB) $(EXTERNALLIBS) ++EXTRA_LIBS = $(NCDFLIBS) $(HDFEOS5LIB) $(NETCDF4LIB) $(HDFEOSLIB) $(HDFLIB) $(HDF5LIB) $(GRIB2LIB) $(GDALLIB) $(GRIDSPECLIB) $(OpenCLLIB) $(UDUNITSLIB) $(V5DLIB) $(PNGLIB) $(CAIROLIB) $(EEMDLIB) $(EXTERNALLIBS) + #else +-EXTRA_LIBS = $(NCDFLIBS) $(HDFEOS5LIB) $(NETCDF4LIB) $(HDFEOSLIB) $(HDFLIB) $(HDF5LIB) $(GDALLIB) $(GRIDSPECLIB) $(OpenCLLIB) $(UDUNITSLIB) $(V5DLIB) $(GRIB2LIB) $(PNGLIB) $(CAIROLIB) $(EEMDLIB) $(EXTERNALLIBS) ++EXTRA_LIBS = $(NCDFLIBS) $(HDFEOS5LIB) $(NETCDF4LIB) $(HDFEOSLIB) $(HDFLIB) $(HDF5LIB) $(GRIB2LIB) $(GDALLIB) $(GRIDSPECLIB) $(OpenCLLIB) $(UDUNITSLIB) $(V5DLIB) $(PNGLIB) $(CAIROLIB) $(EEMDLIB) $(EXTERNALLIBS) + #endif + + SYS_LIBS = $(XLIB) $(CTOFLIBS) -lm $(ARCH_LIBS) $(DYNAMIC_LIBS) diff --git a/ncl.spec b/ncl.spec index 84d8f91..b624266 100644 --- a/ncl.spec +++ b/ncl.spec @@ -1,6 +1,6 @@ Name: ncl Version: 6.6.2 -Release: 11%{?dist} +Release: 12%{?dist} Summary: NCAR Command Language and NCAR Graphics License: BSD @@ -35,6 +35,10 @@ Patch3: ncl-libs.patch Patch4: ncl-format.patch # Fix use of BOZ constans Patch5: ncl-boz.patch +# Change link order of g2clib and gdal to work around gdal's modified g2_getfld() +# https://bugzilla.redhat.com/show_bug.cgi?id=1856959 +# https://github.com/OSGeo/gdal/issues/2775 +Patch6: ncl-gdal.patch # don't have the installation target depends on the build target since # for library it implies running ranlib and modifying the library timestamp Patch10: ncl-5.0.0-no_install_dep.patch @@ -129,6 +133,7 @@ Example programs and data using NCL. %patch3 -p1 -b .libs %patch4 -p1 -b .format %patch5 -p1 -b .boz +%patch6 -p1 -b .gdal %patch10 -p1 -b .no_install_dep %patch11 -p1 -b .build_n_scripts %patch12 -p1 -b .netcdff @@ -351,6 +356,9 @@ done %changelog +* Sat Jul 18 03:56:02 GMT 2020 Orion Poplawski - 6.6.2-12 +- Change link order to fix issue with gdal and g2clib (bz#1856959) + * Thu Jun 25 2020 Orion Poplawski - 6.6.2-11 - Rebuild for hdf5 1.10.6