2018-01-01 02:20:54 -08:00
|
|
|
# Maintainer: Trent Palmer trenttdually at gmail
|
|
|
|
# Contributor: Victor <victor@xirion.net>
|
|
|
|
# Contributor: Jan-Tarek Butt <tarek AT ring0 DOT de>
|
|
|
|
# Contributor: Erik Beran <eberan AT gmail DOT com>
|
|
|
|
# Contributor: Thor K. H. <thor at roht dot no>
|
|
|
|
# Contributor: Babken Vardanyan <483ken 4tgma1l
|
|
|
|
# Contributor: mikezackles
|
|
|
|
# Contributor: z33ky
|
|
|
|
# Contributor: stykr
|
|
|
|
# Contributor: Svenstaro
|
|
|
|
# Contributor: KaiSforza
|
|
|
|
# Contributor: Simon Gomizelj <simongmzlj@gmail.com>
|
|
|
|
# Contributor: Daniel Micay <danielmicay@gmail.com>
|
|
|
|
# Contributor: shmilee
|
|
|
|
# Contributor: foobster
|
|
|
|
# Contributor: archdria
|
|
|
|
# Contributor: Andy Weidenbaum <archbaum@gmail.com>
|
|
|
|
|
2018-11-28 06:42:07 -08:00
|
|
|
#=========================================================================================================#
|
|
|
|
# Build Options #
|
|
|
|
#=========================================================================================================#
|
2019-07-11 10:24:34 -07:00
|
|
|
# _omnisharp="y" # OmniSharpServer deleted
|
2020-07-19 15:46:48 -07:00
|
|
|
_gocode="y"
|
|
|
|
_use_system_gocode="n"
|
2018-11-28 06:42:07 -08:00
|
|
|
_rust="y"
|
2019-07-28 14:33:40 -07:00
|
|
|
_tern="y"
|
|
|
|
_typescript="y"
|
2018-11-28 06:42:07 -08:00
|
|
|
_java="n"
|
2019-01-30 01:23:45 -08:00
|
|
|
_docs="n"
|
|
|
|
_tests="n"
|
2018-11-28 06:42:07 -08:00
|
|
|
_use_system_clang="ON"
|
|
|
|
_use_python2="OFF"
|
2020-02-13 18:41:09 -08:00
|
|
|
_use_system_python="n" # seems broken
|
2019-07-11 10:24:34 -07:00
|
|
|
_use_OmniSharp_Roslyn="y"
|
2020-07-19 15:46:48 -07:00
|
|
|
_use_system_OmniSharp_Roslyn="n"
|
2020-04-20 11:12:51 -07:00
|
|
|
_use_system_jedi="n"
|
2020-04-15 10:49:37 -07:00
|
|
|
_use_system_python_watchdog="n"
|
2018-01-01 02:20:54 -08:00
|
|
|
|
2018-11-28 06:42:07 -08:00
|
|
|
_neovim="$NEOVIM_YOUCOMPLETEME"
|
|
|
|
#=========================================================================================================#
|
|
|
|
#=========================================================================================================#
|
2018-01-01 02:20:54 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
2018-11-28 06:42:07 -08:00
|
|
|
#=========================================================================================================#
|
|
|
|
# Default PKGBUILD Configuration #
|
|
|
|
#=========================================================================================================#
|
2018-01-01 02:20:54 -08:00
|
|
|
pkgname=vim-youcompleteme-git
|
2024-09-26 04:47:56 -07:00
|
|
|
pkgver=r3226.63ab13e9
|
2018-01-01 02:20:54 -08:00
|
|
|
pkgver() {
|
2019-06-29 20:38:36 -07:00
|
|
|
cd "YouCompleteMe" || exit
|
|
|
|
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
2018-01-01 02:20:54 -08:00
|
|
|
}
|
2018-12-11 23:33:17 -08:00
|
|
|
pkgrel=1
|
2018-01-01 02:20:54 -08:00
|
|
|
pkgdesc="A code-completion engine for Vim"
|
2018-11-28 06:42:07 -08:00
|
|
|
arch=('any')
|
2018-12-04 14:05:24 -08:00
|
|
|
url='https://github.com/Valloric/YouCompleteMe'
|
2018-01-01 02:20:54 -08:00
|
|
|
license=('GPL3')
|
|
|
|
groups=('vim-plugins')
|
2019-04-29 10:35:24 -07:00
|
|
|
depends=('boost' 'boost-libs' 'nodejs' 'vim' 'clang')
|
2018-11-28 06:42:07 -08:00
|
|
|
makedepends=('cmake' 'git' 'make' 'curl')
|
|
|
|
install=install
|
|
|
|
source=(
|
|
|
|
'git+https://github.com/Valloric/YouCompleteMe.git' #ycm
|
2019-11-01 00:53:58 -07:00
|
|
|
'git+https://github.com/ycm-core/ycmd.git' #ycm
|
2019-04-29 10:35:24 -07:00
|
|
|
'git+https://github.com/davidhalter/jedi.git' #jedi
|
|
|
|
'git+https://github.com/davidhalter/parso.git' #jedi
|
2019-11-01 00:53:58 -07:00
|
|
|
'git+https://github.com/davidhalter/typeshed.git' #jedi
|
2020-09-22 01:40:51 -07:00
|
|
|
'git+https://github.com/davidhalter/django-stubs' #jedi
|
2019-04-29 10:35:24 -07:00
|
|
|
'git+https://github.com/numpy/numpydoc' #jedi
|
2024-01-03 23:13:08 -08:00
|
|
|
'git+https://github.com/mrabarnett/mrab-regex'
|
2020-04-15 10:49:37 -07:00
|
|
|
'git+https://github.com/gorakhargosh/watchdog'
|
2018-11-28 06:42:07 -08:00
|
|
|
)
|
2024-07-12 10:58:27 -07:00
|
|
|
sha256sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP')
|
2018-11-28 06:42:07 -08:00
|
|
|
#=========================================================================================================#
|
|
|
|
#=========================================================================================================#
|
2018-01-01 02:20:54 -08:00
|
|
|
|
|
|
|
|
2018-11-28 06:42:07 -08:00
|
|
|
#=========================================================================================================#
|
|
|
|
# Applying PKBUILD Build Options #
|
|
|
|
#=========================================================================================================#
|
2018-01-01 02:20:54 -08:00
|
|
|
|
2020-07-19 15:46:48 -07:00
|
|
|
# find omnisharp-roslyn version by greppin third_party/ycmd/build.py
|
2019-07-11 10:24:34 -07:00
|
|
|
if [[ "$_use_OmniSharp_Roslyn" == "y" ]];then
|
|
|
|
if [[ "$_use_system_OmniSharp_Roslyn" == "n" ]];then
|
2021-11-20 18:17:50 -08:00
|
|
|
source+=('https://github.com/OmniSharp/omnisharp-roslyn/releases/download/v1.37.11/omnisharp-mono.tar.gz')
|
2019-07-11 10:24:34 -07:00
|
|
|
noextract=('omnisharp-mono.tar.gz')
|
2024-07-12 10:58:27 -07:00
|
|
|
sha256sums+=('6060d44229abb27076eeed33d5909c1c69422e52b352c1ce24e0eb1f71d19b48')
|
2019-07-11 10:24:34 -07:00
|
|
|
elif [[ "$_use_system_OmniSharp_Roslyn" == "y" ]];then
|
|
|
|
depends+=('omnisharp-roslyn')
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2019-06-29 20:38:36 -07:00
|
|
|
if [[ "$_gocode" == "y" ]];then
|
|
|
|
makedepends+=('go')
|
2018-11-28 06:42:07 -08:00
|
|
|
fi
|
2018-01-01 02:20:54 -08:00
|
|
|
|
2020-04-18 10:57:33 -07:00
|
|
|
if [[ "$_use_system_gocode" == "y" ]];then
|
|
|
|
makedepends+=('gopls')
|
|
|
|
fi
|
|
|
|
|
2019-07-11 10:24:34 -07:00
|
|
|
if [[ "$_rust" == "y" ]];then
|
2019-06-29 20:38:36 -07:00
|
|
|
# ycmd
|
2019-07-11 10:24:34 -07:00
|
|
|
depends+=('rustup')
|
2018-11-28 06:42:07 -08:00
|
|
|
fi
|
|
|
|
|
2019-07-28 14:33:40 -07:00
|
|
|
if [[ "$_tern" == "y" ]]; then
|
2019-06-29 20:38:36 -07:00
|
|
|
# ycmd
|
|
|
|
makedepends+=('npm')
|
2018-11-28 06:42:07 -08:00
|
|
|
fi
|
|
|
|
|
2019-04-29 10:35:24 -07:00
|
|
|
if [[ "$_use_system_python" == "n" ]]; then
|
2019-06-29 20:38:36 -07:00
|
|
|
if [[ "$_use_python2" == "OFF" ]]; then
|
|
|
|
depends+=('python')
|
|
|
|
elif [[ "$_use_python2" == "ON" ]]; then
|
|
|
|
depends+=('python2')
|
|
|
|
fi
|
2019-04-29 10:35:24 -07:00
|
|
|
elif [[ "$_use_system_python" == "y" ]]; then
|
2019-06-29 20:38:36 -07:00
|
|
|
if [[ "$_use_python2" == "OFF" ]]; then
|
2024-07-12 10:58:27 -07:00
|
|
|
depends+=('python-regex')
|
2019-06-29 20:38:36 -07:00
|
|
|
elif [[ "$_use_python2" == "ON" ]]; then
|
2024-07-12 10:58:27 -07:00
|
|
|
depends+=('python2-regex')
|
2019-06-29 20:38:36 -07:00
|
|
|
fi
|
2019-04-29 10:35:24 -07:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ "$_use_system_jedi" == "y" ]]; then
|
2019-06-29 20:38:36 -07:00
|
|
|
if [[ "$_use_python2" == "OFF" ]]; then
|
|
|
|
depends+=('python-jedi' 'python-parso' 'python-numpydoc')
|
|
|
|
elif [[ "$_use_python2" == "ON" ]]; then
|
|
|
|
depends+=('python2-jedi' 'python2-parso' 'python2-numpydoc')
|
|
|
|
fi
|
2019-04-29 10:35:24 -07:00
|
|
|
fi
|
2020-04-15 10:49:37 -07:00
|
|
|
|
|
|
|
if [[ "$_use_system_python_watchdog" == "y" ]]; then
|
|
|
|
if [[ "$_use_python2" == "OFF" ]]; then
|
2021-04-09 19:45:21 -07:00
|
|
|
depends+=('python-watchdog')
|
2020-04-15 10:49:37 -07:00
|
|
|
elif [[ "$_use_python2" == "ON" ]]; then
|
2021-04-09 19:45:21 -07:00
|
|
|
depends+=('python2-watchdog')
|
2020-04-15 10:49:37 -07:00
|
|
|
fi
|
|
|
|
fi
|
2018-11-28 06:42:07 -08:00
|
|
|
#=========================================================================================================#
|
|
|
|
#=========================================================================================================#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#=========================================================================================================#
|
|
|
|
# Utility Functions #
|
|
|
|
#=========================================================================================================#
|
2018-01-01 02:20:54 -08:00
|
|
|
|
|
|
|
gitprepare() {
|
2019-06-29 20:38:36 -07:00
|
|
|
local cd_dir=$1
|
|
|
|
local git_prefix=$2
|
|
|
|
local c=0
|
|
|
|
for val in "$@" ; do
|
|
|
|
if [ $c -gt 1 ]; then
|
|
|
|
local feed[$c]=$val
|
|
|
|
fi
|
|
|
|
c=$(( c + 1 ))
|
|
|
|
done
|
|
|
|
|
|
|
|
cd "$srcdir/$cd_dir" || exit
|
|
|
|
|
|
|
|
git submodule init
|
|
|
|
for gitsubvar in "${feed[@]}" ; do
|
|
|
|
git config submodule."$git_prefix$gitsubvar".url "$srcdir/$gitsubvar"
|
|
|
|
done
|
|
|
|
|
2022-11-10 02:35:34 -08:00
|
|
|
git submodule--helper update
|
2019-06-29 20:38:36 -07:00
|
|
|
unset -v feed
|
2018-11-28 06:42:07 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
#=========================================================================================================#
|
|
|
|
#=========================================================================================================#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#=========================================================================================================#
|
|
|
|
# Standard PKGBUILD Functions #
|
|
|
|
#=========================================================================================================#
|
|
|
|
|
|
|
|
prepare() {
|
|
|
|
|
2019-06-29 20:38:36 -07:00
|
|
|
# Add the java completion engine dynamically...
|
|
|
|
if [[ "$_java" == "y" ]]; then
|
2018-11-28 06:42:07 -08:00
|
|
|
|
2019-06-29 20:38:36 -07:00
|
|
|
msg2 'Parsing out the JDTLS package version from upstream...'
|
|
|
|
local jdtls_package_name="jdt-language-server"
|
|
|
|
local jdtls_milestone=`egrep '^JDTLS_MILESTONE' "$srcdir/ycmd/build.py" | sed -e "s/.* = //g" -e "s/'//g"`
|
|
|
|
local jdtls_buildstamp=`egrep '^JDTLS_BUILD_STAMP' "$srcdir/ycmd/build.py" | sed -e "s/.* = //g" -e "s/'//g"`
|
|
|
|
if [[ "$jdtls_milestone" != "" ]] && [[ "$jdtls_buildstamp" != "" ]]; then
|
|
|
|
msg2 'JDTLS package version matched. Downloading...'
|
|
|
|
curl -LO http://download.eclipse.org/jdtls/milestones/"${jdtls_milestone}"/"${jdtls_package_name}"-"${jdtls_milestone}"-"${jdtls_buildstamp}".tar.gz
|
|
|
|
tar xf "${jdtls_package_name}"-"${jdtls_milestone}"-"${jdtls_buildstamp}".tar.gz
|
|
|
|
else
|
|
|
|
error 'Mismatched JDTLS version'
|
|
|
|
exit 1
|
|
|
|
fi
|
2018-11-28 06:42:07 -08:00
|
|
|
|
2019-06-29 20:38:36 -07:00
|
|
|
fi
|
2018-11-28 06:42:07 -08:00
|
|
|
|
2019-06-29 20:38:36 -07:00
|
|
|
msg2 'Setting up Git submodules...'
|
2018-11-28 06:42:07 -08:00
|
|
|
|
2021-05-02 22:35:19 -07:00
|
|
|
local YouCompleteMe=("ycmd")
|
2019-04-29 10:35:24 -07:00
|
|
|
|
2019-06-29 20:38:36 -07:00
|
|
|
gitprepare "YouCompleteMe" "third_party/" "${YouCompleteMe[@]}"
|
2018-11-28 06:42:07 -08:00
|
|
|
|
2024-07-12 10:58:27 -07:00
|
|
|
local ycmd=("mrab-regex")
|
2018-11-28 06:42:07 -08:00
|
|
|
|
2019-06-29 20:38:36 -07:00
|
|
|
gitprepare "YouCompleteMe/third_party/ycmd" "third_party/" "${ycmd[@]}"
|
2018-11-28 06:42:07 -08:00
|
|
|
|
2019-06-29 20:38:36 -07:00
|
|
|
local ycmdJediDeps=("jedi" "parso" "numpydoc")
|
|
|
|
gitprepare "YouCompleteMe/third_party/ycmd" "third_party/jedi_deps" "${ycmdJediDeps[@]}"
|
2019-01-30 01:23:45 -08:00
|
|
|
|
2021-04-09 19:45:21 -07:00
|
|
|
local ycmdWatchdogDeps=("watchdog")
|
2020-04-15 10:49:37 -07:00
|
|
|
gitprepare "YouCompleteMe/third_party/ycmd" "third_party/watchdog_deps" "${ycmdWatchdogDeps[@]}"
|
|
|
|
|
2019-07-11 10:24:34 -07:00
|
|
|
if [[ "$_use_OmniSharp_Roslyn" == "y" ]];then
|
|
|
|
if [[ "$_use_system_OmniSharp_Roslyn" == "n" ]];then
|
|
|
|
mkdir -p "$srcdir/omnisharp-roslyn"
|
|
|
|
cd "$srcdir/omnisharp-roslyn" && tar xf ../omnisharp-mono.tar.gz .
|
|
|
|
noextract=('omnisharp-mono.tar.gz')
|
|
|
|
fi
|
2019-06-29 20:38:36 -07:00
|
|
|
fi
|
2018-01-01 02:20:54 -08:00
|
|
|
}
|
|
|
|
|
2018-11-28 06:42:07 -08:00
|
|
|
|
2018-01-01 02:20:54 -08:00
|
|
|
build() {
|
2019-06-29 20:38:36 -07:00
|
|
|
msg2 'Purging unneeded files...'
|
|
|
|
rm -r "$srcdir/YouCompleteMe/python/ycm/tests"
|
|
|
|
|
|
|
|
msg2 'Building ycmd...' # BuildYcmdLibs()
|
|
|
|
mkdir -p "$srcdir/ycmd_build"
|
|
|
|
cd "$srcdir/ycmd_build" || exit
|
|
|
|
cmake -G "Unix Makefiles" -DUSE_PYTHON2=$_use_python2 -DUSE_SYSTEM_LIBCLANG="$_use_system_clang" . "$srcdir/YouCompleteMe/third_party/ycmd/cpp"
|
|
|
|
make ycm_core
|
|
|
|
|
2020-11-14 23:45:02 -08:00
|
|
|
# if [[ "$_use_system_python" == "n" ]]; then
|
|
|
|
# mkdir -p "$srcdir/regex_build"
|
|
|
|
# cd "$srcdir/regex_build" || exit
|
2024-01-03 23:13:08 -08:00
|
|
|
# cmake -G "Unix Makefiles" -DUSE_PYTHON2=$_use_python2 -DUSE_SYSTEM_LIBCLANG="$_use_system_clang" . "$srcdir/YouCompleteMe/third_party/ycmd/third_party/mrab-regex-github"
|
2020-11-14 23:45:02 -08:00
|
|
|
# make _regex
|
|
|
|
# fi
|
2019-07-11 10:24:34 -07:00
|
|
|
|
2020-04-15 10:49:37 -07:00
|
|
|
if [[ "$_use_system_python" == "n" ]]; then
|
|
|
|
cd "$srcdir/YouCompleteMe/third_party/ycmd/third_party/watchdog_deps/watchdog" || { echo "cant cd to watchdog" ; exit ; }
|
|
|
|
python setup.py build --build-base="build/3" --build-lib="build/lib3" || { echo "fail build watchdog" ; exit ; }
|
2024-01-03 23:13:08 -08:00
|
|
|
cd "$srcdir/YouCompleteMe/third_party/ycmd/third_party/mrab-regex-github" || { echo "cant cd to mrab-regex-github" ; exit ; }
|
2020-11-14 23:45:02 -08:00
|
|
|
python setup.py build --build-base="regex-build/3" --build-lib="regex-build" || { echo "fail build watchdog" ; exit ; }
|
2020-04-15 10:49:37 -07:00
|
|
|
fi
|
|
|
|
|
2019-07-11 10:24:34 -07:00
|
|
|
if [[ "$_rust" == "y" ]]; then
|
|
|
|
mkdir -p "$srcdir/rls_build"
|
|
|
|
export RUSTUP_HOME="$srcdir/rls_build"
|
2019-07-28 14:33:40 -07:00
|
|
|
rustup toolchain install nightly-2019-07-18
|
|
|
|
rustup default nightly-2019-07-18
|
2019-07-11 10:24:34 -07:00
|
|
|
rustup component add rls rust-analysis rust-src
|
2019-06-29 20:38:36 -07:00
|
|
|
fi
|
|
|
|
|
2020-04-18 10:57:33 -07:00
|
|
|
if [[ "$_gocode" == "y" && "$_use_system_gocode" == "n" ]]; then
|
|
|
|
mkdir -p "$srcdir/YouCompleteMe/third_party/ycmd/third_party/go" || exit
|
|
|
|
export GO111MODULE=on
|
|
|
|
export GOPATH="$srcdir/YouCompleteMe/third_party/ycmd/third_party/go"
|
|
|
|
msg2 'Building gopls for go completion...' # BuildGoCode()
|
|
|
|
cd "$srcdir/YouCompleteMe/third_party/ycmd/third_party/go" || exit
|
2020-07-19 15:46:48 -07:00
|
|
|
# find gopls version by grepping third_party/ycmd/build.py
|
2024-09-10 18:05:55 -07:00
|
|
|
go install golang.org/x/tools/gopls@v0.16.1
|
2019-06-29 20:38:36 -07:00
|
|
|
else
|
|
|
|
msg2 'Skipping Gocode completer...'
|
|
|
|
fi
|
|
|
|
|
2019-07-28 14:33:40 -07:00
|
|
|
if [[ "$_typescript" == "y" ]]; then
|
|
|
|
cd "$srcdir/YouCompleteMe/third_party/ycmd" || exit
|
|
|
|
mkdir -p "third_party/tsserver" || exit
|
2019-06-29 20:38:36 -07:00
|
|
|
|
2019-07-28 14:33:40 -07:00
|
|
|
if [[ "$_use_python2" == "ON" ]]; then
|
|
|
|
npm install -g --prefix third_party/tsserver typescript --python=python2
|
|
|
|
else
|
|
|
|
npm install -g --prefix third_party/tsserver typescript --python=python3
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
msg2 'Skipping typescript completer...'
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ "$_tern" == "y" ]]; then
|
2019-06-29 20:38:36 -07:00
|
|
|
msg2 'Building Tern completer...' # SetUpTern()
|
|
|
|
cd "$srcdir/YouCompleteMe/third_party/ycmd/third_party/tern_runtime" || exit
|
2019-07-11 10:24:34 -07:00
|
|
|
|
2019-06-29 20:38:36 -07:00
|
|
|
if [[ "$_use_python2" == "ON" ]]; then
|
|
|
|
npm install --production --python=python2
|
|
|
|
else
|
|
|
|
npm install --production --python=python3
|
|
|
|
fi
|
2019-07-11 10:24:34 -07:00
|
|
|
|
2019-06-29 20:38:36 -07:00
|
|
|
else
|
|
|
|
msg2 'Skipping Tern completer...'
|
|
|
|
fi
|
|
|
|
|
2019-07-28 14:33:40 -07:00
|
|
|
|
2019-06-29 20:38:36 -07:00
|
|
|
if [[ "$_java" == "y" ]]; then
|
|
|
|
# Remove stale java completer data if any
|
|
|
|
rm -rf "$srcdir/YouCompleteMe/third_party/ycmd/third_party/eclipse.jdt.ls/target/repository"
|
|
|
|
mkdir -p "$srcdir/YouCompleteMe/third_party/ycmd/third_party/eclipse.jdt.ls/target/repository"
|
|
|
|
mv "$srcdir"/{config_linux,features,plugins} "$srcdir/YouCompleteMe/third_party/ycmd/third_party/eclipse.jdt.ls/target/repository"
|
|
|
|
fi
|
2018-01-01 02:20:54 -08:00
|
|
|
}
|
|
|
|
|
2018-11-28 06:42:07 -08:00
|
|
|
|
2018-01-01 02:20:54 -08:00
|
|
|
package() {
|
2018-11-28 06:42:07 -08:00
|
|
|
|
2019-06-29 20:38:36 -07:00
|
|
|
local vimfiles_dir=usr/share/vim/vimfiles
|
|
|
|
if [[ "$_neovim" == "y" ]]; then
|
|
|
|
vimfiles_dir=usr/share/nvim/runtime
|
|
|
|
fi
|
|
|
|
|
|
|
|
mkdir -p "$pkgdir/$vimfiles_dir/third_party/ycmd/third_party"
|
|
|
|
|
2021-04-09 19:45:21 -07:00
|
|
|
cp -r "$srcdir/YouCompleteMe/third_party/ycmd/"{ycmd,ycm_core.cpython-*-x86_64-linux-gnu.so,CORE_VERSION} \
|
2019-06-29 20:38:36 -07:00
|
|
|
"$pkgdir/$vimfiles_dir/third_party/ycmd"
|
|
|
|
|
|
|
|
cp -r "$srcdir/YouCompleteMe/"{autoload,doc,plugin,python} \
|
|
|
|
"$pkgdir/$vimfiles_dir"
|
|
|
|
|
2019-07-11 10:24:34 -07:00
|
|
|
if [[ "$_use_OmniSharp_Roslyn" == "y" ]];then
|
|
|
|
if [[ "$_use_system_OmniSharp_Roslyn" == "n" ]];then
|
|
|
|
cp -r "$srcdir/omnisharp-roslyn" \
|
|
|
|
"$pkgdir/$vimfiles_dir/third_party/ycmd/third_party/"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ "$_rust" == "y" ]]; then
|
|
|
|
mkdir -p "$pkgdir/$vimfiles_dir/third_party/ycmd/third_party/rls"
|
|
|
|
cp -r "$srcdir/rls_build/toolchains/nightly-"*"/"{bin,etc,lib,share} \
|
|
|
|
"$pkgdir/$vimfiles_dir/third_party/ycmd/third_party/rls"
|
|
|
|
fi
|
|
|
|
|
2019-06-29 20:38:36 -07:00
|
|
|
if [[ "$_use_system_python" == "n" ]]; then
|
|
|
|
|
2024-07-12 10:58:27 -07:00
|
|
|
cp -r "$srcdir/YouCompleteMe/third_party/ycmd/third_party/"{clang,mrab-regex-github} \
|
2019-06-29 20:38:36 -07:00
|
|
|
"$pkgdir/$vimfiles_dir/third_party/ycmd/third_party"
|
|
|
|
|
|
|
|
elif [[ "$_use_system_python" == "y" ]]; then
|
|
|
|
cp -r "$srcdir/YouCompleteMe/third_party/ycmd/third_party/clang" \
|
|
|
|
"$pkgdir/$vimfiles_dir/third_party/ycmd/third_party"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ "$_use_system_jedi" == "n" ]]; then
|
|
|
|
mkdir -p "$pkgdir/$vimfiles_dir/third_party/ycmd/third_party/jedi_deps/"{jedi,parso,numpydoc}
|
|
|
|
cp -r "$srcdir/YouCompleteMe/third_party/ycmd/third_party/jedi_deps/jedi/jedi" \
|
|
|
|
"$pkgdir/$vimfiles_dir/third_party/ycmd/third_party/jedi_deps/jedi/"
|
|
|
|
cp -r "$srcdir/YouCompleteMe/third_party/ycmd/third_party/jedi_deps/parso/parso" \
|
|
|
|
"$pkgdir/$vimfiles_dir/third_party/ycmd/third_party/jedi_deps/parso/"
|
|
|
|
cp -r "$srcdir/YouCompleteMe/third_party/ycmd/third_party/jedi_deps/numpydoc/numpydoc" \
|
|
|
|
"$pkgdir/$vimfiles_dir/third_party/ycmd/third_party/jedi_deps/numpydoc/"
|
|
|
|
fi
|
2020-04-15 10:49:37 -07:00
|
|
|
|
|
|
|
if [[ "$_use_system_python_watchdog" == "n" ]]; then
|
2021-04-09 19:45:21 -07:00
|
|
|
mkdir -p "$pkgdir/$vimfiles_dir/third_party/ycmd/third_party/watchdog_deps/watchdog"
|
2020-04-15 10:49:37 -07:00
|
|
|
cp -r "$srcdir/YouCompleteMe/third_party/ycmd/third_party/watchdog_deps/watchdog" \
|
|
|
|
"$pkgdir/$vimfiles_dir/third_party/ycmd/third_party/watchdog_deps/"
|
|
|
|
fi
|
2019-06-29 20:38:36 -07:00
|
|
|
|
2020-04-18 10:57:33 -07:00
|
|
|
if [[ "$_gocode" == "y" && "$_use_system_gocode" == "n" ]]; then
|
|
|
|
mkdir -p "$pkgdir/$vimfiles_dir/third_party/ycmd/third_party/go"
|
|
|
|
cp -rv "$srcdir/YouCompleteMe/third_party/ycmd/third_party/go/bin" \
|
|
|
|
"$pkgdir/$vimfiles_dir/third_party/ycmd/third_party/go"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ "$_use_system_gocode" == "y" ]]; then
|
|
|
|
mkdir -p "$pkgdir/$vimfiles_dir/third_party/ycmd/third_party/go/bin"
|
|
|
|
ln -s "/usr/bin/gopls" "$pkgdir/$vimfiles_dir/third_party/ycmd/third_party/go/bin/gopls"
|
2019-06-29 20:38:36 -07:00
|
|
|
fi
|
|
|
|
|
2019-07-28 14:33:40 -07:00
|
|
|
if [[ "$_tern" == "y" ]]; then
|
|
|
|
cp -r "$srcdir/YouCompleteMe/third_party/ycmd/third_party/tern_runtime" \
|
|
|
|
"$pkgdir/$vimfiles_dir/third_party/ycmd/third_party"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ "$_typescript" == "y" ]]; then
|
|
|
|
cp -r "$srcdir/YouCompleteMe/third_party/ycmd/third_party/tsserver" \
|
2019-06-29 20:38:36 -07:00
|
|
|
"$pkgdir/$vimfiles_dir/third_party/ycmd/third_party"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ "$_java" == "y" ]]; then
|
|
|
|
mv "$srcdir/YouCompleteMe/third_party/ycmd/third_party/eclipse.jdt.ls" "$pkgdir/$vimfiles_dir/third_party/ycmd/third_party"
|
|
|
|
# Force the java completion engine to create its workspace at /tmp instead which is writeable by every user
|
|
|
|
ln -sf /tmp "$pkgdir/$vimfiles_dir/third_party/ycmd/third_party/eclipse.jdt.ls/workspace"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Remove all the unnecessary git repositories
|
|
|
|
find "$pkgdir" -name '.git*' -exec rm -fr {} +
|
|
|
|
|
|
|
|
# Remove test files
|
|
|
|
if [[ "$_tests" == "n" ]]; then
|
|
|
|
find "$pkgdir" -name tests -exec rm -fr {} +
|
|
|
|
find "$pkgdir" -name 'test' -exec rm -fr {} +
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Remove unneeded docs
|
|
|
|
if [[ "$_docs" == "n" ]]; then
|
2020-04-15 10:49:37 -07:00
|
|
|
# find "$pkgdir" -name docs -exec rm -fr {} + # can't do this anymore because flask-sphinx-themes
|
2019-06-29 20:38:36 -07:00
|
|
|
find "$pkgdir/$vimfiles_dir/third_party/" -name doc -exec rm -fr {} +
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Finally compile all the python files to bytecode.
|
|
|
|
# not sure why this block causes the pkg function to fail unless you add "|| :"
|
|
|
|
if [[ "$_use_python2" == "ON" ]]; then
|
|
|
|
python2 -m compileall "$pkgdir" || :
|
|
|
|
else
|
|
|
|
python3 -m compileall "$pkgdir" || :
|
|
|
|
fi
|
2018-11-28 06:42:07 -08:00
|
|
|
|
2018-01-01 02:20:54 -08:00
|
|
|
}
|
2018-11-28 06:42:07 -08:00
|
|
|
|
|
|
|
#=========================================================================================================#
|
|
|
|
#=========================================================================================================#
|