mirror of
https://github.com/yann64/haikuports.git
synced 2026-03-18 17:35:59 +01:00
youcompleteme: recipe clean ups, switch to libclang 20. (#12492)
This commit is contained in:
@@ -18,7 +18,7 @@ etc.)."
|
||||
HOMEPAGE="https://ycm-core.github.io/YouCompleteMe/"
|
||||
COPYRIGHT="2015-2024 YouCompleteMe contributors"
|
||||
LICENSE="GNU GPL v3"
|
||||
REVISION="1"
|
||||
REVISION="2"
|
||||
gitRevURI="131b1827354871a4e984c1660b6af0fefca755c3"
|
||||
SOURCE_URI="https://github.com/ycm-core/YouCompleteMe/archive/$gitRevURI.zip"
|
||||
SOURCE_DIR="YouCompleteMe-$gitRevURI"
|
||||
@@ -34,19 +34,18 @@ ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
# Use these when updating the recipe for newer versions:
|
||||
CLANG_VERSION=16
|
||||
CLANG_VERSION=20
|
||||
PYTHON_VERSION=3.10
|
||||
pythonPackage=python${PYTHON_VERSION//.}
|
||||
VIM_VERSION=9.1
|
||||
|
||||
PROVIDES="
|
||||
youcompleteme$secondaryArchSuffix = $portVersion
|
||||
lib:ycm_core.cpython_${pyVer}$secondaryArchSuffix
|
||||
"
|
||||
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
cmd:vim >= $VIM_VERSION # set this to == once vim uses compat on its provides.
|
||||
cmd:vim >= $VIM_VERSION
|
||||
bottle_$pythonPackage
|
||||
certifi_$pythonPackage
|
||||
frozendict_$pythonPackage
|
||||
@@ -55,8 +54,11 @@ REQUIRES="
|
||||
requests_$pythonPackage
|
||||
waitress_$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:libclang$secondaryArchSuffix >= $CLANG_VERSION
|
||||
lib:libclang$secondaryArchSuffix
|
||||
lib:libpython$PYTHON_VERSION$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
@@ -68,31 +70,28 @@ BUILD_REQUIRES="
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ninja
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
mkdir -p ycm_build
|
||||
mkdir -p $developLibDir
|
||||
cd ycm_build
|
||||
rm -rf ./third_party/ycmd
|
||||
ln -sr $sourceDir2 ./third_party/ycmd
|
||||
|
||||
rm -rf ../third_party/ycmd
|
||||
ln -s ../../../sources-2/ycmd-* ../third_party/ycmd
|
||||
cmake -B build -S ./third_party/ycmd/cpp \
|
||||
$cmakeDirArgs \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_SKIP_RPATH=ON \
|
||||
-DUSE_SYSTEM_LIBCLANG=ON \
|
||||
-DUSE_SYSTEM_ABSEIL=ON
|
||||
|
||||
cmake -GNinja $cmakeDirArgs ../third_party/ycmd/cpp \
|
||||
-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
|
||||
make -C build $jobArgs ycm_core
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
vimDir=vim${VIM_VERSION//.} # eg: vim91
|
||||
vimDir=vim${VIM_VERSION//.} # ie: vim91
|
||||
|
||||
mkdir -p $dataDir/vim/$vimDir
|
||||
cp -r autoload doc python plugin $dataDir/vim/$vimDir
|
||||
|
||||
Reference in New Issue
Block a user