diff --git a/cgnslib.spec b/cgnslib.spec index eaae525..93e8893 100644 --- a/cgnslib.spec +++ b/cgnslib.spec @@ -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 @@ Patch1: cgnslib-cmake.patch # 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 @@ sed -i "s|DESTINATION lib|DESTINATION \${LIB_INSTALL_DIR}|" src/CMakeLists.txt 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 @@ find %{buildroot} -name '*.a' -delete -print 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 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} make test %{_fmoddir}/cgns.mod %changelog +* Sun Sep 02 2018 Antonio Trande - 3.3.1-8 +- Disable wl,--as-needed on fedora 30+ +- Use CMake3 on epel + * Thu Aug 30 2018 Antonio Trande - 3.3.1-7 - Fix Fortran linker flags for epel7