1 |
commit: 98b911b67554ddbecaa92b471a6cbdf43716766a |
2 |
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jan 13 00:19:34 2019 +0000 |
4 |
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 13 14:27:20 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=98b911b6 |
7 |
|
8 |
app-emulation/gallium-nine-standalone: New package |
9 |
|
10 |
Package-Manager: Portage-2.3.55, Repoman-2.3.12 |
11 |
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org> |
12 |
|
13 |
app-emulation/gallium-nine-standalone/Manifest | 1 + |
14 |
.../gallium-nine-standalone/files/flags.patch | 28 ++++++ |
15 |
.../files/nine-dll-path.patch | 12 +++ |
16 |
.../gallium-nine-standalone-0_p20190113.ebuild | 110 +++++++++++++++++++++ |
17 |
.../gallium-nine-standalone-9999.ebuild | 110 +++++++++++++++++++++ |
18 |
app-emulation/gallium-nine-standalone/metadata.xml | 20 ++++ |
19 |
6 files changed, 281 insertions(+) |
20 |
|
21 |
diff --git a/app-emulation/gallium-nine-standalone/Manifest b/app-emulation/gallium-nine-standalone/Manifest |
22 |
new file mode 100644 |
23 |
index 00000000000..725f6ef859f |
24 |
--- /dev/null |
25 |
+++ b/app-emulation/gallium-nine-standalone/Manifest |
26 |
@@ -0,0 +1 @@ |
27 |
+DIST gallium-nine-standalone-0_p20190113.tar.gz 58954 BLAKE2B 29be3f5501cc4463aa05216b7360e2a5a949c498dd1c3a0170d5a2f7f508c1fe3171f90f8e35bbe95530be5d6b98b70c5a99362e69d4a64615e40fbb9c8eb96a SHA512 2b2ab79b3d9f2c19967a16200cf69e7eba589d4d3d8918890b9504a5cb4895cd76000b6f3852baa738845e8508c6d67843f45d368225878d446ec6e907f75de4 |
28 |
|
29 |
diff --git a/app-emulation/gallium-nine-standalone/files/flags.patch b/app-emulation/gallium-nine-standalone/files/flags.patch |
30 |
new file mode 100644 |
31 |
index 00000000000..217dcddf35b |
32 |
--- /dev/null |
33 |
+++ b/app-emulation/gallium-nine-standalone/files/flags.patch |
34 |
@@ -0,0 +1,28 @@ |
35 |
+diff -Naur a/tools/cross-wine32.in b/tools/cross-wine32.in |
36 |
+--- a/tools/cross-wine32.in 2019-01-12 16:45:09.190471883 +0000 |
37 |
++++ b/tools/cross-wine32.in 2019-01-12 16:48:22.569404982 +0000 |
38 |
+@@ -5,8 +5,8 @@ |
39 |
+ pkgconfig = '@PKG_CONFIG@' |
40 |
+ |
41 |
+ [properties] |
42 |
+-c_args = ['-m32', '--no-gnu-unique'] |
43 |
+-c_link_args = ['-m32', '-mwindows'] |
44 |
++c_args = @CFLAGS@ + ['-m32', '--no-gnu-unique'] |
45 |
++c_link_args = @LDFLAGS@ + ['-m32', '-mwindows'] |
46 |
+ needs_exe_wrapper = true |
47 |
+ |
48 |
+ [host_machine] |
49 |
+diff -Naur a/tools/cross-wine64.in b/tools/cross-wine64.in |
50 |
+--- a/tools/cross-wine64.in 2019-01-12 16:45:09.190471883 +0000 |
51 |
++++ b/tools/cross-wine64.in 2019-01-12 16:48:19.865349306 +0000 |
52 |
+@@ -5,8 +5,8 @@ |
53 |
+ pkgconfig = '@PKG_CONFIG@' |
54 |
+ |
55 |
+ [properties] |
56 |
+-c_args = ['-m64', '--no-gnu-unique'] |
57 |
+-c_link_args = ['-m64', '-mwindows'] |
58 |
++c_args = @CFLAGS@ + ['-m64', '--no-gnu-unique'] |
59 |
++c_link_args = @LDFLAGS@ + ['-m64', '-mwindows'] |
60 |
+ needs_exe_wrapper = true |
61 |
+ |
62 |
+ [host_machine] |
63 |
|
64 |
diff --git a/app-emulation/gallium-nine-standalone/files/nine-dll-path.patch b/app-emulation/gallium-nine-standalone/files/nine-dll-path.patch |
65 |
new file mode 100644 |
66 |
index 00000000000..9399dde3e4f |
67 |
--- /dev/null |
68 |
+++ b/app-emulation/gallium-nine-standalone/files/nine-dll-path.patch |
69 |
@@ -0,0 +1,12 @@ |
70 |
+diff -Naur a/ninewinecfg/main.c b/ninewinecfg/main.c |
71 |
+--- a/ninewinecfg/main.c 2019-01-12 19:43:40.113737110 +0000 |
72 |
++++ b/ninewinecfg/main.c 2019-01-12 19:46:54.213703713 +0000 |
73 |
+@@ -47,7 +47,7 @@ |
74 |
+ #define WINE_STAGING 1 |
75 |
+ #endif |
76 |
+ |
77 |
+-static const char * const fn_nine_dll = "d3d9-nine.dll"; |
78 |
++static const char * const fn_nine_dll = G9DLL; |
79 |
+ static const char * const reg_path_dll_overrides = "Software\\Wine\\DllOverrides"; |
80 |
+ static const char * const reg_path_dll_redirects = "Software\\Wine\\DllRedirects"; |
81 |
+ static const char * const reg_key_d3d9 = "d3d9"; |
82 |
|
83 |
diff --git a/app-emulation/gallium-nine-standalone/gallium-nine-standalone-0_p20190113.ebuild b/app-emulation/gallium-nine-standalone/gallium-nine-standalone-0_p20190113.ebuild |
84 |
new file mode 100644 |
85 |
index 00000000000..74e8ff9eb03 |
86 |
--- /dev/null |
87 |
+++ b/app-emulation/gallium-nine-standalone/gallium-nine-standalone-0_p20190113.ebuild |
88 |
@@ -0,0 +1,110 @@ |
89 |
+# Copyright 1999-2019 Gentoo Authors |
90 |
+# Distributed under the terms of the GNU General Public License v2 |
91 |
+ |
92 |
+EAPI=7 |
93 |
+ |
94 |
+inherit meson multilib-minimal toolchain-funcs |
95 |
+ |
96 |
+DESCRIPTION="A standalone version of the WINE parts of Gallium Nine" |
97 |
+HOMEPAGE="https://github.com/dhewg/nine" |
98 |
+ |
99 |
+if [[ $PV = 9999* ]]; then |
100 |
+ inherit git-r3 |
101 |
+ EGIT_REPO_URI="https://github.com/dhewg/nine.git" |
102 |
+else |
103 |
+ COMMIT="e10dd1a770c91d5ff13343c9a0186665b7df6114" |
104 |
+ SRC_URI="https://github.com/dhewg/nine/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" |
105 |
+ S="${WORKDIR}/nine-${COMMIT}" |
106 |
+ KEYWORDS="-* ~amd64 ~x86" |
107 |
+fi |
108 |
+ |
109 |
+LICENSE="LGPL-2.1+" |
110 |
+SLOT="0" |
111 |
+ |
112 |
+# We don't put Wine in RDEPEND because you can also use this with |
113 |
+# Steam's Proton. |
114 |
+ |
115 |
+RDEPEND=" |
116 |
+ media-libs/mesa[d3d9,egl,${MULTILIB_USEDEP}] |
117 |
+ x11-libs/libX11[${MULTILIB_USEDEP}] |
118 |
+ x11-libs/libXext[${MULTILIB_USEDEP}] |
119 |
+ x11-libs/libxcb[${MULTILIB_USEDEP}] |
120 |
+" |
121 |
+ |
122 |
+DEPEND=" |
123 |
+ ${RDEPEND} |
124 |
+ virtual/pkgconfig[${MULTILIB_USEDEP}] |
125 |
+ virtual/wine[${MULTILIB_USEDEP}] |
126 |
+" |
127 |
+ |
128 |
+PATCHES=( |
129 |
+ "${FILESDIR}"/flags.patch |
130 |
+ "${FILESDIR}"/nine-dll-path.patch |
131 |
+) |
132 |
+ |
133 |
+bits() { |
134 |
+ if [[ ${ABI} = amd64 ]]; then |
135 |
+ echo 64 |
136 |
+ else |
137 |
+ echo 32 |
138 |
+ fi |
139 |
+} |
140 |
+ |
141 |
+src_prepare() { |
142 |
+ default |
143 |
+ |
144 |
+ # Upstream includes a bootstrap.sh script with hardcoded CHOSTs to |
145 |
+ # create the Meson cross files. We improve on that here but also |
146 |
+ # inject CFLAGS and LDFLAGS, partly to simply respect these, and |
147 |
+ # partly to allow d3d9-nine.dll to be loaded from a location outside |
148 |
+ # WINEPREFIX. This avoids the need for the nine-install.sh script, |
149 |
+ # which doesn't play well with our multi-Wine environment. |
150 |
+ bootstrap_nine() { |
151 |
+ local file=tools/cross-wine$(bits) |
152 |
+ local g9dll=Z:${EPREFIX//\//\\}\\usr\\$(get_libdir)\\d3d9-nine.dll.so |
153 |
+ |
154 |
+ # Yes, these ridiculous backslashes are needed! |
155 |
+ g9dll=\\\\\\\\\\\"${g9dll//\\/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\}\\\\\\\\\\\" |
156 |
+ |
157 |
+ sed \ |
158 |
+ -e "s!@PKG_CONFIG@!$(tc-getPKG_CONFIG)!" \ |
159 |
+ -e "s!@CFLAGS@!$(_meson_env_array "${CFLAGS} -DG9DLL=${g9dll}")!" \ |
160 |
+ -e "s!@LDFLAGS@!$(_meson_env_array "${LDFLAGS}")!" \ |
161 |
+ ${file}.in > ${file} || die |
162 |
+ } |
163 |
+ |
164 |
+ multilib_foreach_abi bootstrap_nine |
165 |
+} |
166 |
+ |
167 |
+multilib_src_configure() { |
168 |
+ # We override bindir because otherwise the 32-bit exe is overwritten |
169 |
+ # by the 64-bit exe and we need both of them. |
170 |
+ local emesonargs=( |
171 |
+ --cross-file "${S}/tools/cross-wine$(bits)" |
172 |
+ --bindir "$(get_libdir)" |
173 |
+ ) |
174 |
+ meson_src_configure |
175 |
+} |
176 |
+ |
177 |
+multilib_src_compile() { |
178 |
+ meson_src_compile |
179 |
+} |
180 |
+ |
181 |
+multilib_src_install() { |
182 |
+ meson_src_install |
183 |
+} |
184 |
+ |
185 |
+pkg_postinst() { |
186 |
+ local bits=$(bits) |
187 |
+ |
188 |
+ einfo "Don't remove the Z: drive from your WINEPREFIX as this relies on it." |
189 |
+ einfo |
190 |
+ einfo "To set up the ${bits}-bit library, launch your preferred Wine as follows:" |
191 |
+ einfo " wine${bits/32} ${EPREFIX}/usr/$(get_libdir)/ninewinecfg.exe.so" |
192 |
+ |
193 |
+ if use abi_x86_64 && use abi_x86_32; then |
194 |
+ einfo |
195 |
+ einfo "To set up the 32-bit library, launch your preferred Wine as follows:" |
196 |
+ einfo " wine ${EPREFIX}/usr/$(ABI=x86 get_libdir)/ninewinecfg.exe.so" |
197 |
+ fi |
198 |
+} |
199 |
|
200 |
diff --git a/app-emulation/gallium-nine-standalone/gallium-nine-standalone-9999.ebuild b/app-emulation/gallium-nine-standalone/gallium-nine-standalone-9999.ebuild |
201 |
new file mode 100644 |
202 |
index 00000000000..0e73ee93be3 |
203 |
--- /dev/null |
204 |
+++ b/app-emulation/gallium-nine-standalone/gallium-nine-standalone-9999.ebuild |
205 |
@@ -0,0 +1,110 @@ |
206 |
+# Copyright 1999-2019 Gentoo Authors |
207 |
+# Distributed under the terms of the GNU General Public License v2 |
208 |
+ |
209 |
+EAPI=7 |
210 |
+ |
211 |
+inherit meson multilib-minimal toolchain-funcs |
212 |
+ |
213 |
+DESCRIPTION="A standalone version of the WINE parts of Gallium Nine" |
214 |
+HOMEPAGE="https://github.com/dhewg/nine" |
215 |
+ |
216 |
+if [[ $PV = 9999* ]]; then |
217 |
+ inherit git-r3 |
218 |
+ EGIT_REPO_URI="https://github.com/dhewg/nine.git" |
219 |
+else |
220 |
+ COMMIT="" |
221 |
+ SRC_URI="https://github.com/dhewg/nine/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" |
222 |
+ S="${WORKDIR}/nine-${COMMIT}" |
223 |
+ KEYWORDS="-* ~amd64 ~x86" |
224 |
+fi |
225 |
+ |
226 |
+LICENSE="LGPL-2.1+" |
227 |
+SLOT="0" |
228 |
+ |
229 |
+# We don't put Wine in RDEPEND because you can also use this with |
230 |
+# Steam's Proton. |
231 |
+ |
232 |
+RDEPEND=" |
233 |
+ media-libs/mesa[d3d9,egl,${MULTILIB_USEDEP}] |
234 |
+ x11-libs/libX11[${MULTILIB_USEDEP}] |
235 |
+ x11-libs/libXext[${MULTILIB_USEDEP}] |
236 |
+ x11-libs/libxcb[${MULTILIB_USEDEP}] |
237 |
+" |
238 |
+ |
239 |
+DEPEND=" |
240 |
+ ${RDEPEND} |
241 |
+ virtual/pkgconfig[${MULTILIB_USEDEP}] |
242 |
+ virtual/wine[${MULTILIB_USEDEP}] |
243 |
+" |
244 |
+ |
245 |
+PATCHES=( |
246 |
+ "${FILESDIR}"/flags.patch |
247 |
+ "${FILESDIR}"/nine-dll-path.patch |
248 |
+) |
249 |
+ |
250 |
+bits() { |
251 |
+ if [[ ${ABI} = amd64 ]]; then |
252 |
+ echo 64 |
253 |
+ else |
254 |
+ echo 32 |
255 |
+ fi |
256 |
+} |
257 |
+ |
258 |
+src_prepare() { |
259 |
+ default |
260 |
+ |
261 |
+ # Upstream includes a bootstrap.sh script with hardcoded CHOSTs to |
262 |
+ # create the Meson cross files. We improve on that here but also |
263 |
+ # inject CFLAGS and LDFLAGS, partly to simply respect these, and |
264 |
+ # partly to allow d3d9-nine.dll to be loaded from a location outside |
265 |
+ # WINEPREFIX. This avoids the need for the nine-install.sh script, |
266 |
+ # which doesn't play well with our multi-Wine environment. |
267 |
+ bootstrap_nine() { |
268 |
+ local file=tools/cross-wine$(bits) |
269 |
+ local g9dll=Z:${EPREFIX//\//\\}\\usr\\$(get_libdir)\\d3d9-nine.dll.so |
270 |
+ |
271 |
+ # Yes, these ridiculous backslashes are needed! |
272 |
+ g9dll=\\\\\\\\\\\"${g9dll//\\/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\}\\\\\\\\\\\" |
273 |
+ |
274 |
+ sed \ |
275 |
+ -e "s!@PKG_CONFIG@!$(tc-getPKG_CONFIG)!" \ |
276 |
+ -e "s!@CFLAGS@!$(_meson_env_array "${CFLAGS} -DG9DLL=${g9dll}")!" \ |
277 |
+ -e "s!@LDFLAGS@!$(_meson_env_array "${LDFLAGS}")!" \ |
278 |
+ ${file}.in > ${file} || die |
279 |
+ } |
280 |
+ |
281 |
+ multilib_foreach_abi bootstrap_nine |
282 |
+} |
283 |
+ |
284 |
+multilib_src_configure() { |
285 |
+ # We override bindir because otherwise the 32-bit exe is overwritten |
286 |
+ # by the 64-bit exe and we need both of them. |
287 |
+ local emesonargs=( |
288 |
+ --cross-file "${S}/tools/cross-wine$(bits)" |
289 |
+ --bindir "$(get_libdir)" |
290 |
+ ) |
291 |
+ meson_src_configure |
292 |
+} |
293 |
+ |
294 |
+multilib_src_compile() { |
295 |
+ meson_src_compile |
296 |
+} |
297 |
+ |
298 |
+multilib_src_install() { |
299 |
+ meson_src_install |
300 |
+} |
301 |
+ |
302 |
+pkg_postinst() { |
303 |
+ local bits=$(bits) |
304 |
+ |
305 |
+ einfo "Don't remove the Z: drive from your WINEPREFIX as this relies on it." |
306 |
+ einfo |
307 |
+ einfo "To set up the ${bits}-bit library, launch your preferred Wine as follows:" |
308 |
+ einfo " wine${bits/32} ${EPREFIX}/usr/$(get_libdir)/ninewinecfg.exe.so" |
309 |
+ |
310 |
+ if use abi_x86_64 && use abi_x86_32; then |
311 |
+ einfo |
312 |
+ einfo "To set up the 32-bit library, launch your preferred Wine as follows:" |
313 |
+ einfo " wine ${EPREFIX}/usr/$(ABI=x86 get_libdir)/ninewinecfg.exe.so" |
314 |
+ fi |
315 |
+} |
316 |
|
317 |
diff --git a/app-emulation/gallium-nine-standalone/metadata.xml b/app-emulation/gallium-nine-standalone/metadata.xml |
318 |
new file mode 100644 |
319 |
index 00000000000..c661f33f58d |
320 |
--- /dev/null |
321 |
+++ b/app-emulation/gallium-nine-standalone/metadata.xml |
322 |
@@ -0,0 +1,20 @@ |
323 |
+<?xml version="1.0" encoding="UTF-8"?> |
324 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
325 |
+<pkgmetadata> |
326 |
+ <maintainer type="person"> |
327 |
+ <email>chewi@g.o</email> |
328 |
+ <name>James Le Cuirot</name> |
329 |
+ </maintainer> |
330 |
+ <maintainer type="project"> |
331 |
+ <email>wine@g.o</email> |
332 |
+ <name>Wine</name> |
333 |
+ </maintainer> |
334 |
+ <longdescription> |
335 |
+Gallium Nine Standalone, as the name implies, is a standalone version of the WINE parts of Gallium Nine. |
336 |
+ |
337 |
+This decouples Gallium Nine from the WINE tree, so that it can be used with any WINE version. There is no need for any WINE patches. A stable, development, or staging WINE release is sufficient. |
338 |
+ </longdescription> |
339 |
+ <upstream> |
340 |
+ <remote-id type="github">dhewg/nine</remote-id> |
341 |
+ </upstream> |
342 |
+</pkgmetadata> |