diff --git a/app-emulation/dxvk/Manifest b/app-emulation/dxvk/Manifest index e1195cc..5c8b142 100644 --- a/app-emulation/dxvk/Manifest +++ b/app-emulation/dxvk/Manifest @@ -3,15 +3,17 @@ Hash: SHA512 AUX 9999-add_compiler_flags.patch 1519 BLAKE2B 272434af7b582a8e47a6c2bf10301bc2ba3b32eb9af60e92c77896df335a85309fe035a7d30214bd29d8fd7a85aca3752faeead1a42b2a7413054ed903ebab1f SHA512 3b35b3b2c0307c22d15acdc227e5811b12fd46594016ab9233a96ba9a4f6f57a930d49cf134d996e04f8cc3a70dde8b0f4ea0d96a132ffbaf8dc9d0207ac1307 DIST dxvk-1.6.1.tar.gz 894553 BLAKE2B a45f905f33b255beed65daebbb946b36c28d00dc4d3830e46de342f16d95541361a31243e6ce3e8cde3b2c7297dd2b1044aa61955f1803b8bfb34ec83367c2a9 SHA512 0f3cb7096643d1bcb1db51696824c8ca16720adfe6894392122b21f400cfa416e79eb74cdcc46d1a63a276697d324324d7657afb70b9490e22e6792643fc5805 +DIST dxvk-1.7.1.tar.gz 1076757 BLAKE2B 9e03aa872fe8d97fcf0cd07cd532de39823504620a45cd76791968b41f4183d8c7e1162f620824bb36ed839033a8b47223d8eac5ce72fc7547471794f2790c79 SHA512 fb0339658c197c27addb55f91df94d6b4ac20fcf74ff67528e4d50743da71fc5477bd7c1eff1ec04551ab799f574f4d6b0f31fb2b9ec324b3fed8379fe85b365 DIST dxvk-1.7.tar.gz 899679 BLAKE2B 3e382520c136ebdb5277289ba2ba6586dbd861074f1c7d71b296ea1c564560087737044683d79db17a5faf732a9b339908d8f247225511431ed2943680c9d3ff SHA512 3a78332dbaaed71fb007ef9b441b33892bd56844dfddc72ded926108712ade34060ddb850bf3943b175aed6e89d453fb84f12fe9c00a94e03a342de61d7aed0c EBUILD dxvk-1.6.1-r1.ebuild 5457 BLAKE2B faa212d0ca64e3e4e2b0f2461e3941d83cb7e69310454e822b6168ccdc0bc25dbd194d749936eceecc5b70112c1a5d02155875894be401f731abed35aa2e19b3 SHA512 ecd07f8ccf742147aed6fe5b2a4f57b3a73784002ef8c7219a5d3d29bfdc7471c9e119c88cd1e89bf0de11410c7ee597d075afeb96a51abdc0ab88115e2a0d62 +EBUILD dxvk-1.7.1.ebuild 4388 BLAKE2B 8efd8cdf4ed833270d33b06648b76491a789d6f53e75788813048e11c6cec8707f411d79f3e63da4dc09abc239433c2c156ea241a7dff12767122049d099c4d7 SHA512 10039476bf2014081bd0e31d325e99a172fb596209018c525eab13127c2f6c52749c601d5519888e5397e9e8dfb6300bcaaddeb20615ed4ef9446ee5ecfa93f9 EBUILD dxvk-1.7.ebuild 4814 BLAKE2B 59cbf2cf123edcb0dd1e47d9f72c53322537ef6802afbe71ac2fe994591ea755fe4bf538c6d171003b107193ed035e1cb6f2534ae12f2df3d20b1213ee0b26d1 SHA512 c8694c887a4e0e4752dbbbee597d80b3e3cd4831c20c7d9a652bc7ae0262629748c4277ca78714b453a2fda61a58bb5c4bbee011844be63a0dbbf02c4d55c274 EBUILD dxvk-9999-r4.ebuild 4360 BLAKE2B 2e15a3b32068bc658ca7744f077eae84186c41068a0e2484ae52293d338281cd799795d2af6b2e625a231e4b41f2837f3af8c56c43f01399567f027f113eee85 SHA512 de80de2563ea3b1c7b88ef94c45f04c467e1dcf66e47f2223206415e56c1f97da5a52033174112986bceed09b06e49aa3d5119e8ba38487e47f5b9faace43ba7 MISC metadata.xml 643 BLAKE2B 6e4968ea2dddea57b8079e56f3c7e5f3f478a5d017d4d238d3b2326b593bb461a74ef77270bf659fecec25c564156617e287ab8a247e8b040c07e5b829e70898 SHA512 0c71cc5589839c365703bb1938fd3360adf985875a669239a45abb8f25f517330b8e72895a18db61b076eed7e71e1a804016d0d01afeadc5650340505c30eb74 -----BEGIN PGP SIGNATURE----- -iHUEAREKAB0WIQQ1VSZoZMptf/RapufPw5SX8bJuBwUCXsKV7gAKCRDPw5SX8bJu -B8AGAQCLpJ9tGz4rn0lLzW/GnLuZdisQ3jyqOqMv6jm2+wpJyQD/SjxkSkJ+5XhS -+l6eNkyKMI1mx1/jGAZGZ2Q3GrGEnN0= -=YnB3 +iHUEAREKAB0WIQQ1VSZoZMptf/RapufPw5SX8bJuBwUCXzWKigAKCRDPw5SX8bJu +B/mpAP9FKl7twviMtqQ5MDdtiYLyGh9CihT1zuPB6yfPvc0OCAD8CCdXp/og0wrf +msEex3aI9X20uy6Jya+FafFuqG1tiHE= +=bXNc -----END PGP SIGNATURE----- diff --git a/app-emulation/dxvk/dxvk-1.7.1.ebuild b/app-emulation/dxvk/dxvk-1.7.1.ebuild new file mode 100644 index 0000000..cc1f640 --- /dev/null +++ b/app-emulation/dxvk/dxvk-1.7.1.ebuild @@ -0,0 +1,161 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +MULTILIB_COMPAT=( abi_x86_{32,64} ) +inherit flag-o-matic meson multilib-minimal ninja-utils +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-19.2 + ) + || ( + >=app-emulation/wine-staging-4.5[${MULTILIB_USEDEP},vulkan] + >=app-emulation/wine-vanilla-4.5[${MULTILIB_USEDEP},vulkan] + ) +" + +PATCHES=( + "${FILESDIR}/9999-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[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 with USE=\"libraries\"" + eerror "and ${cat}/gcc with EXTRA_ECONF=\"--enable-threads=posix\"." + eerror "See 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 " or email." +} + +src_prepare() { + default + + # Flag modifications adapted from TheGreatMcPain's overlay. + if [[ $(is-flag "-march=*") == "true" ]]; then + append-flags "-mno-avx" + fi + replace-flags "-O3" "-O2" + + 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." +}