commit:     bf70fc6f858192032083797585be058d5091bf2f
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 28 01:20:26 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Mar 28 01:20:26 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bf70fc6f

dev-util/ccls: fix CMake configure error

Closes: https://bugs.gentoo.org/835916
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-util/ccls/ccls-0.20210330.ebuild                 |  6 +++++-
 dev-util/ccls/files/ccls-0.20210330-llvm-cmake.patch | 18 ++++++++++++++++++
 2 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/dev-util/ccls/ccls-0.20210330.ebuild 
b/dev-util/ccls/ccls-0.20210330.ebuild
index 377cc36c8068..9b48ac669633 100644
--- a/dev-util/ccls/ccls-0.20210330.ebuild
+++ b/dev-util/ccls/ccls-0.20210330.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2020 Gentoo Authors
+# Copyright 2020-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -32,6 +32,10 @@ DEPEND="
 "
 RDEPEND="${DEPEND}"
 
+PATCHES=(
+       "${FILESDIR}"/${P}-llvm-cmake.patch
+)
+
 src_configure() {
        local mycmakeargs=(
                -DCCLS_VERSION=${PV}

diff --git a/dev-util/ccls/files/ccls-0.20210330-llvm-cmake.patch 
b/dev-util/ccls/files/ccls-0.20210330-llvm-cmake.patch
new file mode 100644
index 000000000000..8d8db4483db5
--- /dev/null
+++ b/dev-util/ccls/files/ccls-0.20210330-llvm-cmake.patch
@@ -0,0 +1,18 @@
+https://github.com/MaskRay/ccls/commit/dce86b1362acbabb8f997869fdaa27adc67f9a55.patch
+https://bugs.gentoo.org/835916
+
+From: Fangrui Song <[email protected]>
+Date: Wed, 15 Dec 2021 10:13:29 -0800
+Subject: [PATCH] cmake: Add LANGUAGE C to fix find_package(Clang REQUIRED)
+ error
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,5 +1,5 @@
+ cmake_minimum_required(VERSION 3.8)
+-project(ccls LANGUAGES CXX)
++project(ccls LANGUAGES CXX C)
+ 
+ option(USE_SYSTEM_RAPIDJSON "Use system RapidJSON instead of the git 
submodule if exists" ON)
+ 
+

Reply via email to