#2 Disable wl,--as-needed on fedora 30+; use CMake3 on epel
Merged 5 years ago by smani. Opened 5 years ago by sagitter.
rpms/ sagitter/cgnslib master  into  master

file modified
+18 -4
@@ -1,6 +1,8 @@ 

+ %undefine _ld_as_needed

+ 

  Name:           cgnslib

  Version:        3.3.1

- Release:        7%{?dist}

+ Release:        8%{?dist}

  Summary:        Computational Fluid Dynamics General Notation System

  License:        zlib

  URL:            http://www.cgns.org/
@@ -13,7 +15,14 @@ 

  # Upstream PR: https://github.com/CGNS/CGNS/pull/55

  Patch2:         cgnslib_matherr.patch

  

- BuildRequires:  cmake

+ %if 0%{?rhel}

+ BuildRequires:          cmake3, epel-rpm-macros

+ %global ctest3 ctest3

+ %else

+ BuildRequires:          cmake

+ %global cmake3 %cmake

+ %global ctest3 ctest

+ %endif

  BuildRequires:  gcc

  BuildRequires:  gcc-gfortran

  BuildRequires:  hdf5-devel
@@ -55,7 +64,7 @@ 

  chmod a-x src/cgnstools/utilities/cgns_to_vtk.c

  

  %build

- %cmake -DCMAKE_SKIP_RPATH=ON \

+ %cmake3 -DCMAKE_SKIP_RPATH=ON \

         -DCGNS_ENABLE_TESTS=ON \

         -DCGNS_ENABLE_FORTRAN=ON \

         -DCGNS_BUILD_CGNSTOOLS=ON \
@@ -75,7 +84,8 @@ 

  sed -i -e '1i#!%{_bindir}/sh' %{buildroot}%{_bindir}/cgconfig

  

  %check

- LD_LIBRARY_PATH=%{buildroot}%{_libdir} make test

+ export LD_LIBRARY_PATH=%{buildroot}%{_libdir}

+ %ctest3 --force-new-ctest-process

  

  %ldconfig_scriptlets

  
@@ -114,6 +124,10 @@ 

  %{_fmoddir}/cgns.mod

  

  %changelog

+ * Sun Sep 02 2018 Antonio Trande <sagitterATfedoraproject.org> - 3.3.1-8

+ - Disable wl,--as-needed on fedora 30+

+ - Use CMake3 on epel

+ 

  * Thu Aug 30 2018 Antonio Trande <sagitterATfedoraproject.org> - 3.3.1-7

  - Fix Fortran linker flags for epel7