youcompleteme: recipe clean ups, switch to libclang 20. (#12492)

This commit is contained in:
OscarL
2025-07-20 11:54:48 -03:00
committed by GitHub
parent ced4964c33
commit a92e2b90aa

View File

@@ -18,7 +18,7 @@ etc.)."
HOMEPAGE="https://ycm-core.github.io/YouCompleteMe/" HOMEPAGE="https://ycm-core.github.io/YouCompleteMe/"
COPYRIGHT="2015-2024 YouCompleteMe contributors" COPYRIGHT="2015-2024 YouCompleteMe contributors"
LICENSE="GNU GPL v3" LICENSE="GNU GPL v3"
REVISION="1" REVISION="2"
gitRevURI="131b1827354871a4e984c1660b6af0fefca755c3" gitRevURI="131b1827354871a4e984c1660b6af0fefca755c3"
SOURCE_URI="https://github.com/ycm-core/YouCompleteMe/archive/$gitRevURI.zip" SOURCE_URI="https://github.com/ycm-core/YouCompleteMe/archive/$gitRevURI.zip"
SOURCE_DIR="YouCompleteMe-$gitRevURI" SOURCE_DIR="YouCompleteMe-$gitRevURI"
@@ -34,19 +34,18 @@ ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86" SECONDARY_ARCHITECTURES="x86"
# Use these when updating the recipe for newer versions: # Use these when updating the recipe for newer versions:
CLANG_VERSION=16 CLANG_VERSION=20
PYTHON_VERSION=3.10 PYTHON_VERSION=3.10
pythonPackage=python${PYTHON_VERSION//.} pythonPackage=python${PYTHON_VERSION//.}
VIM_VERSION=9.1 VIM_VERSION=9.1
PROVIDES=" PROVIDES="
youcompleteme$secondaryArchSuffix = $portVersion youcompleteme$secondaryArchSuffix = $portVersion
lib:ycm_core.cpython_${pyVer}$secondaryArchSuffix
" "
REQUIRES=" REQUIRES="
haiku$secondaryArchSuffix haiku$secondaryArchSuffix
cmd:vim >= $VIM_VERSION # set this to == once vim uses compat on its provides. cmd:vim >= $VIM_VERSION
bottle_$pythonPackage bottle_$pythonPackage
certifi_$pythonPackage certifi_$pythonPackage
frozendict_$pythonPackage frozendict_$pythonPackage
@@ -55,8 +54,11 @@ REQUIRES="
requests_$pythonPackage requests_$pythonPackage
waitress_$pythonPackage waitress_$pythonPackage
watchdog_$pythonPackage watchdog_$pythonPackage
# "ycm_core.cpython-310.so" is linked against *a lot* of libabsl_* .so.
# just list the base one here for simplicity.
lib:libabsl_base$secondaryArchSuffix lib:libabsl_base$secondaryArchSuffix
lib:libclang$secondaryArchSuffix >= $CLANG_VERSION lib:libclang$secondaryArchSuffix
lib:libpython$PYTHON_VERSION$secondaryArchSuffix
" "
BUILD_REQUIRES=" BUILD_REQUIRES="
@@ -68,31 +70,28 @@ BUILD_REQUIRES="
BUILD_PREREQUIRES=" BUILD_PREREQUIRES="
cmd:cmake cmd:cmake
cmd:gcc$secondaryArchSuffix cmd:gcc$secondaryArchSuffix
cmd:ninja cmd:make
cmd:pkg_config$secondaryArchSuffix cmd:pkg_config$secondaryArchSuffix
" "
BUILD() BUILD()
{ {
mkdir -p ycm_build rm -rf ./third_party/ycmd
mkdir -p $developLibDir ln -sr $sourceDir2 ./third_party/ycmd
cd ycm_build
rm -rf ../third_party/ycmd cmake -B build -S ./third_party/ycmd/cpp \
ln -s ../../../sources-2/ycmd-* ../third_party/ycmd $cmakeDirArgs \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_SKIP_RPATH=ON \
-DUSE_SYSTEM_LIBCLANG=ON \
-DUSE_SYSTEM_ABSEIL=ON
cmake -GNinja $cmakeDirArgs ../third_party/ycmd/cpp \ make -C build $jobArgs ycm_core
-DUSE_SYSTEM_LIBCLANG=ON -DUSE_SYSTEM_ABSEIL=ON \
-DPYTHON_INCLUDE_DIR=/system/develop/headers/python$PYTHON_VERSION \
-DCMAKE_BUILD_TYPE=Release
# This in theory should work, but doesn't, thus the need for $PATCHES_2.
# -DUSE_SYSTEM_LIBCLANG=1
ninja $jobArgs ycm_core
} }
INSTALL() INSTALL()
{ {
vimDir=vim${VIM_VERSION//.} # eg: vim91 vimDir=vim${VIM_VERSION//.} # ie: vim91
mkdir -p $dataDir/vim/$vimDir mkdir -p $dataDir/vim/$vimDir
cp -r autoload doc python plugin $dataDir/vim/$vimDir cp -r autoload doc python plugin $dataDir/vim/$vimDir