commit:     ebd7f86c37d809236671924e401244ee140434d3
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Nov  4 03:22:59 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Nov  4 03:25:07 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ebd7f86c

app-editors/vim: fix configure w/ clang 16

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../vim/files/vim-0.0.0828-configure-clang16.patch | 28 ++++++++++++++++++++++
 ...{vim-9.0.0828.ebuild => vim-9.0.0828-r1.ebuild} |  5 +++-
 2 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/app-editors/vim/files/vim-0.0.0828-configure-clang16.patch 
b/app-editors/vim/files/vim-0.0.0828-configure-clang16.patch
new file mode 100644
index 000000000000..e202a9dd3caa
--- /dev/null
+++ b/app-editors/vim/files/vim-0.0.0828-configure-clang16.patch
@@ -0,0 +1,28 @@
+https://github.com/vim/vim/pull/11496
+
+From 360b569f86b851c37e32b7cfaec079823188ff27 Mon Sep 17 00:00:00 2001
+From: Sam James <[email protected]>
+Date: Fri, 4 Nov 2022 03:18:23 +0000
+Subject: [PATCH] configure.ac: Fix -Wimplicit-int
+
+Clang 16 makes -Wimplicit-int an error by default. Fixes errors like:
+```
+error: type specifier missing, defaults to 'int'; ISO C99 and later do not 
support implicit int [-Werror,-Wimplicit-int]
+```
+
+We already use proper declarations with every other test anyway, so
+let's be consistent.
+
+Signed-off-by: Sam James <[email protected]>
+--- a/src/configure.ac
++++ b/src/configure.ac
+@@ -3654,7 +3654,7 @@ dnl check if struct sigcontext is defined (used for SGI 
only)
+ AC_MSG_CHECKING(for struct sigcontext)
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
+ #include <signal.h>
+-test_sig()
++int test_sig()
+ {
+     struct sigcontext *scont;
+     scont = (struct sigcontext *)0;
+

diff --git a/app-editors/vim/vim-9.0.0828.ebuild 
b/app-editors/vim/vim-9.0.0828-r1.ebuild
similarity index 99%
rename from app-editors/vim/vim-9.0.0828.ebuild
rename to app-editors/vim/vim-9.0.0828-r1.ebuild
index f9e1c2239e75..0bb399988a93 100644
--- a/app-editors/vim/vim-9.0.0828.ebuild
+++ b/app-editors/vim/vim-9.0.0828-r1.ebuild
@@ -66,6 +66,10 @@ BDEPEND="
 "
 PDEPEND="!minimal? ( app-vim/gentoo-syntax )"
 
+PATCHES=(
+       "${FILESDIR}"/vim-0.0.0828-configure-clang16.patch
+)
+
 pkg_setup() {
        # people with broken alphabets run into trouble. bug #82186.
        unset LANG LC_ALL
@@ -76,7 +80,6 @@ pkg_setup() {
 }
 
 src_prepare() {
-
        if [[ ${PV} != 9999* ]] ; then
                # Gentoo patches to fix runtime issues, cross-compile errors, 
etc
                eapply "${WORKDIR}"/vim-patches-vim-9.0.0049-patches

Reply via email to