summaryrefslogtreecommitdiff
path: root/eclass
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* out-of-source.eclass: canonical variable orderingDavid Seifert2022-01-221-3/+3
| | | | | Closes: https://github.com/gentoo/gentoo/pull/23910 Signed-off-by: David Seifert <soap@gentoo.org>
* out-of-source.eclass: remove EAPI 6David Seifert2022-01-221-2/+2
| | | | Signed-off-by: David Seifert <soap@gentoo.org>
* out-of-source.eclass: enable EAPI 8David Seifert2022-01-221-3/+3
| | | | Signed-off-by: David Seifert <soap@gentoo.org>
* go-module.eclass fixed referenced packageDennis Lamm2022-01-211-1/+1
| | | | | | | | | dev-util/golicense -> dev-go/golicense Signed-off-by: Dennis Lamm <expeditioneer@gentoo.org> Package-Manager: Portage-3.0.28, Repoman-3.0.3 Closes: https://github.com/gentoo/gentoo/pull/23890 Signed-off-by: Sam James <sam@gentoo.org>
* llvm.org.eclass: Detect stale patchsetsMichał Górny2022-01-211-1/+9
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Also run nosetests via EPYTHONMichał Górny2022-01-211-1/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* dist-kernel-utils.eclass: add hppa to dist-kernel_get_image_path()Sam James2022-01-201-2/+2
| | | | | | Uses same logic as ppc/ppc64. Just adding to the case statement. Signed-off-by: Sam James <sam@gentoo.org>
* python-utils-r1.eclass: Run sphinx-build via EPYTHONMichał Górny2022-01-201-1/+2
| | | | | | | | | Run sphinx-build via EPYTHON to ensure that the correct Python executable is being used. Otherwise, sphinx-build runs via /usr/bin/python* and does not respect the virtualenv boundaries. Closes: https://bugs.gentoo.org/831565 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Mark installed scripts +x in PEP517 modeMichał Górny2022-01-191-0/+6
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Clean the build tree in PEP517 modeMichał Górny2022-01-181-0/+6
| | | | | | | | | | Ensure to call `esetup.py clean -a` after performing the wheel install in PEP517 mode. This is necessary since we no longer override build paths and setuptools performs the PyPy and CPython builds in the same directory. With its bad install/bdist logic, the CPython wheel ends up including PyPy3 extensions as well. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* common-lisp-3.eclass: use einstalldocsAnna Vyalkova2022-01-171-5/+3
| | | | | Signed-off-by: Anna Vyalkova <cyber+gentoo@sysrq.in> Signed-off-by: Joonas Niilola <juippis@gentoo.org>
* openib.eclass: last-rite for removalDavid Seifert2022-01-161-1/+2
| | | | | | | Closes: https://github.com/gentoo/gentoo/pull/23716 Bug: https://bugs.gentoo.org/601692 Bug: https://bugs.gentoo.org/830999 Signed-off-by: David Seifert <soap@gentoo.org>
* distutils-r1.eclass: Implement PEP517 modeMichał Górny2022-01-161-90/+319
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a PEP517 mode to the distutils-r1.eclass in order to facilitate building packages via PEP517 backends. In order to use it, set DISTUTILS_USE_PEP517 to the appropriate build system name. The eclass will take care of setting BDEPEND, then invoke the backend to build a wheel and then install its contents in python_compile(). The install phase is limited to merging the staging area into the image directory. In PEP517 mode, the test phase is automatically provided with venv-style install tree that should suffice the vast majority of test suites. As a result, distutils_install_for_testing should no longer be necessary and is not available in this mode. The new mode can also be used to install pre-PEP517 distutils and setuptools packages. To do so, just specify setuptools backend. If pyproject.toml is missing, the eclass assumes legacy setuptools backend that invokes setup.py. It also enables setuptools-vendored distutils, effectively carrying the migration from deprecated stdlib version. The PEP517 support effectively deprecates the legacy eclass mode. This follows upstream deprecation of distutils and install commands in setuptools. Closes: https://github.com/gentoo/gentoo/pull/23750 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Fix manpage formattingMichał Górny2022-01-161-0/+4
| | | | | | Thanks to arthurzam for noticing. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Force stdlib distutils for the time beingMichał Górny2022-01-161-0/+4
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Minimize & unify dift --via-venv logicMichał Górny2022-01-161-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modify `distutils_install_for_testing --via-venv` to create a minimal venv manually rather than relying on Python to do so. Use root-style install rather than the egg-style to improve consistency with regular installs. This is a step towards unifying different install layouts used within the eclass. Right now we support three different variants for testing: 1. The build-dir layout that's created by python_compile() and exposed unconditionally through PYTHONPATH. 2. The --via-root layout of dift that resembles install closer (primarily through including package metadata) and also uses PYTHONPATH. 3. The --via-venv layout of dift that creates a venv and installs the packages there. It requires only PATH, not PYTHONPATH. The last layout is the newest and probably the most compatible but it requires additional install step. Since the PEP517 build logic is going to require installing a wheel anyway, the plan is to inject a minimal venv into the staging directory and use it unconditionally for tests. The purpose of this patch is to prepare a single code snippet that will be used both by dift and the new logic logic. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* multibuild.eclass: remove EAPI 4 and 5David Seifert2022-01-161-35/+7
| | | | | | Signed-off-by: David Seifert <soap@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/23699 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* multibuild.eclass: inline cp_argsDavid Seifert2022-01-161-29/+7
| | | | | Signed-off-by: David Seifert <soap@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org>
* multibuild.eclass: remove dead userland_BSDDavid Seifert2022-01-161-23/+12
| | | | | Signed-off-by: David Seifert <soap@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org>
* multilib-build.eclass: remove EAPI 5David Seifert2022-01-161-37/+5
| | | | | Signed-off-by: David Seifert <soap@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org>
* multilib-minimal.eclass: remove EAPI 5David Seifert2022-01-161-8/+9
| | | | | Signed-off-by: David Seifert <soap@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org>
* toolchain-glibc.eclass: Begone foul spirit!Andreas K. Hüttel2022-01-161-1488/+0
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>