summaryrefslogtreecommitdiff
path: root/eclass
Commit message (Collapse)AuthorAgeFilesLines
* llvm.org.eclass: Add 18.0.0_pre20231228 snapshotMichał Górny2023-12-281-0/+3
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* linux-mod-r1.eclass: use kernel compatible xz settings for >=kmod-31Ionen Wolkens2023-12-281-1/+8
| | | | | | | | | | | | | | | | When the non-default CONFIG_KERNEL_DECOMPRESS option is set in kernel >6.4, >=kmod-31 will let the kernel handle decompression rather than use xz-utils. ...but kernel XZ decompressor is more limited, so need to use the same options the kernel does. -T/--threads fortunately is harmless to keep on top. Note crc32 is already the default and main problem was dict size, but still specify in case someone has e.g. XZ_DEFAULTS="--check=sha256". Closes: https://bugs.gentoo.org/920837 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
* autotools.eclass: drop 2.13/2.69 from _WANT_AUTOCONFSam James2023-12-271-1/+1
| | | | | | | | | | If people want/need these, they should explicitly state it in the ebuild (although please port to a newer version!) Otherwise, we're going to be saying that autoconf-2.13 and such could satisfy all ebuilds unless they explicitly say something else which is rather unlikely. Signed-off-by: Sam James <sam@gentoo.org>
* autotools.eclass: treat 2.5 as 2.71 for nowSam James2023-12-271-1/+9
| | | | | | | | | | | Having an unbound dependency (no slot) causes all sorts of problems. Add cases for each slot. I think we should really have the slots aligned to PV and slotmove as required but let's handle that another time. This would've hidden the original bug at least. Bug: https://bugs.gentoo.org/920822 Signed-off-by: Sam James <sam@gentoo.org>
* autotools.eclass: optimize dependency generation (elide subshells)Sam James2023-12-271-2/+6
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* autotools.eclass: avoid deprecated backticksSam James2023-12-271-6/+11
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* autotools.eclass: rework WANT_AUTOCONF handlingSam James2023-12-271-6/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For automake, we enumerate each of the automake slots in _WANT_AUTOMAKE and use this to handle setting WANT_AUTOMAKE accordingly if the ebuild (or user, I suppose) haven't set WANT_AUTOMAKE themselves. This means that we can easily rollover to the latest installed on a system (and we also pull it in via _WANT_AUTOMAKE which is used for dependencies) because WANT_AUTOMAKE is based on the slots in _WANT_AUTOMAKE intersected with whatever is installed on the system. For autoconf, we weren't doing any of that, and were just hardcoding whatever the latest slot is! That's error prone on bumps but it also wasn't really possible to get right as-is without marking a new slot stable because of the entanglement between the dependencies, WANT_AUTOCONF, and no intersection being done (WANT_AUTOCONF wasn't dynamic at all). We now implement a similar scheme for autoconf as we already had for automake. This fixes the case where WANT_AUTOCONF="latest" in an ebuild (the default), autoconf:2.71 isn't installed, but autoconf:2.72 is. This sometimes worked before if the latest dep was slotted rather than unslotted like it is now (see below for why that's not easy to just fix) because the new slot would never get pulled in and hence the older slot which aligned with WANT_AUTOCONF's hardcoded value would be available. (I still think we should consider slotmoving older autoconfs but that's something to discuss and possibly do another time. See TODO.) Bug: https://bugs.gentoo.org/827852 Bug: https://bugs.gentoo.org/893434 Closes: https://bugs.gentoo.org/920822 Signed-off-by: Sam James <sam@gentoo.org>
* toolchain-funcs.eclass: Add tc-is-lto functionMichał Górny2023-12-261-0/+21
| | | | | | | | | | | | | | | Add a function to check whether the C compiler is using LTO. To determine this, we compile a dummy source unit. In the GCC case, we check whether the resulting object file contains ".gnu.lto*" sections. In the clang case, we check whether a valid LLVM bytecode file was output rather than a regular object. The goal of this change is to reduce the amount of USE=lto abuse, and have a consistent cross-package way of enabling LTO via setting appropriate CFLAGS and CXXFLAGS. Closes: https://github.com/gentoo/gentoo/pull/34470 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* kernel-{build,install}.eclass: drop plymouth for generic-ukiAndrew Ammerlaan2023-12-252-8/+8
| | | | | | | | | | plymouth pulls in drm, and drm includes all gpu drivers and their firmware especially the firmware files are very big. The whole thing costs us 15M on each initrd, and therefore gpkg. Also exclude the netronome drivers, these also have ridiculously large firmware files. Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org>
* kernel-install.eclass: Add kernel-install_compress_modulesMichał Górny2023-12-251-0/+11
| | | | | | | Add a function to compress modules manually. It will be used in sys-kernel/gentoo-kernel-bin. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* kernel-{build,install}.eclass: Support XZ module compressionMichał Górny2023-12-252-2/+25
| | | | | | | | | | When KERNEL_IUSE_GENERIC_UKI is set (to gatekeep for new ebuilds), enable XZ module compression in kernel and add IUSE=module-compress. When the flag is enabled, the modules are installed .xz compressed per the config. When it is disabled, they are installed uncompressed but the kernel retains module compression support. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass/ruby-utils.eclass: prepare for ruby33Hans de Graaff2023-12-251-2/+2
| | | | Signed-off-by: Hans de Graaff <graaff@gentoo.org>
* eclass/kernel-install.eclass: warn if USE=-initramfsAndrew Ammerlaan2023-12-241-0/+14
| | | | | | Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/34450 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
* kernel-{build,install}.eclass: compress generic initrd with xzAndrew Ammerlaan2023-12-242-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Some basic benchmarks: -rw------- 1 root root 103494321 Dec 24 11:10 bzip2 -rw------- 1 root root 112179814 Dec 24 11:02 gzip-nostrip -rw------- 1 root root 112179814 Dec 24 11:06 gzip-strip -rw------- 1 root root 112179814 Dec 24 11:08 gzip-strip-aggressive -rw------- 1 root root 130847597 Dec 24 11:19 lz4 -rw------- 1 root root 66948253 Dec 24 11:13 lzma -rw------- 1 root root 124285638 Dec 24 11:18 lzop -rw------- 1 root root 80242444 Dec 24 11:14 xz -rw------- 1 root root 66744036 Dec 24 11:59 xz-9e--check -rw------- 1 root root 85917687 Dec 24 11:20 zstd Strip does nothing, which makes sense since portage already did this. xz is our size champion so pick this one to compress our initrd With this change the generic UKI is: 82515840, versus My own hostonly UKI of the same kernel version: 29390720. Which is still 2.8 times larger, but significantly better then the 5 times larger we had before! Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/34024 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
* plasma.kde.org.eclass: Exclude print-manager from SLOT=5 blockersAndreas Sturmlechner2023-12-231-1/+2
| | | | Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
* flag-o-matic.eclass: allow -fdebug-default-version=*Sam James2023-12-231-0/+1
| | | | | | | Reported by leio. We need this for e.g. Clang to produce output that debugedit is happy with. Signed-off-by: Sam James <sam@gentoo.org>
* kernel-{build,install}.eclass: add USE=generic-ukiAndrew Ammerlaan2023-12-232-10/+301
| | | | | | | | | | - optionally build a generic unified kernel image - only install this uki.efi in any binary generated binpkgs, this saves space - extract the initrd and kernel image from the uki in pkg_postinst - own image, initrd and uki install paths Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org>
* llvm.org.eclass: Remove support for old snapshotsMichał Górny2023-12-221-6/+0
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* llvm.org.eclass: Add 18.0.0_pre20231222 snapshotMichał Górny2023-12-221-0/+3
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* plasma.kde.org.eclass: Exclude kwayland-integration from SLOT=5 blockersAndreas Sturmlechner2023-12-211-0/+1
| | | | Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
* ecm.eclass: Drop dev-qt/qtbase:6[test]Andreas Sturmlechner2023-12-211-5/+3
| | | | Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
* git-r3.eclass: fetch remote_ref in the mirror clone typeAlfred Wingate2023-12-201-0/+2
| | | | | | | | | | * Handles scenarios where commits in submodules are orphaned. Closes: https://bugs.gentoo.org/917746 Bug: https://bugs.gentoo.org/503332 Signed-off-by: Alfred Wingate <parona@protonmail.com> Closes: https://github.com/gentoo/gentoo/pull/33935 Signed-off-by: Sam James <sam@gentoo.org>
* qt6-build.eclass: cleanup <6.5.3 and 6.6.0 workaroundsIonen Wolkens2023-12-191-8/+2
| | | | | | | Only >=6.6.1 in the tree now and, even if someone wanted to restore 6.5.2, lacking this wouldn't prevent typical usage. Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
* kernel-build.eclass: ensure KERNEL_EFI_ZBOOT is probed in all casesWANG Xuerui2023-12-191-6/+6
| | | | | | | | | | | | | The several partially-supported arches (those relying on USE=savedconfig) directly return in src_prepare(), hence previously the CONFIG_EFI_ZBOOT probing didn't have a chance to run when building for those arches, leading to wrong kernel artifact path and failed src_install(). Move the probing to near the end of eclass src_configure(), so the flag correctly reflects the reality in all circumstances. Signed-off-by: WANG Xuerui <xen0n@gentoo.org>
* kernel-install.eclass: support loong in kernel-install_get_qemu_archWANG Xuerui2023-12-191-0/+3
| | | | | | | Right now the loong profiles in Gentoo only cover the 64-bit ISA, so we can unconditionally specify loongarch64 for QEMU. Signed-off-by: WANG Xuerui <xen0n@gentoo.org>
* dist-kernel-utils.eclass: support loong in dist-kernel_get_image_pathWANG Xuerui2023-12-191-0/+7
| | | | | | | The filenames to use are taken from upstream: https://github.com/torvalds/linux/blob/v6.6/arch/loongarch/boot/Makefile. Signed-off-by: WANG Xuerui <xen0n@gentoo.org>
* frameworks.kde.org.eclass: Support unstable release SRC_URIsAndreas Sturmlechner2023-12-181-1/+7
| | | | Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
* distutils-r1.eclass: Call gpep517 via EPYTHONMichał Górny2023-12-171-3/+3
| | | | | | | | | | | Call gpep517 via EPYTHON, in order to make it possible to use any plugins that were installed during python_compile() in python_test(). This is used in dev-python/setuptools-gettext that is tested via building an example project relying on the plugin. Signed-off-by: Michał Górny <mgorny@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/34312 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* llvm.org.eclass: Add 18.0.0_pre20231215 snapshotMichał Górny2023-12-151-0/+3
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* plasma.kde.org.eclass: Support KDE_ORG_TAR_PNAndreas Sturmlechner2023-12-151-1/+1
| | | | Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
* plasma.kde.org.eclass: Support versioning scheme of Plasma 6 BetasAndreas Sturmlechner2023-12-151-0/+4
| | | | Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
* plasma.kde.org.eclass: Add _PSLOT major version mapping, SLOT 5 blockerAndreas Sturmlechner2023-12-151-1/+24
| | | | Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
* gear.kde.org.eclass: Support KDE_ORG_TAR_PNAndreas Sturmlechner2023-12-151-1/+1
| | | | Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
* frameworks.kde.org.eclass: Support KDE_ORG_TAR_PNAndreas Sturmlechner2023-12-151-1/+1
| | | | Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
* frameworks.kde.org.eclass: Simplify SLOT handlingAndreas Sturmlechner2023-12-151-2/+2
| | | | Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
* kde.org.eclass: Add KDE_ORG_TAR_PN override variableAndreas Sturmlechner2023-12-151-2/+11
| | | | Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
* ninja-utils.eclass: use app-alternatives/ninjaSam James2023-12-151-12/+9
| | | | | | | | Needed now that it's stable. Bug: https://bugs.gentoo.org/919969 Closes: https://bugs.gentoo.org/917623 Signed-off-by: Sam James <sam@gentoo.org>
* rocm.eclass: add ROCM_SKIP_GLOBALS for the USE-flags exposure.Benda Xu2023-12-141-2/+16
| | | | | | | | | | | Low level ebuilds such as dev-util/hip and dev-libs/rocm-opencl-runtime unconditionally supports all the AMDGPU cards. They do not need to define amdgpu_targets_* USE-flags. But their src_test() call check_amdgpu() to confirm an AMDGPU is available. Reference: https://marc.info/?l=gentoo-dev&m=170045497732286 Signed-off-by: Benda Xu <heroxbd@gentoo.org>
* flag-o-matic.eclass: allow -mtls-dialect=* through filterSam James2023-12-141-0/+4
| | | | | | | | | | Most arches have this set anyway but amd64 is likely to switch to gnu2 finally as well [0] so let's allow testing with it (and reverting to the old default once it changes) by allowing -mtls-dialect=* through the filter. [0] https://inbox.sourceware.org/gcc/871qbqp4of.fsf@oldenburg.str.redhat.com/ Signed-off-by: Sam James <sam@gentoo.org>
* python-utils-r1.eclass: fix EclassReservedName (drop obsolete ${EBUILD} old ↵Sam James2023-12-141-11/+0
| | | | | | | | | | compat check) We introduced this in ddd9cd63e860ce71ad5f92e80a3e6e4be901af8a but it's UB to use ${EBUILD} and pkgcheck nowadays has OldPythonCompat for this. Bug: https://github.com/pkgcore/pkgcheck/issues/591 Signed-off-by: Sam James <sam@gentoo.org>
* distutils-r1.eclass: mark DISTUTILS_EXT as @PRE_INHERITSam James2023-12-141-0/+1
| | | | | | We set DEPEND and IUSE based on it. Signed-off-by: Sam James <sam@gentoo.org>
* distutils-r1.eclass: workaround cython bug for Modern CSam James2023-12-141-0/+5
| | | | | | | | | | | Pass -Wno-error=incompatible-pointer-types for now to avoid many dupes for the same cython bug. Bug: https://github.com/cython/cython/issues/2747 Bug: https://bugs.gentoo.org/918983 Bug: https://bugs.gentoo.org/919261 Bug: https://bugs.gentoo.org/919277 Signed-off-by: Sam James <sam@gentoo.org>
* python-utils-r1.eclass: Disable pytest-salt-factories by defaultMichał Górny2023-12-141-0/+2
| | | | | Signed-off-by: Michał Górny <mgorny@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* python-utils-r1.eclass: epytest, use NO_COLOR rather than NOCOLORMichał Górny2023-12-141-9/+2
| | | | | | | | | | Update epytest to respect the modern NO_COLOR variable rather than Portage's old NOCOLOR. Adjust it to correctly check whether it is set at all rather than to a specific value, to match the behavior of pytest itself. Signed-off-by: Michał Górny <mgorny@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* qt5-build.eclass: filter-ltoAndreas Sturmlechner2023-12-121-0/+3
| | | | | | | | | | Closes: https://bugs.gentoo.org/650488 Closes: https://bugs.gentoo.org/692078 Closes: https://bugs.gentoo.org/713850 Closes: https://bugs.gentoo.org/908419 Closes: https://bugs.gentoo.org/652158 Closes: https://bugs.gentoo.org/919043 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
* kernel-build.eclass: work around permissions issue with module signingViolet Purcell2023-12-111-6/+12
| | | | | | | | | | | | | | | Currently, using a custom path for MODULES_SIGN_KEY requires the key to be readable by portage:portage. This is not ideal for security, since the file has to be either owned by portage:portage or readable by all users in this case. Instead, export the contents of MODULES_SIGN_KEY to a variable in pkg_setup, and then create a temporary file with it in src_configure to ensure that the temporary key is readable by the user that the kernel is being built as. The variable is then unset so it does not end up in the final environment file. Co-authored-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> Signed-off-by: Violet Purcell <vimproved@inventati.org> Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
* kernel-install.eclass: fix test phase on systemd systemsAndrew Ammerlaan2023-12-111-0/+3
| | | | | | | | | | | | | On systemd systems the dracut systemd modules are included automatically. Systemd insists our dummy root has some valid /etc/os-release file, otherwise it refuses the switch root operation. However, with this fix it still does not boot up correctly on systemd systems, it gets stuck in an infinite boot loop. Presumably the reason has something to do with our dummy root not having a real systemd init to switch root to. We add the systemd dracut modules to the omit list to prevent the problem and ensure the test phase behaves the same on systemd and non-systemd systems. Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
* ghc-package.eclass: Fix typosUlrich Müller2023-12-111-1/+1
| | | | Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* haskell-cabal.eclass: Fix typosUlrich Müller2023-12-111-3/+3
| | | | Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* ghc-package.eclass: Drop support for EAPI 6Ulrich Müller2023-12-111-2/+1
| | | | Signed-off-by: Ulrich Müller <ulm@gentoo.org>