diff --git a/app-emulation/dxvk/Manifest b/app-emulation/dxvk/Manifest index a87da9a..9fe1a3a 100644 --- a/app-emulation/dxvk/Manifest +++ b/app-emulation/dxvk/Manifest @@ -7,15 +7,17 @@ AUX 9999-add_compiler_flags.patch 1474 BLAKE2B a38298c55d2884e661afc68d2505cec97 AUX flags.patch 1400 BLAKE2B c69951eddea7b94836e9d64b39870395c4eb54dcfff31fb9ff9eafa801d989acddcf738802bbc3600a871053546dc5f641726f7e75cfdb9f101973aebd2b3571 SHA512 fd4a053775a4ab7b4df24da38ba602a5e8d43a75676bf3e870a82dd4f4e3bcf228e043139604c95941b09086ecd21887a8eaf81f2229d00abb47fdc83419284c DIST dxvk-1.6.1.tar.gz 894553 BLAKE2B a45f905f33b255beed65daebbb946b36c28d00dc4d3830e46de342f16d95541361a31243e6ce3e8cde3b2c7297dd2b1044aa61955f1803b8bfb34ec83367c2a9 SHA512 0f3cb7096643d1bcb1db51696824c8ca16720adfe6894392122b21f400cfa416e79eb74cdcc46d1a63a276697d324324d7657afb70b9490e22e6792643fc5805 DIST dxvk-1.6.tar.gz 892463 BLAKE2B 84d1ca0b42b9b63c5efa15d284ffedd76d4f5c09a1ca3e51971d36d68f0a5346f4bf3e5ee119a90fdbf489a3e21137e9d981710cb2b33b4b6a195f941baefa15 SHA512 5b1ba21515e5f7a75baba1e182a0b15285712c2a6e8946fcc0eadb82b64d43122e1c211304af2c890e368098fd2a69d174f86c05f9b0de0b417b0f2390d4a0ca +DIST dxvk-1.7.tar.gz 899679 BLAKE2B 3e382520c136ebdb5277289ba2ba6586dbd861074f1c7d71b296ea1c564560087737044683d79db17a5faf732a9b339908d8f247225511431ed2943680c9d3ff SHA512 3a78332dbaaed71fb007ef9b441b33892bd56844dfddc72ded926108712ade34060ddb850bf3943b175aed6e89d453fb84f12fe9c00a94e03a342de61d7aed0c EBUILD dxvk-1.6.1-r1.ebuild 5458 BLAKE2B 26cf74765a78a1fc91652538eaff50e65696e4fbc6ca781cdb14642aaf9fee1cfd8a8b30e5be08c6c45eee4d8092d5cbeb2acb9f5b1402c1224b1a0a643b39bb SHA512 f1d6dea813e702d700568f5ea54b736f01efbb920b58b93a51b4aa76e4cf386dbc8ecf2ef5ddeca48552575f511939dc8a85942e6acedce7ea6fd926b0cd3639 EBUILD dxvk-1.6.1.ebuild 2970 BLAKE2B 4eb3ed4de391e7bc3aea0b8f2789728f88f43cda7f4da00a6dc7f10308716418bab30c0f235ac4cf048ef887f2100eb4b131be02be0a46817b456a6e05c9db74 SHA512 2915110c781a80e70b1568868c03370804d50954885d7d0015d8bbd5517abcc1ec0bed8cb5f197a3f5d671c6cb5c282ce23fe33c4d179a6ee449b1aaf62ecec7 EBUILD dxvk-1.6.ebuild 3014 BLAKE2B f510a47962b19ab5854d8a5f5e36a2200d021f6783aa05f8222cce1d05006b97130abf186bda937236c73cc994c043d627938035d9363030605d0c082f66638c SHA512 43e80f111f51a9084b09064178bebb437b2c0931b4f65ed665a837805b6bb5dcc5a2868b05bd103fe864f6f9de59829c4c9e21734a780c4a0913b4176c7e8757 +EBUILD dxvk-1.7.ebuild 5045 BLAKE2B cb57f52c9fcf0a8347a8762da40f7784f197e1f0fe245cbdf0a71957e552cf39f5a7c1055cd87ab0d81bec9a1a881861687c2fccaa440007e8439350d2f0fc0f SHA512 eaed28afe937d753aad4cc54a75c69b5eb5b87cb6f7b04a3f9bb6a4fb1c3f08271d79449129a4037011aba06187f39246408ae0ed2608292bf1d486cc5698c6b EBUILD dxvk-9999-r4.ebuild 5045 BLAKE2B cb57f52c9fcf0a8347a8762da40f7784f197e1f0fe245cbdf0a71957e552cf39f5a7c1055cd87ab0d81bec9a1a881861687c2fccaa440007e8439350d2f0fc0f SHA512 eaed28afe937d753aad4cc54a75c69b5eb5b87cb6f7b04a3f9bb6a4fb1c3f08271d79449129a4037011aba06187f39246408ae0ed2608292bf1d486cc5698c6b MISC metadata.xml 643 BLAKE2B 6e4968ea2dddea57b8079e56f3c7e5f3f478a5d017d4d238d3b2326b593bb461a74ef77270bf659fecec25c564156617e287ab8a247e8b040c07e5b829e70898 SHA512 0c71cc5589839c365703bb1938fd3360adf985875a669239a45abb8f25f517330b8e72895a18db61b076eed7e71e1a804016d0d01afeadc5650340505c30eb74 -----BEGIN PGP SIGNATURE----- -iHUEAREKAB0WIQQ1VSZoZMptf/RapufPw5SX8bJuBwUCXqxEngAKCRDPw5SX8bJu -B+K4AP4o81LGHHZaMhNcM8T3hqXG6S4YYwdtXIvr4Su1BunZ5gD8CDYltm5DuARC -FBISDlFyODPRaPaU4Ae/LjgLug5pX1E= -=rofq +iHUEAREKAB0WIQQ1VSZoZMptf/RapufPw5SX8bJuBwUCXsATBgAKCRDPw5SX8bJu +Bw3pAP9o6za8r2bbQ+daogejUlFnlU5HrEtp63X8FOgkVMB6tAD/TGR+fL9AtUWs +7sxKDe3/aHhtV+5Ap/RyI6PsMdfMDtc= +=9Ax7 -----END PGP SIGNATURE----- diff --git a/app-emulation/dxvk/dxvk-1.7.ebuild b/app-emulation/dxvk/dxvk-1.7.ebuild new file mode 100644 index 0000000..16a1972 --- /dev/null +++ b/app-emulation/dxvk/dxvk-1.7.ebuild @@ -0,0 +1,174 @@ +# 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" +) + +pkg_pretend () { + if ! use abi_x86_64 && ! use abi_x86_32; then + eerror "You need to enable at least one of abi_x86_32 and abi_x86_64." + die + fi + + 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}/gcc with EXTRA_ECONF=\"--enable-threads=posix\"" + eerror "and ${cat}/mingw64-runtime with USE=\"libraries\"." + elog "See for more information." + einfo "In short:" + einfo "echo '~${cat}/mingw64-runtime-7.0.0 ~amd64' >> \\" + einfo " /etc/portage/package.accept_keywords/mingw" + einfo "crossdev --stable --target ${cat}" + einfo "echo 'EXTRA_ECONF=\"--enable-threads=posix\"' >> \\" + einfo " /etc/portage/env/mingw-gcc.conf" + einfo "echo '${cat}/gcc mingw-gcc.conf' >> \\" + einfo " /etc/portage/package.env/mingw" + einfo "echo '${cat}/mingw64-runtime libraries' >> \\" + einfo " /etc/portage/package.use/mingw" + einfo "emerge --oneshot ${cat}/gcc ${cat}/mingw64-runtime" + + 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." +}