Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 919150

Summary: llvm.eclass: provide function for generating LLVM/Clang dependencies
Product: Gentoo Linux Reporter: Sam James <sam>
Component: EclassesAssignee: LLVM support project <llvm>
Status: RESOLVED FIXED    
Severity: normal CC: dwfreed, flow, x11
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=622782
Whiteboard:
Package list:
Runtime testing required: ---

Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-12-04 10:23:28 UTC
We often want to generate deps like:
```
        ${PYTHON_DEPS}
        <sys-devel/llvm-$((${LLVM_MAX_SLOT} + 1)):=
        || (
                sys-devel/clang:14
                sys-devel/clang:15
                sys-devel/clang:${LLVM_MAX_SLOT}
        )
"
```

It's both a bit tedious to keep repeating it, but also error prone if you update LLVM_MAX_SLOT but forget to add an intermediate LLVM to the list.

media-libs/mesa has a lot of machinery for this too.

dwfreed suggests something like `llvm_slot_range_dep thing_you_want_to_depend_on lowest_slot highest_slot` (maybe with a param for usedep) too.
Comment 1 Larry the Git Cow gentoo-dev 2024-02-10 10:47:29 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5618de75aec49009489efb560a89e014fd060524

commit 5618de75aec49009489efb560a89e014fd060524
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2024-02-05 19:29:36 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2024-02-10 10:47:23 +0000

    llvm-r1.eclass: Initial version
    
    Bug: https://bugs.gentoo.org/923228
    Bug: https://bugs.gentoo.org/880671
    Closes: https://bugs.gentoo.org/821955
    Closes: https://bugs.gentoo.org/919150
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 eclass/llvm-r1.eclass   | 250 ++++++++++++++++++++++++++++++++++++++++++++++++
 eclass/tests/llvm-r1.sh | 151 +++++++++++++++++++++++++++++
 2 files changed, 401 insertions(+)