diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-08-10 15:32:41 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-08-10 15:32:41 +0100 |
commit | 56e9cc62c11546e2c081f8dc14a9cc965f14787c (patch) | |
tree | 6dd5cbe22a937288e8c471e95a9f92bffb5d5707 /app-emulation/wine-staging | |
parent | d087665a0d6764fc223d2f88a04db01d76af9cc0 (diff) |
gentoo auto-resync : 10:08:2023 - 15:32:40
Diffstat (limited to 'app-emulation/wine-staging')
-rw-r--r-- | app-emulation/wine-staging/Manifest | 12 | ||||
-rw-r--r-- | app-emulation/wine-staging/metadata.xml | 5 | ||||
-rw-r--r-- | app-emulation/wine-staging/wine-staging-8.0.ebuild | 8 | ||||
-rw-r--r-- | app-emulation/wine-staging/wine-staging-8.11-r1.ebuild | 7 | ||||
-rw-r--r-- | app-emulation/wine-staging/wine-staging-8.12.ebuild | 7 | ||||
-rw-r--r-- | app-emulation/wine-staging/wine-staging-8.13.ebuild | 114 | ||||
-rw-r--r-- | app-emulation/wine-staging/wine-staging-9999.ebuild | 114 |
7 files changed, 179 insertions, 88 deletions
diff --git a/app-emulation/wine-staging/Manifest b/app-emulation/wine-staging/Manifest index 12a1367d92bc..393865df107b 100644 --- a/app-emulation/wine-staging/Manifest +++ b/app-emulation/wine-staging/Manifest @@ -8,9 +8,9 @@ DIST wine-staging-8.0.tar.gz 9529620 BLAKE2B c9540195ea885d9f1e980232b0af471e92c DIST wine-staging-8.11.tar.gz 9715880 BLAKE2B 2795389381d6e52215d8b1b2c437a47beaf61e9b36e78f99c45b3fcd79d554f2d4abafcbf34c366dcb7ce4fc14d66b8751466c30648ae0d7c451aaa345c30c5f SHA512 fb7a5f575c092e84afa78868e3b15fa33d67205a5e20deae61a60613714df784b18d54cd32167355ae38543f047f4304bfbc7f2ba2b3f6050c9f738812a15154 DIST wine-staging-8.12.tar.gz 9764049 BLAKE2B 739c6dfdcef6e744fc7f6dcee24abdedd5f96b7ad688bdd5cc667627cec0b21d658354369ecc0de71a4ba682636e369105cef3de97dbf095f1ee1025d9a12fc2 SHA512 11364b2367e25706b98c168710288b796e9dea1e3400efc0d010ea8827cb8c4187385f53aebd1fda46611902f6619282ea97ce9d7c20fe18aa48c14f15c99d14 DIST wine-staging-8.13.tar.gz 9785058 BLAKE2B 6c797cd50276009cc23619447a70ac972b5c7ad7684d7bd99f20cd7607b88f911eb89f59df98680ef8786495f2f8ff2910c8bbd930d811bb31147aa230105ce1 SHA512 b2104b0893ba27ee7f4f5495f7dee990962ff668786fd95e11af6d3975b7d00bc4ecb2572f280d27fbb6d1672745e0acbdb392ec7b3fd5b330a846783c23e12d -EBUILD wine-staging-8.0.ebuild 11757 BLAKE2B 983c33bccc4407babf442e583cc5805d2612b17e00e12504cc38a9ea64d586fde11a00a243fab1279e5f4a4a0313eb0a376b813d95cdfb2c175be5ac57fd039c SHA512 3faea23a639ac0cae4f55516d29fa3a02b8ffbc21281a316ceb0ab5d6f8d22ef0336fc41fe72178dc30898c8c21b1bdf740cd4680e2a6ab24f8ad414dba04547 -EBUILD wine-staging-8.11-r1.ebuild 12076 BLAKE2B 830ead3b2a0c7b149e2ac7e8797b515e10aba4b4dee61c0d296c8b0bad3fb4a577c277aa35ccced03e9650ca33184625cb305f46562a26f33f8953c02fa573fb SHA512 565442c9383a0661693652cdc60fe0a9a4541756ae8645cddbca6ef8e619d8dcb5acf676ef18ed122025a4d642a6fb40cafd9ca49d1e1cbbb61cbd88aa9ae628 -EBUILD wine-staging-8.12.ebuild 12076 BLAKE2B 830ead3b2a0c7b149e2ac7e8797b515e10aba4b4dee61c0d296c8b0bad3fb4a577c277aa35ccced03e9650ca33184625cb305f46562a26f33f8953c02fa573fb SHA512 565442c9383a0661693652cdc60fe0a9a4541756ae8645cddbca6ef8e619d8dcb5acf676ef18ed122025a4d642a6fb40cafd9ca49d1e1cbbb61cbd88aa9ae628 -EBUILD wine-staging-8.13.ebuild 12076 BLAKE2B 830ead3b2a0c7b149e2ac7e8797b515e10aba4b4dee61c0d296c8b0bad3fb4a577c277aa35ccced03e9650ca33184625cb305f46562a26f33f8953c02fa573fb SHA512 565442c9383a0661693652cdc60fe0a9a4541756ae8645cddbca6ef8e619d8dcb5acf676ef18ed122025a4d642a6fb40cafd9ca49d1e1cbbb61cbd88aa9ae628 -EBUILD wine-staging-9999.ebuild 12076 BLAKE2B 830ead3b2a0c7b149e2ac7e8797b515e10aba4b4dee61c0d296c8b0bad3fb4a577c277aa35ccced03e9650ca33184625cb305f46562a26f33f8953c02fa573fb SHA512 565442c9383a0661693652cdc60fe0a9a4541756ae8645cddbca6ef8e619d8dcb5acf676ef18ed122025a4d642a6fb40cafd9ca49d1e1cbbb61cbd88aa9ae628 -MISC metadata.xml 2339 BLAKE2B 1b947010c803306d2e1a02e82c427461377651faf0fde13cc5ce5c6a08a9790f5699ad427f16f10c6057bcf9c53e707e4486e28bed6d0d27d23d3ec118d5f518 SHA512 aa5aa60a8488dcebb5f45c992cf77eef215b8559c2911cae4066c48fd8cd74f4d2029ba989cc65ed0200927f9fcd3b7b253b93003302d2b88230b035eb274ebb +EBUILD wine-staging-8.0.ebuild 11924 BLAKE2B 0e4562181251cd9844b940bb43dfa010e1867417086102b67be02492d1f28a579cd6b4c075de2cd00ccac65d2e69b451f95f17ba5559f581e57cbf8869a37bea SHA512 404a62047ff77551065f9109ad43c301f65744f07b33fbbfdd8cfe3a172a92956ab4d313ab2ddef1e1bfd00b39f3f4fd92dc308783ee1c6e5f221beabd28d5f4 +EBUILD wine-staging-8.11-r1.ebuild 12235 BLAKE2B f4b5947c95e11e2bfcb20c4c52e859501a8ceff4369ac52af4ab41829530c8ad98b07000e01285e6b53665a08c30828f294e743261526faeffa7022b44aefc4b SHA512 b9b009b867264879549a6d8bce9ef3da3b64bfbe61536ca3a6e17a547047ef3bcf448b7b9efc6524c1c6b02b77d0009ad8d6c18e2d52b851f80575f3f504f536 +EBUILD wine-staging-8.12.ebuild 12235 BLAKE2B f4b5947c95e11e2bfcb20c4c52e859501a8ceff4369ac52af4ab41829530c8ad98b07000e01285e6b53665a08c30828f294e743261526faeffa7022b44aefc4b SHA512 b9b009b867264879549a6d8bce9ef3da3b64bfbe61536ca3a6e17a547047ef3bcf448b7b9efc6524c1c6b02b77d0009ad8d6c18e2d52b851f80575f3f504f536 +EBUILD wine-staging-8.13.ebuild 13170 BLAKE2B f1c806debf31857bb49c3681fdd82d6b1f9488636816930fd12491182473267c8510f3987f0d56022df7dc45cc37b74b461d6605dbc0bccf8ce78176e3749b09 SHA512 042185b7516f9e6a5c2570c686844f1e2201a40734e1787c2d0a4ccb697c4eb0ed38bfe0b983196f9e320c527fbfecfcebbdfa17c5ed9235737235a6f19ac0b6 +EBUILD wine-staging-9999.ebuild 13170 BLAKE2B f1c806debf31857bb49c3681fdd82d6b1f9488636816930fd12491182473267c8510f3987f0d56022df7dc45cc37b74b461d6605dbc0bccf8ce78176e3749b09 SHA512 042185b7516f9e6a5c2570c686844f1e2201a40734e1787c2d0a4ccb697c4eb0ed38bfe0b983196f9e320c527fbfecfcebbdfa17c5ed9235737235a6f19ac0b6 +MISC metadata.xml 2534 BLAKE2B 9b25b0ade2b7b2ad5bbfa37e30c8e0a3756d8ea0a5430a8e76537e7e309987961b438022929b087c2cf262ac26ffaedfac48225ed22233ab94e5584daae4f7ce SHA512 1f07d61995be3634bb8c39861e0cd959b80a131e3f3a827dab486defff6cf75e29f36ef26be8e7747cfd6c348e9743c336fa452ae8406b238d7d3c6c15522911 diff --git a/app-emulation/wine-staging/metadata.xml b/app-emulation/wine-staging/metadata.xml index 3ef81511155b..455c48fd0a96 100644 --- a/app-emulation/wine-staging/metadata.xml +++ b/app-emulation/wine-staging/metadata.xml @@ -29,6 +29,11 @@ This variant of the Wine packaging includes the Wine-Staging patchset. <flag name="perl">Install helpers that require perl (winedump/winemaker)</flag> <flag name="samba">Pull in <pkg>net-fs/samba</pkg> with winbind for NTLM auth support</flag> <flag name="sdl">Enable gamepad support using <pkg>media-libs/libsdl2</pkg></flag> + <flag name="wow64"> + Enable running 32bit applications without 32bit ELF + multilib by mapping to 64bit calls (experimental, + USE=abi_x86_32 is recommended for complete support) + </flag> </use> <upstream> <bugs-to>https://bugs.winehq.org/describecomponents.cgi?product=Wine-staging</bugs-to> diff --git a/app-emulation/wine-staging/wine-staging-8.0.ebuild b/app-emulation/wine-staging/wine-staging-8.0.ebuild index c8412919b5a8..d5832e55b076 100644 --- a/app-emulation/wine-staging/wine-staging-8.0.ebuild +++ b/app-emulation/wine-staging/wine-staging-8.0.ebuild @@ -4,7 +4,8 @@ EAPI=8 MULTILIB_COMPAT=( abi_x86_{32,64} ) -inherit autotools flag-o-matic multilib multilib-build toolchain-funcs wrapper +inherit autotools flag-o-matic multilib multilib-build +inherit prefix toolchain-funcs wrapper WINE_GECKO=2.47.3 WINE_MONO=7.4.0 @@ -203,6 +204,9 @@ src_prepare() { # ensure .desktop calls this variant + slot sed -i "/^Exec=/s/wine /${P} /" loader/wine.desktop || die + # datadir is not where wine-mono is installed, so prefixy alternate paths + hprefixify -w /get_mono_path/ dlls/mscoree/metahost.c + # always update for patches (including user's wrt #432348) eautoreconf tools/make_requests || die # perl @@ -305,7 +309,7 @@ src_configure() { # 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 + use custom-cflags || append-cflags -mno-avx CC=${CROSSCC} test-flags-CC ${CFLAGS:--O2})}" : "${CROSSLDFLAGS:=$( filter-flags '-fuse-ld=*' diff --git a/app-emulation/wine-staging/wine-staging-8.11-r1.ebuild b/app-emulation/wine-staging/wine-staging-8.11-r1.ebuild index 940bb93e3836..4c8102d89813 100644 --- a/app-emulation/wine-staging/wine-staging-8.11-r1.ebuild +++ b/app-emulation/wine-staging/wine-staging-8.11-r1.ebuild @@ -6,7 +6,7 @@ EAPI=8 MULTILIB_COMPAT=( abi_x86_{32,64} ) PYTHON_COMPAT=( python3_{10..12} ) inherit autotools edo flag-o-matic multilib multilib-build -inherit python-any-r1 toolchain-funcs wrapper +inherit prefix python-any-r1 toolchain-funcs wrapper WINE_GECKO=2.47.4 WINE_MONO=8.0.0 @@ -217,6 +217,9 @@ src_prepare() { # ensure .desktop calls this variant + slot sed -i "/^Exec=/s/wine /${P} /" loader/wine.desktop || die + # datadir is not where wine-mono is installed, so prefixy alternate paths + hprefixify -w /get_mono_path/ dlls/mscoree/metahost.c + # always update for patches (including user's wrt #432348) eautoreconf tools/make_requests || die # perl @@ -318,7 +321,7 @@ src_configure() { # 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 + use custom-cflags || append-cflags -mno-avx CC=${CROSSCC} test-flags-CC ${CFLAGS:--O2})}" : "${CROSSLDFLAGS:=$( filter-flags '-fuse-ld=*' diff --git a/app-emulation/wine-staging/wine-staging-8.12.ebuild b/app-emulation/wine-staging/wine-staging-8.12.ebuild index 940bb93e3836..4c8102d89813 100644 --- a/app-emulation/wine-staging/wine-staging-8.12.ebuild +++ b/app-emulation/wine-staging/wine-staging-8.12.ebuild @@ -6,7 +6,7 @@ EAPI=8 MULTILIB_COMPAT=( abi_x86_{32,64} ) PYTHON_COMPAT=( python3_{10..12} ) inherit autotools edo flag-o-matic multilib multilib-build -inherit python-any-r1 toolchain-funcs wrapper +inherit prefix python-any-r1 toolchain-funcs wrapper WINE_GECKO=2.47.4 WINE_MONO=8.0.0 @@ -217,6 +217,9 @@ src_prepare() { # ensure .desktop calls this variant + slot sed -i "/^Exec=/s/wine /${P} /" loader/wine.desktop || die + # datadir is not where wine-mono is installed, so prefixy alternate paths + hprefixify -w /get_mono_path/ dlls/mscoree/metahost.c + # always update for patches (including user's wrt #432348) eautoreconf tools/make_requests || die # perl @@ -318,7 +321,7 @@ src_configure() { # 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 + use custom-cflags || append-cflags -mno-avx CC=${CROSSCC} test-flags-CC ${CFLAGS:--O2})}" : "${CROSSLDFLAGS:=$( filter-flags '-fuse-ld=*' diff --git a/app-emulation/wine-staging/wine-staging-8.13.ebuild b/app-emulation/wine-staging/wine-staging-8.13.ebuild index 940bb93e3836..3a7cda74ca11 100644 --- a/app-emulation/wine-staging/wine-staging-8.13.ebuild +++ b/app-emulation/wine-staging/wine-staging-8.13.ebuild @@ -6,7 +6,7 @@ EAPI=8 MULTILIB_COMPAT=( abi_x86_{32,64} ) PYTHON_COMPAT=( python3_{10..12} ) inherit autotools edo flag-o-matic multilib multilib-build -inherit python-any-r1 toolchain-funcs wrapper +inherit prefix python-any-r1 toolchain-funcs wrapper WINE_GECKO=2.47.4 WINE_MONO=8.0.0 @@ -37,11 +37,13 @@ IUSE=" llvm-libunwind custom-cflags +fontconfig +gecko gphoto2 +gstreamer kerberos +mingw +mono netapi nls 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 @@ -108,7 +110,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? ( @@ -139,6 +144,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 )" @@ -161,7 +167,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:" @@ -217,6 +224,9 @@ src_prepare() { # ensure .desktop calls this variant + slot sed -i "/^Exec=/s/wine /${P} /" loader/wine.desktop || die + # datadir is not where wine-mono is installed, so prefixy alternate paths + hprefixify -w /get_mono_path/ dlls/mscoree/metahost.c + # always update for patches (including user's wrt #432348) eautoreconf tools/make_requests || die # perl @@ -232,9 +242,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) @@ -269,19 +283,56 @@ src_configure() { $(use_with xinerama) ) - tc-ld-force-bfd # builds with non-bfd but broken at runtime (bug #867097) + # builds with non-bfd but broken at runtime (bug #867097) + # TODO: retest mold and lld, and figure out what's wrong if + # still broken given (at least) lld is supposed to work + tc-ld-force-bfd + 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 + use custom-cflags || 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 ( @@ -290,10 +341,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+=( @@ -303,28 +351,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[@]}" ) @@ -340,8 +366,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 @@ -379,6 +410,13 @@ src_install() { } pkg_postinst() { + if use !abi_x86_32 && use !wow64; then + 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," + ewarn "note that the experimental USE=wow64 can allow 32bit without multilib." + fi + eselect wine update --if-unset || die } diff --git a/app-emulation/wine-staging/wine-staging-9999.ebuild b/app-emulation/wine-staging/wine-staging-9999.ebuild index 940bb93e3836..3a7cda74ca11 100644 --- a/app-emulation/wine-staging/wine-staging-9999.ebuild +++ b/app-emulation/wine-staging/wine-staging-9999.ebuild @@ -6,7 +6,7 @@ EAPI=8 MULTILIB_COMPAT=( abi_x86_{32,64} ) PYTHON_COMPAT=( python3_{10..12} ) inherit autotools edo flag-o-matic multilib multilib-build -inherit python-any-r1 toolchain-funcs wrapper +inherit prefix python-any-r1 toolchain-funcs wrapper WINE_GECKO=2.47.4 WINE_MONO=8.0.0 @@ -37,11 +37,13 @@ IUSE=" llvm-libunwind custom-cflags +fontconfig +gecko gphoto2 +gstreamer kerberos +mingw +mono netapi nls 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 @@ -108,7 +110,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? ( @@ -139,6 +144,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 )" @@ -161,7 +167,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:" @@ -217,6 +224,9 @@ src_prepare() { # ensure .desktop calls this variant + slot sed -i "/^Exec=/s/wine /${P} /" loader/wine.desktop || die + # datadir is not where wine-mono is installed, so prefixy alternate paths + hprefixify -w /get_mono_path/ dlls/mscoree/metahost.c + # always update for patches (including user's wrt #432348) eautoreconf tools/make_requests || die # perl @@ -232,9 +242,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) @@ -269,19 +283,56 @@ src_configure() { $(use_with xinerama) ) - tc-ld-force-bfd # builds with non-bfd but broken at runtime (bug #867097) + # builds with non-bfd but broken at runtime (bug #867097) + # TODO: retest mold and lld, and figure out what's wrong if + # still broken given (at least) lld is supposed to work + tc-ld-force-bfd + 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 + use custom-cflags || 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 ( @@ -290,10 +341,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+=( @@ -303,28 +351,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[@]}" ) @@ -340,8 +366,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 @@ -379,6 +410,13 @@ src_install() { } pkg_postinst() { + if use !abi_x86_32 && use !wow64; then + 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," + ewarn "note that the experimental USE=wow64 can allow 32bit without multilib." + fi + eselect wine update --if-unset || die } |