09.09.2026 16:41, Stuart Henderson пишет:
> I agree with poisoning and have done a test build on i386 that way.
> At least these need to go in first though (there may be some !i386
> ports that need it too).
OK kn
>
> Index: editors/neovim/patches/patch-cmake_Deps_cmake
> ===================================================================
> RCS file: editors/neovim/patches/patch-cmake_Deps_cmake
> diff -N editors/neovim/patches/patch-cmake_Deps_cmake
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ editors/neovim/patches/patch-cmake_Deps_cmake 9 Sep 2026 13:37:18
> -0000
> @@ -0,0 +1,20 @@
> +don't pick up ccache; ports is capable of using ccache by itself, and doing
> +it this way breaks PORTS_PRIVSEP
> +
> +Index: cmake/Deps.cmake
> +--- cmake/Deps.cmake.orig
> ++++ cmake/Deps.cmake
> +@@ -17,13 +17,6 @@ if(APPLE)
> + list(APPEND DEPS_CMAKE_ARGS -D
> CMAKE_FIND_FRAMEWORK=${CMAKE_FIND_FRAMEWORK})
> + endif()
> +
> +-find_program(CACHE_PRG NAMES ccache sccache)
> +-mark_as_advanced(CACHE_PRG)
> +-if(CACHE_PRG)
> +- set(CMAKE_C_COMPILER_LAUNCHER ${CMAKE_COMMAND} -E env
> CCACHE_SLOPPINESS=pch_defines,time_macros ${CACHE_PRG})
> +- list(APPEND DEPS_CMAKE_CACHE_ARGS
> -DCMAKE_C_COMPILER_LAUNCHER:STRING=${CMAKE_C_COMPILER_LAUNCHER})
> +-endif()
CONFIGURE_ARGS += -DCACHE_PRG=OFF is equivalent to this patch.
I've done that a few times and did verify that it works for neovim, too:
pkg_add ccache sccache
make USE_{,S}CCACHE=no configure
pkg_delete ccache sccache
make
Without configure flag ccache is picked and it fails; with flag it builds.
> +-
> + # MAKE_PRG
> + if(UNIX)
> + find_program(MAKE_PRG NAMES gmake make)
Same should hold true for other CMake ports using find_program(),
one just has to grep for it.
Which makes a point, I think, for just adding these variables by default.
They don't hurt and CMake reports unused variables, i.e. for updated/new
ports one could even spot which of the ones we pass actually worked.