Update to dxvk release 2.4
OBS-URL: https://build.opensuse.org/package/show/Emulators:Wine/dxvk?expand=0&rev=42
This commit is contained in:
commit
8e9cd7df77
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
16
_service
Normal file
16
_service
Normal file
@ -0,0 +1,16 @@
|
||||
<services>
|
||||
<service mode="disabled" name="obs_scm">
|
||||
<param name="versionformat">@PARENT_TAG@</param>
|
||||
<param name="versionrewrite-pattern">v(.*)</param>
|
||||
<param name="url">https://github.com/doitsujin/dxvk.git</param>
|
||||
<param name="scm">git</param>
|
||||
<param name="revision">@PARENT_TAG@</param>
|
||||
</service>
|
||||
<service mode="disabled" name="tar" />
|
||||
<service mode="disabled" name="recompress">
|
||||
<param name="file">*.tar</param>
|
||||
<param name="compression">gz</param>
|
||||
</service>
|
||||
<service mode="disabled" name="set_version"/>
|
||||
<service mode="disabled" name="download_files"/>
|
||||
</services>
|
3
baselibs.conf
Normal file
3
baselibs.conf
Normal file
@ -0,0 +1,3 @@
|
||||
dxvk
|
||||
+/usr/libexec/dxvk/lib(64)?/.*
|
||||
requires -dxvk-<targettype>
|
3
dxvk-2.3.tar.gz
Normal file
3
dxvk-2.3.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c6445483a1865cc561f1b8278076bfdda9f3514ccaa807b797ce9bb6ea6aeb72
|
||||
size 4219775
|
3
dxvk-2.4.tar.gz
Normal file
3
dxvk-2.4.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:eb5b9d4e797daa0a42181a907fe8ff13dcf8aacde3d900def801e4c29906523b
|
||||
size 4538917
|
5664
dxvk.changes
Normal file
5664
dxvk.changes
Normal file
File diff suppressed because it is too large
Load Diff
4
dxvk.obsinfo
Normal file
4
dxvk.obsinfo
Normal file
@ -0,0 +1,4 @@
|
||||
name: dxvk
|
||||
version: 2.4
|
||||
mtime: 1720605374
|
||||
commit: 008afc1c5f287e82a553108790da6e10b1159200
|
111
dxvk.spec
Normal file
111
dxvk.spec
Normal file
@ -0,0 +1,111 @@
|
||||
#
|
||||
# spec file for package dxvk
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
Name: dxvk
|
||||
Version: 2.4
|
||||
Release: 0
|
||||
Summary: Vulkan-based Direct3D 8/9/10/11 implementation for Linux / Wine
|
||||
License: zlib-acknowledgement
|
||||
Group: System/Emulators/PC
|
||||
URL: https://github.com/doitsujin/dxvk
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
Source1: baselibs.conf
|
||||
Source2: setup_dxvk.sh
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: glslang-devel
|
||||
BuildRequires: meson
|
||||
BuildRequires: ninja
|
||||
BuildRequires: wine
|
||||
BuildRequires: xz
|
||||
|
||||
%ifarch x86_64
|
||||
BuildRequires: mingw64-cross-cpp
|
||||
BuildRequires: mingw64-cross-gcc
|
||||
BuildRequires: mingw64-cross-gcc-c++
|
||||
BuildRequires: mingw64-headers
|
||||
|
||||
#Require 32bit version
|
||||
Requires: %{name}-32bit
|
||||
%else
|
||||
BuildRequires: mingw32-cross-cpp
|
||||
BuildRequires: mingw32-cross-gcc
|
||||
BuildRequires: mingw32-cross-gcc-c++
|
||||
BuildRequires: mingw32-headers
|
||||
%endif
|
||||
|
||||
ExclusiveArch: %{ix86} x86_64
|
||||
|
||||
%description
|
||||
A Vulkan-based translation layer for Direct3D 8/9/10/11 which allows running 3D applications on Linux using Wine.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
export CFLAGS="%optflags -DNDEBUG -fPIC -O2 -pthread -fno-strict-aliasing -fpredictive-commoning -fuse-linker-plugin -fno-stack-protector -fno-stack-clash-protection -fno-lto"
|
||||
export CXXFLAGS="${CFLAGS} -fpermissive"
|
||||
export LDFLAGS="-fPIC -Wl,--sort-common -Wl,--gc-sections -Wl,-O1 -fuse-linker-plugin -fno-lto"
|
||||
|
||||
mkdir ../build
|
||||
|
||||
meson setup \
|
||||
--cross-file build-win$(arch | tail -c 3 | sed 's|86|32|g').txt \
|
||||
--strip \
|
||||
--buildtype "release" \
|
||||
--unity off \
|
||||
--prefix /%{name} \
|
||||
../build
|
||||
|
||||
cd ../build
|
||||
ninja
|
||||
|
||||
%install
|
||||
|
||||
#install wrapper scripts
|
||||
mkdir -p %{buildroot}%{_bindir} %{buildroot}%{_libexecdir}/%{name}/bin
|
||||
sed \
|
||||
-e 's|basedir=.*|basedir="%{_libexecdir}/%{name}"|g' \
|
||||
-e 's|x32|lib|g' -e 's|x64|lib64|g' \
|
||||
%{SOURCE2}> %{buildroot}%{_libexecdir}/%{name}/bin/setup_dxvk.sh
|
||||
ln -s %{_libexecdir}/%{name}/bin/setup_dxvk.sh %{buildroot}%{_bindir}/wine%{name}
|
||||
|
||||
#install dxvk proper
|
||||
cd ../build
|
||||
DESTDIR=%{buildroot}%{_libexecdir} ninja install
|
||||
|
||||
%ifarch x86_64
|
||||
if [ -d %{buildroot}%{_libexecdir}/%{name}/lib ];then
|
||||
mv %{buildroot}%{_libexecdir}/%{name}/lib %{buildroot}%{_libexecdir}/%{name}/%{_lib}
|
||||
fi
|
||||
%endif
|
||||
rm %{buildroot}%{_libexecdir}/%{name}/%{_lib}/*.dll.a && \
|
||||
mv %{buildroot}%{_libexecdir}/%{name}/bin/*.dll %{buildroot}%{_libexecdir}/%{name}/%{_lib}/
|
||||
|
||||
%files
|
||||
%defattr(644,root,root)
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
|
||||
%{_bindir}/wine%{name}
|
||||
%dir %{_libexecdir}/%{name}
|
||||
%{_libexecdir}/%{name}/%{_lib}
|
||||
%attr(755, root, root) %{_libexecdir}/%{name}/bin
|
||||
|
||||
%changelog
|
207
setup_dxvk.sh
Normal file
207
setup_dxvk.sh
Normal file
@ -0,0 +1,207 @@
|
||||
#!/bin/bash
|
||||
|
||||
# default directories
|
||||
dxvk_lib32=${dxvk_lib32:-"x32"}
|
||||
dxvk_lib64=${dxvk_lib64:-"x64"}
|
||||
|
||||
# figure out where we are
|
||||
basedir="$(dirname "$(readlink -f "$0")")"
|
||||
|
||||
# figure out which action to perform
|
||||
action="$1"
|
||||
|
||||
case "$action" in
|
||||
install)
|
||||
;;
|
||||
uninstall)
|
||||
;;
|
||||
*)
|
||||
echo "Unrecognized action: $action"
|
||||
echo "Usage: $0 [install|uninstall] [--without-dxgi] [--symlink]"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
# process arguments
|
||||
shift
|
||||
|
||||
with_dxgi=true
|
||||
file_cmd="cp -v --reflink=auto"
|
||||
|
||||
while (($# > 0)); do
|
||||
case "$1" in
|
||||
"--without-dxgi")
|
||||
with_dxgi=false
|
||||
;;
|
||||
"--symlink")
|
||||
file_cmd="ln -s -v"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# check wine prefix before invoking wine, so that we
|
||||
# don't accidentally create one if the user screws up
|
||||
if [ -n "$WINEPREFIX" ] && ! [ -f "$WINEPREFIX/system.reg" ]; then
|
||||
echo "$WINEPREFIX:"' Not a valid wine prefix.' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# find wine executable
|
||||
export WINEDEBUG=-all
|
||||
# disable mscoree and mshtml to avoid downloading
|
||||
# wine gecko and mono
|
||||
export WINEDLLOVERRIDES="mscoree,mshtml="
|
||||
|
||||
wine="wine"
|
||||
wine64="wine64"
|
||||
wineboot="wineboot"
|
||||
|
||||
# $PATH is the way for user to control where wine is located (including custom Wine versions).
|
||||
# Pure 64-bit Wine (non Wow64) requries skipping 32-bit steps.
|
||||
# In such case, wine64 and winebooot will be present, but wine binary will be missing,
|
||||
# however it can be present in other PATHs, so it shouldn't be used, to avoid versions mixing.
|
||||
wine_path=$(dirname "$(which $wineboot)")
|
||||
wow64=true
|
||||
if ! [ -f "$wine_path/$wine" ]; then
|
||||
wine=$wine64
|
||||
wow64=false
|
||||
fi
|
||||
|
||||
# resolve 32-bit and 64-bit system32 path
|
||||
winever=$($wine --version | grep wine)
|
||||
if [ -z "$winever" ]; then
|
||||
echo "$wine:"' Not a wine executable. Check your $wine.' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# ensure wine placeholder dlls are recreated
|
||||
# if they are missing
|
||||
$wineboot -u
|
||||
|
||||
win64_sys_path=$($wine64 winepath -u 'C:\windows\system32' 2> /dev/null)
|
||||
win64_sys_path="${win64_sys_path/$'\r'/}"
|
||||
if $wow64; then
|
||||
win32_sys_path=$($wine winepath -u 'C:\windows\system32' 2> /dev/null)
|
||||
win32_sys_path="${win32_sys_path/$'\r'/}"
|
||||
fi
|
||||
|
||||
if [ -z "$win32_sys_path" ] && [ -z "$win64_sys_path" ]; then
|
||||
echo 'Failed to resolve C:\windows\system32.' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# create native dll override
|
||||
overrideDll() {
|
||||
$wine reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v $1 /d native /f >/dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "Failed to add override for $1"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# remove dll override
|
||||
restoreDll() {
|
||||
$wine reg delete 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v $1 /f > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to remove override for $1"
|
||||
fi
|
||||
}
|
||||
|
||||
# copy or link dxvk dll, back up original file
|
||||
installFile() {
|
||||
dstfile="${1}/${3}.dll"
|
||||
srcfile="${basedir}/${2}/${3}.dll"
|
||||
|
||||
if [ -f "${srcfile}.so" ]; then
|
||||
srcfile="${srcfile}.so"
|
||||
fi
|
||||
|
||||
if ! [ -f "${srcfile}" ]; then
|
||||
echo "${srcfile}: File not found. Skipping." >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -n "$1" ]; then
|
||||
if [ -f "${dstfile}" ] || [ -h "${dstfile}" ]; then
|
||||
if ! [ -f "${dstfile}.old" ]; then
|
||||
mv -v "${dstfile}" "${dstfile}.old"
|
||||
else
|
||||
rm -v "${dstfile}"
|
||||
fi
|
||||
$file_cmd "${srcfile}" "${dstfile}"
|
||||
else
|
||||
echo "${dstfile}: File not found in wine prefix" >&2
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
# remove dxvk dll, restore original file
|
||||
uninstallFile() {
|
||||
dstfile="${1}/${3}.dll"
|
||||
srcfile="${basedir}/${2}/${3}.dll"
|
||||
|
||||
if [ -f "${srcfile}.so" ]; then
|
||||
srcfile="${srcfile}.so"
|
||||
fi
|
||||
|
||||
if ! [ -f "${srcfile}" ]; then
|
||||
echo "${srcfile}: File not found. Skipping." >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
if ! [ -f "${dstfile}" ] && ! [ -h "${dstfile}" ]; then
|
||||
echo "${dstfile}: File not found. Skipping." >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -f "${dstfile}.old" ]; then
|
||||
rm -v "${dstfile}"
|
||||
mv -v "${dstfile}.old" "${dstfile}"
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
install() {
|
||||
installFile "$win64_sys_path" "$dxvk_lib64" "$1"
|
||||
inst64_ret="$?"
|
||||
|
||||
inst32_ret=-1
|
||||
if $wow64; then
|
||||
installFile "$win32_sys_path" "$dxvk_lib32" "$1"
|
||||
inst32_ret="$?"
|
||||
fi
|
||||
|
||||
if (( ($inst32_ret == 0) || ($inst64_ret == 0) )); then
|
||||
overrideDll "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
uninstall() {
|
||||
uninstallFile "$win64_sys_path" "$dxvk_lib64" "$1"
|
||||
uninst64_ret="$?"
|
||||
|
||||
uninst32_ret=-1
|
||||
if $wow64; then
|
||||
uninstallFile "$win32_sys_path" "$dxvk_lib32" "$1"
|
||||
uninst32_ret="$?"
|
||||
fi
|
||||
|
||||
if (( ($uninst32_ret == 0) || ($uninst64_ret == 0) )); then
|
||||
restoreDll "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
# skip dxgi during install if not explicitly
|
||||
# enabled, but always try to uninstall it
|
||||
if $with_dxgi || [ "$action" == "uninstall" ]; then
|
||||
$action dxgi
|
||||
fi
|
||||
|
||||
$action d3d9
|
||||
$action d3d10core
|
||||
$action d3d11
|
||||
$action d3d8
|
Loading…
Reference in New Issue
Block a user