diff --git a/disable-unreliable-tests-arch.patch b/disable-unreliable-tests-arch.patch index 138c179..80fd9d7 100644 --- a/disable-unreliable-tests-arch.patch +++ b/disable-unreliable-tests-arch.patch @@ -34,7 +34,7 @@ Index: vim-8.2.3318/src/testdir/Make_all.mak test_regex_char_classes \ test_regexp_latin \ test_regexp_utf8 \ -@@ -459,7 +452,6 @@ NEW_TESTS_RES = \ +@@ -458,7 +451,6 @@ NEW_TESTS_RES = \ test_quickfix.res \ test_quotestar.res \ test_random.res \ diff --git a/disable-unreliable-tests.patch b/disable-unreliable-tests.patch index c7f5d76..3b9f2b5 100644 --- a/disable-unreliable-tests.patch +++ b/disable-unreliable-tests.patch @@ -10,7 +10,7 @@ Index: vim-8.2.3075/src/testdir/Make_all.mak test_balloon_gui \ test_behave \ test_blob \ -@@ -203,7 +202,6 @@ NEW_TESTS = \ +@@ -204,7 +203,6 @@ NEW_TESTS = \ test_netbeans \ test_normal \ test_number \ @@ -18,7 +18,15 @@ Index: vim-8.2.3075/src/testdir/Make_all.mak test_packadd \ test_partial \ test_paste \ -@@ -323,7 +320,6 @@ NEW_TESTS_RES = \ +@@ -262,7 +260,6 @@ NEW_TESTS = \ + test_stat \ + test_statusline \ + test_substitute \ +- test_suspend \ + test_swap \ + test_syn_attr \ + test_syntax \ +@@ -324,7 +321,6 @@ NEW_TESTS_RES = \ test_autocmd.res \ test_autoload.res \ test_backspace_opt.res \ @@ -26,6 +34,14 @@ Index: vim-8.2.3075/src/testdir/Make_all.mak test_balloon_gui.res \ test_blob.res \ test_blockedit.res \ +@@ -490,7 +486,6 @@ NEW_TESTS_RES = \ + test_stat.res \ + test_statusline.res \ + test_substitute.res \ +- test_suspend.res \ + test_swap.res \ + test_syn_attr.res \ + test_syntax.res \ Index: vim-8.2.3075/src/testdir/Makefile =================================================================== --- vim-8.2.3075.orig/src/testdir/Makefile diff --git a/vim.changes b/vim.changes index 99386e9..69b8485 100644 --- a/vim.changes +++ b/vim.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Oct 22 14:53:00 UTC 2021 - Stefan Schubert + +- Use libalternatives instead of update-alternatives. +- Test_suspend disabled temporary. + Updated patches: + disable-unreliable-tests-arch.patch, disable-unreliable-tests.patch + ------------------------------------------------------------------- Fri Oct 22 13:53:00 UTC 2021 - Ondřej Súkup diff --git a/vim.spec b/vim.spec index 7bf73fe..75d8164 100644 --- a/vim.spec +++ b/vim.spec @@ -23,6 +23,13 @@ %define site_runtimepath %{_datadir}/vim/site %define make make VIMRCLOC=%{_sysconfdir} VIMRUNTIMEDIR=%{_datadir}/vim/current MAKE="make -e" %{?_smp_mflags} %bcond_without python2 + +%if 0%{?suse_version} > 1500 +%bcond_without libalternatives +%else +%bcond_with libalternatives +%endif + Name: vim Version: %{pkg_version}.%{patchlevel_compact} Release: 0 @@ -90,8 +97,12 @@ BuildRequires: pkgconfig(lua) BuildRequires: pkgconfig(python3) BuildRequires: pkgconfig(xt) Requires: vim-data-common = %{version}-%{release} +%if %{with libalternatives} +Requires: alts +%else Requires(post): update-alternatives -Requires(postun):update-alternatives +Requires(postun): update-alternatives +%endif Recommends: vim-data = %{version}-%{release} Conflicts: vim-base < 8.2 Provides: vi @@ -139,8 +150,13 @@ Summary: A GUI for Vi Group: Productivity/Text/Editors Requires: gvim_client Requires: vim-data = %{version}-%{release} +%if %{with libalternatives} +BuildRequires: alts +Requires: alts +%else Requires(post): update-alternatives -Requires(postun):update-alternatives +Requires(postun): update-alternatives +%endif Conflicts: gvim < 8.2 Provides: gvim-base = %{version}-%{release} Provides: gvim-enhanced = %{version}-%{release} @@ -159,8 +175,13 @@ want less features, you might want to install vim instead. %package small Summary: Vim with reduced features Group: Productivity/Text/Editors +%if %{with libalternatives} +BuildRequires: alts +Requires: alts +%else Requires(post): update-alternatives -Requires(postun):update-alternatives +Requires(postun): update-alternatives +%endif Provides: vi Provides: vim_client Requires: vim-data-common = %{version}-%{release} @@ -310,9 +331,40 @@ done # install vim install -D -m 0755 vim-small %{buildroot}%{_bindir}/vim-small install -D -m 0755 vim-nox11 %{buildroot}%{_bindir}/vim-nox11 +%if ! %{with libalternatives} mkdir -p %{buildroot}%{_sysconfdir}/alternatives ln -s -f %{_sysconfdir}/alternatives/vim %{buildroot}%{_bindir}/vim ln -s -f %{_sysconfdir}/alternatives/vi %{buildroot}%{_bindir}/vi +%else +ln -sf %{_bindir}/alts %{buildroot}%{_bindir}/vi +ln -sf %{_bindir}/alts %{buildroot}%{_bindir}/vim +mkdir -p %{buildroot}%{_datadir}/libalternatives/vi +cat > %{buildroot}%{_datadir}/libalternatives/vi/20.conf < %{buildroot}%{_datadir}/libalternatives/vi/30.conf < %{buildroot}%{_datadir}/libalternatives/vi/19.conf < %{buildroot}%{_datadir}/libalternatives/vim/20.conf < %{buildroot}%{_datadir}/libalternatives/vim/30.conf < %{buildroot}%{_datadir}/libalternatives/vim/19.conf <