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 0000000000000000000000000000000000000000..136a76e90bae9f7592a8c076c3920b3d409333c4 --- /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 334b512a72a8c60fe2ea86ffe6f1ef9d48d3b7b2..4ab2a9e7997e740150ce6e5c7b083317df1bf8a9 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}.6 License: Vim and MIT Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{baseversion}-%{patchlevel}.tar.bz2 Source1: vim.sh @@ -118,6 +118,10 @@ 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 +%ifarch sw_64 +Patch10002: vim-8.2-configure-does-not-recognize-gcc-10.0.patch +%endif # gcc is no longer in buildroot by default BuildRequires: gcc @@ -337,7 +341,8 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk %patch3040 -p1 -b .cve1927 %patch10000 -p1 - +%patch10001 -p1 +%patch10002 -p1 %build %if 0%{?rhel} > 7 export RHEL_ALLOW_PYTHON2_FOR_BUILD=1 @@ -855,6 +860,12 @@ 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 + * 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 0000000000000000000000000000000000000000..a440eace6d6379cca7b4ee82056649efb307ae8a --- /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);