diff options
author | Sam James <sam@gentoo.org> | 2022-10-01 07:32:31 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-10-01 07:33:50 +0100 |
commit | 737b23a0af4224a9d02d23ede7f41ab6dbd97319 (patch) | |
tree | c1a90d3828cbf5ccf6f167b0fdfcfaf3abcd4406 /app-editors/neovim | |
parent | dev-perl/pcsc-perl: Keyword 1.4.14-r1 arm64, #872809 (diff) | |
download | gentoo-737b23a0af4224a9d02d23ede7f41ab6dbd97319.tar.gz gentoo-737b23a0af4224a9d02d23ede7f41ab6dbd97319.tar.bz2 gentoo-737b23a0af4224a9d02d23ede7f41ab6dbd97319.zip |
app-editors/neovim: fix respecting CFLAGS; try avoid sandbox violation
- RelWithDebInfo sets -Og -g after our flags. (Made a local hook for now
to try catch these in future, along with -ffast-math, although that wasn't
being set here.)
- Use xdg_environment_reset to try avoid sandbox issues (see
https://forums.gentoo.org/viewtopic-p-8750050.html).
Also sent a patch to gentoo-dev ML for adding XDG_STATE_HOME to
the unset/reset list for the eclass.
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-editors/neovim')
-rw-r--r-- | app-editors/neovim/files/neovim-9999-cmake-release-type.patch | 15 | ||||
-rw-r--r-- | app-editors/neovim/neovim-0.8.0-r1.ebuild (renamed from app-editors/neovim/neovim-0.8.0.ebuild) | 5 | ||||
-rw-r--r-- | app-editors/neovim/neovim-9999.ebuild | 5 |
3 files changed, 23 insertions, 2 deletions
diff --git a/app-editors/neovim/files/neovim-9999-cmake-release-type.patch b/app-editors/neovim/files/neovim-9999-cmake-release-type.patch index 1d7fb56b51c8..8114e2a92b74 100644 --- a/app-editors/neovim/files/neovim-9999-cmake-release-type.patch +++ b/app-editors/neovim/files/neovim-9999-cmake-release-type.patch @@ -11,3 +11,18 @@ https://bugs.gentoo.org/757744 call health#report_ok(buildtype) else call health#report_info(buildtype) +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -137,12 +137,6 @@ else() + message(STATUS "MIN_LOG_LEVEL=${MIN_LOG_LEVEL}") + endif() + +-# Default to -O2 on release builds. +-if(CMAKE_C_FLAGS_RELEASE MATCHES "-O3") +- message(STATUS "Replacing -O3 in CMAKE_C_FLAGS_RELEASE with -O2") +- string(REPLACE "-O3" "-O2" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}") +-endif() +- + if(CMAKE_C_COMPILER_ID MATCHES "GNU") + check_c_compiler_flag(-Og HAS_OG_FLAG) + else() diff --git a/app-editors/neovim/neovim-0.8.0.ebuild b/app-editors/neovim/neovim-0.8.0-r1.ebuild index 2e5948e10f45..fe675b291f83 100644 --- a/app-editors/neovim/neovim-0.8.0.ebuild +++ b/app-editors/neovim/neovim-0.8.0-r1.ebuild @@ -3,8 +3,9 @@ EAPI=8 +# RelWithDebInfo sets -Og -g +CMAKE_BUILD_TYPE=Release LUA_COMPAT=( lua5-{1..2} luajit ) - inherit cmake lua-single optfeature xdg DESCRIPTION="Vim-fork focused on extensibility and agility" @@ -88,6 +89,8 @@ src_prepare() { sed -e "/^# define SYS_VIMRC_FILE/s|\$VIM|${EPREFIX}/etc/vim|" \ -i src/nvim/globals.h || die + # https://forums.gentoo.org/viewtopic-p-8750050.html + xdg_environment_reset cmake_src_prepare } diff --git a/app-editors/neovim/neovim-9999.ebuild b/app-editors/neovim/neovim-9999.ebuild index 2e5948e10f45..fe675b291f83 100644 --- a/app-editors/neovim/neovim-9999.ebuild +++ b/app-editors/neovim/neovim-9999.ebuild @@ -3,8 +3,9 @@ EAPI=8 +# RelWithDebInfo sets -Og -g +CMAKE_BUILD_TYPE=Release LUA_COMPAT=( lua5-{1..2} luajit ) - inherit cmake lua-single optfeature xdg DESCRIPTION="Vim-fork focused on extensibility and agility" @@ -88,6 +89,8 @@ src_prepare() { sed -e "/^# define SYS_VIMRC_FILE/s|\$VIM|${EPREFIX}/etc/vim|" \ -i src/nvim/globals.h || die + # https://forums.gentoo.org/viewtopic-p-8750050.html + xdg_environment_reset cmake_src_prepare } |