ADA.ECLASS

Section: eclass-manpages (5)
Updated: Oct 2024
Index Return to Main Contents

NAME

ada.eclass - An eclass for Ada packages

DESCRIPTION

This eclass set the IUSE and REQUIRED_USE to request the ADA_TARGET when the inheriting ebuild can be supported by more than one Ada implementation. It also set ADA_USEDEP and ADA_DEPS with a suitable form. A common eclass providing helper functions to build and install packages supporting Ada implementations.

This eclass sets correct IUSE. Modification of REQUIRED_USE has to be done by the author of the ebuild (but ADA_REQUIRED_USE is provided for convenience, see below). ada exports ADA_DEPS and ADA_USEDEP so you can create correct dependencies for your package easily.

Mostly copied from python-single-r1.eclass

SUPPORTED EAPIS

7 8

FUNCTIONS

ada_export [<impl>] <variables>...
Set and export the Ada implementation-relevant variables passed as parameters.

The optional first parameter may specify the requested Ada implementation (either as ADA_TARGETS value, e.g. ada2_7, or an EADA one, e.g. ada2.7). If no implementation passed, the current one will be obtained from ${EADA}.

The variables which can be exported are: GCC, EADA, GNATMAKE. They are described more completely in the eclass variable documentation.

ada_wrapper_setup [<path> [<impl>]]
Create proper 'ada' executable wrappers in the directory named by <path>. Set up PATH appropriately. <path> defaults to ${T}/${EADA}.

The wrappers will be created for implementation named by <impl>, or for one named by ${EADA} if no <impl> passed.

If the named directory contains a ada symlink already, it will be assumed to contain proper wrappers already and only environment setup will be done. If wrapper update is requested, the directory shall be removed first.

ada_setup
Determine what the selected Ada implementation is and set the Ada build environment up for it.
ada_pkg_setup
Runs ada_setup.

ECLASS VARIABLES

ADA_DEPS (GENERATED BY ECLASS)
This is an eclass-generated Ada dependency string for all implementations listed in ADA_COMPAT.

The dependency string is conditional on ADA_TARGET.

Example use:

RDEPEND="${ADA_DEPS}
  dev-foo/mydep"
DEPEND="${RDEPEND}"

Example value:

ada_target_gcc_12? ( sys-devel/gcc:12[ada] )
ada_target_gnat_2021? ( dev-lang/gnat-gps:2021[ada] )
ADA_REQUIRED_USE (GENERATED BY ECLASS)
This is an eclass-generated required-use expression which ensures that exactly one ADA_TARGET value has been enabled.

This expression should be utilized in an ebuild by including it in REQUIRED_USE, optionally behind a use flag.

Example use:

REQUIRED_USE="ada? ( ${ADA_REQUIRED_USE} )"

Example value:

^^ ( ada_target_gnat_2021 ada_target_gcc_12 )
ADA_USEDEP (GENERATED BY ECLASS)
This is a placeholder variable, in order to depend on ada packages built for the same ada implementations.

Example use:

RDEPEND="$(ada_gen_cond_dep '
    dev-ada/foo[${ADA_USEDEP}]
  ')"

Example value:

ada_targets_gcc_12(-)

AUTHORS

Tupone Alfredo <tupone@gentoo.org>

MAINTAINERS

Ada team <ada@gentoo.org>

REPORTING BUGS

Please report bugs via https://bugs.gentoo.org/

FILES

ada.eclass

SEE ALSO

ebuild(5)
https://gitweb.gentoo.org/repo/gentoo.git/log/eclass/ada.eclass


Index

NAME
DESCRIPTION
SUPPORTED EAPIS
FUNCTIONS
ECLASS VARIABLES
AUTHORS
MAINTAINERS
REPORTING BUGS
FILES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 03:27:02 GMT, October 07, 2024