From a35bae210b24b0079d9452eb63465c0485f2397d Mon Sep 17 00:00:00 2001 From: wxiat Date: Wed, 28 Jun 2023 10:55:02 +0800 Subject: [PATCH 1/2] add sw Signed-off-by: wxiat --- vim.spec | 8 ++++++-- vim80-sw.patch | 24 ++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 vim80-sw.patch diff --git a/vim.spec b/vim.spec index 334b512..4dc0a5b 100644 --- a/vim.spec +++ b/vim.spec @@ -25,7 +25,7 @@ Summary: The VIM editor URL: http://www.vim.org/ Name: vim Version: %{baseversion}.%{patchlevel} -Release: 19%{anolis_release}%{?dist}.4 +Release: 19%{anolis_release}%{?dist}.5 License: Vim and MIT Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{baseversion}-%{patchlevel}.tar.bz2 Source1: vim.sh @@ -118,6 +118,7 @@ Patch3040: 0001-patch-8.2.5037-cursor-position-may-be-invalid-after-.patch # backport patch to fix build error with ruby Patch10000: 0001-vim-anolis-build-with-ruby26.patch # End +Patch10001: vim80-sw.patch # gcc is no longer in buildroot by default BuildRequires: gcc @@ -337,7 +338,7 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk %patch3040 -p1 -b .cve1927 %patch10000 -p1 - +%patch10001 -p1 %build %if 0%{?rhel} > 7 export RHEL_ALLOW_PYTHON2_FOR_BUILD=1 @@ -855,6 +856,9 @@ touch %{buildroot}/%{_datadir}/%{name}/vimfiles/doc/tags %{_datadir}/icons/locolor/*/apps/* %changelog +* Fri May 12 2023 wxiat - 2:8.0.1763-19.0.1.5 +- add sw patch + * Mon Aug 08 2022 Mahailiang - 2:8.0.1763-19.0.1.4 - Rebrand to Anolis(Xiaoxuan Yang) - Fix build issue with ruby(Liwei Ge) diff --git a/vim80-sw.patch b/vim80-sw.patch new file mode 100644 index 0000000..a440eac --- /dev/null +++ b/vim80-sw.patch @@ -0,0 +1,24 @@ +diff -Naur vim80.org/runtime/syntax/debcontrol.vim vim80.sw/runtime/syntax/debcontrol.vim +--- vim80.org/runtime/syntax/debcontrol.vim 2018-02-12 16:55:41.000000000 +0800 ++++ vim80.sw/runtime/syntax/debcontrol.vim 2023-05-12 14:59:37.859109283 +0800 +@@ -31,7 +31,7 @@ + \ 'alpha', 'amd64', 'armeb', 'armel', 'armhf', 'arm64', 'avr32', 'hppa' + \, 'i386', 'ia64', 'lpia', 'm32r', 'm68k', 'mipsel', 'mips64el', 'mips' + \, 'powerpcspe', 'powerpc', 'ppc64el', 'ppc64', 's390x', 's390', 'sh3eb' +- \, 'sh3', 'sh4eb', 'sh4', 'sh', 'sparc64', 'sparc', 'x32' ++ \, 'sh3', 'sh4eb', 'sh4', 'sh', 'sparc64', 'sparc', 'x32', 'sw_64' + \ ] + let s:pairs = [ + \ 'hurd-i386', 'kfreebsd-i386', 'kfreebsd-amd64', 'knetbsd-i386' +diff -Naur vim80.org/src/osdef1.h.in vim80.sw/src/osdef1.h.in +--- vim80.org/src/osdef1.h.in 2016-12-02 16:39:09.000000000 +0800 ++++ vim80.sw/src/osdef1.h.in 2023-05-12 15:02:42.527581672 +0800 +@@ -130,7 +130,7 @@ + #else + extern char *getwd(char *); + #endif +-#ifndef __alpha /* suggested by Campbell */ ++#if !defined __alpha && !defined __sw_64 /* suggested by Campbell */ + extern int ioctl(int, int, ...); + #endif + extern int chmod(const char *, mode_t); -- Gitee From 28782b3e2502918a054e253cead2a5b797279bfa Mon Sep 17 00:00:00 2001 From: Weisson Date: Mon, 20 Nov 2023 17:12:48 +0800 Subject: [PATCH 2/2] add support for gcc having version beyond 10.0. Signed-off-by: Weisson --- ...onfigure-does-not-recognize-gcc-10.0.patch | 66 +++++++++++++++++++ vim.spec | 9 ++- 2 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 vim-8.2-configure-does-not-recognize-gcc-10.0.patch diff --git a/vim-8.2-configure-does-not-recognize-gcc-10.0.patch b/vim-8.2-configure-does-not-recognize-gcc-10.0.patch new file mode 100644 index 0000000..136a76e --- /dev/null +++ b/vim-8.2-configure-does-not-recognize-gcc-10.0.patch @@ -0,0 +1,66 @@ +From 6b9c1662eb49612bbcfc3e07167cbde7c4ec6aef Mon Sep 17 00:00:00 2001 +From: Weisson +Date: Mon, 20 Nov 2023 16:40:44 +0800 +Subject: [PATCH] patch 8.2.0213: configure does not recognize gcc 10.0 and + later + +Problem: Configure does not recognize gcc 10.0 and later. +Solution: Adjust the pattern matching the version number. (Sergei + Trofimovich, closes #5580) +Signed-off-by: Weisson +--- + src/auto/configure | 2 +- + src/configure.ac | 4 ++-- + src/version.c | 2 ++ + 3 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/src/auto/configure b/src/auto/configure +index a0e9ea5..0c4c9c3 100755 +--- a/src/auto/configure ++++ b/src/auto/configure +@@ -14686,7 +14686,7 @@ DEPEND_CFLAGS_FILTER= + if test "$GCC" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC 3 or later" >&5 + $as_echo_n "checking for GCC 3 or later... " >&6; } +- gccmajor=`echo "$gccversion" | sed -e 's/^\([1-9]\)\..*$/\1/g'` ++ gccmajor=`echo "$gccversion" | sed -e 's/^\([0-9]\+\)\..*$/\1/g'` + if test "$gccmajor" -gt "2"; then + DEPEND_CFLAGS_FILTER="| sed 's+-I */+-isystem /+g'" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +diff --git a/src/configure.ac b/src/configure.ac +index 5e45762..73ef5e9 100644 +--- a/src/configure.ac ++++ b/src/configure.ac +@@ -2204,7 +2204,7 @@ else + fi + + dnl On my HPUX system the X include dir is found, but the lib dir not. +- dnl This is a desparate try to fix this. ++ dnl This is a desperate try to fix this. + + if test -d "$x_includes" && test ! -d "$x_libraries"; then + x_libraries=`echo "$x_includes" | sed s/include/lib/` +@@ -4424,7 +4424,7 @@ dnl the number before the version number. + DEPEND_CFLAGS_FILTER= + if test "$GCC" = yes; then + AC_MSG_CHECKING(for GCC 3 or later) +- gccmajor=`echo "$gccversion" | sed -e 's/^\([[1-9]]\)\..*$/\1/g'` ++ gccmajor=`echo "$gccversion" | sed -e 's/^\([[0-9]]\+\)\..*$/\1/g'` + if test "$gccmajor" -gt "2"; then + DEPEND_CFLAGS_FILTER="| sed 's+-I */+-isystem /+g'" + AC_MSG_RESULT(yes) +diff --git a/src/version.c b/src/version.c +index f5d4c5a..2ae07d2 100644 +--- a/src/version.c ++++ b/src/version.c +@@ -761,6 +761,8 @@ static char *(features[]) = + + static int included_patches[] = + { /* Add new patch number below this line */ ++/**/ ++ 232, + /**/ + 1763, + /**/ +-- +2.31.1 \ No newline at end of file diff --git a/vim.spec b/vim.spec index 4dc0a5b..41a720d 100644 --- a/vim.spec +++ b/vim.spec @@ -1,4 +1,4 @@ -%define anolis_release .0.1 +%define anolis_release .0.2 %define patchlevel 1763 %if %{?WITH_SELINUX:0}%{!?WITH_SELINUX:1} %define WITH_SELINUX 1 @@ -119,6 +119,7 @@ Patch3040: 0001-patch-8.2.5037-cursor-position-may-be-invalid-after-.patch Patch10000: 0001-vim-anolis-build-with-ruby26.patch # End Patch10001: vim80-sw.patch +Patch10002: vim-8.2-configure-does-not-recognize-gcc-10.0.patch # gcc is no longer in buildroot by default BuildRequires: gcc @@ -339,6 +340,9 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk %patch10000 -p1 %patch10001 -p1 +%ifarch sw_64 +%patch10002 -p1 +%endif %build %if 0%{?rhel} > 7 export RHEL_ALLOW_PYTHON2_FOR_BUILD=1 @@ -856,6 +860,9 @@ touch %{buildroot}/%{_datadir}/%{name}/vimfiles/doc/tags %{_datadir}/icons/locolor/*/apps/* %changelog +* Mon Nov 20 2023 Weisson - 2:8.0.1763-19.0.2.5 +- add support for gcc having version beyond 10.0. + * Fri May 12 2023 wxiat - 2:8.0.1763-19.0.1.5 - add sw patch -- Gitee