commit:     0d45bc5c25675e0dd174d12013a9d68fc83c7d0b
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 15 20:00:53 2023 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Tue Aug 15 20:21:18 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d45bc5c

app-emulation/vkd3d-proton: fix setup script with wine[wow64]

Currently it will try to install both 32bit and 64bit dlls
in system32. Very few likely use wow64 so far, but this could
come biting later without a revbump.

Ideally do not want to use these scripts anymore and write
something new that could be packaged separately and shared
between dxvk, vkd3d-proton, and potential new packages.
Albeit haven't explored the cleanest way to do this yet,
so just do a dirty sanity check + fallback for now (wish
could just use these directly from system paths, but wine
really does not seem to offer a way to do this).

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../vkd3d-proton/files/vkd3d-proton-2.6-wow64-setup.patch  | 14 ++++++++++++++
 ...{vkd3d-proton-2.6.ebuild => vkd3d-proton-2.6-r1.ebuild} |  4 ++++
 ...{vkd3d-proton-2.9.ebuild => vkd3d-proton-2.9-r1.ebuild} |  4 ++++
 app-emulation/vkd3d-proton/vkd3d-proton-9999.ebuild        |  4 ++++
 4 files changed, 26 insertions(+)

diff --git 
a/app-emulation/vkd3d-proton/files/vkd3d-proton-2.6-wow64-setup.patch 
b/app-emulation/vkd3d-proton/files/vkd3d-proton-2.6-wow64-setup.patch
new file mode 100644
index 000000000000..413852460d54
--- /dev/null
+++ b/app-emulation/vkd3d-proton/files/vkd3d-proton-2.6-wow64-setup.patch
@@ -0,0 +1,14 @@
+Dirty workaround to try syswow64 if paths are the same. This can happen
+with USE=wow64 on wine where wine64 is a symlink to wine.
+
+TODO: dxvk's and vkd3d-proton's setup script should be rewritten and packaged
+separately (shared) as upstream hardly support these (dxvk dropped altogether).
+--- a/setup_vkd3d_proton.sh
++++ b/setup_vkd3d_proton.sh
+@@ -81,2 +81,6 @@
+   win32_sys_path="${win32_sys_path/$'\r'/}"
++  if [ "$win32_sys_path" = "$win64_sys_path" ]; then
++    win32_sys_path=$($wine winepath -u 'C:\windows\syswow64' 2> /dev/null)
++    win32_sys_path="${win32_sys_path/$'\r'/}"
++  fi
+ fi

diff --git a/app-emulation/vkd3d-proton/vkd3d-proton-2.6.ebuild 
b/app-emulation/vkd3d-proton/vkd3d-proton-2.6-r1.ebuild
similarity index 99%
rename from app-emulation/vkd3d-proton/vkd3d-proton-2.6.ebuild
rename to app-emulation/vkd3d-proton/vkd3d-proton-2.6-r1.ebuild
index b2963d7ca105..b728f3d9a94f 100644
--- a/app-emulation/vkd3d-proton/vkd3d-proton-2.6.ebuild
+++ b/app-emulation/vkd3d-proton/vkd3d-proton-2.6-r1.ebuild
@@ -48,6 +48,10 @@ BDEPEND="
        dev-util/glslang
        !crossdev-mingw? ( dev-util/mingw64-toolchain[${MULTILIB_USEDEP}] )"
 
+PATCHES=(
+       "${FILESDIR}"/${PN}-2.6-wow64-setup.patch
+)
+
 pkg_pretend() {
        [[ ${MERGE_TYPE} == binary ]] && return
 

diff --git a/app-emulation/vkd3d-proton/vkd3d-proton-2.9.ebuild 
b/app-emulation/vkd3d-proton/vkd3d-proton-2.9-r1.ebuild
similarity index 99%
rename from app-emulation/vkd3d-proton/vkd3d-proton-2.9.ebuild
rename to app-emulation/vkd3d-proton/vkd3d-proton-2.9-r1.ebuild
index 025dbe03397b..cf5467c6fde5 100644
--- a/app-emulation/vkd3d-proton/vkd3d-proton-2.9.ebuild
+++ b/app-emulation/vkd3d-proton/vkd3d-proton-2.9-r1.ebuild
@@ -48,6 +48,10 @@ BDEPEND="
        dev-util/glslang
        !crossdev-mingw? ( dev-util/mingw64-toolchain[${MULTILIB_USEDEP}] )"
 
+PATCHES=(
+       "${FILESDIR}"/${PN}-2.6-wow64-setup.patch
+)
+
 pkg_pretend() {
        [[ ${MERGE_TYPE} == binary ]] && return
 

diff --git a/app-emulation/vkd3d-proton/vkd3d-proton-9999.ebuild 
b/app-emulation/vkd3d-proton/vkd3d-proton-9999.ebuild
index 5c521dc6e224..490163e3132b 100644
--- a/app-emulation/vkd3d-proton/vkd3d-proton-9999.ebuild
+++ b/app-emulation/vkd3d-proton/vkd3d-proton-9999.ebuild
@@ -48,6 +48,10 @@ BDEPEND="
        dev-util/glslang
        !crossdev-mingw? ( dev-util/mingw64-toolchain[${MULTILIB_USEDEP}] )"
 
+PATCHES=(
+       "${FILESDIR}"/${PN}-2.6-wow64-setup.patch
+)
+
 pkg_pretend() {
        [[ ${MERGE_TYPE} == binary ]] && return
 

Reply via email to