blob: e5eb62cbcd00d1dbe4a9505c54ccd295b91379f0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
# Maintainer: Alexander 'z33ky' Hirsch <1zeeky@gmail.com>
# Contributor: Yen Chi Hsuan <yan12125@gmail.com>
# The following contributors are from the vim-youcompleteme-git AUR package
# Contributor: Babken Vardanyan <483ken 4tgma1l
# Contributor: stykr
# Contributor: Svenstaro
# Contributor: KaiSforza
# Contributor: Simon Gomizelj <simongmzlj@gmail.com>
# Contributor: Daniel Micay <danielmicay@gmail.com>
# clang completion is builtin and cannot be provided separately (?)
_clang_completer=y
pkgname=neovim-youcompleteme-core-git
pkgver=r2268.d27563d2
pkgrel=2
pkgdesc='A code-completion engine for Vim'
arch=(i686 x86_64)
url='https://valloric.github.io/YouCompleteMe/'
license=('GPL3')
depends=('neovim' 'boost-libs' 'python>=3.2' 'python-bottle' 'python-waitress' 'python-frozendict' 'python-requests-futures' 'python-future' 'python-neovim')
makedepends=('git' 'cmake' 'boost')
optdepends=(
'gocode-git: Go semantic completion'
'godef-git: Go semantic completion'
'nodejs-tern: JavaScript semantic completion'
'racerd-git: Rust semantic completion'
'typescript: Typescript semantic completion'
'python-jedihttp-git: Python semantic completion')
# https://github.com/Valloric/ycmd/pull/213
#'omnisharp-roslyn: C# semantic completion'
source=('git+https://github.com/Valloric/YouCompleteMe.git'
'git+https://github.com/Valloric/ycmd')
sha256sums=('SKIP'
'SKIP')
pkgver() {
cd "${srcdir}/YouCompleteMe"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
if [ "${_clang_completer}" == 'y' ]; then
depends+=('clang')
fi
prepare() {
cd "${srcdir}/YouCompleteMe"
git reset --hard
git -C 'third_party/ycmd' reset --hard
git config submodule.third_party/ycmd.url "${srcdir}/ycmd"
git submodule update --init 'third_party/ycmd'
}
build() {
mkdir -p "${srcdir}/ycmd_build"
cd "${srcdir}/ycmd_build"
cmake_flags="-DUSE_PYTHON2=OFF -DUSE_SYSTEM_BOOST=ON"
if [ "${_clang_completer}" == 'y' ]; then
cmake_flags+=" -DUSE_CLANG_COMPLETER=ON -DUSE_SYSTEM_LIBCLANG=ON"
fi
cmake ${cmake_flags} . "$srcdir/YouCompleteMe/third_party/ycmd/cpp"
make ycm_core
}
package() {
pkg_ycmd_dir="${pkgdir}/usr/share/nvim/runtime/third_party/ycmd"
src_ycmd_dir="${srcdir}/YouCompleteMe/third_party/ycmd"
mkdir -p "${pkg_ycmd_dir}"
cp -r "${srcdir}/YouCompleteMe/"{autoload,doc,plugin,python} "${pkgdir}/usr/share/nvim/runtime"
cp -r "${src_ycmd_dir}/"{ycmd,ycm_core.so,CORE_VERSION} "${pkg_ycmd_dir}"
if [ "${_clang_completer}" == 'y' ]; then
clang_version="$(clang --version|sed -n 's/clang version \([0-9.]\+\) .*/\1/p')"
ln -s "/usr/lib/clang/${clang_version}/include/" "${pkg_ycmd_dir}/clang_includes"
unset clang_version
fi
install -Ddm755 "${pkg_ycmd_dir}/third_party/JediHTTP"
install -Ddm755 "${pkg_ycmd_dir}/third_party/tern_runtime/node_modules/"
install -Ddm755 "${pkg_ycmd_dir}/third_party/gocode/"
install -Ddm755 "${pkg_ycmd_dir}/third_party/godef/"
ln -s /usr/bin/jedihttp "${pkg_ycmd_dir}/third_party/JediHTTP/jedihttp"
ln -s /usr/lib/node_modules/tern "${pkg_ycmd_dir}/third_party/tern_runtime/node_modules/"
ln -s /usr/bin/gocode "${pkg_ycmd_dir}/third_party/gocode/"
ln -s /usr/bin/godef "${pkg_ycmd_dir}/third_party/godef/"
find "${pkgdir}" \( -name .git -or -name 'test*' -or -name 'run_tests.py' -or -name 'CMakeFiles' \) -exec rm -fr {} +
python -m compileall "$pkgdir"
}
|