aports/community/ccls/APKBUILD
mio 236dd456ce community/ccls: build with non-default clang
Building with default clang/llvm results in the error below. Rebuild with
clang/llvm19 for now.

```
ninja: job failed: /usr/bin/clang++  -I/home/buildozer/aports/community/ccls/src/ccls-0.20241108/src -isystem /home/buildozer/aports/community/ccls/src/ccls-0.20241108/third_party -isystem /usr/lib/llvm20/include -Os -fstack-clash-protection -Wformat -Werror=format-security -D_GLIBCXX_ASSERTIONS=1 -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS=1 -D_LIBCPP_ENABLE_HARDENED_MODE=1 -O3 -DNDEBUG -std=c++17 -Wall -Wno-sign-compare -MD -MT CMakeFiles/ccls.dir/src/clang_tu.cc.o -MF CMakeFiles/ccls.dir/src/clang_tu.cc.o.d -o CMakeFiles/ccls.dir/src/clang_tu.cc.o -c /home/buildozer/aports/community/ccls/src/ccls-0.20241108/src/clang_tu.cc
/home/buildozer/aports/community/ccls/src/ccls-0.20241108/src/clang_tu.cc:128:7: error: no matching function for call to 'createDiagnostics'
  128 |       CompilerInstance::createDiagnostics(new DiagnosticOptions,
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/llvm20/include/clang/Frontend/CompilerInstance.h:687:8: note: candidate function not viable: no known conversion from 'DiagnosticOptions *' to 'llvm::vfs::FileSystem &' for 1st argument
  687 |   void createDiagnostics(llvm::vfs::FileSystem &VFS,
      |        ^                 ~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/llvm20/include/clang/Frontend/CompilerInstance.h:710:3: note: candidate function not viable: no known conversion from 'DiagnosticOptions *' to 'llvm::vfs::FileSystem &' for 1st argument
  710 |   createDiagnostics(llvm::vfs::FileSystem &VFS, DiagnosticOptions *Opts,
      |   ^                 ~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
```
2025-05-09 09:27:31 +00:00

47 lines
1.2 KiB
Text

# Contributor: Clayton Craft <clayton@craftyguy.net>
# Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=ccls
pkgver=0.20241108
pkgrel=2
pkgdesc="C/C++/Objective-C language server"
url="https://github.com/MaskRay/ccls"
arch="all"
license="Apache-2.0"
_llvmver=19
makedepends="
clang$_llvmver-dev
clang$_llvmver-extra-tools
clang$_llvmver-static
cmake
libxml2-dev
llvm$_llvmver-dev
llvm$_llvmver-gtest
llvm$_llvmver-static
rapidjson-dev
samurai
zlib-dev
"
source="$pkgname-$pkgver.tar.gz::https://github.com/MaskRay/ccls/archive/$pkgver.tar.gz"
options="!check" # no tests
build() {
# export $PATH to help cmake find clang
export PATH="/usr/lib/llvm$_llvmver/bin:$PATH"
CC=clang-$_llvmver \
CXX=clang++-$_llvmver \
cmake -B build -G Ninja \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_C_COMPILER=clang-$_llvmver \
-DCMAKE_CXX_COMPILER=clang++-$_llvmver \
-DCLANG_LINK_CLANG_DYLIB=on \
-DLLVM_LINK_LLVM_DYLIB=on
cmake --build build
}
package() {
DESTDIR="$pkgdir" cmake --install build
}
sha512sums="
b271b175ea64eb10a052789c5527135b5aff7f9088aa20158895263262c1c93541cc4f987e7d7a73b702db0b85f9366ed57a9b38bf1e245e50f3c4e3eeed7277 ccls-0.20241108.tar.gz
"