summaryrefslogtreecommitdiff
path: root/app-emulation/dxvk
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-07-13 19:37:38 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-07-13 19:37:38 +0100
commitd01ca4361883c2aec4ffb1c2dcd75980773fdc31 (patch)
treeb918b6c397ceb2422bde7865f55fd37ff8eef908 /app-emulation/dxvk
parent7b02e37a04e4051a91a109814d386711f41f9a4b (diff)
gentoo auto-resync : 13:07:2022 - 19:37:38
Diffstat (limited to 'app-emulation/dxvk')
-rw-r--r--app-emulation/dxvk/Manifest6
-rw-r--r--app-emulation/dxvk/dxvk-1.10.1.ebuild2
-rw-r--r--app-emulation/dxvk/dxvk-1.10.2.ebuild134
-rw-r--r--app-emulation/dxvk/dxvk-9999.ebuild2
4 files changed, 140 insertions, 4 deletions
diff --git a/app-emulation/dxvk/Manifest b/app-emulation/dxvk/Manifest
index 1100b6242c63..8ec3dceb4763 100644
--- a/app-emulation/dxvk/Manifest
+++ b/app-emulation/dxvk/Manifest
@@ -1,4 +1,6 @@
DIST dxvk-1.10.1.tar.gz 1188138 BLAKE2B e4c5c5052de3f0976581317b9e6de148735198d2545e961ed4540be8660fbba0bcd30f81a1b55f032a1e00e226993d1ab3e4017b104f2829bf37d2ee4fc4420a SHA512 8fd34d9f14a7013cdc1957f63bf60feb19748fddc1cd6ec40cf271005f636de62965efb42ddf2598dad3e37a4f59a870bf769387b2534db93451d1ea6aa65410
-EBUILD dxvk-1.10.1.ebuild 4354 BLAKE2B 7b82f950f5a0ad8183d24602c9786c932214166a911958b744fcb9705ed8f06eefa0699177a43c994386b5fed6a18b29c2e935ce65904667af6e29a95d3f9e54 SHA512 d022a9e6985433ad8542251fd38c4a6150cf2f1ef07a1c3f9b3227afa66e3dce31cbc203e08b69593cb6ca8568378f0657d8fc40cd77b8d316754daf7704ce85
-EBUILD dxvk-9999.ebuild 4354 BLAKE2B 7b82f950f5a0ad8183d24602c9786c932214166a911958b744fcb9705ed8f06eefa0699177a43c994386b5fed6a18b29c2e935ce65904667af6e29a95d3f9e54 SHA512 d022a9e6985433ad8542251fd38c4a6150cf2f1ef07a1c3f9b3227afa66e3dce31cbc203e08b69593cb6ca8568378f0657d8fc40cd77b8d316754daf7704ce85
+DIST dxvk-1.10.2.tar.gz 1199562 BLAKE2B 8605d80de3640845589727999da8d19f235eafd52dc693ddfc6a6c54da4525ab5a1418694767395e37cfd84ab55bfd33867cd8608ff2e34965759f68832f55ee SHA512 2a68ececd405e38b6a463637f98c871e53f83c0b232bbf45f08b6b2cac01637eecea90f9337d8ebc600e174a65fe2b10236b1b29afdbd0ad0a9d970a050678a4
+EBUILD dxvk-1.10.1.ebuild 4362 BLAKE2B bfaec727b86399ec9e1a62494f9817e72c1d8ef19c17a752e11789e412db396fe1d1b14de2e5d60dfabf608daad1ce03b03bca06b03a6e74ef72543ab3993bbd SHA512 7415fdee8daebee75269a7d344f23d4d6f6b771447e9f43528220b13f5081e7a9c04dd5dba4925773844a42dfb94029cbae137d22851eb20eb849b42a227effd
+EBUILD dxvk-1.10.2.ebuild 4362 BLAKE2B bfaec727b86399ec9e1a62494f9817e72c1d8ef19c17a752e11789e412db396fe1d1b14de2e5d60dfabf608daad1ce03b03bca06b03a6e74ef72543ab3993bbd SHA512 7415fdee8daebee75269a7d344f23d4d6f6b771447e9f43528220b13f5081e7a9c04dd5dba4925773844a42dfb94029cbae137d22851eb20eb849b42a227effd
+EBUILD dxvk-9999.ebuild 4362 BLAKE2B bfaec727b86399ec9e1a62494f9817e72c1d8ef19c17a752e11789e412db396fe1d1b14de2e5d60dfabf608daad1ce03b03bca06b03a6e74ef72543ab3993bbd SHA512 7415fdee8daebee75269a7d344f23d4d6f6b771447e9f43528220b13f5081e7a9c04dd5dba4925773844a42dfb94029cbae137d22851eb20eb849b42a227effd
MISC metadata.xml 818 BLAKE2B 88081c074b99329c925174de4b7ff9b2c220ffc67eb64a5324f4eaf2a35f98f06c9978ddc0e929ba76b341a389a8eff025b7aa0a2414e3f7ae496c44a023c65c SHA512 90d76ac3df3abe003371cd25b9cf0e6570a53b371349fb2e048cae1818e51f0482e17b3d5490eb82c57d891bb43c4a7cd41530101b888591719c33c566788e3b
diff --git a/app-emulation/dxvk/dxvk-1.10.1.ebuild b/app-emulation/dxvk/dxvk-1.10.1.ebuild
index cf84df747aaa..d260df14098d 100644
--- a/app-emulation/dxvk/dxvk-1.10.1.ebuild
+++ b/app-emulation/dxvk/dxvk-1.10.1.ebuild
@@ -103,7 +103,7 @@ multilib_src_install_all() {
}
pkg_preinst() {
- [[ -e /usr/$(get_libdir)/dxvk/d3d11.dll ]] && DXVK_HAD_OVERLAY=
+ [[ -e ${EROOT}/usr/$(get_libdir)/dxvk/d3d11.dll ]] && DXVK_HAD_OVERLAY=
}
pkg_postinst() {
diff --git a/app-emulation/dxvk/dxvk-1.10.2.ebuild b/app-emulation/dxvk/dxvk-1.10.2.ebuild
new file mode 100644
index 000000000000..d260df14098d
--- /dev/null
+++ b/app-emulation/dxvk/dxvk-1.10.2.ebuild
@@ -0,0 +1,134 @@
+# Copyright 2022 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
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/doitsujin/dxvk.git"
+else
+ SRC_URI="https://github.com/doitsujin/dxvk/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="-* ~amd64 ~x86"
+fi
+
+DESCRIPTION="Vulkan-based implementation of D3D9, D3D10 and D3D11 for Linux / Wine"
+HOMEPAGE="https://github.com/doitsujin/dxvk/"
+
+LICENSE="ZLIB"
+SLOT="0"
+IUSE="+abi_x86_32 crossdev-mingw +d3d9 +d3d10 +d3d11 debug +dxgi"
+REQUIRED_USE="
+ || ( d3d9 d3d10 d3d11 dxgi )
+ d3d10? ( d3d11 )
+ dxgi? ( d3d11 )"
+
+BDEPEND="
+ dev-util/glslang
+ !crossdev-mingw? ( dev-util/mingw64-toolchain[${MULTILIB_USEDEP}] )"
+
+pkg_pretend() {
+ [[ ${MERGE_TYPE} == binary ]] && return
+
+ if use crossdev-mingw && [[ ! -v MINGW_BYPASS ]]; then
+ local tool=-w64-mingw32-g++
+ for tool in $(usev abi_x86_64 x86_64${tool}) $(usev abi_x86_32 i686${tool}); do
+ if ! type -P ${tool} >/dev/null; then
+ eerror "With USE=crossdev-mingw, it is necessary to setup the mingw toolchain."
+ eerror "For instructions, please see: https://wiki.gentoo.org/wiki/Mingw"
+ use abi_x86_32 && use abi_x86_64 &&
+ eerror "Also, with USE=abi_x86_32, will need both i686 and x86_64 toolchains."
+ die "USE=crossdev-mingw is set but ${tool} was not found"
+ elif [[ ! $(LC_ALL=C ${tool} -v 2>&1) =~ "Thread model: posix" ]]; then
+ eerror "${PN} requires GCC to be built with --enable-threads=posix"
+ eerror "Please see: https://wiki.gentoo.org/wiki/Mingw#POSIX_threads_for_Windows"
+ die "USE=crossdev-mingw is set but ${tool} does not use POSIX threads"
+ fi
+ done
+ fi
+}
+
+src_prepare() {
+ default
+
+ sed -i "/^basedir=/s|=.*|=${EPREFIX}/usr/lib/${PN}|" setup_dxvk.sh || die
+}
+
+src_configure() {
+ use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH}
+
+ # AVX has a history of causing issues with this package, disable for safety
+ # https://github.com/Tk-Glitch/PKGBUILDS/issues/515
+ append-flags -mno-avx
+
+ if [[ ${CHOST} != *-mingw* ]]; then
+ [[ ! -v MINGW_BYPASS ]] && unset AR CC CXX RC STRIP
+
+ CHOST_amd64=x86_64-w64-mingw32
+ CHOST_x86=i686-w64-mingw32
+ CHOST=$(usex x86 ${CHOST_x86} ${CHOST_amd64})
+
+ strip-unsupported-flags
+ fi
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ # multilib's ${CHOST_amd64}-gcc -m32 is unusable with crossdev,
+ # unset again so meson eclass will set ${CHOST}-gcc + others
+ use crossdev-mingw && [[ ! -v MINGW_BYPASS ]] && unset AR CC CXX RC STRIP
+
+ local emesonargs=(
+ --prefix="${EPREFIX}"/usr/lib/${PN}
+ --{bin,lib}dir=x${MULTILIB_ABI_FLAG: -2}
+ $(meson_use {,enable_}d3d9)
+ $(meson_use {,enable_}d3d10)
+ $(meson_use {,enable_}d3d11)
+ $(meson_use {,enable_}dxgi)
+ $(usev !debug --strip) # portage won't strip .dll, so allow it here
+ -Denable_tests=false # needs wine/vulkan and is intended for manual use
+ )
+
+ meson_src_configure
+}
+
+multilib_src_install_all() {
+ dobin setup_dxvk.sh
+ dodoc README.md dxvk.conf
+
+ find "${ED}" -type f -name '*.a' -delete || die
+}
+
+pkg_preinst() {
+ [[ -e ${EROOT}/usr/$(get_libdir)/dxvk/d3d11.dll ]] && DXVK_HAD_OVERLAY=
+}
+
+pkg_postinst() {
+ if [[ ! ${REPLACING_VERSIONS} ]]; then
+ elog "To enable ${PN} on a wine prefix, you can run the following command:"
+ elog
+ elog " WINEPREFIX=/path/to/prefix setup_dxvk.sh install --symlink"
+ elog
+ elog "See ${EROOT}/usr/share/doc/${PF}/README.md* for details."
+ elif [[ -v DXVK_HAD_OVERLAY ]]; then
+ # temporary warning until this version is more widely used
+ elog "Gentoo's main repo ebuild for ${PN} uses different paths than most overlays."
+ elog "If you were using symbolic links in wine prefixes it may be necessary to"
+ elog "refresh them by re-running the command:"
+ elog
+ elog " WINEPREFIX=/path/to/prefix setup_dxvk.sh install --symlink"
+ elog
+ elog "Also, if you were using /etc/${PN}.conf, ${PN} is no longer patched to load"
+ elog "it. See ${EROOT}/usr/share/doc/${PF}/README.md* for handling configs."
+ fi
+
+ # don't try to keep wine-*[vulkan] in RDEPEND, but still give a warning
+ local wine
+ for wine in app-emulation/wine-{vanilla,staging}; do
+ has_version ${wine} && ! has_version ${wine}[vulkan] &&
+ ewarn "${wine} was not built with USE=vulkan, ${PN} will not be usable with it"
+ done
+}
diff --git a/app-emulation/dxvk/dxvk-9999.ebuild b/app-emulation/dxvk/dxvk-9999.ebuild
index cf84df747aaa..d260df14098d 100644
--- a/app-emulation/dxvk/dxvk-9999.ebuild
+++ b/app-emulation/dxvk/dxvk-9999.ebuild
@@ -103,7 +103,7 @@ multilib_src_install_all() {
}
pkg_preinst() {
- [[ -e /usr/$(get_libdir)/dxvk/d3d11.dll ]] && DXVK_HAD_OVERLAY=
+ [[ -e ${EROOT}/usr/$(get_libdir)/dxvk/d3d11.dll ]] && DXVK_HAD_OVERLAY=
}
pkg_postinst() {