Files
ports/devel/ccls/Makefile
T
Dimitry Andric 9025f32b15 devel/ccls: fix build with LLVM_DEFAULT=19
When building against llvm 19, several errors appear:

  /wrkdirs/usr/ports/devel/ccls/work/ccls-0.20240202/src/include_complete.cc:117:37: error: no member named 'endswith' in 'llvm::StringRef'; did you mean 'ends_
    117 |                 if (StringRef(path).endswith(suffix))                                                                                                         |                                     ^~~~~~~~
        |                                     ends_with
  /wrkdirs/usr/ports/devel/ccls/work/ccls-0.20240202/src/clang_tu.cc:32:22: error: no member named 'startswith' in 'llvm::StringRef'; did you mean 'starts_with'
     32 |   if (file.getName().startswith("/../")) {
        |                      ^~~~~~~~~~                                                                                                                               |                      starts_with
  /wrkdirs/usr/ports/devel/ccls/work/ccls-0.20240202/src/clang_tu.cc:340:21: error: no member named 'OMPArraySection' in 'clang::BuiltinType'; did you mean 'Arr
    340 |   case BuiltinType::OMPArraySection:
        |        ~~~~~~~~~~~~~^~~~~~~~~~~~~~~
        |                     ArraySection                                                                                                                        /wrkdirs/usr/ports/devel/ccls/work/ccls-0.20240202/src/indexer.cc:1130:64: error: non-virtual member function marked 'override' hides virtual member function
   1130 |                           SrcMgr::CharacteristicKind fileType) override {
        |                                                                ^

Pull in a number of upstream patches to fix these.

PR:		284422
Appproved by:	maintainer timeout (2 weeks)
MFH:		2025Q1
2025-02-16 17:47:35 +01:00

64 lines
2.0 KiB
Makefile

PORTNAME= ccls
DISTVERSION= 0.20240202
CATEGORIES= devel
PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
PATCHFILES+= 88e382f8a3d107383764310624ac61f237fdfa06.patch:-p1 # Adapt llvmorg-19-init-1720-gda95d926f6fc: InclusionDirective
PATCHFILES+= 559b4164096d026a73604055e5014361faf70a10.patch:-p1 # Adapt llvmorg-19-init-9119-g4ec9a662d388: startswith/endswith removal
PATCHFILES+= e5e101253a07e9f40f6ea54024a9a454978f6a58.patch:-p1 # Adapt llvmorg-19-init-9465-g39adc8f42329: BuiltinType::ArraySection
PATCHFILES+= 4331c8958698d42933bf4e132f8a7d61f3cedb8c.patch:-p1 # Adapt llvmorg-20-init-12964-gdf9a14d7bbf1: createDiagnostics
MAINTAINER= khng@FreeBSD.org
COMMENT= C/C++/ObjC language server
WWW= https://github.com/MaskRay/ccls
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= rapidjson>=1.1.0_4:devel/rapidjson
USES= cmake compiler:c++17-lang llvm:lib localbase
USE_GITHUB= yes
GH_ACCOUNT= MaskRay
GH_TAGNAME= ${DISTVERSION}
CMAKE_ARGS= -DCCLS_VERSION:STRING="${DISTVERSION}" \
-DClang_DIR:PATH="${LLVM_PREFIX}/lib/cmake/clang" \
-DLLVM_DIR:PATH="${LLVM_PREFIX}/lib/cmake/llvm"
CXXFLAGS+= -DNDEBUG
PLIST_FILES= bin/ccls
PORTDOCS= *
OPTIONS_DEFINE= DOCS
DOCS_MASTER_SITES= LOCAL/khng:docs
DOCS_DISTFILES= ccls.wiki-${DISTVERSION}.tar.gz:docs
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
cd ${WRKDIR}/ccls.wiki && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}
.if defined(MAINTAINER_MODE)
MAINTAINER_DISTFILE= \
${_DISTDIR:S|/$||}/${DOCS_DISTFILES:Mccls.wiki-*.tar.gz\:*:C|\:.*$||}
maintainer-docs-fetch:
@${MAKE} clean
@${MKDIR} ${WRKDIR}/ccls.wiki
@git clone https://github.com/MaskRay/ccls.wiki.git \
${WRKDIR}/ccls.wiki
@${TAR} -zcf ${MAINTAINER_DISTFILE} -C ${WRKDIR} \
--uid 0 --gid 0 --exclude-vcs ccls.wiki
@${MAKE} makesum
@${MAKE} clean
${MAINTAINER_DISTFILE}: maintainer-docs-fetch
maintainer-docs-distfiles: ${MAINTAINER_DISTFILE}
scp ${MAINTAINER_DISTFILE} \
freefall.freebsd.org:public_distfiles/
.endif
.include <bsd.port.mk>