commit: 975e8d62dca9a13c2e0097f1d3d0352043786fd2 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org> AuthorDate: Sun Apr 27 06:58:06 2025 +0000 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> CommitDate: Sun Apr 27 08:26:24 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=975e8d62
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 <AT> gmail.com> Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org> eclass/wine.eclass | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/eclass/wine.eclass b/eclass/wine.eclass index 223c83f1c4a5..9cf9a1b443ee 100644 --- a/eclass/wine.eclass +++ b/eclass/wine.eclass @@ -37,6 +37,7 @@ inherit autotools flag-o-matic multilib prefix toolchain-funcs wrapper # TODO: when the *new* wow64 mode (aka USE=wow64) is mature enough to # be preferred over abi_x86_32, this should be removed and support for # 32bit-only-on-64bit be dropped matching how /no-multilib/ handles it +# (USE=wow64 should be enabled by default on amd64 then, but not arm64) readonly WINE_USEDEP="abi_x86_32(-)?,abi_x86_64(-)?" IUSE=" @@ -46,7 +47,7 @@ IUSE=" REQUIRED_USE=" || ( abi_x86_32 abi_x86_64 arm64 ) crossdev-mingw? ( mingw ) - wow64? ( abi_x86_64 !abi_x86_32 ) + wow64? ( !arm64? ( abi_x86_64 !abi_x86_32 ) ) " BDEPEND=" @@ -384,7 +385,10 @@ wine_src_install() { # Provide generic warnings about missing 32bit support, # and run eselect wine update. wine_pkg_postinst() { - if use !abi_x86_32 && use !wow64; then + # on amd64, users sometime disable the default 32bit support due to being + # annoyed by the requirements without realizing that they need it + if use amd64 && use !abi_x86_32 && use !wow64; then + ewarn ewarn "32bit support is disabled. While 64bit applications themselves will" ewarn "work, be warned that it is not unusual that installers or other helpers" ewarn "will attempt to use 32bit and fail. If do not want full USE=abi_x86_32," @@ -395,18 +399,27 @@ wine_pkg_postinst() { if use abi_x86_32 && { use opengl || use vulkan; }; then if has_version 'x11-drivers/nvidia-drivers'; then if has_version 'x11-drivers/nvidia-drivers[-abi_x86_32]'; then + ewarn ewarn "x11-drivers/nvidia-drivers is installed but is built without" ewarn "USE=abi_x86_32 (ABI_X86=32), hardware acceleration with 32bit" ewarn "applications under ${PN} will likely not be usable." ewarn "Multi-card setups may need this on media-libs/mesa as well." fi elif has_version 'media-libs/mesa[-abi_x86_32]'; then + ewarn ewarn "media-libs/mesa seems to be in use but is built without" ewarn "USE=abi_x86_32 (ABI_X86=32), hardware acceleration with 32bit" ewarn "applications under ${PN} will likely not be usable." fi fi + if use arm64 && use wow64; then + ewarn + ewarn "${PN} does not include an x86 emulator, running x86 binaries" + ewarn "with USE=wow64 on arm64 requires manually setting up xtajit.dll" + ewarn "(not packaged) in the Wine prefix." + fi + eselect wine update --if-unset || die }
