From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 44F5B15801B for ; Thu, 10 Aug 2023 10:53:21 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7D05B2BC027; Thu, 10 Aug 2023 10:53:20 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6233A2BC027 for ; Thu, 10 Aug 2023 10:53:19 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 268AC335D4D for ; Thu, 10 Aug 2023 10:53:18 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6B8D5F4E for ; Thu, 10 Aug 2023 10:53:16 +0000 (UTC) From: "Ionen Wolkens" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ionen Wolkens" Message-ID: <1691662470.665f0c67478eb89940e1e7745a66fd3eb72dfe9c.ionen@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/wine-vanilla/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-emulation/wine-vanilla/metadata.xml app-emulation/wine-vanilla/wine-vanilla-8.13.ebuild app-emulation/wine-vanilla/wine-vanilla-9999.ebuild X-VCS-Directories: app-emulation/wine-vanilla/ X-VCS-Committer: ionen X-VCS-Committer-Name: Ionen Wolkens X-VCS-Revision: 665f0c67478eb89940e1e7745a66fd3eb72dfe9c X-VCS-Branch: master Date: Thu, 10 Aug 2023 10:53:16 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 8b35db84-74ed-460f-aa38-b143ea1b90a2 X-Archives-Hash: e58d227df3573413281d9ade59879065 commit: 665f0c67478eb89940e1e7745a66fd3eb72dfe9c Author: Ionen Wolkens gentoo org> AuthorDate: Thu Aug 10 05:59:44 2023 +0000 Commit: Ionen Wolkens gentoo org> CommitDate: Thu Aug 10 10:14:30 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=665f0c67 app-emulation/wine-vanilla: tentative support for 32bit w/o multilib This been possible to "build" since early wine-8 but was too incomplete to be really useful and became more usable since roughly 8.10. Scarecely tested, but was still able to get hardware accelerated 32bit wglgears.exe (like glxgears) on a no-multilib prefix install. Not tested on musl yet, but alpine uses it and should work in theory. Only going enable in current latest 8.13 and 9999 so don't expect this on wine-proton/vanilla-8.0.x where it'd be near useless (for wine-proton it likely will not be until wine-proton-9). Does not feel at a stage where it should be default except on no-multilib profiles (abi_x86_32 is still recommended and wine itself outputs a warning about being experimental when using it), but in the event primarily use 64bit while still needing some 32bit support for e.g. bad installers, then this should be good enough. Still requires USE=abi_x86_32 on mingw64-toolchain and wine-gecko (also dxvk/vkd3d-proton if used), but these have no requirements on multilib libraries of their own. In the future may potentially use a different USE on these to avoid confusion and integrate better with no-multilib profiles. For convenience moved the CROSS{CC,*FLAGS} out of the loop -- meaning this no longer tests flags separately for 64+32 but should not be an issue. Signed-off-by: Ionen Wolkens gentoo.org> app-emulation/wine-vanilla/metadata.xml | 5 ++ .../wine-vanilla/wine-vanilla-8.13.ebuild | 96 ++++++++++++++-------- .../wine-vanilla/wine-vanilla-9999.ebuild | 96 ++++++++++++++-------- 3 files changed, 125 insertions(+), 72 deletions(-) diff --git a/app-emulation/wine-vanilla/metadata.xml b/app-emulation/wine-vanilla/metadata.xml index c9f0e02fc1eb..08f1c1fa3035 100644 --- a/app-emulation/wine-vanilla/metadata.xml +++ b/app-emulation/wine-vanilla/metadata.xml @@ -30,6 +30,11 @@ This variant of the Wine packaging does not include external patchsets Pull in net-fs/samba with winbind for NTLM auth support Enable gamepad support using media-libs/libsdl2 Enable DirectX 12 support using app-emulation/vkd3d + + Enable running 32bit applications without 32bit ELF + multilib by mapping to 64bit calls (experimental, + USE=abi_x86_32 is recommended for complete support) + https://bugs.winehq.org/describecomponents.cgi?product=Wine diff --git a/app-emulation/wine-vanilla/wine-vanilla-8.13.ebuild b/app-emulation/wine-vanilla/wine-vanilla-8.13.ebuild index 11ed198a2f98..9ee3560f4437 100644 --- a/app-emulation/wine-vanilla/wine-vanilla-8.13.ebuild +++ b/app-emulation/wine-vanilla/wine-vanilla-8.13.ebuild @@ -31,11 +31,13 @@ IUSE=" llvm-libunwind custom-cflags +fontconfig +gecko gphoto2 +gstreamer kerberos +mingw +mono netapi nls odbc opencl +opengl osmesa pcap perl pulseaudio samba scanner +sdl selinux smartcard +ssl +strip - +truetype udev udisks +unwind usb v4l +vulkan wayland +xcomposite - xinerama" + +truetype udev udisks +unwind usb v4l +vulkan wayland wow64 + +xcomposite xinerama" +# bug #551124 for truetype REQUIRED_USE=" X? ( truetype ) - crossdev-mingw? ( mingw )" # bug #551124 for truetype + crossdev-mingw? ( mingw ) + wow64? ( abi_x86_64 !abi_x86_32 mingw )" # tests are non-trivial to run, can hang easily, don't play well with # sandbox, and several need real opengl/vulkan or network access @@ -103,7 +105,10 @@ RDEPEND=" games-emulation/dosbox-staging ) ) - gecko? ( app-emulation/wine-gecko:${WINE_GECKO}[${MULTILIB_USEDEP}] ) + gecko? ( + app-emulation/wine-gecko:${WINE_GECKO}[${MULTILIB_USEDEP}] + wow64? ( app-emulation/wine-gecko[abi_x86_32] ) + ) gstreamer? ( media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] ) mono? ( app-emulation/wine-mono:${WINE_MONO} ) perl? ( @@ -125,6 +130,7 @@ BDEPEND=" virtual/pkgconfig mingw? ( !crossdev-mingw? ( >=dev-util/mingw64-toolchain-10.0.0_p1-r2[${MULTILIB_USEDEP}] + wow64? ( dev-util/mingw64-toolchain[abi_x86_32] ) ) ) nls? ( sys-devel/gettext ) wayland? ( dev-util/wayland-scanner )" @@ -146,7 +152,8 @@ pkg_pretend() { if use crossdev-mingw && [[ ! -v MINGW_BYPASS ]]; then local mingw=-w64-mingw32 - for mingw in $(usev abi_x86_64 x86_64${mingw}) $(usev abi_x86_32 i686${mingw}); do + for mingw in $(usev abi_x86_64 x86_64${mingw}) \ + $(use abi_x86_32 || use wow64 && echo i686${mingw}); do if ! type -P ${mingw}-gcc >/dev/null; then eerror "With USE=crossdev-mingw, you must prepare the MinGW toolchain" eerror "yourself by installing sys-devel/crossdev then running:" @@ -190,9 +197,13 @@ src_configure() { --includedir="${EPREFIX}"/usr/include/${P} --libdir="${EPREFIX}"${WINE_PREFIX} --mandir="${EPREFIX}"${WINE_DATADIR}/man + + $(usev wow64 --enable-archs=x86_64,i386) + $(use_enable gecko mshtml) $(use_enable mono mscoree) --disable-tests + $(use_with X x) $(use_with alsa) $(use_with capi) @@ -230,17 +241,50 @@ src_configure() { tc-ld-force-bfd # builds with non-bfd but broken at runtime (bug #867097) filter-lto # build failure - use mingw || filter-flags -fno-plt # build failure use custom-cflags || strip-flags # can break in obscure ways at runtime - use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH} # temporary workaround for tc-ld-force-bfd not yet enforcing with mold # https://github.com/gentoo/gentoo/pull/28355 [[ $($(tc-getCC) ${LDFLAGS} -Wl,--version 2>/dev/null) == mold* ]] && append-ldflags -fuse-ld=bfd - # build using upstream's way (--with-wine64) - # order matters: configure+compile 64->32, install 32->64 + if use mingw; then + use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH} + + filter-flags -fno-plt # build failure + + # CROSSCC was formerly recognized by wine, thus been using similar + # variables (subject to change, esp. if ever make a mingw.eclass). + local mingwcc_amd64=${CROSSCC:-${CROSSCC_amd64:-x86_64-w64-mingw32-gcc}} + local mingwcc_x86=${CROSSCC:-${CROSSCC_x86:-i686-w64-mingw32-gcc}} + local -n mingwcc=mingwcc_$(usex abi_x86_64 amd64 x86) + + conf+=( + ac_cv_prog_x86_64_CC="${mingwcc_amd64}" + ac_cv_prog_i386_CC="${mingwcc_x86}" + + CROSSCFLAGS="$( + filter-flags '-fstack-protector*' #870136 + filter-flags '-mfunction-return=thunk*' #878849 + + # -mavx with mingw-gcc has a history of obscure issues and + # disabling is seen as safer, e.g. `WINEARCH=win32 winecfg` + # crashes with -march=skylake >=wine-8.10, similar issues with + # znver4: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110273 + append-cflags -mno-avx + + CC=${mingwcc} test-flags-CC ${CFLAGS:--O2} + )" + + CROSSLDFLAGS="$( + filter-flags '-fuse-ld=*' + + CC=${mingwcc} test-flags-CCLD ${LDFLAGS} + )" + ) + fi + + # order matters with multilib: configure+compile 64->32, install 32->64 local -i bits for bits in $(usev abi_x86_64 64) $(usev abi_x86_32 32); do ( @@ -249,10 +293,7 @@ src_configure() { mkdir ../build${bits} || die cd ../build${bits} || die - pe_arch=i386 if (( bits == 64 )); then - pe_arch=x86_64 - : "${CROSSCC:=${CROSSCC_amd64:-x86_64-w64-mingw32-gcc}}" conf+=( --enable-win64 ) elif use amd64; then conf+=( @@ -262,28 +303,6 @@ src_configure() { # _setup is optional, but use over Wine's auto-detect (+#472038) multilib_toolchain_setup x86 fi - : "${CROSSCC:=${CROSSCC_x86:-i686-w64-mingw32-gcc}}" - - if use mingw; then - # CROSSCC is no longer recognized by Wine, but still use for now - # (future handling for CROSS* variables is subject to changes) - conf+=( ac_cv_prog_${pe_arch}_CC="${CROSSCC}" ) - - # use *FLAGS for mingw, but strip unsupported - : "${CROSSCFLAGS:=$( - filter-flags '-fstack-protector*' #870136 - filter-flags '-mfunction-return=thunk*' #878849 - # -mavx with mingw-gcc has a history of obscure issues and - # disabling is seen as safer, e.g. `WINEARCH=win32 winecfg` - # crashes with -march=skylake >=wine-8.10, similar issues with - # znver4: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110273 - append-cflags -mno-avx - CC=${CROSSCC} test-flags-CC ${CFLAGS:--O2})}" - : "${CROSSLDFLAGS:=$( - filter-flags '-fuse-ld=*' - CC=${CROSSCC} test-flags-CCLD ${LDFLAGS})}" - export CROSS{C,LD}FLAGS - fi ECONF_SOURCE=${S} econf "${conf[@]}" ) @@ -299,8 +318,13 @@ src_install() { use abi_x86_32 && emake DESTDIR="${D}" -C ../build32 install use abi_x86_64 && emake DESTDIR="${D}" -C ../build64 install # do last - # symlink for plain 'wine' and install its man pages if 64bit-only #404331 - if use abi_x86_64 && use !abi_x86_32; then + if use wow64; then + # compat symlinks, albeit ideally no one should call "wine64" + dosym wine ${WINE_PREFIX}/bin/wine64 + dosym wine-preloader ${WINE_PREFIX}/bin/wine64-preloader + elif use abi_x86_64 && use !abi_x86_32; then + # if no 32bit support it instead only installs "wine64" which may + # come as unexpected, so provide "wine" alongside its man page dosym wine64 ${WINE_PREFIX}/bin/wine dosym wine64-preloader ${WINE_PREFIX}/bin/wine-preloader local man diff --git a/app-emulation/wine-vanilla/wine-vanilla-9999.ebuild b/app-emulation/wine-vanilla/wine-vanilla-9999.ebuild index 11ed198a2f98..9ee3560f4437 100644 --- a/app-emulation/wine-vanilla/wine-vanilla-9999.ebuild +++ b/app-emulation/wine-vanilla/wine-vanilla-9999.ebuild @@ -31,11 +31,13 @@ IUSE=" llvm-libunwind custom-cflags +fontconfig +gecko gphoto2 +gstreamer kerberos +mingw +mono netapi nls odbc opencl +opengl osmesa pcap perl pulseaudio samba scanner +sdl selinux smartcard +ssl +strip - +truetype udev udisks +unwind usb v4l +vulkan wayland +xcomposite - xinerama" + +truetype udev udisks +unwind usb v4l +vulkan wayland wow64 + +xcomposite xinerama" +# bug #551124 for truetype REQUIRED_USE=" X? ( truetype ) - crossdev-mingw? ( mingw )" # bug #551124 for truetype + crossdev-mingw? ( mingw ) + wow64? ( abi_x86_64 !abi_x86_32 mingw )" # tests are non-trivial to run, can hang easily, don't play well with # sandbox, and several need real opengl/vulkan or network access @@ -103,7 +105,10 @@ RDEPEND=" games-emulation/dosbox-staging ) ) - gecko? ( app-emulation/wine-gecko:${WINE_GECKO}[${MULTILIB_USEDEP}] ) + gecko? ( + app-emulation/wine-gecko:${WINE_GECKO}[${MULTILIB_USEDEP}] + wow64? ( app-emulation/wine-gecko[abi_x86_32] ) + ) gstreamer? ( media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] ) mono? ( app-emulation/wine-mono:${WINE_MONO} ) perl? ( @@ -125,6 +130,7 @@ BDEPEND=" virtual/pkgconfig mingw? ( !crossdev-mingw? ( >=dev-util/mingw64-toolchain-10.0.0_p1-r2[${MULTILIB_USEDEP}] + wow64? ( dev-util/mingw64-toolchain[abi_x86_32] ) ) ) nls? ( sys-devel/gettext ) wayland? ( dev-util/wayland-scanner )" @@ -146,7 +152,8 @@ pkg_pretend() { if use crossdev-mingw && [[ ! -v MINGW_BYPASS ]]; then local mingw=-w64-mingw32 - for mingw in $(usev abi_x86_64 x86_64${mingw}) $(usev abi_x86_32 i686${mingw}); do + for mingw in $(usev abi_x86_64 x86_64${mingw}) \ + $(use abi_x86_32 || use wow64 && echo i686${mingw}); do if ! type -P ${mingw}-gcc >/dev/null; then eerror "With USE=crossdev-mingw, you must prepare the MinGW toolchain" eerror "yourself by installing sys-devel/crossdev then running:" @@ -190,9 +197,13 @@ src_configure() { --includedir="${EPREFIX}"/usr/include/${P} --libdir="${EPREFIX}"${WINE_PREFIX} --mandir="${EPREFIX}"${WINE_DATADIR}/man + + $(usev wow64 --enable-archs=x86_64,i386) + $(use_enable gecko mshtml) $(use_enable mono mscoree) --disable-tests + $(use_with X x) $(use_with alsa) $(use_with capi) @@ -230,17 +241,50 @@ src_configure() { tc-ld-force-bfd # builds with non-bfd but broken at runtime (bug #867097) filter-lto # build failure - use mingw || filter-flags -fno-plt # build failure use custom-cflags || strip-flags # can break in obscure ways at runtime - use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH} # temporary workaround for tc-ld-force-bfd not yet enforcing with mold # https://github.com/gentoo/gentoo/pull/28355 [[ $($(tc-getCC) ${LDFLAGS} -Wl,--version 2>/dev/null) == mold* ]] && append-ldflags -fuse-ld=bfd - # build using upstream's way (--with-wine64) - # order matters: configure+compile 64->32, install 32->64 + if use mingw; then + use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH} + + filter-flags -fno-plt # build failure + + # CROSSCC was formerly recognized by wine, thus been using similar + # variables (subject to change, esp. if ever make a mingw.eclass). + local mingwcc_amd64=${CROSSCC:-${CROSSCC_amd64:-x86_64-w64-mingw32-gcc}} + local mingwcc_x86=${CROSSCC:-${CROSSCC_x86:-i686-w64-mingw32-gcc}} + local -n mingwcc=mingwcc_$(usex abi_x86_64 amd64 x86) + + conf+=( + ac_cv_prog_x86_64_CC="${mingwcc_amd64}" + ac_cv_prog_i386_CC="${mingwcc_x86}" + + CROSSCFLAGS="$( + filter-flags '-fstack-protector*' #870136 + filter-flags '-mfunction-return=thunk*' #878849 + + # -mavx with mingw-gcc has a history of obscure issues and + # disabling is seen as safer, e.g. `WINEARCH=win32 winecfg` + # crashes with -march=skylake >=wine-8.10, similar issues with + # znver4: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110273 + append-cflags -mno-avx + + CC=${mingwcc} test-flags-CC ${CFLAGS:--O2} + )" + + CROSSLDFLAGS="$( + filter-flags '-fuse-ld=*' + + CC=${mingwcc} test-flags-CCLD ${LDFLAGS} + )" + ) + fi + + # order matters with multilib: configure+compile 64->32, install 32->64 local -i bits for bits in $(usev abi_x86_64 64) $(usev abi_x86_32 32); do ( @@ -249,10 +293,7 @@ src_configure() { mkdir ../build${bits} || die cd ../build${bits} || die - pe_arch=i386 if (( bits == 64 )); then - pe_arch=x86_64 - : "${CROSSCC:=${CROSSCC_amd64:-x86_64-w64-mingw32-gcc}}" conf+=( --enable-win64 ) elif use amd64; then conf+=( @@ -262,28 +303,6 @@ src_configure() { # _setup is optional, but use over Wine's auto-detect (+#472038) multilib_toolchain_setup x86 fi - : "${CROSSCC:=${CROSSCC_x86:-i686-w64-mingw32-gcc}}" - - if use mingw; then - # CROSSCC is no longer recognized by Wine, but still use for now - # (future handling for CROSS* variables is subject to changes) - conf+=( ac_cv_prog_${pe_arch}_CC="${CROSSCC}" ) - - # use *FLAGS for mingw, but strip unsupported - : "${CROSSCFLAGS:=$( - filter-flags '-fstack-protector*' #870136 - filter-flags '-mfunction-return=thunk*' #878849 - # -mavx with mingw-gcc has a history of obscure issues and - # disabling is seen as safer, e.g. `WINEARCH=win32 winecfg` - # crashes with -march=skylake >=wine-8.10, similar issues with - # znver4: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110273 - append-cflags -mno-avx - CC=${CROSSCC} test-flags-CC ${CFLAGS:--O2})}" - : "${CROSSLDFLAGS:=$( - filter-flags '-fuse-ld=*' - CC=${CROSSCC} test-flags-CCLD ${LDFLAGS})}" - export CROSS{C,LD}FLAGS - fi ECONF_SOURCE=${S} econf "${conf[@]}" ) @@ -299,8 +318,13 @@ src_install() { use abi_x86_32 && emake DESTDIR="${D}" -C ../build32 install use abi_x86_64 && emake DESTDIR="${D}" -C ../build64 install # do last - # symlink for plain 'wine' and install its man pages if 64bit-only #404331 - if use abi_x86_64 && use !abi_x86_32; then + if use wow64; then + # compat symlinks, albeit ideally no one should call "wine64" + dosym wine ${WINE_PREFIX}/bin/wine64 + dosym wine-preloader ${WINE_PREFIX}/bin/wine64-preloader + elif use abi_x86_64 && use !abi_x86_32; then + # if no 32bit support it instead only installs "wine64" which may + # come as unexpected, so provide "wine" alongside its man page dosym wine64 ${WINE_PREFIX}/bin/wine dosym wine64-preloader ${WINE_PREFIX}/bin/wine-preloader local man