summaryrefslogtreecommitdiff
path: root/eclass
Commit message (Collapse)AuthorAgeFilesLines
* scons-utils.eclass: Replace deprecated PYTHON_MULTI_USEDEPMichał Górny2022-02-041-3/+3
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass: deprecate the old go eclassesWilliam Hubbs2022-02-044-0/+4
| | | | | | | | The golang-* eclasses should not be used for new go packages. Modern go packages use go modules and the go-module eclass handles this setup. Signed-off-by: William Hubbs <williamh@gentoo.org>
* dune.eclass: enhance build and test logsAlfredo Tupone2022-02-021-2/+2
| | | | Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
* distutils-r1.eclass: Restore QA warning for DUS + DISTUTILS_OPTIONALMichał Górny2022-02-011-0/+5
| | | | | | | Restore the QA warning (proviously issued as part of install-qa-check.d) for combining DISTUTILS_USE_SETUPTOOLS and DISTUTILS_OPTIONAL. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Add DISTUTILS_DEPS output var for PEP 517 modeMichał Górny2022-02-011-1/+33
| | | | | | | | | | The PEP 517 build-time deps have gotten more complex, and largely depend on the internal eclass logic used to build and install wheels. Introduce a DISTUTILS_DEPS output variable that contains the correct BDEPEND string for use in DISTUTILS_OPTIONAL=1 ebuilds. Bug: https://bugs.gentoo.org/832337 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Move DISTUTILS_OPTIONAL check into set_globalsMichał Górny2022-02-011-7/+9
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Fix subphase return value passthroughMichał Górny2022-02-011-15/+33
| | | | | | | | | | | | | | | | | | | | | | | | Fix distutils-r1 phase functions to correctly pass through the return value from the subphases. This fixes e.g. the mistake of virtx not failing in the following case: src_test() { virtx distutils-r1_src_test } python_test() { epytest } This is because virtx implicitly uses nonfatal and epytest uses `die -n`. However, since the return value was not passed through, virtx never knew that anything has failed. While this covers only trivial cases and this is better solved via dying explicitly in the redefined python_test(), there's no harm in adding this passthrough. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: make esetup.py require setup.{py,cfg}Michał Górny2022-02-011-0/+3
| | | | | | | | | Make esetup.py fail if neither setup.py nor setup.cfg is available. To support PEP 517 builds, the function has been modified to work without setup.py. However, this also caused esetup.py to implicitly succeed in installing zero files on non-distutils/setuptools packages. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Disable stale egg-info cleaning in PEP517 modeMichał Górny2022-02-011-1/+7
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* vcs-snapshot.eclass: canonical variable orderingDavid Seifert2022-02-011-1/+6
| | | | | Closes: https://github.com/gentoo/gentoo/pull/24013 Signed-off-by: David Seifert <soap@gentoo.org>
* vcs-snapshot.eclass: remove EAPI 0-5David Seifert2022-02-011-5/+5
| | | | Signed-off-by: David Seifert <soap@gentoo.org>
* vcs-snapshot.eclass: enable EAPI 8David Seifert2022-02-011-3/+3
| | | | Signed-off-by: David Seifert <soap@gentoo.org>
* vcs-clean.eclass: add missing dieDavid Seifert2022-02-011-3/+9
| | | | Signed-off-by: David Seifert <soap@gentoo.org>
* vcs-clean.eclass: enable EAPI 8David Seifert2022-02-011-4/+4
| | | | Signed-off-by: David Seifert <soap@gentoo.org>
* usr-ldscript.eclass: canonical variable orderingDavid Seifert2022-02-011-3/+3
| | | | Signed-off-by: David Seifert <soap@gentoo.org>
* usr-ldscript.eclass: remove EAPI 5David Seifert2022-02-011-3/+3
| | | | Signed-off-by: David Seifert <soap@gentoo.org>
* user-info.eclass: remove EAPI 5David Seifert2022-02-011-4/+4
| | | | Signed-off-by: David Seifert <soap@gentoo.org>
* user.eclass: canonical variable orderingDavid Seifert2022-02-011-3/+3
| | | | Signed-off-by: David Seifert <soap@gentoo.org>
* user.eclass: remove EAPI 5David Seifert2022-02-011-4/+4
| | | | Signed-off-by: David Seifert <soap@gentoo.org>
* toolchain.eclass: canonical variable orderingDavid Seifert2022-02-011-9/+14
| | | | Signed-off-by: David Seifert <soap@gentoo.org>
* toolchain.eclass: remove EAPI 5 and 6David Seifert2022-02-011-70/+40
| | | | Signed-off-by: David Seifert <soap@gentoo.org>
* texlive-common.eclass: respect EPREFIX in symlink creationSam James2022-01-311-3/+3
| | | | | Closes: https://bugs.gentoo.org/832408 Signed-off-by: Sam James <sam@gentoo.org>
* bazel.eclass: Add EAPI8 supportJason Zaman2022-01-291-3/+5
| | | | | | Also don't BDEP on bazel from the bazel package itself Signed-off-by: Jason Zaman <perfinion@gentoo.org>
* distutils-r1.eclass: Do not create ${BUILD_DIR}/lib in PEP 517 modeMichał Górny2022-01-291-8/+8
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Fix installing scripts w/ PEP517 & single-implMichał Górny2022-01-291-0/+3
| | | | | Closes: https://bugs.gentoo.org/832267 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass: Update links to Gentoo Python GuideMichał Górny2022-01-295-6/+6
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Support deprecated flit/poetry backendsMichał Górny2022-01-291-2/+23
| | | | | | | | | Detect, report and fix the deprecated flit/poetry backends to use flit_core and poetry_core respectively. In both cases, the end result is the same. Using flit involves unnecessary dependencies, and poetry is not even packaged right now (and has even worse dependency hell). Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Improve PEP 517 einfo outputMichał Górny2022-01-291-1/+2
| | | | | | | Add an einfo message for calling installer. Indent both messages relevant to PEP 517 logic. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Set script shebangs to venv in PEP 517Michał Górny2022-01-291-15/+24
| | | | | | | | | | | | | | | | | | | Alter the shebangs of generated scripts to point out the to venv Python executables in PEP 517 mode. Otherwise, the executables are run with system Python during the test run and therefore do not use the venv. For convenience, rather than modifying them back just copy them immediately into the python-exec directory. This means that instead of reverting some of our python_compile() changes in python_install() and then moving scripts to the python-exec directory, we can just discard /usr/bin and let the wrapping logic recreate it. While at it, stop repeating ${root}${EPREFIX}/usr/bin multiple times in python_compile(). Just shove it into a helper variable. Also move pyvenv.cfg inside bindir for convenience — Python is fine with either location. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* java-vm-2.eclass: support EAPI=7Georgy Yakovlev2022-01-271-3/+3
| | | | Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
* java-virtuals-2.eclass: support EAPI=7Georgy Yakovlev2022-01-271-3/+3
| | | | Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
* sgml-catalog-r1.eclass: Remove obsolete environment filesJames Le Cuirot2022-01-251-13/+5
| | | | | | | | | | | | These files are only regenerated when gensgmlenv is present, but this tool was part of sgmltools-lite, which was last-rited over a year ago. The presence of 93sgmltools-lite can break tools such as asciidoc. When SGML_CATALOG_FILES is defined, it automatically passes the --catalogs option to xmllint, which uses the obsolete variable over the updated catalogs listed in /etc/sgml/catalog. Signed-off-by: James Le Cuirot <chewi@gentoo.org>
* java-utils-2.eclass: update rather-obsolete python-updater referenceSam James2022-01-251-2/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* distutils-r1.eclass: Bump installer requirement and remove hackMichał Górny2022-01-241-8/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Make epytest disable plugins we don't wantMichał Górny2022-01-241-0/+8
| | | | | | | | | | | Make epytest explicitly disable unwanted plugins such as pytest-cov or pytest-flakes. We want the relevant options to be stripped out of pytest config files. However, when these packages are installed on the system, it's easy to miss them and then users (or tinderboxes) hit the failures first. Disabling the plugins explicitly forces them to fail immediately while testing. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Link to installer +x fixMichał Górny2022-01-231-0/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Fix prefix pathsMichał Górny2022-01-231-14/+14
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Strip LICENSE* & COPYING* from PEP517 dist-infoMichał Górny2022-01-231-0/+5
| | | | | | | The .dist-info metadata installed by PEP517 packages contains a full copy of the license. Strip that following the Gentoo policy. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* autotools.eclass: update for autoconf 2.71Sam James2022-01-221-2/+2
| | | | | Closes: https://bugs.gentoo.org/827852 Signed-off-by: Sam James <sam@gentoo.org>
* autotools.eclass: update for latest automake 1.16.4Sam James2022-01-221-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* autotools.eclass: use --system-acdir for aclocalSam James2022-01-221-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to instruct aclocal that it might find macros in both ${BROOT} _and_ ${SYSROOT}. - A classic example within BROOT is autoconf-archive. - A classic example within SYSROOT is, say, libogg. A fair amount of codec software installs its own macro to help locating it (but this is in no ways limited to that genre/area). The correct position for a dependency like libogg is DEPEND, and yet the status quo doesn't mean that aclocal is obligated to check in ${ESYSROOT} which is where DEPEND-class dependencies are guaranteed to be installed. We can't rely on these being in BDEPEND -- in fact, most of the time, they won't be. If we wanted to rely on macros always being provided by BDEPEND, we'd have to duplicate a considerable number of dependencies in both BDEPEND + DEPEND, with the unnecessary cross-compilation that would entail too: it makes far more sense to just tell aclocal to look in the right place (an extra location). Bug: https://bugs.gentoo.org/710792 Closes: https://bugs.gentoo.org/677002 Closes: https://bugs.gentoo.org/738918 Thanks-to: David Michael <fedora.dm0@gmail.com> (for the suggestion) Thanks-to: James Le Cuirot <chewi@gentoo.org> (rubberducking & sounding board) Signed-off-by: Sam James <sam@gentoo.org>
* autotools.eclass: don't inject -I${SYSROOT} to aclocalSam James2022-01-221-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When -I${SYSROOT} is injected, it'll override the default of -Im4, which results in trying to install macros to ${SYSROOT} (a sandbox violation) when they can't be found. From aclocal(1): ``` -I DIR add directory to search list for .m4 files --install copy third-party files to the first -I directory ``` The first directory is normally -Im4 if anything, whereas when injected (when ${SYSROOT} is defined), it ends up being ${SYSROOT}, not m4 (so we try to copy macros to somewhere outside of the build directory). [We could drop this just for > EAPI 7, but I'm not sure there's much point there either. As Chewi observed in bug 677002, you can't assume they'll be present in ${SYSROOT} anyway, and frankly, the cross-compilation (and --root, --sysroot, and so on) situation is rather bleak for earlier EAPIs, which is why we did all that work for 7.] Bug: https://bugs.gentoo.org/710792 Closes: https://bugs.gentoo.org/677002 Closes: https://bugs.gentoo.org/738918 Thanks-to: James Le Cuirot <chewi@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* flag-o-matic.eclass: allow -frecord-command-lineSam James2022-01-221-0/+1
| | | | | | In Clang, -frecord-gcc-switches does the same as this anyway. Signed-off-by: Sam James <sam@gentoo.org>
* flag-o-matic.eclass: allow -fstack-clash-protection, -fcf-protection=*Sam James2022-01-221-0/+2
| | | | | | | -fstack-clash-protection suggested by Arfrever. Reported-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> Signed-off-by: Sam James <sam@gentoo.org>
* flag-o-matic.eclass: allow -ffixed-x18 for arm64Sam James2022-01-221-0/+3
| | | | | | | | Needed for shadow stack bits on ARM64. Closes: https://bugs.gentoo.org/800533 Thanks-to: Jannik Glückert <jannik.glueckert@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
* flag-o-matic.eclass: allow -glldbSam James2022-01-221-0/+1
| | | | | | | | We already allow -ggdb for GDB and this is the analogue for LLDB. Bug: https://bugs.gentoo.org/800533 Reported-by: Jannik Glückert <jannik.glueckert@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
* flag-o-matic.eclass: allow Spectre mitigation flagsSam James2022-01-221-0/+5
| | | | | Closes: https://bugs.gentoo.org/646076 Signed-off-by: Sam James <sam@gentoo.org>
* flag-o-matic.eclass: restructure comments a bitSam James2022-01-221-4/+11
| | | | | | No functional change. Signed-off-by: Sam James <sam@gentoo.org>
* flag-o-matic.eclass: allow -fno-diagnostics-color -fmessage-length=0Sam James2022-01-221-0/+2
| | | | | | | | | Both of these options are useful for automated reports and should be harmless. Closes: https://bugs.gentoo.org/830534 Reported-by: Agostino Sarubbo <ago@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* flag-o-matic.eclass: strip-flags: Fix logic to properly support "=" in patterns.Arfrever Frehtes Taifersar Arahesis2022-01-221-12/+11
| | | | | Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> Signed-off-by: Sam James <sam@gentoo.org>