mirror of
https://github.com/TrentSPalmer/aur-packages.git
synced 2024-11-22 03:11:30 -08:00
rebase youcompleteme PKGBUILD from https://aur.archlinux.org/packages/vim-youcompleteme-git
This commit is contained in:
parent
e13a2ef0a6
commit
5986f57572
@ -1,25 +1,30 @@
|
|||||||
pkgbase = vim-youcompleteme-git
|
pkgbase = vim-youcompleteme-git
|
||||||
pkgdesc = A code-completion engine for Vim
|
pkgdesc = A code-completion engine for Vim
|
||||||
pkgver = 2373.15362d9c
|
pkgver = r2439.75bf1738
|
||||||
pkgrel = 1
|
pkgrel = 1
|
||||||
url = https://github.com/Valloric/YouCompleteMe
|
url = http://valloric.github.com/YouCompleteMe/
|
||||||
install = install
|
install = install
|
||||||
arch = i686
|
arch = any
|
||||||
arch = x86_64
|
|
||||||
arch = armv7h
|
|
||||||
groups = vim-plugins
|
groups = vim-plugins
|
||||||
license = GPL3
|
license = GPL3
|
||||||
makedepends = cmake
|
makedepends = cmake
|
||||||
makedepends = git
|
makedepends = git
|
||||||
makedepends = make
|
makedepends = make
|
||||||
|
makedepends = curl
|
||||||
|
makedepends = go
|
||||||
|
makedepends = mono
|
||||||
|
makedepends = cargo
|
||||||
|
makedepends = npm
|
||||||
depends = boost
|
depends = boost
|
||||||
depends = boost-libs
|
depends = boost-libs
|
||||||
depends = ncurses5-compat-libs
|
depends = ncurses5-compat-libs
|
||||||
depends = python
|
depends = python
|
||||||
depends = python2
|
depends = python2
|
||||||
|
depends = nodejs
|
||||||
depends = vim
|
depends = vim
|
||||||
depends = clang
|
depends = clang
|
||||||
provides = vim-youcompleteme
|
depends = mono
|
||||||
|
depends = rust
|
||||||
source = git+https://github.com/Valloric/YouCompleteMe.git
|
source = git+https://github.com/Valloric/YouCompleteMe.git
|
||||||
source = git+https://github.com/ross/requests-futures.git
|
source = git+https://github.com/ross/requests-futures.git
|
||||||
source = git+https://github.com/Valloric/ycmd.git
|
source = git+https://github.com/Valloric/ycmd.git
|
||||||
@ -30,7 +35,17 @@ pkgbase = vim-youcompleteme-git
|
|||||||
source = git+https://github.com/davidhalter/jedi.git
|
source = git+https://github.com/davidhalter/jedi.git
|
||||||
source = git+https://github.com/davidhalter/parso.git
|
source = git+https://github.com/davidhalter/parso.git
|
||||||
source = git+https://github.com/Pylons/waitress.git
|
source = git+https://github.com/Pylons/waitress.git
|
||||||
source = git+https://github.com/micbou/regex.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
|
||||||
|
sha256sums = SKIP
|
||||||
|
sha256sums = SKIP
|
||||||
|
sha256sums = SKIP
|
||||||
|
sha256sums = SKIP
|
||||||
|
sha256sums = SKIP
|
||||||
sha256sums = SKIP
|
sha256sums = SKIP
|
||||||
sha256sums = SKIP
|
sha256sums = SKIP
|
||||||
sha256sums = SKIP
|
sha256sums = SKIP
|
||||||
|
@ -16,203 +16,324 @@
|
|||||||
# Contributor: archdria
|
# Contributor: archdria
|
||||||
# Contributor: Andy Weidenbaum <archbaum@gmail.com>
|
# Contributor: Andy Weidenbaum <archbaum@gmail.com>
|
||||||
|
|
||||||
###########################################################################################################
|
#=========================================================================================================#
|
||||||
# Build Options
|
# Build Options #
|
||||||
###########################################################################################################
|
#=========================================================================================================#
|
||||||
# change all build options to no by default
|
_omnisharp="y"
|
||||||
_omnisharp="n"
|
_gocode="y"
|
||||||
|
_rust="y"
|
||||||
|
_tern="y"
|
||||||
|
_java="n"
|
||||||
|
_use_system_clang="ON"
|
||||||
|
_use_python2="OFF"
|
||||||
|
|
||||||
_gocode="n"
|
_neovim="$NEOVIM_YOUCOMPLETEME"
|
||||||
|
#=========================================================================================================#
|
||||||
|
#=========================================================================================================#
|
||||||
|
|
||||||
_rust="n"
|
|
||||||
|
|
||||||
_tern="n"
|
|
||||||
|
|
||||||
_completer="ON"
|
|
||||||
|
|
||||||
###########################################################################################################
|
|
||||||
|
|
||||||
|
#=========================================================================================================#
|
||||||
|
# Default PKGBUILD Configuration #
|
||||||
|
#=========================================================================================================#
|
||||||
pkgname=vim-youcompleteme-git
|
pkgname=vim-youcompleteme-git
|
||||||
pkgver=2373.15362d9c
|
pkgver=r2439.75bf1738
|
||||||
pkgver() {
|
pkgver() {
|
||||||
cd "YouCompleteMe" || exit
|
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
|
pkgrel=1
|
||||||
pkgdesc="A code-completion engine for Vim"
|
pkgdesc="A code-completion engine for Vim"
|
||||||
|
arch=('any')
|
||||||
arch=('i686' 'x86_64' 'armv7h')
|
url='http://valloric.github.com/YouCompleteMe/'
|
||||||
url='https://github.com/Valloric/YouCompleteMe'
|
|
||||||
license=('GPL3')
|
license=('GPL3')
|
||||||
groups=('vim-plugins')
|
groups=('vim-plugins')
|
||||||
provides=('vim-youcompleteme')
|
depends=('boost' 'boost-libs' 'ncurses5-compat-libs' 'python' 'python2' 'nodejs' 'vim' 'clang')
|
||||||
conflicts=('')
|
makedepends=('cmake' 'git' 'make' 'curl')
|
||||||
|
|
||||||
depends=('boost' 'boost-libs' 'ncurses5-compat-libs' 'python' 'python2' 'vim' 'clang')
|
|
||||||
[[ "$_omnisharp" = "y" ]] && depends+=('mono')
|
|
||||||
[[ "$_rust" = "y" ]] && depends+=('rust')
|
|
||||||
[[ "$_tern" = "y" ]] && depends+=('nodejs')
|
|
||||||
|
|
||||||
makedepends=('cmake' 'git' 'make')
|
|
||||||
[[ "$_omnisharp" = "y" ]] && makedepends+=('mono')
|
|
||||||
[[ "$_rust" = "y" ]] && makedepends+=('cargo')
|
|
||||||
[[ "$_tern" = "y" ]] && makedepends+=('npm')
|
|
||||||
[[ "$_gocode" = "y" ]] && makedepends+=('go')
|
|
||||||
|
|
||||||
# source=('git+https://github.com/Valloric/YouCompleteMe.git#commit=1080a310274b546a6e7a6ae87aa6c7ea2fa646e7' #ycm
|
|
||||||
source=('git+https://github.com/Valloric/YouCompleteMe.git' #ycm
|
|
||||||
'git+https://github.com/ross/requests-futures.git' #ycm
|
|
||||||
'git+https://github.com/Valloric/ycmd.git' #ycm
|
|
||||||
'git+https://github.com/kennethreitz/requests.git' #ycmd
|
|
||||||
'git+https://github.com/bottlepy/bottle.git' #ycmd
|
|
||||||
'git+https://github.com/slezica/python-frozendict.git' #ycmd
|
|
||||||
'git+https://github.com/PythonCharmers/python-future.git' #ycmd
|
|
||||||
'git+https://github.com/davidhalter/jedi.git' #ycmd
|
|
||||||
'git+https://github.com/davidhalter/parso.git' #ycmd
|
|
||||||
'git+https://github.com/Pylons/waitress.git' #ycmd
|
|
||||||
'git+https://github.com/micbou/regex.git' #ycmd
|
|
||||||
)
|
|
||||||
|
|
||||||
[[ "$_omnisharp" = "y" ]] && source+=('git+https://github.com/icsharpcode/NRefactory.git' #OmniSharpServer
|
|
||||||
'git+https://github.com/jbevain/cecil.git' #OmniSharpServer
|
|
||||||
'git+https://github.com/nosami/OmniSharpServer.git' #ycmd
|
|
||||||
)
|
|
||||||
[[ "$_rust" = "y" ]] && source+=('git+https://github.com/jwilm/racerd.git' #ycmd
|
|
||||||
)
|
|
||||||
[[ "$_gocode" = "y" ]] && source+=('git+https://github.com/nsf/gocode.git' #ycmd
|
|
||||||
'git+https://github.com/Manishearth/godef.git' #ycmd
|
|
||||||
)
|
|
||||||
sha256sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP')
|
|
||||||
|
|
||||||
[[ "$_omnisharp" = "y" ]] && sha256sums+=('SKIP' 'SKIP' 'SKIP')
|
|
||||||
[[ "$_rust" = "y" ]] && sha256sums+=('SKIP')
|
|
||||||
[[ "$_gocode" = "y" ]] && sha256sums+=('SKIP' 'SKIP')
|
|
||||||
|
|
||||||
install=install
|
install=install
|
||||||
|
source=(
|
||||||
|
'git+https://github.com/Valloric/YouCompleteMe.git' #ycm
|
||||||
|
'git+https://github.com/ross/requests-futures.git' #ycm
|
||||||
|
'git+https://github.com/Valloric/ycmd.git' #ycm
|
||||||
|
'git+https://github.com/kennethreitz/requests.git' #ycmd
|
||||||
|
'git+https://github.com/bottlepy/bottle.git' #ycmd
|
||||||
|
'git+https://github.com/slezica/python-frozendict.git' #ycmd
|
||||||
|
'git+https://github.com/PythonCharmers/python-future.git' #ycmd
|
||||||
|
'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/Manishearth/godef.git' #ycmd
|
||||||
|
)
|
||||||
|
sha256sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP')
|
||||||
|
#=========================================================================================================#
|
||||||
|
#=========================================================================================================#
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#=========================================================================================================#
|
||||||
|
# Applying PKBUILD Build Options #
|
||||||
|
#=========================================================================================================#
|
||||||
|
|
||||||
|
if [[ "$_gocode" == "y" ]]; then
|
||||||
|
# ycmd
|
||||||
|
source+=('git+https://github.com/nsf/gocode.git')
|
||||||
|
sha256sums+=('SKIP')
|
||||||
|
makedepends+=('go')
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
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')
|
||||||
|
makedepends+=('cargo')
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$_tern" == "y" ]]; then
|
||||||
|
# ycmd
|
||||||
|
makedepends+=('npm')
|
||||||
|
fi
|
||||||
|
|
||||||
|
#=========================================================================================================#
|
||||||
|
#=========================================================================================================#
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#=========================================================================================================#
|
||||||
|
# Utility Functions #
|
||||||
|
#=========================================================================================================#
|
||||||
|
|
||||||
|
gitprepare() {
|
||||||
|
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
|
||||||
|
|
||||||
|
git submodule update
|
||||||
|
unset -v feed
|
||||||
|
}
|
||||||
|
|
||||||
|
#=========================================================================================================#
|
||||||
|
#=========================================================================================================#
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#=========================================================================================================#
|
||||||
|
# Standard PKGBUILD Functions #
|
||||||
|
#=========================================================================================================#
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
|
|
||||||
|
# Add the java completion engine dynamically...
|
||||||
|
if [[ "$_java" == "y" ]]; then
|
||||||
|
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
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
msg2 'Setting up Git submodules...'
|
msg2 'Setting up Git submodules...'
|
||||||
|
|
||||||
YouCompleteMe=("requests-futures" "ycmd")
|
local YouCompleteMe=("requests-futures" "ycmd")
|
||||||
gitprepare "YouCompleteMe" "third_party/" "${YouCompleteMe[@]}"
|
gitprepare "YouCompleteMe" "third_party/" "${YouCompleteMe[@]}"
|
||||||
|
|
||||||
ycmd=("bottle" "python-frozendict" "python-future" "waitress" "requests" "jedi" "parso" "regex")
|
local ycmd=("bottle" "python-frozendict" "python-future" "waitress" "requests")
|
||||||
[[ "$_omnisharp" = "y" ]] && ycmd+=("OmniSharpServer")
|
|
||||||
[[ "$_rust" = "y" ]] && ycmd+=("racerd")
|
if [[ "$_gocode" == "y" ]]; then
|
||||||
[[ "$_gocode" = "y" ]] && ycmd+=("gocode" "godef")
|
ycmd+=("gocode" "godef")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$_omnisharp" == "y" ]]; then
|
||||||
|
ycmd+=("OmniSharpServer")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$_rust" == "y" ]]; then
|
||||||
|
ycmd+=("racerd")
|
||||||
|
fi
|
||||||
|
|
||||||
gitprepare "YouCompleteMe/third_party/ycmd" "third_party/" "${ycmd[@]}"
|
gitprepare "YouCompleteMe/third_party/ycmd" "third_party/" "${ycmd[@]}"
|
||||||
|
|
||||||
if [ "$_omnisharp" = "y" ]; then
|
local Jedi=("waitress" "jedi" "bottle" "parso")
|
||||||
OmniSharpServer=("NRefactory" "cecil")
|
gitprepare "YouCompleteMe/third_party/ycmd/third_party/jedi" "vendor/" "${Jedi[@]}"
|
||||||
|
|
||||||
|
if [[ "$_omnisharp" == "y" ]]; then
|
||||||
|
local OmniSharpServer=("NRefactory" "cecil")
|
||||||
gitprepare "YouCompleteMe/third_party/ycmd/third_party/OmniSharpServer" "" "${OmniSharpServer[@]}"
|
gitprepare "YouCompleteMe/third_party/ycmd/third_party/OmniSharpServer" "" "${OmniSharpServer[@]}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
gitprepare() {
|
|
||||||
CD_DIR=$1
|
|
||||||
GIT_PREFIX=$2
|
|
||||||
c=0
|
|
||||||
for val in "$@" ; do
|
|
||||||
if [ $c -gt 1 ]; then
|
|
||||||
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
|
|
||||||
git submodule update
|
|
||||||
unset -v FEED
|
|
||||||
}
|
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
|
msg2 'Purging unneeded files...'
|
||||||
|
rm -r "$srcdir/YouCompleteMe/python/ycm/tests"
|
||||||
|
|
||||||
msg2 'Building ycmd...' # BuildYcmdLibs()
|
msg2 'Building ycmd...' # BuildYcmdLibs()
|
||||||
mkdir -p "$srcdir/ycmd_build"
|
mkdir -p "$srcdir/ycmd_build"
|
||||||
cd "$srcdir/ycmd_build" || exit
|
cd "$srcdir/ycmd_build" || exit
|
||||||
cmake -G "Unix Makefiles" -DUSE_SYSTEM_LIBCLANG="$_completer" . "$srcdir/YouCompleteMe/third_party/ycmd/cpp"
|
cmake -G "Unix Makefiles" -DUSE_PYTHON2=$_use_python2 -DUSE_SYSTEM_LIBCLANG="$_use_system_clang" . "$srcdir/YouCompleteMe/third_party/ycmd/cpp"
|
||||||
make ycm_core
|
make ycm_core
|
||||||
|
|
||||||
if [ "$_omnisharp" = "y" ]; then
|
if [[ "$_omnisharp" == "y" ]]; then
|
||||||
msg2 'Building OmniSharp completer...' # BuildOmniSharp()
|
msg2 'Building OmniSharp completer...' # BuildOmniSharp()
|
||||||
cd "$srcdir/YouCompleteMe/third_party/ycmd/third_party/OmniSharpServer" || exit
|
cd "$srcdir/YouCompleteMe/third_party/ycmd/third_party/OmniSharpServer" || exit
|
||||||
pwd
|
|
||||||
xbuild /property:Configuration=Release
|
xbuild /property:Configuration=Release
|
||||||
else
|
else
|
||||||
msg2 'Skipping OmniSharp completer...'
|
msg2 'Skipping OmniSharp completer...'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$_gocode" = "y" ]; then
|
if [[ "$_gocode" == "y" ]]; then
|
||||||
|
export GOPATH="$GOPATH:$srcdir/YouCompleteMe/third_party/ycmd/third_party/go"
|
||||||
msg2 'Building Gocode completer...' # BuildGoCode()
|
msg2 'Building Gocode completer...' # BuildGoCode()
|
||||||
cd "$srcdir/YouCompleteMe/third_party/ycmd/third_party/gocode" || exit
|
cd "$srcdir/YouCompleteMe/third_party/ycmd/third_party/go/src/github.com/mdempsky/gocode" || exit
|
||||||
pwd
|
|
||||||
go build
|
go build
|
||||||
cd "$srcdir/YouCompleteMe/third_party/ycmd/third_party/godef" || exit
|
cd "$srcdir/YouCompleteMe/third_party/ycmd/third_party/go/src/github.com/rogpeppe/godef" || exit
|
||||||
pwd
|
|
||||||
go build
|
go build
|
||||||
else
|
else
|
||||||
msg2 'Skipping Gocode completer...'
|
msg2 'Skipping Gocode completer...'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$_rust" = "y" ]; then
|
if [[ "$_rust" == "y" ]]; then
|
||||||
msg2 'Building Rust completer...' # BuildRacerd()
|
msg2 'Building Rust completer...' # BuildRacerd()
|
||||||
cd "$srcdir/YouCompleteMe/third_party/ycmd/third_party/racerd" || exit
|
cd "$srcdir/YouCompleteMe/third_party/ycmd/third_party/racerd" || exit
|
||||||
pwd
|
|
||||||
cargo build --release
|
cargo build --release
|
||||||
else
|
else
|
||||||
msg2 'Skipping Rust completer...'
|
msg2 'Skipping Rust completer...'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$_tern" = "y" ]; then
|
if [[ "$_tern" == "y" ]]; then
|
||||||
msg2 'Building Tern completer...' # SetUpTern()
|
msg2 'Building Tern completer...' # SetUpTern()
|
||||||
cd "$srcdir/YouCompleteMe/third_party/ycmd/third_party/tern_runtime" || exit
|
cd "$srcdir/YouCompleteMe/third_party/ycmd/third_party/tern_runtime" || exit
|
||||||
pwd
|
if [[ "$_use_python2" == "ON" ]]; then
|
||||||
npm install --production --python=python2
|
npm install --production --python=python2
|
||||||
|
else
|
||||||
|
npm install --production --python=python3
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
msg2 'Skipping Tern completer...'
|
msg2 'Skipping Tern completer...'
|
||||||
fi
|
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() {
|
package() {
|
||||||
mkdir -p "$pkgdir/usr/share/vim/vimfiles/third_party/ycmd/third_party"
|
|
||||||
|
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"
|
||||||
|
|
||||||
cp -r "$srcdir/YouCompleteMe/"{autoload,doc,plugin,python} \
|
cp -r "$srcdir/YouCompleteMe/"{autoload,doc,plugin,python} \
|
||||||
"$pkgdir/usr/share/vim/vimfiles"
|
"$pkgdir/$vimfiles_dir"
|
||||||
cp -r "$srcdir/YouCompleteMe/third_party/"{pythonfutures,requests-futures} \
|
cp -r "$srcdir/YouCompleteMe/third_party/"{pythonfutures,requests-futures} \
|
||||||
"$pkgdir/usr/share/vim/vimfiles/third_party"
|
"$pkgdir/$vimfiles_dir/third_party"
|
||||||
cp -r "$srcdir/YouCompleteMe/third_party/ycmd/"{ycmd,ycm_core.so,CORE_VERSION,cpp,clang_includes} \
|
cp -r "$srcdir/YouCompleteMe/third_party/ycmd/"{ycmd,ycm_core.so,CORE_VERSION,clang_includes} \
|
||||||
"$pkgdir/usr/share/vim/vimfiles/third_party/ycmd"
|
"$pkgdir/$vimfiles_dir/third_party/ycmd"
|
||||||
cp -r "$srcdir/YouCompleteMe/third_party/ycmd/third_party/"{bottle,parso,frozendict,jedi,python-future,requests,waitress,cregex} \
|
cp -r "$srcdir/YouCompleteMe/third_party/ycmd/third_party/"{bottle,parso,frozendict,jedi,python-future,requests,waitress} \
|
||||||
"$pkgdir/usr/share/vim/vimfiles/third_party/ycmd/third_party"
|
"$pkgdir/$vimfiles_dir/third_party/ycmd/third_party"
|
||||||
|
|
||||||
if [ "$_omnisharp" = "y" ]; then
|
if [[ "$_omnisharp" == "y" ]]; then
|
||||||
mkdir -p "$pkgdir/usr/share/vim/vimfiles/third_party/ycmd/third_party/OmniSharpServer/OmniSharp/bin/Release"
|
mkdir -p "$pkgdir/$vimfiles_dir/third_party/ycmd/third_party/OmniSharpServer/OmniSharp/bin/Release"
|
||||||
cp -r "$srcdir/YouCompleteMe/third_party/ycmd/third_party/OmniSharpServer/OmniSharp/bin/Release" \
|
cp -r "$srcdir/YouCompleteMe/third_party/ycmd/third_party/OmniSharpServer/OmniSharp/bin/Release" \
|
||||||
"$pkgdir/usr/share/vim/vimfiles/third_party/ycmd/third_party/OmniSharpServer/OmniSharp/bin"
|
"$pkgdir/$vimfiles_dir/third_party/ycmd/third_party/OmniSharpServer/OmniSharp/bin"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$_gocode" = "y" ]; then
|
if [[ "$_gocode" == "y" ]]; then
|
||||||
mkdir -p "$pkgdir/usr/share/vim/vimfiles/third_party/ycmd/third_party/gocode"
|
mkdir -p "$pkgdir/$vimfiles_dir/third_party/ycmd/third_party/go/src/github.com/mdempsky/gocode"
|
||||||
mkdir -p "$pkgdir/usr/share/vim/vimfiles/third_party/ycmd/third_party/godef"
|
mkdir -p "$pkgdir/$vimfiles_dir/third_party/ycmd/third_party/go/src/github.com/rogpeppe/godef"
|
||||||
cp "$srcdir/YouCompleteMe/third_party/ycmd/third_party/gocode/gocode" \
|
cp "$srcdir/YouCompleteMe/third_party/ycmd/third_party/go/src/github.com/mdempsky/gocode/gocode" \
|
||||||
"$pkgdir/usr/share/vim/vimfiles/third_party/ycmd/third_party/gocode/gocode"
|
"$pkgdir/$vimfiles_dir/third_party/ycmd/third_party/go/src/github.com/mdempsky/gocode/gocode"
|
||||||
cp "$srcdir/YouCompleteMe/third_party/ycmd/third_party/godef/godef" \
|
cp "$srcdir/YouCompleteMe/third_party/ycmd/third_party/go/src/github.com/rogpeppe/godef/godef" \
|
||||||
"$pkgdir/usr/share/vim/vimfiles/third_party/ycmd/third_party/godef/godef"
|
"$pkgdir/$vimfiles_dir/third_party/ycmd/third_party/go/src/github.com/rogpeppe/godef/godef"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$_rust" = "y" ]; then
|
if [[ "$_rust" == "y" ]]; then
|
||||||
mkdir -p "$pkgdir/usr/share/vim/vimfiles/third_party/ycmd/third_party/racerd/target/release"
|
mkdir -p "$pkgdir/$vimfiles_dir/third_party/ycmd/third_party/racerd/target/release"
|
||||||
cp "$srcdir/YouCompleteMe/third_party/ycmd/third_party/racerd/target/release/racerd" \
|
cp "$srcdir/YouCompleteMe/third_party/ycmd/third_party/racerd/target/release/racerd" \
|
||||||
"$pkgdir/usr/share/vim/vimfiles/third_party/ycmd/third_party/racerd/target/release/racerd"
|
"$pkgdir/$vimfiles_dir/third_party/ycmd/third_party/racerd/target/release/racerd"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$_tern" = "y" ]; then
|
if [[ "$_tern" == "y" ]]; then
|
||||||
cp -r "$srcdir/YouCompleteMe/third_party/ycmd/third_party/tern_runtime" \
|
cp -r "$srcdir/YouCompleteMe/third_party/ycmd/third_party/tern_runtime" \
|
||||||
"$pkgdir/usr/share/vim/vimfiles/third_party/ycmd/third_party"
|
"$pkgdir/$vimfiles_dir/third_party/ycmd/third_party"
|
||||||
fi
|
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 {} +
|
find "$pkgdir" -name .git -exec rm -fr {} +
|
||||||
find "$pkgdir" -name .gitignore -exec rm -fr {} +
|
|
||||||
find "$pkgdir" -name tests -exec rm -fr {} +
|
# Remove test files
|
||||||
|
rm -r "$pkgdir/$vimfiles_dir/third_party/ycmd/ycmd/tests"
|
||||||
|
rm -r "$pkgdir/$vimfiles_dir/third_party/ycmd/third_party/parso/test"
|
||||||
|
rm -r "$pkgdir/$vimfiles_dir/third_party/ycmd/third_party/python-future/tests"
|
||||||
|
rm -r "$pkgdir/$vimfiles_dir/third_party/ycmd/third_party/jedi/test"
|
||||||
|
rm -r "$pkgdir/$vimfiles_dir/third_party/ycmd/third_party/waitress/waitress/tests"
|
||||||
|
rm -r "$pkgdir/$vimfiles_dir/third_party/ycmd/third_party/bottle/test"
|
||||||
|
|
||||||
|
# Remove any file we cannot compile using a specfic python version
|
||||||
|
if [[ "$_use_python2" == "ON" ]]; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
rm -r "$pkgdir/$vimfiles_dir/third_party/ycmd/third_party/bottle/plugins/werkzeug/bottle_werkzeug.py"
|
||||||
|
rm -r "$pkgdir/$vimfiles_dir/third_party/ycmd/third_party/bottle/plugins/sqlite/bottle_sqlite.py"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove unneeded docs
|
||||||
|
rm -r "$pkgdir/$vimfiles_dir/third_party/ycmd/third_party/python-future/docs"
|
||||||
|
|
||||||
|
# Finally compile all the python files to bytecode.
|
||||||
|
if [[ "$_use_python2" == "ON" ]]; then
|
||||||
|
python2 -m compileall "$pkgdir"
|
||||||
|
else
|
||||||
|
python3 -m compileall "$pkgdir"
|
||||||
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#=========================================================================================================#
|
||||||
|
#=========================================================================================================#
|
||||||
|
Loading…
Reference in New Issue
Block a user