summaryrefslogtreecommitdiff
path: root/eclass
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* haskell-cabal.eclass: Drop support for EAPI 6Ulrich Müller2023-12-111-6/+3
| | | | Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* vdr-plugin-2.eclass: Drop support for EAPI 6Ulrich Müller2023-12-111-15/+5
| | | | Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* cargo.eclass: Allow CRATES to be unsetMichał Górny2023-12-091-5/+0
| | | | | | | | | | Remove the assertion requiring CRATES to be set for non-live ebuilds. There are valid use cases for ebuilds without CRATES, and the eclass works just fine -- e.g. when the package is using GIT_CRATES only, or when crates are provided via a tarball. Closes: https://github.com/gentoo/gentoo/pull/34091 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* kernel-build.eclass: Do not call dtbs_install in src_test()Michał Górny2023-12-091-6/+1
| | | | | | | | Do not call `emake dtbs_install` in `src_test()` phase, as it attempts to install straight to `/boot`. Why do people send patches without actually testing them?! Signed-off-by: Michał Górny <mgorny@gentoo.org>
* java-pkg-opt-2.eclass: Drop redundant EAPI conditionalUlrich Müller2023-12-091-5/+3
| | | | | | Use standard EAPI guard. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* java-pkg-2.eclass: Use standard EAPI guardUlrich Müller2023-12-091-2/+2
| | | | Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* java-ant-2.eclass: Drop redundant EAPI conditionalUlrich Müller2023-12-091-3/+2
| | | | Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* java-utils-2.eclass: Drop redundant EAPI conditionalsUlrich Müller2023-12-091-24/+5
| | | | | | Use standard EAPI guard. Inherit eqawarn instead of eutils in EAPI 6. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* rpm.eclass: Replace eutils inherit by eqawarn in EAPI 6Ulrich Müller2023-12-081-1/+1
| | | | | Reviewed-by: David Seifert <soap@gentoo.org> Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* flag-o-matic.eclass: Replace eutils inherit by eqawarn in EAPI 6Ulrich Müller2023-12-081-1/+1
| | | | | Reviewed-by: David Seifert <soap@gentoo.org> Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* llvm.eclass: add tuple -> LLVM_TARGETS translate functionMatoro Mahri2023-12-071-0/+31
| | | | | | | | | | To be used in support of dev-lang/rust under crossdev. Cross-compiled rust needs LLVM with support for both host and destination targets. Bug: https://bugs.gentoo.org/680652 Signed-off-by: Matoro Mahri <matoro_gentoo@matoro.tk> Closes: https://github.com/gentoo/gentoo/pull/33996 Signed-off-by: Sam James <sam@gentoo.org>
* eclass/(dist-)kernel{-utils,-install}: More flexible initrd generationAndrew Ammerlaan2023-12-052-28/+52
| | | | | | | | | | | | | We only need to call dracut to generate an initrd/uki if we are using <=sys-kernel/installkernel-gentoo-7. sys-kernel/installkernel-systemd already calls dracut via its plugin system if it is installed. sys-kernel/installkernel-gentoo-8[dracut] now also contains the code required to generate an initrd or uki. This change makes it possible for users to use other/custom initrd generators with our dist kernels if they are using installkernel-systemd. Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
* vala.eclass: adapt modern c workaround for gccSam James2023-12-041-1/+1
| | | | | | | | | | GCC doesn't have -Wincompatible-function-pointer-types, just -Wincompatible-pointer-types, and it makes the latter fatal in GCC 14. Just adapt the workaround to use that for now until Vala is fixed properly upstream. Bug: https://bugs.gentoo.org/892708 Signed-off-by: Sam James <sam@gentoo.org>
* llvm.org.eclass: Add 18.0.0_pre20231129 snapshotMichał Górny2023-11-291-0/+3
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* meson.eclass: update machine files for meson-1.3.0 deprecationSam James2023-11-271-0/+6
| | | | | | | | | | | | | See https://mesonbuild.com/Release-notes-for-1-3-0.html#machine-files-pkgconfig-field-deprecated-and-replaced-by-pkgconfig. 'pkgconfig' is deprecated as a key in machine files in favour of 'pkg-config'. We can define both 'pkgconfig' and 'pkg-config' in our generated machine files until we require >=1.3.0. Per the release notes, if we define both, no deprecation notice is emitted, so do that. Reviewed-by: Eli Schwartz <eschwartz93@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
* Revert "kernel-build.eclass: copy module signing key to tempdir in pkg_setup"Andrew Ammerlaan2023-11-261-10/+7
| | | | | | | | reverted at mgorny's request, apparently we can't hardcode the portage user. This reverts commit d03c14cd4be8665830082f424e4443906b005c7e. Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
* aspell-dict-r1.eclass: drop usage of whichSam James2023-11-261-2/+5
| | | | | | | | The configure script uses are all the same. Go for a sed instead of many patches for all of aspell-*. Bug: https://bugs.gentoo.org/844094 Signed-off-by: Sam James <sam@gentoo.org>
* kernel-build.eclass: copy module signing key to tempdir in pkg_setupViolet Purcell2023-11-261-7/+10
| | | | | | | | | | | Previously, it was being copied in src_prepare, and thus would fail if the signing key was not readable by portage:portage. This commit makes kernel-build.eclass instead copy the signing key in pkg_setup, and then correct the permissions. Signed-off-by: Violet Purcell <vimproved@inventati.org> Closes: https://github.com/gentoo/gentoo/pull/33850 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
* ecm.eclass: Relax kde-frameworks/extra-cmake-modules SLOT dep to :*Andreas Sturmlechner2023-11-261-1/+1
| | | | | | We do not need to pin to 0 right away to let overlays catch up. Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
* frameworks.kde.org.eclass: Support KF6, set ECM to SLOT=0Andreas Sturmlechner2023-11-261-2/+13
| | | | | | | | | Define SLOT=6 properly for >=5.240, excluding 5.9999 git master was set to 5.240 for KF6 ports, unstable KF6 releases use numbers 5.245 and above. Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
* frameworks.kde.org.eclass: Switch 5.9999 to kf5 branchAndreas Sturmlechner2023-11-261-17/+26
| | | | | | | See also: https://mail.kde.org/pipermail/kde-frameworks-devel/2023-January/123124.html Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
* ecm.eclass: Use _KFSLOT to aptly configure KF5/KF6 based packagesAndreas Sturmlechner2023-11-261-21/+25
| | | | Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
* ecm.eclass: Add SLOT=6 dependencies if KFMIN is >=5.240Andreas Sturmlechner2023-11-261-3/+16
| | | | | | | - Excluding KDE Frameworks 5.9999 from KFMIN>=5.240 check - Enforce QT_MAJOR_VERSION=6 for packages w/ KFMIN >= 5.240 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
* ecm.eclass: Initial support for Qt6-based consumersAndreas Sturmlechner2023-11-261-11/+26
| | | | Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
* llvm.org.eclass: Remove old snapshotsMichał Górny2023-11-251-6/+0
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* go-env.eclass: fix GO386 handlingSam James2023-11-241-1/+22
| | | | | | | | | | | | | | | | | | Go 1.16 dropped explicit support for 386 FP and relies on software emulation instead in the absence of SSE2. * First, check if cpu_flags_x86_sse2 is used in the ebuild. If it is and it's enabled, then act in SSE2 mode. * If not, fall back to checking whether the compiler has __SSE2__ defined via e.g. -march in CFLAGS. * Failing that, use softfloat mode. Fixes the issue mentioned in 5718f8440197298e0aa1df2a88a66057d2cdaf83 (where we tried to use a USE flag which isn't implicit). Signed-off-by: Sam James <sam@gentoo.org>
* go-env.eclass: Reapply "also set GOARM & GO386 when applicable"Sam James2023-11-241-0/+21
| | | | | | | | | | | This reverts commit 5718f8440197298e0aa1df2a88a66057d2cdaf83. Reverted because of the issue mentioned in 5718f8440197298e0aa1df2a88a66057d2cdaf83 to not leave things broken while investigating a fix. Reapplying and fixing it up in a followup. Signed-off-by: Sam James <sam@gentoo.org>
* Revert "go-env.eclass: also set GOARM & GO386 when applicable"Sam James2023-11-241-21/+0
| | | | | | | | | This reverts commit 64224abbe06824d47c554dced4149b51f3cebe91. Ionen raises on the ML that this won't work unless cpu_flags_x86_sse2 is in IUSE, so revert for now until can figure that bit out. Signed-off-by: Sam James <sam@gentoo.org>
* go-env.eclass: also set GOARM & GO386 when applicableWANG Xuerui2023-11-241-0/+21
| | | | | | | | | | This is necessary for the build artifact to conform to the configured ISA level and features on those arches. The logic is also taken from the dev-lang/go ebuild. Signed-off-by: WANG Xuerui <xen0n@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/33941 Signed-off-by: Sam James <sam@gentoo.org>
* go-env.eclass: unify GOARCH mapping logic with dev-lang/goWANG Xuerui2023-11-241-14/+26
| | | | | | | | | | | | | | | | Previously the eclass featured its own GOARCH mapping, that took care of less cases than the dev-lang/go ebuild did, and broke Go packages on arches like loong (GOARCH=loong64), mips (4 GOARCHes supported in total) or riscv (GOARCH=riscv64). This patch adds a copy of the go_arch() helper from dev-lang/go to the eclass and switches the go-env_set_compile_environment() function to use that, to fix the problem at hand. Fixes: 878d04daaf34765e6224e58139a9c45921d7a0c3 Closes: https://bugs.gentoo.org/917750 Signed-off-by: WANG Xuerui <xen0n@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* multibuild.eclass: Fix passing return value from variantsMichał Górny2023-11-231-1/+1
| | | | | | | | Move the misplaced return value saving into the variant loop, so that any non-successful return code is saved (as intended) rather than just the last one. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* toolchain-autoconf.eclass: Add TC_AUTOCONF_ENVPREFIXArsen Arsenović2023-11-221-1/+8
| | | | | | | | This variable allows packages like autoconf-vanilla to adjust their priority in env.d concatenation. Signed-off-by: Arsen Arsenović <arsen@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* toolchain-autoconf.eclass: accept arguments for src_configureSam James2023-11-221-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* toolchain-autoconf.eclass: handle different PNSam James2023-11-221-2/+5
| | | | | | Prepare for autoconf-vanilla. Signed-off-by: Sam James <sam@gentoo.org>
* flag-o-matic.eclass: allow further MIPS errata flagsSam James2023-11-211-3/+9
| | | | | | | | | | | | | | | | * We were missing 24k, r5900, vr4120, vr4130, sb1 [0]. * Chuck in -Wa,-mfix-loongson2f-nop while at it. The topic of -Wa,* is an interesting one, as we currently allow -Wl,*, so we should probably do the same for the assembler, but punt that to another time. Note that we use r5900 and -Wa,-mfix-loongson2f-nop for building stages... Prompted by discussion with immolo (see also fad75a344cbaada57ae490c3e8f88cdd5b35dadc). [0] https://gcc.gnu.org/onlinedocs/gcc/MIPS-Options.html#index-mfix-24k (and below) Signed-off-by: Sam James <sam@gentoo.org>
* flag-o-matic.eclass: allow -mfix-r5900 errata flag for MIPSSam James2023-11-211-1/+2
| | | | | | Reported by immolo. Signed-off-by: Sam James <sam@gentoo.org>
* eclass/golang-vcs.eclass: set up compile envThilo Fromm2023-11-201-1/+4
| | | | | | | | | | | This change calls go-env_set_compile_environment in golang-vcs's src_unpack to set up a sane compile environment early in the go build process. This un-breaks cross compiling of all golang ebuilds that inherit golang-vcs. Signed-off-by: Thilo Fromm <thilo.alexander@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/33539 Signed-off-by: James Le Cuirot <chewi@gentoo.org>
* eclass/golang-vcs-snapshot.eclass: set up compile envThilo Fromm2023-11-201-1/+4
| | | | | | | | | | This change calls go-env_set_compile_environment in golang-vcs-snapshot's src_unpack to set up a sane compile environment early in the go build process. This un-breaks cross compiling of all golang ebuilds that inherit golang-vcs-snapshot. Signed-off-by: Thilo Fromm <thilo.alexander@gmail.com> Signed-off-by: James Le Cuirot <chewi@gentoo.org>
* eclass/go-module.eclass: export compile env in src_unpackThilo Fromm2023-11-201-1/+4
| | | | | | | | | | This change calls go-env_set_compile_environment in go-module's src_unpack to set up a sane compile environment early in the go build process. This un-breaks cross compiling of all golang ebuilds that inherit go-module. Signed-off-by: Thilo Fromm <thilo.alexander@gmail.com> Signed-off-by: James Le Cuirot <chewi@gentoo.org>
* eclass/go-env.eclass: add helper to set compile envThilo Fromm2023-11-201-0/+48
| | | | | | | | | | | | | | | | | | | | | | This change adds a helper function to explicitly set CC, CXX, and GOARCH, and carrying over CFLAGS, LDFLAGS and friends to CGO equivalents, to provide a minimal sane compile environment for Go. It enables Go builds to play nice with crossdev's wrappers for emerge/ebuild etc. Previously, Go ebuilds emitted binaries for the host architecture. For example, when running on an x86_64 host: emerge-aarch64-cross-linux-gnu foo will now correctly emerge Go package "foo" for aarch64 instead of x86_64. The eclass provides a single helper function go-env_set_compile_environment() intended to be called by other Go eclasses in an early build stage. Ebuilds may also explicitly call this function. Signed-off-by: Thilo Fromm <thilo.alexander@gmail.com> Signed-off-by: James Le Cuirot <chewi@gentoo.org>
* haskell-cabal.eclass: Fix default_exposed_pkgshololeap2023-11-191-0/+1
| | | | | | | | | The array package has been available via dev-lang/ghc for years but was not included as a default for GHC_BOOTSTRAP_PKGS. This adds 'array' to default_exposed_pkgs. Signed-off-by: hololeap <hololeap@protonmail.com> Signed-off-by: Sam James <sam@gentoo.org>
* distutils-r1.eclass: Silence pydevd warningsMichał Górny2023-11-191-0/+3
| | | | | | | | | Set `PYDEVD_DISABLE_FILE_VALIDATION` to silence warnings about frozen modules from dev-python/pydevd. Signed-off-by: Michał Górny <mgorny@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/33888 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Do not pass `-p no:*` w/ no autoloadingMichał Górny2023-11-191-23/+28
| | | | | | | | Modify `epytest` not to pass our plethora of `-p no:*` arguments when `PYTEST_DISABLE_PLUGIN_AUTOLOAD` is set. This is NFC since the plugins wouldn't be loaded anyway. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Do not pass `-p xdist` w/ PYTEST_PLUGINSMichał Górny2023-11-191-3/+7
| | | | | | | | Fix `epytest` with `EPYTEST_XDIST` not to pass a duplicate `-p xdist` when `xdist.plugin` is already present in `PYTEST_PLUGINS`. Otherwise, pytest will fail due to the plugin being loaded twice. Signed-off-by: Michał Górny <mgorny@gentoo.org>