From e0ec1a7066acfed9d159a12974c19de922992031 Mon Sep 17 00:00:00 2001 From: Jos de Kloe Date: Sat, 17 Oct 2020 16:05:58 +0200 Subject: [PATCH 1/2] remove gfortran v10 specific option --- eccodes.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/eccodes.spec b/eccodes.spec index f6abf99..1103eaf 100644 --- a/eccodes.spec +++ b/eccodes.spec @@ -245,7 +245,6 @@ chmod 644 AUTHORS LICENSE -DCMAKE_SKIP_INSTALL_RPATH=TRUE \ -DECCODES_SOVERSION=%{so_version} \ -DECCODES_SOVERSION_F90=%{so_version_f90} \ - -DCMAKE_Fortran_FLAGS="-fallow-argument-mismatch" \ -DCMAKE_Fortran_FLAGS="-fPIC" \ -DENABLE_PYTHON=OFF From df047bab558c9b7bd39845e96e98d705aec917cf Mon Sep 17 00:00:00 2001 From: Jos de Kloe Date: Sat, 17 Oct 2020 16:18:54 +0200 Subject: [PATCH 2/2] fall back to old make scripts --- eccodes.spec | 35 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/eccodes.spec b/eccodes.spec index 1103eaf..edf9ad6 100644 --- a/eccodes.spec +++ b/eccodes.spec @@ -174,12 +174,12 @@ in C, and Fortran 90. %autosetup -n %{name}-%{version}-Source -p1 # unpack the test data below build -mkdir -p %{_vpath_builddir} -pushd %{_vpath_builddir} +mkdir build +cd build tar xf %SOURCE1 -popd # remove executable permissions from c files +cd .. chmod 644 tigge/*.c chmod 644 tools/*.c @@ -187,6 +187,7 @@ chmod 644 tools/*.c chmod 644 AUTHORS LICENSE %build +cd build #-- The following features are disabled by default and not switched on: # @@ -230,11 +231,6 @@ chmod 644 AUTHORS LICENSE # export FCFLAGS="%%{build_fflags} -fallow-argument-mismatch" # defining the -DCMAKE_Fortran_FLAGS for camke is required to let it compile. -# added -DCMAKE_Fortran_FLAGS="-fPIC" -# because the koji build crashes with the error that it needs this setting -# when I try to build for armv7hl (other archs do not complain ......) -# I have no idea what causes this difference in behaviour. - %cmake3 -DINSTALL_LIB_DIR=%{_lib} \ -DENABLE_ECCODES_OMP_THREADS=ON \ -DENABLE_EXTRA_TESTS=ON \ @@ -245,21 +241,20 @@ chmod 644 AUTHORS LICENSE -DCMAKE_SKIP_INSTALL_RPATH=TRUE \ -DECCODES_SOVERSION=%{so_version} \ -DECCODES_SOVERSION_F90=%{so_version_f90} \ - -DCMAKE_Fortran_FLAGS="-fPIC" \ - -DENABLE_PYTHON=OFF + -DCMAKE_Fortran_FLAGS="-fallow-argument-mismatch" \ + -DENABLE_PYTHON=OFF \ + .. -# note the final '..' is no longer needed to the cmake3 call. -# this is now hidden in the %%cmake3 macro - -%cmake_build +%make_build # copy some include files to the build dir -# that are otherwise not found when creating the debugsource sub-package -cp fortran/eccodes_constants.h %{_vpath_builddir}/fortran/ -cp fortran/grib_api_constants.h %{_vpath_builddir}/fortran/ +# that are otherwise not found when creating the debugsource subpackage +cd .. +cp fortran/eccodes_constants.h build/fortran/ +cp fortran/grib_api_constants.h build/fortran/ %install -%cmake_install +%make_install -C build mkdir -p %{buildroot}%{_fmoddir} mv %{buildroot}%{_includedir}/*.mod %{buildroot}%{_fmoddir}/ @@ -310,7 +305,7 @@ sed -i 's|^libs=.*$|libs=-L${libdir} -leccodes_f90 -leccodes|g' %{buildroot}/%{_ %ldconfig_scriptlets %check -cd %{_vpath_builddir} +cd build # notes: # * the LD_LIBRARY_PATH setting is required to let the tests @@ -320,8 +315,6 @@ cd %{_vpath_builddir} # 'eccodes_t_bufr_dump_(de|en)code_C' tests run. # These tests compile on the fly generated C code, and # without this setting the loader does not find the libraries. -# * this is a 'non-standard' use of ctest3 so it does currently not -# work with the %%ctest macro. LD_LIBRARY_PATH=%{buildroot}/%{_libdir} \ LIBRARY_PATH=%{buildroot}/%{_libdir} \