Revert "fish.spec: drop RHEL 6 elements"

The 3.2 branch still supports it

This reverts commit 63fa8dfd26.
This commit is contained in:
Fabian Homborg 2021-03-14 12:56:16 +01:00
parent 865abebd11
commit 771db6018e

View file

@ -21,12 +21,18 @@ BuildRequires: cmake pcre2-devel
BuildRequires: update-desktop-files BuildRequires: update-desktop-files
%endif %endif
%if 0%{?opensuse_bs} && 0%{?rhel} && 0%{?rhel} < 7
BuildRequires: gcc48 gcc48-c++
%endif
# for tests # for tests
%if 0%{?fedora} || ( 0%{?rhel} && 0%{?rhel} > 7 ) %if 0%{?fedora} || ( 0%{?rhel} && 0%{?rhel} > 7 )
# Need the en_US.utf-8 locale at a minimum # Need the en_US.utf-8 locale at a minimum
BuildRequires: glibc-langpack-en BuildRequires: glibc-langpack-en
%endif %endif
%if 0%{?rhel} != 6
BuildRequires: python3 procps BuildRequires: python3 procps
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -53,6 +59,11 @@ is simple but incompatible with other shell languages.
%setup -q -n %{name}-@VERSION@ %setup -q -n %{name}-@VERSION@
%build %build
%if 0%{?opensuse_bs} && 0%{?rhel} && 0%{?rhel} < 7
export CC=gcc48
export CXX=g++48
EXTRA_CMAKE_FLAGS="-DCURSES_EXTRA_LIBRARY=tinfo"
%endif
# CMake macros define -DBUILD_SHARED_LIBS:BOOL=ON, which breaks the # CMake macros define -DBUILD_SHARED_LIBS:BOOL=ON, which breaks the
# bundled PCRE2 static library. # bundled PCRE2 static library.
EXTRA_CMAKE_FLAGS="$EXTRA_CMAKE_FLAGS -DBUILD_SHARED_LIBS:BOOL=OFF" EXTRA_CMAKE_FLAGS="$EXTRA_CMAKE_FLAGS -DBUILD_SHARED_LIBS:BOOL=OFF"
@ -88,7 +99,12 @@ cp -a CONTRIBUTING.rst %{buildroot}%{_datadir}/doc/fish/
%if 0%{?__builddir:1} %if 0%{?__builddir:1}
cd %__builddir cd %__builddir
%endif %endif
# Turn off tests on RHEL 6, they are hard to keep running
%if 0%{?opensuse_bs} && 0%{?rhel} && 0%{?rhel} < 7
./fish -c 'exit 0'
%else
make test SHOW_INTERACTIVE_LOG=1 make test SHOW_INTERACTIVE_LOG=1
%endif
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT