aboutsummaryrefslogtreecommitdiffstats
path: root/devel/youcompleteme/Makefile
blob: c7b4fed65c8570cae8f1e1de5f09539b02e23990 (plain) (blame)
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
# Created by: Richard Gallamore <ultima@freebsd.org>
# $FreeBSD$

PORTNAME=   YouCompleteMe
DISTVERSION=    g20171203
CATEGORIES= devel

MAINTAINER= ultima@FreeBSD.org
COMMENT=    Code-completion engine for Vim

LICENSE=    GPLv3
LICENSE_FILE=   ${WRKSRC}/COPYING.txt

RUN_DEPENDS=    vim:editors/vim \
        ${LOCALBASE}/lib/libboost_thread.so:devel/boost-libs \
        ${LOCALBASE}/lib/libboost_python.so:devel/boost-python-libs \
        ${PYTHON_PKGNAMEPREFIX}argparse>0:devel/py-argparse@${PY_FLAVOR} \
        ${PYTHON_PKGNAMEPREFIX}bottle>0:www/py-bottle@${PY_FLAVOR} \
        ${PYTHON_PKGNAMEPREFIX}frozendict>0:devel/py-frozendict@${PY_FLAVOR} \
        ${PYTHON_PKGNAMEPREFIX}future>0:devel/py-future@${PY_FLAVOR} \
        ${PYTHON_PKGNAMEPREFIX}jedi>0:devel/py-jedi@${PY_FLAVOR} \
        ${PYTHON_PKGNAMEPREFIX}parso>0:textproc/py-parso@${PY_FLAVOR} \
        ${PYTHON_PKGNAMEPREFIX}requests>0:www/py-requests@${PY_FLAVOR} \
        ${PYTHON_PKGNAMEPREFIX}requests-futures>0:www/py-requests-futures@${PY_FLAVOR} \
        ${PYTHON_PKGNAMEPREFIX}waitress>0:www/py-waitress@${PY_FLAVOR}

USES=       cmake python:2.7
USE_GITHUB= yes
GH_ACCOUNT= Valloric
GH_TAGNAME= 290dd9472
GH_TUPLE=   Valloric:ycmd:f58c1f7b6:ycm/third_party/ycmd \
        vheon:JediHTTP:67c8d27c6:ycmd5/third_party/ycmd/third_party/JediHTTP

CMAKE_SOURCE_PATH+= ${WRKSRC}/third_party/ycmd/cpp

SUB_FILES=      pkg-message pkg-install pkg-deinstall
SUB_LIST=       VIMFILESDIR="${VIMFILESDIR}"

OPTIONS_DEFINE=     C GO MONO RUST
OPTIONS_DEFAULT=    C GO MONO RUST
OPTIONS_SUB=        yes

C_DESC=         C-family Semantic Completion Support
GO_DESC=        Go Semantic Completion Support
MONO_DESC=      C\# Semantic Completion Support
RUST_DESC=      Rust Semantic Completion Support

C_CMAKE_ON=     -DPATH_TO_LLVM_ROOT=${LOCALBASE}/llvm40
C_LIB_DEPENDS=      libclang.so:devel/llvm40

GO_RUN_DEPENDS=     gocode:devel/go-gocode \
            godef:devel/go-godef

MONO_RUN_DEPENDS=   ${LOCALBASE}/share/omnisharp-server/bin/Release/OmniSharp.exe:devel/omnisharp-server
MONO_VARS=      MONOFILESDIR=${VIMFILESDIR}/third_party/ycmd/third_party/OmniSharpServer

RUST_RUN_DEPENDS=   racerd:devel/racerd

VIMFILESDIR=        ${PREFIX}/share/vim/vimfiles

do-install:
        ${MKDIR} ${STAGEDIR}${VIMFILESDIR}/third_party/ycmd/third_party
        (cd ${WRKSRC} && ${COPYTREE_SHARE} "autoload doc plugin python" \
            "${STAGEDIR}${VIMFILESDIR}")
        (cd ${WRKSRC}/third_party/ycmd && ${COPYTREE_SHARE} \
            "ycmd CORE_VERSION cpp clang_includes" \
            "${STAGEDIR}${VIMFILESDIR}/third_party/ycmd/${d}")
        ${RM} -r ${WRKSRC}/third_party/ycmd/third_party/JediHTTP/vendor
        (cd ${WRKSRC}/third_party/ycmd/third_party && ${COPYTREE_SHARE} \
            "JediHTTP tern_runtime" \
            "${STAGEDIR}${VIMFILESDIR}/third_party/ycmd/third_party")
        ${RM} -rf ${STAGEDIR}${VIMFILESDIR}/third_party/ycmd/cpp/ycm/tests \
            ${STAGEDIR}${VIMFILESDIR}/third_party/ycmd/ycmd/tests
        ${INSTALL_LIB} ${WRKSRC}/third_party/ycmd/ycm_core.so \
            ${STAGEDIR}${VIMFILESDIR}/third_party/ycmd

do-install-MONO-on:
        ${MKDIR} ${STAGEDIR}${MONOFILESDIR}/OmniSharp/bin
        ${RLN} ${PREFIX}/share/omnisharp-server/bin/Release \
            ${STAGEDIR}${MONOFILESDIR}/OmniSharp/bin/Release

.include <bsd.port.mk>