On Sun, 18 Jan 2026 00:51:54 -0700
Brian Inglis wrote:
> On 2026-01-17 16:56, Takashi Yano via Cygwin-apps wrote:
> > clangd understands the C++ code and adds smart features to the editor:
> > code completion, compile errors, go-to-definition and more. clangd is
> > a language server that can work with many editors via plugins.
> 
> Why can't you just add CLANG_PATCHES to or append them directly in PATCH_URI,
> as we do with other patch sources like Debian, Fedora, Gentoo, OpenSuSE, ...?

Because clang directory is not a subdirectory of ${SRC_DIR}.

llvm-project-21.1.4.src
  ├─clang
  ├─clang-tools-extra
  ├─cmake
  ├─compiler-rt
  ├─libc
  ├─libcxx
  ├─libcxxabi
  ├─libunwind
  ├─llvm              <----- ${SRC_DIR}
  ├─runtimes
  └─utils

The clang patches are borrowed from clang package, the paths in the
patches assume the ${SRC_DIR} is in clang.

> If you have a necessity to use src_patch_hook, then rather than generate 
> CLANG_PATCHES values using eval, everywhere else in Cygport uses indirection
> ${!PATCH_PROJ} with PATCH_PROJ=CLANG_PATCHES; or avoid implementing an unused 
> unnecessary future expansion design feature entirely and just use the 
> variable 
> directly in `for list in $CLANG_PATCHES`, only getting fancier when you 
> really 
> need to?

Yeah, indeed. This src_patch_hook() is also borrowed from other package,
where the for loop is as follows.
        for proj in clang llvm libcxx; do

For this package, this mechanism is too complicated, as you said.

-- 
Takashi Yano <[email protected]>
  • Re: [ITP] clangd Brian Inglis via Cygwin-apps
    • Re: [ITP] clangd Takashi Yano via Cygwin-apps

Reply via email to