Files
haikuports/app-vim/youcompleteme/youcompleteme-20241216.recipe

104 lines
3.4 KiB
Bash

SUMMARY="Code-completion engine for Vim"
DESCRIPTION="YouCompleteMe is a fast, as-you-type, fuzzy-search code \
completion engine for Vim. It has several completion engines:
* an identifier-based engine that works with every programming language,
* a Clang-based engine that provides native semantic code completion for \
C/C++/Objective-C/Objective-C++ (from now on referred to as \"the C-family \
languages\"),
* a Jedi-based completion engine for Python 2 and 3 (using the JediHTTP wrapper),
* an OmniSharp-based completion engine for C#,
* a combination of Gocode and Godef semantic engines for Go,
* a TSServer-based completion engine for TypeScript,
* a Tern-based completion engine for JavaScript,
* a racer-based completion engine for Rust,
* a jdt.ls-based experimental completion engine for Java.
* and an omnifunc-based completer that uses data from Vim's omnicomplete \
system to provide semantic completions for many other languages (Ruby, PHP \
etc.)."
HOMEPAGE="https://ycm-core.github.io/YouCompleteMe/"
COPYRIGHT="2015-2024 YouCompleteMe contributors"
LICENSE="GNU GPL v3"
REVISION="2"
gitRevURI="131b1827354871a4e984c1660b6af0fefca755c3"
SOURCE_URI="https://github.com/ycm-core/YouCompleteMe/archive/$gitRevURI.zip"
SOURCE_DIR="YouCompleteMe-$gitRevURI"
CHECKSUM_SHA256="0f65ef821939f6222d29b5658ea42cdef6b40e5c5befce05abef8826711e1865"
gitRevURI_2="a51329a55f02ee3f16218c25ed5ee57b44cfc954"
SOURCE_URI_2="https://github.com/ycm-core/ycmd/archive/$gitRevURI_2.zip"
SOURCE_DIR_2="ycmd-$gitRevURI_2"
CHECKSUM_SHA256_2="997f8a434b359d2980aa1b647feac59766da6de6cfc366b4fced1022ff5de9b9"
PATCHES_2="youcompleteme-$portVersion-source2.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
# Use these when updating the recipe for newer versions:
CLANG_VERSION=20
PYTHON_VERSION=3.10
pythonPackage=python${PYTHON_VERSION//.}
VIM_VERSION=9.1
PROVIDES="
youcompleteme$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
cmd:vim >= $VIM_VERSION
bottle_$pythonPackage
certifi_$pythonPackage
frozendict_$pythonPackage
future_$pythonPackage
requests_futures_$pythonPackage
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
lib:libpython$PYTHON_VERSION$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libabsl_base$secondaryArchSuffix
devel:libclang$secondaryArchSuffix >= $CLANG_VERSION
devel:libpython${PYTHON_VERSION}$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
BUILD()
{
rm -rf ./third_party/ycmd
ln -sr $sourceDir2 ./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
make -C build $jobArgs ycm_core
}
INSTALL()
{
vimDir=vim${VIM_VERSION//.} # ie: vim91
mkdir -p $dataDir/vim/$vimDir
cp -r autoload doc python plugin $dataDir/vim/$vimDir
mkdir -p $dataDir/vim/$vimDir/third_party/ycmd
cp -r third_party/ycmd/ycm_core.cpython-${PYTHON_VERSION//.}.so $dataDir/vim/$vimDir/third_party/ycmd
cp -r third_party/ycmd/ycmd $dataDir/vim/$vimDir/third_party/ycmd/ycmd
cp third_party/ycmd/CORE_VERSION $dataDir/vim/$vimDir/third_party/ycmd/
}