1 |
commit: c7a06ebb79e1e1fd14c330b64c96da0d91ff5069 |
2 |
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Aug 2 15:32:12 2022 +0000 |
4 |
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Aug 2 15:37:01 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7a06ebb |
7 |
|
8 |
app-emulation/dxvk: add 1.10.3 |
9 |
|
10 |
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org> |
11 |
|
12 |
app-emulation/dxvk/Manifest | 1 + |
13 |
app-emulation/dxvk/dxvk-1.10.3.ebuild | 137 ++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 138 insertions(+) |
15 |
|
16 |
diff --git a/app-emulation/dxvk/Manifest b/app-emulation/dxvk/Manifest |
17 |
index 2d6ed76b68c1..0cdf4e6fd323 100644 |
18 |
--- a/app-emulation/dxvk/Manifest |
19 |
+++ b/app-emulation/dxvk/Manifest |
20 |
@@ -1,2 +1,3 @@ |
21 |
DIST dxvk-1.10.1.tar.gz 1188138 BLAKE2B e4c5c5052de3f0976581317b9e6de148735198d2545e961ed4540be8660fbba0bcd30f81a1b55f032a1e00e226993d1ab3e4017b104f2829bf37d2ee4fc4420a SHA512 8fd34d9f14a7013cdc1957f63bf60feb19748fddc1cd6ec40cf271005f636de62965efb42ddf2598dad3e37a4f59a870bf769387b2534db93451d1ea6aa65410 |
22 |
DIST dxvk-1.10.2.tar.gz 1199562 BLAKE2B 8605d80de3640845589727999da8d19f235eafd52dc693ddfc6a6c54da4525ab5a1418694767395e37cfd84ab55bfd33867cd8608ff2e34965759f68832f55ee SHA512 2a68ececd405e38b6a463637f98c871e53f83c0b232bbf45f08b6b2cac01637eecea90f9337d8ebc600e174a65fe2b10236b1b29afdbd0ad0a9d970a050678a4 |
23 |
+DIST dxvk-1.10.3.tar.gz 1204407 BLAKE2B 3507ffe4abf9c45f2a138b05e7cf706322a6bf3d2e9ae86a9d6216b206c09f79eac696ee7dfe33d0bef55e727f51301c36eb89bfa3b3f429d7d5fafc1eebdcb4 SHA512 8995b231b3f3650beda04c01f30186d10a373075a4774b4ecbfb3bbeb4de99c57555f1db0611e5c61c6a411a7215e0faf228f9861f6b7adae6fc365e8056f7e3 |
24 |
|
25 |
diff --git a/app-emulation/dxvk/dxvk-1.10.3.ebuild b/app-emulation/dxvk/dxvk-1.10.3.ebuild |
26 |
new file mode 100644 |
27 |
index 000000000000..afc25d76d52c |
28 |
--- /dev/null |
29 |
+++ b/app-emulation/dxvk/dxvk-1.10.3.ebuild |
30 |
@@ -0,0 +1,137 @@ |
31 |
+# Copyright 2022 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=8 |
35 |
+ |
36 |
+MULTILIB_COMPAT=( abi_x86_{32,64} ) |
37 |
+inherit flag-o-matic meson-multilib |
38 |
+ |
39 |
+if [[ ${PV} == 9999 ]]; then |
40 |
+ inherit git-r3 |
41 |
+ EGIT_REPO_URI="https://github.com/doitsujin/dxvk.git" |
42 |
+else |
43 |
+ SRC_URI="https://github.com/doitsujin/dxvk/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" |
44 |
+ KEYWORDS="-* ~amd64 ~x86" |
45 |
+fi |
46 |
+ |
47 |
+DESCRIPTION="Vulkan-based implementation of D3D9, D3D10 and D3D11 for Linux / Wine" |
48 |
+HOMEPAGE="https://github.com/doitsujin/dxvk/" |
49 |
+ |
50 |
+LICENSE="ZLIB" |
51 |
+SLOT="0" |
52 |
+IUSE="+abi_x86_32 crossdev-mingw +d3d9 +d3d10 +d3d11 debug +dxgi" |
53 |
+REQUIRED_USE=" |
54 |
+ || ( d3d9 d3d10 d3d11 dxgi ) |
55 |
+ d3d10? ( d3d11 ) |
56 |
+ dxgi? ( d3d11 )" |
57 |
+ |
58 |
+BDEPEND=" |
59 |
+ dev-util/glslang |
60 |
+ !crossdev-mingw? ( dev-util/mingw64-toolchain[${MULTILIB_USEDEP}] )" |
61 |
+ |
62 |
+pkg_pretend() { |
63 |
+ [[ ${MERGE_TYPE} == binary ]] && return |
64 |
+ |
65 |
+ if use crossdev-mingw && [[ ! -v MINGW_BYPASS ]]; then |
66 |
+ local tool=-w64-mingw32-g++ |
67 |
+ for tool in $(usev abi_x86_64 x86_64${tool}) $(usev abi_x86_32 i686${tool}); do |
68 |
+ if ! type -P ${tool} >/dev/null; then |
69 |
+ eerror "With USE=crossdev-mingw, it is necessary to setup the mingw toolchain." |
70 |
+ eerror "For instructions, please see: https://wiki.gentoo.org/wiki/Mingw" |
71 |
+ use abi_x86_32 && use abi_x86_64 && |
72 |
+ eerror "Also, with USE=abi_x86_32, will need both i686 and x86_64 toolchains." |
73 |
+ die "USE=crossdev-mingw is set but ${tool} was not found" |
74 |
+ elif [[ ! $(LC_ALL=C ${tool} -v 2>&1) =~ "Thread model: posix" ]]; then |
75 |
+ eerror "${PN} requires GCC to be built with --enable-threads=posix" |
76 |
+ eerror "Please see: https://wiki.gentoo.org/wiki/Mingw#POSIX_threads_for_Windows" |
77 |
+ die "USE=crossdev-mingw is set but ${tool} does not use POSIX threads" |
78 |
+ fi |
79 |
+ done |
80 |
+ fi |
81 |
+} |
82 |
+ |
83 |
+src_prepare() { |
84 |
+ default |
85 |
+ |
86 |
+ sed -i "/^basedir=/s|=.*|=${EPREFIX}/usr/lib/${PN}|" setup_dxvk.sh || die |
87 |
+} |
88 |
+ |
89 |
+src_configure() { |
90 |
+ use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH} |
91 |
+ |
92 |
+ # AVX has a history of causing issues with this package, disable for safety |
93 |
+ # https://github.com/Tk-Glitch/PKGBUILDS/issues/515 |
94 |
+ append-flags -mno-avx |
95 |
+ |
96 |
+ if [[ ${CHOST} != *-mingw* ]]; then |
97 |
+ if [[ ! -v MINGW_BYPASS ]]; then |
98 |
+ unset AR CC CXX RC STRIP |
99 |
+ filter-flags '-fuse-ld=*' |
100 |
+ fi |
101 |
+ |
102 |
+ CHOST_amd64=x86_64-w64-mingw32 |
103 |
+ CHOST_x86=i686-w64-mingw32 |
104 |
+ CHOST=$(usex x86 ${CHOST_x86} ${CHOST_amd64}) |
105 |
+ |
106 |
+ strip-unsupported-flags |
107 |
+ fi |
108 |
+ |
109 |
+ multilib-minimal_src_configure |
110 |
+} |
111 |
+ |
112 |
+multilib_src_configure() { |
113 |
+ # multilib's ${CHOST_amd64}-gcc -m32 is unusable with crossdev, |
114 |
+ # unset again so meson eclass will set ${CHOST}-gcc + others |
115 |
+ use crossdev-mingw && [[ ! -v MINGW_BYPASS ]] && unset AR CC CXX RC STRIP |
116 |
+ |
117 |
+ local emesonargs=( |
118 |
+ --prefix="${EPREFIX}"/usr/lib/${PN} |
119 |
+ --{bin,lib}dir=x${MULTILIB_ABI_FLAG: -2} |
120 |
+ $(meson_use {,enable_}d3d9) |
121 |
+ $(meson_use {,enable_}d3d10) |
122 |
+ $(meson_use {,enable_}d3d11) |
123 |
+ $(meson_use {,enable_}dxgi) |
124 |
+ $(usev !debug --strip) # portage won't strip .dll, so allow it here |
125 |
+ -Denable_tests=false # needs wine/vulkan and is intended for manual use |
126 |
+ ) |
127 |
+ |
128 |
+ meson_src_configure |
129 |
+} |
130 |
+ |
131 |
+multilib_src_install_all() { |
132 |
+ dobin setup_dxvk.sh |
133 |
+ dodoc README.md dxvk.conf |
134 |
+ |
135 |
+ find "${ED}" -type f -name '*.a' -delete || die |
136 |
+} |
137 |
+ |
138 |
+pkg_preinst() { |
139 |
+ [[ -e ${EROOT}/usr/$(get_libdir)/dxvk/d3d11.dll ]] && DXVK_HAD_OVERLAY= |
140 |
+} |
141 |
+ |
142 |
+pkg_postinst() { |
143 |
+ if [[ ! ${REPLACING_VERSIONS} ]]; then |
144 |
+ elog "To enable ${PN} on a wine prefix, you can run the following command:" |
145 |
+ elog |
146 |
+ elog " WINEPREFIX=/path/to/prefix setup_dxvk.sh install --symlink" |
147 |
+ elog |
148 |
+ elog "See ${EROOT}/usr/share/doc/${PF}/README.md* for details." |
149 |
+ elif [[ -v DXVK_HAD_OVERLAY ]]; then |
150 |
+ # temporary warning until this version is more widely used |
151 |
+ elog "Gentoo's main repo ebuild for ${PN} uses different paths than most overlays." |
152 |
+ elog "If you were using symbolic links in wine prefixes it may be necessary to" |
153 |
+ elog "refresh them by re-running the command:" |
154 |
+ elog |
155 |
+ elog " WINEPREFIX=/path/to/prefix setup_dxvk.sh install --symlink" |
156 |
+ elog |
157 |
+ elog "Also, if you were using /etc/${PN}.conf, ${PN} is no longer patched to load" |
158 |
+ elog "it. See ${EROOT}/usr/share/doc/${PF}/README.md* for handling configs." |
159 |
+ fi |
160 |
+ |
161 |
+ # don't try to keep wine-*[vulkan] in RDEPEND, but still give a warning |
162 |
+ local wine |
163 |
+ for wine in app-emulation/wine-{vanilla,staging}; do |
164 |
+ has_version ${wine} && ! has_version ${wine}[vulkan] && |
165 |
+ ewarn "${wine} was not built with USE=vulkan, ${PN} will not be usable with it" |
166 |
+ done |
167 |
+} |