summaryrefslogtreecommitdiff
path: root/dev-util/ccls/ccls-0.20210330-r1.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'dev-util/ccls/ccls-0.20210330-r1.ebuild')
-rw-r--r--dev-util/ccls/ccls-0.20210330-r1.ebuild51
1 files changed, 51 insertions, 0 deletions
diff --git a/dev-util/ccls/ccls-0.20210330-r1.ebuild b/dev-util/ccls/ccls-0.20210330-r1.ebuild
new file mode 100644
index 000000000000..f2069853b3f4
--- /dev/null
+++ b/dev-util/ccls/ccls-0.20210330-r1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 2020-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+EGIT_REPO_URI="https://github.com/MaskRay/${PN}"
+
+if [[ ${PV} = 9999* ]]; then
+ GIT_ECLASS="git-r3"
+ LLVM_MAX_SLOT=9999
+else
+ LLVM_MAX_SLOT=14
+fi
+
+inherit cmake llvm ${GIT_ECLASS}
+
+DESCRIPTION="C/C++/ObjC language server"
+HOMEPAGE="https://github.com/MaskRay/ccls"
+
+if [[ ${PV} == *9999 ]] ; then
+ SRC_URI=""
+else
+ SRC_URI="https://github.com/MaskRay/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64"
+fi
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE=""
+
+# We only depend on Clang because of a quirk in how dependencies work
+# See comment in llvm.eclass docs
+DEPEND="
+ dev-libs/rapidjson
+ <sys-devel/clang-$((${LLVM_MAX_SLOT} + 1)):=
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-llvm-cmake.patch
+ "${FILESDIR}"/${P}-llvm14.patch
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DCCLS_VERSION=${PV}
+ -DUSE_SYSTEM_RAPIDJSON=ON
+ -DCLANG_LINK_CLANG_DYLIB=1
+ )
+ cmake_src_configure
+}