Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 919150 - llvm.eclass: provide function for generating LLVM/Clang dependencies
Summary: llvm.eclass: provide function for generating LLVM/Clang dependencies
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: LLVM support project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-04 10:23 UTC by Sam James
Modified: 2024-02-10 10:47 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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(+)