summaryrefslogtreecommitdiff
path: root/app-emulation/dxvk
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-08-03 13:48:30 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-08-03 13:48:30 +0100
commit24d75f43d3d4caf76f2448bb277e89a3b3ae0d99 (patch)
tree4f290d635d831599222130ba8ddbf1a726129426 /app-emulation/dxvk
parent8d8735134b6bb6e159162e531cccb456691a4ed4 (diff)
gentoo auto-resync : 03.08.2022 - 13:48:05
Diffstat (limited to 'app-emulation/dxvk')
-rw-r--r--app-emulation/dxvk/Manifest2
-rw-r--r--app-emulation/dxvk/dxvk-1.10.3.ebuild137
2 files changed, 139 insertions, 0 deletions
diff --git a/app-emulation/dxvk/Manifest b/app-emulation/dxvk/Manifest
index 38d39ebb3576..ea3ebc1ef900 100644
--- a/app-emulation/dxvk/Manifest
+++ b/app-emulation/dxvk/Manifest
@@ -1,6 +1,8 @@
DIST dxvk-1.10.1.tar.gz 1188138 BLAKE2B e4c5c5052de3f0976581317b9e6de148735198d2545e961ed4540be8660fbba0bcd30f81a1b55f032a1e00e226993d1ab3e4017b104f2829bf37d2ee4fc4420a SHA512 8fd34d9f14a7013cdc1957f63bf60feb19748fddc1cd6ec40cf271005f636de62965efb42ddf2598dad3e37a4f59a870bf769387b2534db93451d1ea6aa65410
DIST dxvk-1.10.2.tar.gz 1199562 BLAKE2B 8605d80de3640845589727999da8d19f235eafd52dc693ddfc6a6c54da4525ab5a1418694767395e37cfd84ab55bfd33867cd8608ff2e34965759f68832f55ee SHA512 2a68ececd405e38b6a463637f98c871e53f83c0b232bbf45f08b6b2cac01637eecea90f9337d8ebc600e174a65fe2b10236b1b29afdbd0ad0a9d970a050678a4
+DIST dxvk-1.10.3.tar.gz 1204407 BLAKE2B 3507ffe4abf9c45f2a138b05e7cf706322a6bf3d2e9ae86a9d6216b206c09f79eac696ee7dfe33d0bef55e727f51301c36eb89bfa3b3f429d7d5fafc1eebdcb4 SHA512 8995b231b3f3650beda04c01f30186d10a373075a4774b4ecbfb3bbeb4de99c57555f1db0611e5c61c6a411a7215e0faf228f9861f6b7adae6fc365e8056f7e3
EBUILD dxvk-1.10.1.ebuild 4405 BLAKE2B d24f75e3e45f106cd556150bad383400dab74e7fb1a9cd0f92fc10129c44bf18ff6d601186ff2e59dc6fb00380ff467a7e71d1f2a13cb005e3823d320c6532cd SHA512 dddbd222ae2be158d18a485896765e2774224dac3fdfcdf48d1a9f42c5ba98a6e71f8eff06d6a35bcecf29a3cb9c56a9757dd22b02cc35eafac6a6bb76da1b89
EBUILD dxvk-1.10.2.ebuild 4405 BLAKE2B d24f75e3e45f106cd556150bad383400dab74e7fb1a9cd0f92fc10129c44bf18ff6d601186ff2e59dc6fb00380ff467a7e71d1f2a13cb005e3823d320c6532cd SHA512 dddbd222ae2be158d18a485896765e2774224dac3fdfcdf48d1a9f42c5ba98a6e71f8eff06d6a35bcecf29a3cb9c56a9757dd22b02cc35eafac6a6bb76da1b89
+EBUILD dxvk-1.10.3.ebuild 4405 BLAKE2B d24f75e3e45f106cd556150bad383400dab74e7fb1a9cd0f92fc10129c44bf18ff6d601186ff2e59dc6fb00380ff467a7e71d1f2a13cb005e3823d320c6532cd SHA512 dddbd222ae2be158d18a485896765e2774224dac3fdfcdf48d1a9f42c5ba98a6e71f8eff06d6a35bcecf29a3cb9c56a9757dd22b02cc35eafac6a6bb76da1b89
EBUILD dxvk-9999.ebuild 4405 BLAKE2B d24f75e3e45f106cd556150bad383400dab74e7fb1a9cd0f92fc10129c44bf18ff6d601186ff2e59dc6fb00380ff467a7e71d1f2a13cb005e3823d320c6532cd SHA512 dddbd222ae2be158d18a485896765e2774224dac3fdfcdf48d1a9f42c5ba98a6e71f8eff06d6a35bcecf29a3cb9c56a9757dd22b02cc35eafac6a6bb76da1b89
MISC metadata.xml 818 BLAKE2B 88081c074b99329c925174de4b7ff9b2c220ffc67eb64a5324f4eaf2a35f98f06c9978ddc0e929ba76b341a389a8eff025b7aa0a2414e3f7ae496c44a023c65c SHA512 90d76ac3df3abe003371cd25b9cf0e6570a53b371349fb2e048cae1818e51f0482e17b3d5490eb82c57d891bb43c4a7cd41530101b888591719c33c566788e3b
diff --git a/app-emulation/dxvk/dxvk-1.10.3.ebuild b/app-emulation/dxvk/dxvk-1.10.3.ebuild
new file mode 100644
index 000000000000..afc25d76d52c
--- /dev/null
+++ b/app-emulation/dxvk/dxvk-1.10.3.ebuild
@@ -0,0 +1,137 @@
+# 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
+ if [[ ! -v MINGW_BYPASS ]]; then
+ unset AR CC CXX RC STRIP
+ filter-flags '-fuse-ld=*'
+ fi
+
+ 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
+}