app-emulation/dxvk: Version bump 1.9.3

This commit is contained in:
tastytea 2022-01-12 00:57:29 +01:00
parent d95e859c59
commit 4ba825fe1a
Signed by untrusted user: tastytea
GPG Key ID: CFC39497F1B26E07
2 changed files with 161 additions and 0 deletions

View File

@ -1,2 +1,3 @@
DIST dxvk-1.9.1.tar.gz 1135785 BLAKE2B 49bb4aefff8385da238e334bcd99f992263d7266efc23efb3ca1c459ad6c7e7012dbb0390c7581e9b1b3004d9dfb4ddf56e0aa30a7bb1e016c3310b141e8ba29 SHA512 012c1b2b854585696f438e13bfd2334498419650bb9f0fb9decff690562f79701a42fe93738e2567802fc201916a9b33885c44ca7494d5e12ac877e770ab1e36
DIST dxvk-1.9.2.tar.gz 1148537 BLAKE2B 7ff65080f63036afdeb88a517dcfb7712b0f15f6d02e98db1d3c05ba65ce22b6347990f40cc8690204aa347272c42504e1dd3f232e91ea79c4a983623caf3f5a SHA512 0f63ffd65b02263140e5c976de2466baa6e2e440257771c0627b355083072724c8ecc0c6952aefc6786263ebbe30030e7bcdbedc9e775dec0f31d393e4fcf1de
DIST dxvk-1.9.3.tar.gz 1166878 BLAKE2B 1cef00e9b50632d51340ce0fd9d2842db8370853066e51a7a960d3c18b70c44ab5f2a7949c6c20cee47f7cb0d70fbd276136cc8d4cec137f2c1c87e06396fa1e SHA512 8e9d9fe0c123675add5a998de149c06b6e03e6a06d370090dddc68657dabfc1e98a4dd559b0a6a169466fef01149c9d6a6e9b3d57550e3803bda2bfc1f451cd2

View File

@ -0,0 +1,160 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
MULTILIB_COMPAT=( abi_x86_{32,64} )
inherit flag-o-matic meson multilib-minimal
if [[ "${PV}" == "9999" ]]; then
inherit git-r3
fi
DESCRIPTION="Vulkan-based implementation of D3D9, D3D10 and D3D11 for Linux / Wine"
HOMEPAGE="https://github.com/doitsujin/dxvk"
if [[ "${PV}" == "9999" ]]; then
EGIT_REPO_URI="https://github.com/doitsujin/dxvk.git"
else
SRC_URI="https://github.com/doitsujin/dxvk/archive/v${PV}.tar.gz -> ${P}.tar.gz"
fi
LICENSE="ZLIB"
SLOT="0"
if [[ "${PV}" == "9999" ]]; then
KEYWORDS=""
else
KEYWORDS="~amd64"
fi
IUSE="+d3d9 +d3d10 +d3d11 debug +dxgi video_cards_nvidia test"
DEPEND="
dev-util/vulkan-headers
dev-util/glslang
"
RDEPEND="
media-libs/vulkan-loader[${MULTILIB_USEDEP}]
|| (
video_cards_nvidia? ( >=x11-drivers/nvidia-drivers-440.31 )
>=media-libs/mesa-20.2
)
|| (
>=app-emulation/wine-staging-4.5[${MULTILIB_USEDEP},vulkan]
>=app-emulation/wine-vanilla-4.5[${MULTILIB_USEDEP},vulkan]
)
"
PATCHES=(
"${FILESDIR}/dxvk-1.8_add-compiler-flags.patch"
)
RESTRICT="!test? ( test )"
pkg_pretend () {
local -a categories
use abi_x86_64 && categories+=("cross-x86_64-w64-mingw32")
use abi_x86_32 && categories+=("cross-i686-w64-mingw32")
for cat in ${categories[@]}; do
local thread_model="$(LC_ALL=C ${cat/cross-/}-gcc -v 2>&1 \
| grep 'Thread model' | cut -d' ' -f3)" || die
if ! has_version -b ">=${cat}/mingw64-runtime-8.0.0[libraries]" ||
! has_version -b "${cat}/gcc" ||
[[ "${thread_model}" != "posix" ]]; then
eerror "The ${cat} toolchain is not properly installed."
eerror "Make sure to install ${cat}/mingw64-runtime >= 8.0.0 with USE=\"libraries\""
eerror "and ${cat}/gcc with EXTRA_ECONF=\"--enable-threads=posix\"."
eerror "See <https://wiki.gentoo.org/wiki/DXVK> for more information."
einfo "Alternatively you can install app-emulation/dxvk-bin from the “guru” repo."
die "${cat} toolchain is not properly installed."
fi
done
einfo "Please report build errors first to the package maintainer via"
einfo "<https://schlomp.space/tastytea/overlay/issues> or email."
}
src_prepare() {
default
# Flag modifications adapted from TheGreatMcPain's overlay.
if [[ $(is-flag "-march=*") == "true" ]]; then
append-flags "-mno-avx"
fi
sed -i "s|^basedir=.*$|basedir=\"${EPREFIX}\"|" setup_dxvk.sh || die
# Delete installation instructions for unused ABIs.
if ! use abi_x86_64; then
sed -i '/installFile "$win64_sys_path"/d' setup_dxvk.sh || die
fi
if ! use abi_x86_32; then
sed -i '/installFile "$win32_sys_path"/d' setup_dxvk.sh || die
fi
patch_build_flags() {
local bits="${MULTILIB_ABI_FLAG:8:2}"
# Fix installation directory.
sed -i "s|\"x${bits}\"|\"usr/$(get_libdir)/dxvk\"|" setup_dxvk.sh || die
# Add *FLAGS to cross-file.
sed -i \
-e "s!@CFLAGS@!$(_meson_env_array "${CFLAGS}")!" \
-e "s!@CXXFLAGS@!$(_meson_env_array "${CXXFLAGS}")!" \
-e "s!@LDFLAGS@!$(_meson_env_array "${LDFLAGS}")!" \
"build-win${bits}.txt" || die
}
multilib_foreach_abi patch_build_flags
# Load configuration file from /etc/dxvk.conf.
sed -Ei 's|filePath = "^(\s+)dxvk.conf";$|\1filePath = "/etc/dxvk.conf";|' \
src/util/config/config.cpp || die
}
multilib_src_configure() {
local bits="${MULTILIB_ABI_FLAG:8:2}"
local emesonargs=(
--libdir="$(get_libdir)/dxvk"
--bindir="$(get_libdir)/dxvk"
--cross-file="${S}/build-win${bits}.txt"
--buildtype="release"
$(usex debug "" "--strip")
$(meson_use d3d9 "enable_d3d9")
$(meson_use d3d10 "enable_d3d10")
$(meson_use d3d11 "enable_d3d11")
$(meson_use dxgi "enable_dxgi")
$(meson_use test "enable_tests")
)
meson_src_configure
}
multilib_src_compile() {
EMESON_SOURCE="${S}"
meson_src_compile
}
multilib_src_install() {
meson_src_install
}
multilib_src_install_all() {
# The .a files are needed during the install phase.
find "${D}" -name '*.a' -delete -print
dobin setup_dxvk.sh
insinto etc
doins "dxvk.conf"
default
}
pkg_postinst() {
elog "dxvk is installed, but not activated. You have to create DLL overrides"
elog "in order to make use of it. To do so, set WINEPREFIX and execute"
elog "setup_dxvk.sh install --symlink."
elog "D9VK is part of DXVK since 1.5. If you use symlinks, don't forget to link the new libraries."
}