Commit Graph

7469 Commits

Author SHA1 Message Date
Andreas Sturmlechner
3e48742e69 kodi-addon.eclass: cmake consumer never ported to EAPI-7, now its DEAD
All revdeps were ported away from this triviality.

Bug: https://bugs.gentoo.org/939660
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
2025-05-21 21:21:10 +02:00
Ionen Wolkens
239671750e wine.eclass: fix 32bit-only builds on amd64
Oversight, (at least) needed to set PKG_CONFIG_PATH properly.

>=wine-10 can figure it out by itself, but still want to keep
this to setup everything properly rather than leave it to fate.

Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
2025-05-20 18:55:41 -04:00
Matt Turner
378f828927 eclass: Add xorg-meson eclass
To be used by X.Org packages with a meson build system. Largely a copy
of xorg-3.eclass with changes necessary to switch from autotools to
meson.

Compared with xorg-3, I've dropped a few things that I don't think are
necessary (at least initially), namely:

- font support (media-libs/font-* packages); packages change very
  rarely and don't have meson build systems upstream.
- XORG_DOC dependencies. This actually looks wrong in xorg-3?
    - asciidoc is used to generate docbook documentation (which I
      don't think we ever do in the ebuilds)
    - xmlto is used to create some man pages from XML, but the man pages
      are checked into git so we don't ever need to generate them

Signed-off-by: Matt Turner <mattst88@gentoo.org>
2025-05-19 11:21:58 -04:00
Michał Górny
418ada7356 Add 21.0.0_pre20250517 snapshot
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2025-05-17 14:58:50 +02:00
Michał Górny
636ecd8b17 Remove old snapshots
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2025-05-17 14:58:49 +02:00
Sam James
63d033755d Revert "rust.eclass: revert simplified dependency simplification"
This reverts commit 34b74faa06, i.e.
reapplies the simplified dependency specification.

We had to revert this before because of the collision issues when
switching to slotted Rust where the same Rust version existed before
in a non-slotted variant. We have a sanity check and workaround for that
in pkg_postinst for affected versions now, so there shouldn't be a reason
we can't do this.

This may ease depcleaning older Rust in some cases w/o having to rebuild
packages against new Rust.

Bug: https://bugs.gentoo.org/943143
Bug: https://bugs.gentoo.org/943206
Bug: https://bugs.gentoo.org/953884
Signed-off-by: Sam James <sam@gentoo.org>
2025-05-16 10:57:01 +01:00
Michał Górny
0bc152f357 llvm.org.eclass: Require new OpenPGP keys
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2025-05-16 11:30:54 +02:00
Ionen Wolkens
0db5ce887b wine.eclass: limit -std=gnu17 to <wine-10
chiitoo mentioned that (at least) 10.7 works without this, and
that the last needed fixes were in 10.0-rc1, so I tried 10.0
and it was also fine.

vanilla-9.0.1 does not seem to have received a hotfix for this and
still fails, there's also proton-9.0.4 to worry about so will just
keep passing it for <10 until they're gone.

Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
2025-05-15 21:59:37 -04:00
Alfred Wingate
fa1b0ff46e dot-a.eclass: exit early if static-libs use disabled
Otherwise it will try to run inside the build directory if there is a
static-libs use flag which is disabled.

llvm-bitcode-strip: error: './build/obj/lib/x509_x509path.o': The file was not recognized as a valid object file

Signed-off-by: Alfred Wingate <parona@protonmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
2025-05-15 08:11:02 +01:00
hololeap
8ae4c6d315 haskell-cabal.eclass: Add early check for invalid GHC cache
If the GHC cache is invalid, it can create a confusing error during
src_compile. Add a check in haskell-cabal-pkg_setup that checks for
and fixes an invalid cache.

Closes: https://bugs.gentoo.org/916785
Closes: https://bugs.gentoo.org/916971
Closes: https://bugs.gentoo.org/920879
Closes: https://github.com/gentoo-haskell/gentoo-haskell/issues/1469
Thanks-to: Tom Gillespie <tgbugs@gmail.com>
Signed-off-by: hololeap <hololeap@protonmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/41562
Closes: https://github.com/gentoo/gentoo/pull/41562
Signed-off-by: Arsen Arsenović <arsen@gentoo.org>
2025-05-15 09:09:53 +02:00
hololeap
78beda50cf haskell-cabal.eclass: Output ghc version in src_configure
This will provide valuable ghc version info in build logs

Signed-off-by: hololeap <hololeap@protonmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/41562
Signed-off-by: Arsen Arsenović <arsen@gentoo.org>
2025-05-15 09:09:53 +02:00
Matt Jolly
dae6fd9e1c dev-lang/rust*; sys-devel/rust-std: drop 1.71.1
Rust 1.71.1 was retained due to games-strategy/ja2-stracciatella
being unable to build with any later version of Rust.

This package has been updated and as 1.71.1 is not in our
bootstrap path it is safe to remove (and remove that slot from
consideration in the eclass).

Signed-off-by: Matt Jolly <kangie@gentoo.org>
2025-05-15 09:01:34 +10:00
Ulrich Müller
12508812d0 edo.eclass: Fix two issues with edo() output
This updates the edo function to behave similar to its possible
implementation in the package manager for EAPI 9:

- Backslash-escaping (as einfo does via "echo -e") is not wanted.

- Arguments should be printed in a quoted format that could be reused
  as shell input. We quote arguments using the "@Q" operator of Bash
  parameter expansion, but avoid excessive quoting by testing each
  argument for shell metacharacters. The resulting output should be
  very similar to that of the trace obtained with "set -x".

  Note that the @Q operator did not exist in Bash 4.2, therefore
  arguments are printed literally in EAPI 7.

Bug: https://bugs.gentoo.org/744880#c13
Suggested-by: Eli Schwartz <eschwartz@gentoo.org>
Reviewed-by: Eli Schwartz <eschwartz@gentoo.org>
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
2025-05-14 10:12:32 +02:00
Sam James
abbb1a0e6a toolchain.eclass: tweak Go path for QA_PRESTRIPPED
Not sure if the others are right or obsolete now, or what, but
for me, the "prestripped" (but not) files are at e.g.
usr/lib/go/15/x86_64-pc-linux-gnu/crypto.gox.

Followup to ff1f410ec1.

Signed-off-by: Sam James <sam@gentoo.org>
2025-05-11 05:34:08 +01:00
Sam James
e45c2d0d0a distutils-r1.eclass: workaround bash-5.3* bug
Bug: https://lists.gnu.org/archive/html/bug-bash/2025-05/msg00005.html
Signed-off-by: Sam James <sam@gentoo.org>
2025-05-10 19:52:29 +01:00
Michał Górny
6a1ca7dee4 Add 21.0.0_pre20250510 snapshot
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2025-05-10 14:58:43 +02:00
Michał Górny
f2cc9eb192 distutils-r1.eclass: Allow DISTUTILS_UPSTREAM_PEP517=standalone
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2025-05-10 14:57:15 +02:00
Michał Górny
3adc7e900e distutils-r1.eclass: Fix pyvenv correctly for Python 3.14
Python 3.14 cleaned up the venv logic, and we have been apparently
relying on some hacks that worked by accident.  More specifically:

1. pyvenv.cfg location is used explicitly as sys.prefix, so we can
   no longer put it inside bin/ subdirectory (no clue why we did that
   -- probably a long chain of historical reasons).

2. "home =" must always be present for venv detection to work.

With these changes, Python 3.14 seems now able to correctly detect
the venv and set prefixes accordingly.  Since they improve correctness,
they should also be fine for other Python versions.

Apparently, the pyvenv.cfg file was moved into bindir back in 2022,
for the trivial reason of using a single directory for all created
files.  Mea culpa!

Fixes: d5b7d1b425
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2025-05-10 14:57:14 +02:00
Sam James
ff1f410ec1 toolchain.eclass: set QA_PRESTRIPPED for now for Go
As slyfox analysed on the bug, Portage shouldn't be warning on these
files as they're not executables. We should look at fixing Portage
but set QA_PRESTRIPPED for now to avoid noise and potentially missing
other actual warnings.

Bug: https://bugs.gentoo.org/793770
Closes: https://bugs.gentoo.org/795810
Closes: https://bugs.gentoo.org/955240
Signed-off-by: Sam James <sam@gentoo.org>
2025-05-10 02:53:27 +01:00
Michał Górny
7750d0dd14 distutils-r1.eclasS: Set "home =" in pyvenv.cfg
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2025-05-08 21:09:33 +02:00
Michał Górny
4225e61a43 python-utils-r1.eclass: Add python3.14 targets
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2025-05-08 14:32:52 +02:00
Michał Górny
aff1a7696b python-utils-r1.eclass: Switch python_optimize to use -s
Switch `python_optimize()` to use a combination of `-s` and `-p` options
instead of `-d`, since the latter does not seem to work correctly
in some cases, e.g. with `www-servers/uwsgi`:

```
The stripdir path '/tmp/portage/www-servers/uwsgi-2.0.27/image/usr/lib/python3.13/site-packages/' is not a valid prefix for source path '/tmp/portage/www-servers/uwsgi-2.0.27/image/usr/lib/python3.13/site-packages/uwsgidecorators.py'; ignoring
```

These options are supported in all Python versions the eclasses
currently do support.

Signed-off-by: Michał Górny <mgorny@gentoo.org>
2025-05-08 14:32:48 +02:00
Michał Górny
327899889f python-utils-r1.eclass: Remove old code paths for python_optimize
Remove the old code paths that used to provide `python_optimize()`
for Python 3.8 and Python 2.7 / PyPy.  I thought we were keeping them
for dev-lang/pypy ebuilds but apparently we're calling compileall
directly there.

Signed-off-by: Michał Górny <mgorny@gentoo.org>
2025-05-08 14:32:47 +02:00
Michał Górny
692aa86d57 distutils-r1.eclass: Quote DISTUTILS_ALLOW_WHEEL_REUSE
Reported-by: Ionen Wolkens <ionen@gentoo.org>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2025-05-08 14:29:18 +02:00
Michał Górny
6cbb421176 python-utils-r1.eclass: Simplify _python_impl_matches
Remove special case for '3.10' in _python_impl_matches -- it was only
necessary because we needed to handle 'pypy3' target specially,
and that is no longer the case.  Technically, the code checks for
'pypy3_10' but that's not a problem, since there is no such a thing.

Signed-off-by: Michał Górny <mgorny@gentoo.org>
2025-05-08 14:29:17 +02:00
Eli Schwartz
a13d692939 flag-o-matic.eclass: allow -ffat-lto-objects in strip-flags
This flag is "safe" for the same reason `-flto` is "safe". Furthermore,
the new dot-a.eclass relies on setting this flag, which `strip-flags` then
deletes again in the event that a package uses both `lto-guarantee-fat` and
`strip-flags`.

End result: static libraries that contain neither LTO nor regular object
code.

Example package that does this: dev-libs/nss

Acked-by: Sam James <sam@gentoo.org>
Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
2025-05-06 13:40:28 -04:00
Sam James
89468b4dc0 eclass/tests: tweak dot-a.sh tests for binutils
I'm not sure if I made a mistake when testing this before or if it changed
when the strip patch did, but the new behaviour is fine too with the
latest patch for Binutils.

I think what happened is that the patch changed to only mangle with -R ...
where ... is for LTO sections, which is fine for us. But doing this in a
separate commit so I can revert it easily if needed.

See https://sourceware.org/bugzilla/show_bug.cgi?id=21479#c13.

Signed-off-by: Sam James <sam@gentoo.org>
2025-05-06 09:45:09 +01:00
Sam James
f4e964aa20 dot-a.eclass: new eclass for handling LTO in static archives
Introduce a new eclass with utility functions for handling LTO bytecode
(or internal representation, IR) inside static archives (.a files).

Static libraries when built with LTO will contain LTO bytecode which is
not portable across compiler versions or compiler vendors. To avoid pessimising
the library and always filtering LTO, we can build it with -ffat-lto-objects
instead, which builds some components twice. The installed part will then
have the LTO contents stripped out, leaving the regular objects in the
static archive.

It's not feasible to make these work otherwise, as we'd need tracking
for whether a library was built by a specific compiler and its version,
and that compatibility can vary based on other factors (e.g. with gcc,
sys-devel/gcc[zstd] controls if it supports zstd compression for LTO). We
also discourage static libraries anyway.

Provide two functions:

* lto-guarantee-fat

  If LTO is currently enabled (as determined by `tc-is-lto`, added in
  2aea6c3ff2), add `-ffat-lto-objects`
  to CFLAGS and CXXFLAGS if supported.

  This guarantees that produced archives are "fat" (contain both IR
  and regular object files) for later pruning.

* strip-lto-bytecode

  Process a given static archive (.a file) and remove its IR component,
  leaving a regular object.

This approach is also taken by Fedora, openSUSE, and Debian/Ubuntu. An
honourable mention to `lto-rebuild` which fulfilled the same task for many
in the LTO overlay too.

We did consider an alternative approach where we'd relink objects using
the driver in src_install (or some hook afterwards), but this would be
more brittle, as we'd need to extract the right arguments to use (see
e.g. the recent Wireshark issues in fad8ff8a45
for how this can be subtle) and not PM-agnostic given we don't have portable
hooks right now (and even if we did, suspect they wouldn't work in a way
that facilitated this). It's also not clear if such an approach would've
worked for Clang.

The tests have been quite helpful in debugging this and making sure things
work as expected. They  both make sure the eclass does what it ought to,
but also try to capture the expected interaction with the toolchain (which is
why we have the skips depending on tooling & versions) to allow us to test
workarounds and make sure we understand the interactions fully: it made
it easy to test e.g. a patch to Binutils to make strip have plugin/LTO
integration (PR21479).

All of this wasn't worth pursuing until H. J. Lu's patches for Binutils
landed, which they have now in binutils-2.44 [0], which made bfd's handling
of mixed objects much more robust.

[0] https://inbox.sourceware.org/binutils/20250112220244.597636-1-hjl.tools@gmail.com/

Bug: https://bugs.gentoo.org/926120
Thanks-to: Arsen Arsenović <arsen@gentoo.org>
Co-authored-by: Eli Schwartz <eschwartz@gentoo.org>
Signed-off-by: Sam James <sam@gentoo.org>
2025-05-06 09:45:06 +01:00
Sam James
524897aa59 toolchain.eclass: check current version for HPPA workaround
As the GCC version being used for stage1 may not be the version we think
it is with the bootstrap compiler (i.e. $(gcc-full-version) may not
reflect what we're using because of ada-bootstrap).

Signed-off-by: Sam James <sam@gentoo.org>
2025-05-05 16:55:09 +01:00
Sam James
12e4c095bc toolchain.eclass: move hppa workaround to CC
... as it must always be passed whenever -specs is.

Signed-off-by: Sam James <sam@gentoo.org>
2025-05-05 16:44:33 +01:00
Sam James
a3b3428e8a toolchain.eclass: pass -fno-stack-protector for HPPA GNAT bootstrap
For HPPA, the ada-bootstrap binaries seem to default to -fstack-protector still
(maybe because of cross-building) so we need to override it for <13
(which ignores -fstack-protector) as SSP doesn't exist there. The GNAT
configure test gets confused by GCC warning about this otherwise.

Signed-off-by: Sam James <sam@gentoo.org>
2025-05-05 16:32:19 +01:00
Michał Górny
c5ccc7350f Add 21.0.0_pre20250503 snapshot
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2025-05-03 21:41:51 +02:00
Sam James
36d4028db6 qt5-build.eclass: disable reduce-relocations
For Qt 5, it's best to just disable reduce-relocations, because it
doesn't (unlike Qt 6) support -mno-direct-extern-access, which means
CMake applications building against Qt 5 are prone to all the issues
mentioned in the bug.

Bug: https://bugs.gentoo.org/754021
Signed-off-by: Sam James <sam@gentoo.org>
2025-05-03 06:27:03 +01:00
Michał Górny
8394e261f9 python-utils-r1.eclass: Add more tests for impl match corner cases
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2025-05-02 20:25:11 +02:00
Michał Górny
ab3254155c kernel-build.eclass: Remove py3.10 from PYTHON_COMPAT
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2025-05-02 18:01:01 +02:00
Petr Vaněk
18accbc44e eclass/tests: fix typo in bgo number
The last digit was missing in bgo link.

Fixes: d133f3d0eb ("python-utils-r1.eclass: Fix matching pattern list starting with 3.10")
Bug: https://bugs.gentoo.org/955213
Signed-off-by: Petr Vaněk <arkamar@gentoo.org>
2025-05-02 10:02:52 +02:00
Michał Górny
d133f3d0eb python-utils-r1.eclass: Fix matching pattern list starting with 3.10
Closes: https://bugs.gentoo.org/955213
Fixes: 92cf8fae50 (Disable Python 3.10 / PyPy 3.10 targets)
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2025-05-02 06:10:01 +02:00
Michał Górny
5ba9cc09aa eclass/tests/python-utils-r1.sh: Add missing multilib inherit
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Part-of: https://github.com/gentoo/gentoo/pull/41697
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2025-05-01 13:36:15 +02:00
Michał Górny
cb29d30827 distutils-r1.eclass: Remove obsolete PyPy 3.10 code
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Part-of: https://github.com/gentoo/gentoo/pull/41697
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2025-05-01 13:36:15 +02:00
Michał Górny
92cf8fae50 python-utils-r1.eclass: Disable Python 3.10 / PyPy 3.10 targets
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Part-of: https://github.com/gentoo/gentoo/pull/41697
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2025-05-01 13:36:14 +02:00
Andreas Sturmlechner
43513bb22b kde-apps/artikulate: add Qt6-based 25.07.70_pre20250421
We gain nothing from further bumping Qt5-based releases here.

Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
2025-04-30 22:16:26 +02:00
Alfred Wingate
6a3c96862f gstreamer-meson.eclass: enable py3.13
Closes: https://bugs.gentoo.org/951610
Signed-off-by: Alfred Wingate <parona@protonmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/41795
Closes: https://github.com/gentoo/gentoo/pull/41795
Signed-off-by: Sam James <sam@gentoo.org>
2025-04-27 23:52:27 +01:00
Ionen Wolkens
43f4f47e30 ffmpeg-compat.eclass: fix typo
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
2025-04-27 09:16:50 -04:00
Ionen Wolkens
f8577f63f8 wine.eclass: fix typo in comment
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
2025-04-27 06:49:35 -04:00
Ionen Wolkens
975e8d62dc wine.eclass: add USE=wow64 build support for arm64
Only saying "build" given technically won't work out of the
box without the user setting up xtajit.dll themselves.

The 32bit warning could make sense on arm64 too, but given
it's off-by-default and does not work out of the box, nagging
about this every installs would just be annoying.

(the aarch64_CFLAGS changes & friends from the linked PR
were done in a previous commit)

Untested given do not have arm64 hardware, please report if
I overlooked anything.

While here, also add spacing to the warnings for visibility
and to split them if get more than one message.

Closes: https://github.com/gentoo/gentoo/pull/41752
Thanks-to: Sasha Finkelstein <fnkl.kernel@gmail.com>
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
2025-04-27 04:26:24 -04:00
Ionen Wolkens
2db20f2eb0 wine.eclass: split *FLAGS handling per-arch
Previously would test flags for only one arch as a best effort, but
this gets messier if adding --enable-archs=i386,aarch64 support where
the two are more likely to need different flags.

Using a function inside $() to avoid the need to preserve CHOST
*FLAGS and also allow e.g. filter-flags -Wl,* (from CFLAGS...)
without mangling LDFLAGS given filter-cflags does not exist.

Adapted from https://github.com/gentoo/gentoo/pull/41752

Thanks-to: Sasha Finkelstein <fnkl.kernel@gmail.com>
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
2025-04-27 04:22:30 -04:00
Sam James
b5f77e470a toolchain.eclass: add some 'einfo' calls for flag mangling
Signed-off-by: Sam James <sam@gentoo.org>
2025-04-26 19:09:17 +01:00
Sam James
52d3c7d126 toolchain.eclass: log more *FLAGS vars
* Log STAGE{1,2,3}_${var}, BOOT_${var}, ${var}_FOR_{TARGET,BUILD}.
* Only show the flag if it's non-empty.

Signed-off-by: Sam James <sam@gentoo.org>
2025-04-26 19:03:03 +01:00
Sam James
987c1b6aba toolchain.eclass: reset STAGE1_GDCFLAGS too
... just in case it leaks into other parts of the build. Noticed when
looking at Jannik's reported comparison failure.

Signed-off-by: Sam James <sam@gentoo.org>
2025-04-26 18:51:23 +01:00
Michał Górny
2f20a39298 Add 21.0.0_pre20250426 snapshot
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2025-04-26 17:59:09 +02:00