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/files/, app-editors/neovim/
Date: Sat, 01 Oct 2022 06:33:59
Message-Id: 1664606030.737b23a0af4224a9d02d23ede7f41ab6dbd97319.sam@gentoo
1 commit: 737b23a0af4224a9d02d23ede7f41ab6dbd97319
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sat Oct 1 06:32:31 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sat Oct 1 06:33:50 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=737b23a0
7
8 app-editors/neovim: fix respecting CFLAGS; try avoid sandbox violation
9
10 - RelWithDebInfo sets -Og -g after our flags. (Made a local hook for now
11 to try catch these in future, along with -ffast-math, although that wasn't
12 being set here.)
13
14 - Use xdg_environment_reset to try avoid sandbox issues (see
15 https://forums.gentoo.org/viewtopic-p-8750050.html).
16
17 Also sent a patch to gentoo-dev ML for adding XDG_STATE_HOME to
18 the unset/reset list for the eclass.
19
20 Signed-off-by: Sam James <sam <AT> gentoo.org>
21
22 .../neovim/files/neovim-9999-cmake-release-type.patch | 15 +++++++++++++++
23 .../{neovim-0.8.0.ebuild => neovim-0.8.0-r1.ebuild} | 5 ++++-
24 app-editors/neovim/neovim-9999.ebuild | 5 ++++-
25 3 files changed, 23 insertions(+), 2 deletions(-)
26
27 diff --git a/app-editors/neovim/files/neovim-9999-cmake-release-type.patch b/app-editors/neovim/files/neovim-9999-cmake-release-type.patch
28 index 1d7fb56b51c8..8114e2a92b74 100644
29 --- a/app-editors/neovim/files/neovim-9999-cmake-release-type.patch
30 +++ b/app-editors/neovim/files/neovim-9999-cmake-release-type.patch
31 @@ -11,3 +11,18 @@ https://bugs.gentoo.org/757744
32 call health#report_ok(buildtype)
33 else
34 call health#report_info(buildtype)
35 +--- a/CMakeLists.txt
36 ++++ b/CMakeLists.txt
37 +@@ -137,12 +137,6 @@ else()
38 + message(STATUS "MIN_LOG_LEVEL=${MIN_LOG_LEVEL}")
39 + endif()
40 +
41 +-# Default to -O2 on release builds.
42 +-if(CMAKE_C_FLAGS_RELEASE MATCHES "-O3")
43 +- message(STATUS "Replacing -O3 in CMAKE_C_FLAGS_RELEASE with -O2")
44 +- string(REPLACE "-O3" "-O2" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
45 +-endif()
46 +-
47 + if(CMAKE_C_COMPILER_ID MATCHES "GNU")
48 + check_c_compiler_flag(-Og HAS_OG_FLAG)
49 + else()
50
51 diff --git a/app-editors/neovim/neovim-0.8.0.ebuild b/app-editors/neovim/neovim-0.8.0-r1.ebuild
52 similarity index 96%
53 rename from app-editors/neovim/neovim-0.8.0.ebuild
54 rename to app-editors/neovim/neovim-0.8.0-r1.ebuild
55 index 2e5948e10f45..fe675b291f83 100644
56 --- a/app-editors/neovim/neovim-0.8.0.ebuild
57 +++ b/app-editors/neovim/neovim-0.8.0-r1.ebuild
58 @@ -3,8 +3,9 @@
59
60 EAPI=8
61
62 +# RelWithDebInfo sets -Og -g
63 +CMAKE_BUILD_TYPE=Release
64 LUA_COMPAT=( lua5-{1..2} luajit )
65 -
66 inherit cmake lua-single optfeature xdg
67
68 DESCRIPTION="Vim-fork focused on extensibility and agility"
69 @@ -88,6 +89,8 @@ src_prepare() {
70 sed -e "/^# define SYS_VIMRC_FILE/s|\$VIM|${EPREFIX}/etc/vim|" \
71 -i src/nvim/globals.h || die
72
73 + # https://forums.gentoo.org/viewtopic-p-8750050.html
74 + xdg_environment_reset
75 cmake_src_prepare
76 }
77
78
79 diff --git a/app-editors/neovim/neovim-9999.ebuild b/app-editors/neovim/neovim-9999.ebuild
80 index 2e5948e10f45..fe675b291f83 100644
81 --- a/app-editors/neovim/neovim-9999.ebuild
82 +++ b/app-editors/neovim/neovim-9999.ebuild
83 @@ -3,8 +3,9 @@
84
85 EAPI=8
86
87 +# RelWithDebInfo sets -Og -g
88 +CMAKE_BUILD_TYPE=Release
89 LUA_COMPAT=( lua5-{1..2} luajit )
90 -
91 inherit cmake lua-single optfeature xdg
92
93 DESCRIPTION="Vim-fork focused on extensibility and agility"
94 @@ -88,6 +89,8 @@ src_prepare() {
95 sed -e "/^# define SYS_VIMRC_FILE/s|\$VIM|${EPREFIX}/etc/vim|" \
96 -i src/nvim/globals.h || die
97
98 + # https://forums.gentoo.org/viewtopic-p-8750050.html
99 + xdg_environment_reset
100 cmake_src_prepare
101 }