summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilson E. Alvarez2018-09-11 17:28:05 -0400
committerWilson E. Alvarez2018-09-11 19:00:39 -0400
commitc661dc25dca7dd33d70be0cbda94a001c320be3d (patch)
treef82bae8209339bec80013041854160ec1a613f5c
parent70b55e83867078a9cac739750b2b801fd4815c60 (diff)
downloadaur-c661dc25dca7dd33d70be0cbda94a001c320be3d.tar.gz
Refactored dependencies. Added Java completer.
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD152
-rw-r--r--install.sh (renamed from install)0
3 files changed, 127 insertions, 42 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 21c5aa9a7a25..c868d087b1f7 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
pkgbase = vim-youcompleteme-git
pkgdesc = A code-completion engine for Vim
- pkgver = 2373.15362d9c
+ pkgver = r2393.487b8ab2
pkgrel = 1
url = http://valloric.github.com/YouCompleteMe/
- install = install
+ install = install.sh
arch = i686
arch = x86_64
groups = vim-plugins
@@ -11,20 +11,19 @@ pkgbase = vim-youcompleteme-git
makedepends = cargo
makedepends = cmake
makedepends = git
- makedepends = go
makedepends = make
+ makedepends = go
makedepends = mono
- makedepends = npm
depends = boost
depends = boost-libs
depends = ncurses5-compat-libs
- depends = mono
- depends = nodejs
depends = python
depends = python2
- depends = rust
+ depends = nodejs
depends = vim
depends = clang
+ depends = mono
+ depends = rust
source = git+https://github.com/Valloric/YouCompleteMe.git
source = git+https://github.com/ross/requests-futures.git
source = git+https://github.com/Valloric/ycmd.git
@@ -35,12 +34,13 @@ pkgbase = vim-youcompleteme-git
source = git+https://github.com/davidhalter/jedi.git
source = git+https://github.com/davidhalter/parso.git
source = git+https://github.com/Pylons/waitress.git
- source = git+https://github.com/nsf/gocode.git
source = git+https://github.com/Manishearth/godef.git
+ source = git+https://github.com/nsf/gocode.git
source = git+https://github.com/nosami/OmniSharpServer.git
source = git+https://github.com/icsharpcode/NRefactory.git
source = git+https://github.com/jbevain/cecil.git
source = git+https://github.com/jwilm/racerd.git
+ source = http://download.eclipse.org/jdtls/milestones/0.18.0/jdt-language-server-0.18.0-201805010001.tar.gz
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
@@ -57,6 +57,7 @@ pkgbase = vim-youcompleteme-git
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
+ sha256sums = 9253d4222519442b65b4a01516c9496354b59813d906357a5f3f265601cc77db
pkgname = vim-youcompleteme-git
diff --git a/PKGBUILD b/PKGBUILD
index 8c6dfe04c3bc..3272e85b53b3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -17,27 +17,32 @@
# Contributor: archdria
# Contributor: Andy Weidenbaum <archbaum@gmail.com>
-###########################################################################################################
-# Build Options
-###########################################################################################################
-_omnisharp="y"
-_gocode="y"
+#=========================================================================================================#
+# Build Options #
+#=========================================================================================================#
+_omnisharp="y"
+_gocode="y"
_rust="y"
-
_tern="y"
-
-_completer="ON"
+_java="y"
+_use_system_clang="ON"
_neovim="$NEOVIM_YOUCOMPLETEME"
-###########################################################################################################
+#=========================================================================================================#
+#=========================================================================================================#
+
+
+#=========================================================================================================#
+# Default PKGBUILD Configuration #
+#=========================================================================================================#
pkgname=vim-youcompleteme-git
-pkgver=2373.15362d9c
+pkgver=r2393.487b8ab2
pkgver() {
cd "YouCompleteMe" || exit
- echo "$(git rev-list --count master).$(git rev-parse --short master)"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
pkgrel=1
pkgdesc="A code-completion engine for Vim"
@@ -45,8 +50,9 @@ arch=('i686' 'x86_64')
url='http://valloric.github.com/YouCompleteMe/'
license=('GPL3')
groups=('vim-plugins')
-depends=('boost' 'boost-libs' 'ncurses5-compat-libs' 'mono' 'nodejs' 'python' 'python2' 'rust' 'vim' 'clang')
-makedepends=('cargo' 'cmake' 'git' 'go' 'make' 'mono' 'npm')
+depends=('boost' 'boost-libs' 'ncurses5-compat-libs' 'python' 'python2' 'nodejs' 'vim' 'clang')
+makedepends=('cargo' 'cmake' 'git' 'make')
+install=install.sh
source=(
'git+https://github.com/Valloric/YouCompleteMe.git' #ycm
'git+https://github.com/ross/requests-futures.git' #ycm
@@ -58,39 +64,69 @@ source=(
'git+https://github.com/davidhalter/jedi.git' #jedi
'git+https://github.com/davidhalter/parso.git' #jedi
'git+https://github.com/Pylons/waitress.git' #ycmd,jediHTTP
-'git+https://github.com/nsf/gocode.git' #ycmd
'git+https://github.com/Manishearth/godef.git' #ycmd
-'git+https://github.com/nosami/OmniSharpServer.git' #ycmd
-'git+https://github.com/icsharpcode/NRefactory.git' #OmniSharpServer
-'git+https://github.com/jbevain/cecil.git' #OmniSharpServer
-'git+https://github.com/jwilm/racerd.git' #ycmd
)
-sha256sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP')
-install=install
+sha256sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP')
+#=========================================================================================================#
+#=========================================================================================================#
-prepare() {
- msg2 'Setting up Git submodules...'
- YouCompleteMe=("requests-futures" "ycmd")
- gitprepare "YouCompleteMe" "third_party/" "${YouCompleteMe[@]}"
- ycmd=("bottle" "python-frozendict" "python-future" "waitress" "gocode" "godef" "OmniSharpServer" "requests" "racerd")
- gitprepare "YouCompleteMe/third_party/ycmd" "third_party/" "${ycmd[@]}"
+#=========================================================================================================#
+# Applying PKBUILD Build Options #
+#=========================================================================================================#
- Jedi=("waitress" "jedi" "bottle" "parso")
- gitprepare "YouCompleteMe/third_party/ycmd/third_party/jedi" "vendor/" "${Jedi[@]}"
+if [[ "$_gocode" == "y" ]]; then
+ # ycmd
+ source+=('git+https://github.com/nsf/gocode.git')
+ sha256sums+=('SKIP')
+ makedepends+=('go')
+fi
- OmniSharpServer=("NRefactory" "cecil")
- gitprepare "YouCompleteMe/third_party/ycmd/third_party/OmniSharpServer" "" "${OmniSharpServer[@]}"
-}
+
+if [[ "$_omnisharp" == "y" ]]; then
+ source+=( 'git+https://github.com/nosami/OmniSharpServer.git' #ycmd
+ 'git+https://github.com/icsharpcode/NRefactory.git' #OmniSharpServer
+ 'git+https://github.com/jbevain/cecil.git' #OmniSharpServer
+ )
+ sha256sums+=('SKIP' 'SKIP' 'SKIP')
+ depends+=('mono')
+ makedepends+=('mono')
+fi
+
+if [[ "$_rust" == "y" ]]; then
+ # ycmd
+ source+=( 'git+https://github.com/jwilm/racerd.git')
+ sha256sums+=('SKIP')
+ depends+=('rust')
+fi
+
+if [[ "$_tern" == "y" ]]; then
+ # ycmd
+ wakedepends+=('npm')
+fi
+
+if [[ "$_java" == "y" ]]; then
+ source+=("http://download.eclipse.org/jdtls/milestones/0.18.0/jdt-language-server-0.18.0-201805010001.tar.gz")
+ sha256sums+=('9253d4222519442b65b4a01516c9496354b59813d906357a5f3f265601cc77db')
+fi
+
+#=========================================================================================================#
+#=========================================================================================================#
+
+
+
+#=========================================================================================================#
+# Utility Functions #
+#=========================================================================================================#
gitprepare() {
local CD_DIR=$1
local GIT_PREFIX=$2
- c=0
+ local c=0
for val in "$@" ; do
if [ $c -gt 1 ]; then
- FEED[$c]=$val
+ local FEED[$c]=$val
fi
c=$(( c + 1 ))
done
@@ -101,16 +137,47 @@ gitprepare() {
for GITSUBVAR in "${FEED[@]}" ; do
git config submodule."$GIT_PREFIX$GITSUBVAR".url "$srcdir/$GITSUBVAR"
done
+
git submodule update
unset -v FEED
}
+#=========================================================================================================#
+#=========================================================================================================#
+
+
+
+#=========================================================================================================#
+# Standard PKGBUILD Functions #
+#=========================================================================================================#
+
+
+prepare() {
+ msg2 'Setting up Git submodules...'
+
+ local YouCompleteMe=("requests-futures" "ycmd")
+ gitprepare "YouCompleteMe" "third_party/" "${YouCompleteMe[@]}"
+
+ local ycmd=("bottle" "python-frozendict" "python-future" "waitress" "OmniSharpServer" "requests" "racerd")
+ if [[ $_gocode == "y" ]]; then
+ ycmd+=("gocode" "godef")
+ fi
+ gitprepare "YouCompleteMe/third_party/ycmd" "third_party/" "${ycmd[@]}"
+
+ local Jedi=("waitress" "jedi" "bottle" "parso")
+ gitprepare "YouCompleteMe/third_party/ycmd/third_party/jedi" "vendor/" "${Jedi[@]}"
+
+ local OmniSharpServer=("NRefactory" "cecil")
+ gitprepare "YouCompleteMe/third_party/ycmd/third_party/OmniSharpServer" "" "${OmniSharpServer[@]}"
+}
+
build() {
+
#rm -rf $srcdir/YouCompleteMe/python/ycm/tests
msg2 'Building ycmd...' # BuildYcmdLibs()
mkdir -p "$srcdir/ycmd_build"
cd "$srcdir/ycmd_build" || exit
- cmake -G "Unix Makefiles" -DUSE_SYSTEM_LIBCLANG="$_completer" . "$srcdir/YouCompleteMe/third_party/ycmd/cpp"
+ cmake -G "Unix Makefiles" -DUSE_SYSTEM_LIBCLANG="$_use_system_clang" . "$srcdir/YouCompleteMe/third_party/ycmd/cpp"
make ycm_core
if [ "$_omnisharp" = "y" ]; then
@@ -151,8 +218,16 @@ build() {
else
msg2 'Skipping Tern completer...'
fi
+
+ 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
}
+
package() {
local vimfiles_dir=usr/share/vim/vimfiles
@@ -197,7 +272,16 @@ package() {
"$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
+
find "$pkgdir" -name .git -exec rm -fr {} +
rm -rf "$pkgdir/$vimfiles_dir/third_party/ycmd/ycmd/tests"
}
+
+#=========================================================================================================#
+#=========================================================================================================#
diff --git a/install b/install.sh
index aec3bdf69f92..aec3bdf69f92 100644
--- a/install
+++ b/install.sh