LLVM-R1.ECLASS
Section: eclass-manpages (5)Updated: Nov 2024
Index Return to Main Contents
NAME
llvm-r1.eclass - Provide LLVM_SLOT to build against slotted LLVMDESCRIPTION
An eclass to reliably depend on a set of LLVM-related packages in a matching slot. To use the eclass:
1. Set LLVM_COMPAT to the list of supported LLVM slots.
2. Use llvm_gen_dep and/or LLVM_USEDEP to add appropriate
dependencies.
3. Use llvm-r1_pkg_setup, get_llvm_prefix or LLVM_SLOT.
The eclass sets IUSE and REQUIRED_USE. The flag corresponding to the newest supported stable LLVM slot (or the newest testing, if no stable slots are supported) is enabled by default.
Example:
LLVM_COMPAT=( {16..18} ) inherit llvm-r1 DEPEND=" dev-libs/libfoo[${LLVM_USEDEP}] $(llvm_gen_dep ' sys-devel/clang:${LLVM_SLOT}= sys-devel/llvm:${LLVM_SLOT}= ') "
SUPPORTED EAPIS
8TRANSITIVELY PROVIDED ECLASSES
llvm-utilsFUNCTIONS
- llvm_gen_dep <dependency>
-
Output a dependency block, repeating "<dependency>" conditionally
to all llvm_slot_* USE flags. Any occurences of '${LLVM_SLOT}'
within the block will be substituted for the respective slot.
Example:
DEPEND=" $(llvm_gen_dep ' sys-devel/clang:${LLVM_SLOT}= sys-devel/llvm:${LLVM_SLOT}= ') "
- get_llvm_prefix [-b|-d]
-
Output the path to the selected LLVM slot.
With no option or "-d", the path is prefixed by ESYSROOT. LLVM dependencies should be in DEPEND then.
With "-b" option, the path is prefixed by BROOT. LLVM dependencies should be in BDEPEND then.
- llvm-r1_pkg_setup
-
Prepend the appropriate executable directory for the selected LLVM
slot to PATH.
The PATH manipulation is only done for source builds. The function is a no-op when installing a binary package.
If any other behavior is desired, the contents of the function should be inlined into the ebuild and modified as necessary.
Note that this function is not exported if LLVM_OPTIONAL is set. In that case, it needs to be called manually.
ECLASS VARIABLES
- LLVM_COMPAT (REQUIRED) (SET BEFORE INHERIT)
-
A list of LLVM slots supported by the package, oldest to newest.
Example:
LLVM_COMPAT=( {15..17} )
- LLVM_OPTIONAL (SET BEFORE INHERIT)
- If set to a non-empty value, disables setting REQUIRED_USE and exporting pkg_setup. You have to add LLVM_REQUIRED_USE and call pkg_setup manually, with appropriate USE conditions.
- LLVM_REQUIRED_USE (GENERATED BY ECLASS)
- An eclass-generated REQUIRED_USE string that enforces selecting exactly one slot. It LLVM_OPTIONAL is set, it needs to be copied into REQUIRED_USE, under appropriate USE conditions. Otherwise, it is added automatically.
- LLVM_USEDEP (GENERATED BY ECLASS)
- An eclass-generated USE dependency string that can be applied to other packages using the same eclass, to enforce a LLVM slot match.
AUTHORS
Michał Górny <[email protected]>MAINTAINERS
Michał Górny <[email protected]>REPORTING BUGS
Please report bugs via https://bugs.gentoo.org/FILES
llvm-r1.eclassSEE ALSO
ebuild(5)https://gitweb.gentoo.org/repo/gentoo.git/log/eclass/llvm-r1.eclass
Index
- NAME
- DESCRIPTION
- SUPPORTED EAPIS
- TRANSITIVELY PROVIDED ECLASSES
- FUNCTIONS
- ECLASS VARIABLES
- AUTHORS
- MAINTAINERS
- REPORTING BUGS
- FILES
- SEE ALSO
This document was created by man2html, using the manual pages.
Time: 03:27:00 GMT, November 25, 2024