Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-editors/neovim/, app-editors/neovim/files/
Date: Tue, 05 Jul 2022 00:33:09
Message-Id: 1656981172.bd47d534eab9e010022944bf9f9e98aa198a6860.sam@gentoo
1 commit: bd47d534eab9e010022944bf9f9e98aa198a6860
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jul 5 00:32:52 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Tue Jul 5 00:32:52 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd47d534
7
8 app-editors/neovim: rebase Darwin patch
9
10 Closes: https://github.com/gentoo/gentoo/pull/25889
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 .../neovim/files/neovim-9999-cmake-darwin.patch | 55 ++++++++++++++++++++++
14 app-editors/neovim/neovim-9999.ebuild | 12 +++--
15 2 files changed, 64 insertions(+), 3 deletions(-)
16
17 diff --git a/app-editors/neovim/files/neovim-9999-cmake-darwin.patch b/app-editors/neovim/files/neovim-9999-cmake-darwin.patch
18 new file mode 100644
19 index 000000000000..5b829904a13e
20 --- /dev/null
21 +++ b/app-editors/neovim/files/neovim-9999-cmake-darwin.patch
22 @@ -0,0 +1,55 @@
23 +--- a/CMakeLists.txt
24 ++++ b/CMakeLists.txt
25 +@@ -80,23 +80,6 @@ set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${DEPS_PREFIX}/lib/pkgconfig")
26 + # used for check_c_compiler_flag
27 + include(CheckCCompilerFlag)
28 +
29 +-if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
30 +- # CMake tries to treat /sw and /opt/local as extension of the system path, but
31 +- # that doesn't really work out very well. Once you have a dependency that
32 +- # resides there and have to add it as an include directory, then any other
33 +- # dependency that could be satisfied from there must be--otherwise you can end
34 +- # up with conflicting versions. So, let's make them more of a priority having
35 +- # them be included as one of the first places to look for dependencies.
36 +- list(APPEND CMAKE_PREFIX_PATH /sw /opt/local)
37 +-
38 +- # Work around some old, broken detection by CMake for knowing when to use the
39 +- # isystem flag. Apple's compilers have supported this for quite some time
40 +- # now.
41 +- if(CMAKE_COMPILER_IS_GNUCC)
42 +- set(CMAKE_INCLUDE_SYSTEM_FLAG_C "-isystem ")
43 +- endif()
44 +-endif()
45 +-
46 + if(WIN32 OR CMAKE_SYSTEM_NAME STREQUAL "Darwin")
47 + # Ignore case when comparing filenames on Windows and Mac.
48 + set(CASE_INSENSITIVE_FILENAME TRUE)
49 +--- a/cmake.deps/CMakeLists.txt
50 ++++ b/cmake.deps/CMakeLists.txt
51 +@@ -112,13 +112,6 @@ if(CMAKE_CXX_COMPILER)
52 + set(DEPS_CXX_COMPILER "${CMAKE_CXX_COMPILER}")
53 + endif()
54 +
55 +-if(CMAKE_OSX_SYSROOT)
56 +- set(DEPS_C_COMPILER "${DEPS_C_COMPILER} -isysroot${CMAKE_OSX_SYSROOT}")
57 +- if(DEPS_CXX_COMPILER)
58 +- set(DEPS_CXX_COMPILER "${DEPS_CXX_COMPILER} -isysroot${CMAKE_OSX_SYSROOT}")
59 +- endif()
60 +-endif()
61 +-
62 + if(CMAKE_OSX_ARCHITECTURES)
63 + string(REPLACE ";" "|" CMAKE_OSX_ARCHITECTURES_ALT_SEP "${CMAKE_OSX_ARCHITECTURES}")
64 + # The LuaJIT build does not like being passed multiple `-arch` flags
65 +--- a/src/nvim/CMakeLists.txt
66 ++++ b/src/nvim/CMakeLists.txt
67 +@@ -205,10 +205,6 @@ get_directory_property(gen_includes INCLUDE_DIRECTORIES)
68 + foreach(gen_include ${gen_includes} ${LUA_PREFERRED_INCLUDE_DIRS})
69 + list(APPEND gen_cflags "-I${gen_include}")
70 + endforeach()
71 +-if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_OSX_SYSROOT)
72 +- list(APPEND gen_cflags "-isysroot")
73 +- list(APPEND gen_cflags "${CMAKE_OSX_SYSROOT}")
74 +-endif()
75 + string(TOUPPER "${CMAKE_BUILD_TYPE}" build_type)
76 + separate_arguments(C_FLAGS_ARRAY UNIX_COMMAND ${CMAKE_C_FLAGS})
77 + separate_arguments(C_FLAGS_${build_type}_ARRAY UNIX_COMMAND ${CMAKE_C_FLAGS_${build_type}})
78
79 diff --git a/app-editors/neovim/neovim-9999.ebuild b/app-editors/neovim/neovim-9999.ebuild
80 index 4316da6d93cc..5f18e490acbb 100644
81 --- a/app-editors/neovim/neovim-9999.ebuild
82 +++ b/app-editors/neovim/neovim-9999.ebuild
83 @@ -68,12 +68,18 @@ BDEPEND="
84
85 PATCHES=(
86 "${FILESDIR}/${PN}-0.4.4-cmake-release-type.patch"
87 - "${FILESDIR}/${PN}-0.4.4-cmake-darwin.patch"
88 )
89 +
90 if [[ ${PV} == 9999 ]]; then
91 - PATCHES+=("${FILESDIR}/${PN}-9999-cmake_lua_version.patch")
92 + PATCHES+=(
93 + "${FILESDIR}/${PN}-9999-cmake_lua_version.patch"
94 + "${FILESDIR}/${PN}-9999-cmake-darwin.patch"
95 + )
96 else
97 - PATCHES+=("${FILESDIR}/${PN}-0.4.4-cmake_lua_version.patch")
98 + PATCHES+=(
99 + "${FILESDIR}/${PN}-0.4.4-cmake_lua_version.patch"
100 + "${FILESDIR}/${PN}-0.4.4-cmake-darwin.patch"
101 + )
102 fi
103
104 src_prepare() {