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