From 6c73457c09f838279b240bef59730cbff60ae799 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Mon, 4 Oct 2021 16:34:19 -0700 Subject: [PATCH] vim: fix compilation with macOS Upstream backport. Signed-off-by: Rosen Penev --- utils/vim/Makefile | 2 +- utils/vim/patches/020-macos.patch | 39 +++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 utils/vim/patches/020-macos.patch diff --git a/utils/vim/Makefile b/utils/vim/Makefile index bf41826870..422203f47f 100644 --- a/utils/vim/Makefile +++ b/utils/vim/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=vim PKG_VERSION:=8.2 -PKG_RELEASE:=4 +PKG_RELEASE:=5 VIMVER:=82 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 diff --git a/utils/vim/patches/020-macos.patch b/utils/vim/patches/020-macos.patch new file mode 100644 index 0000000000..a9a3b3dcfd --- /dev/null +++ b/utils/vim/patches/020-macos.patch @@ -0,0 +1,39 @@ +From 5289783e0b07cfc3f92ee933261ca4c4acdca007 Mon Sep 17 00:00:00 2001 +From: Bram Moolenaar +Date: Thu, 2 Jul 2020 22:50:37 +0200 +Subject: [PATCH] patch 8.2.1119: configure fails with Xcode 12 beta + +Problem: Configure fails with Xcode 12 beta. +Solution: use "return" instead of "exit()". (Nico Weber, closes #6381) +--- + src/auto/configure | 4 ++-- + src/configure.ac | 4 ++-- + src/version.c | 2 ++ + 3 files changed, 6 insertions(+), 4 deletions(-) + +--- a/src/auto/configure ++++ b/src/auto/configure +@@ -14005,8 +14005,8 @@ else + main() { + uint32_t nr1 = (uint32_t)-1; + uint32_t nr2 = (uint32_t)0xffffffffUL; +- if (sizeof(uint32_t) != 4 || nr1 != 0xffffffffUL || nr2 + 1 != 0) exit(1); +- exit(0); ++ if (sizeof(uint32_t) != 4 || nr1 != 0xffffffffUL || nr2 + 1 != 0) return 1; ++ return 0; + } + _ACEOF + if ac_fn_c_try_run "$LINENO"; then : +--- a/src/configure.ac ++++ b/src/configure.ac +@@ -4129,8 +4129,8 @@ AC_TRY_RUN([ + main() { + uint32_t nr1 = (uint32_t)-1; + uint32_t nr2 = (uint32_t)0xffffffffUL; +- if (sizeof(uint32_t) != 4 || nr1 != 0xffffffffUL || nr2 + 1 != 0) exit(1); +- exit(0); ++ if (sizeof(uint32_t) != 4 || nr1 != 0xffffffffUL || nr2 + 1 != 0) return 1; ++ return 0; + }], + AC_MSG_RESULT(ok), + AC_MSG_ERROR([WRONG! uint32_t not defined correctly.]),