1 |
commit: 6d87785bf263bc9fcd0c8e984dc8b97a48edfd8a |
2 |
Author: Yuan Liao <liaoyuan <AT> gmail <DOT> com> |
3 |
AuthorDate: Sat Jul 2 22:19:18 2022 +0000 |
4 |
Commit: Yuan Liao <liaoyuan <AT> gmail <DOT> com> |
5 |
CommitDate: Sat Jul 2 22:19:18 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=6d87785b |
7 |
|
8 |
games-emulation/dosbox-x: New package added at 0.84.1, 9999 |
9 |
|
10 |
Signed-off-by: Yuan Liao <liaoyuan <AT> gmail.com> |
11 |
|
12 |
games-emulation/dosbox-x/Manifest | 1 + |
13 |
games-emulation/dosbox-x/dosbox-x-0.84.1.ebuild | 205 +++++++++++++++++++++ |
14 |
games-emulation/dosbox-x/dosbox-x-9999.ebuild | 200 ++++++++++++++++++++ |
15 |
...x-0.84.1-fix-build-error-with-disable-x11.patch | 43 +++++ |
16 |
games-emulation/dosbox-x/metadata.xml | 58 ++++++ |
17 |
5 files changed, 507 insertions(+) |
18 |
|
19 |
diff --git a/games-emulation/dosbox-x/Manifest b/games-emulation/dosbox-x/Manifest |
20 |
new file mode 100644 |
21 |
index 000000000..b6ecb3b67 |
22 |
--- /dev/null |
23 |
+++ b/games-emulation/dosbox-x/Manifest |
24 |
@@ -0,0 +1 @@ |
25 |
+DIST dosbox-x-v0.84.1.tar.gz 67617800 BLAKE2B b7a93ac662d987f99884078fa8a2b566c8aef691861cd8b8270698470cef70e352616970e46439664eedb37b11f673a3cf7d253e45ed756e28740dd06080fffc SHA512 2104352f5756fa394c6a38f6b82694e4b17878b87d64cb67aeeb8ef9f9cf12cadfc8cd23b4626bbb59b8f0657ae6747633ac80016df511b7d9612245b32d21ca |
26 |
|
27 |
diff --git a/games-emulation/dosbox-x/dosbox-x-0.84.1.ebuild b/games-emulation/dosbox-x/dosbox-x-0.84.1.ebuild |
28 |
new file mode 100644 |
29 |
index 000000000..9db968900 |
30 |
--- /dev/null |
31 |
+++ b/games-emulation/dosbox-x/dosbox-x-0.84.1.ebuild |
32 |
@@ -0,0 +1,205 @@ |
33 |
+# Copyright 2022 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=8 |
37 |
+ |
38 |
+inherit autotools xdg |
39 |
+ |
40 |
+if [[ "${PV}" == 9999 ]]; then |
41 |
+ inherit git-r3 |
42 |
+ EGIT_REPO_URI="https://github.com/joncampbell123/dosbox-x.git" |
43 |
+else |
44 |
+ SRC_URI="https://github.com/joncampbell123/dosbox-x/archive/dosbox-x-v${PV}.tar.gz" |
45 |
+ S="${WORKDIR}/${PN}-${PN}-v${PV}" |
46 |
+ KEYWORDS="~amd64" |
47 |
+fi |
48 |
+ |
49 |
+DESCRIPTION="Complete, accurate DOS emulator forked from DOSBox" |
50 |
+HOMEPAGE="https://dosbox-x.com/" |
51 |
+ |
52 |
+# Stay consistent with games-emulation/dosbox::gentoo even though source file |
53 |
+# headers specify the GPL version to be "either version 2 of the License, or |
54 |
+# (at your option) any later version." The same header is used in both the |
55 |
+# DOSBox source tree and the DOSBox-X source tree. |
56 |
+LICENSE="GPL-2" |
57 |
+SLOT="0" |
58 |
+ |
59 |
+IUSE="X debug ffmpeg fluidsynth freetype opengl png slirp" |
60 |
+ |
61 |
+BDEPEND=" |
62 |
+ dev-lang/nasm |
63 |
+ sys-libs/libcap |
64 |
+" |
65 |
+ |
66 |
+# Unconditionally pulling in automagically-enabled optional dependencies: |
67 |
+# - media-libs/alsa-lib |
68 |
+# - media-libs/sdl2-net |
69 |
+# - net-libs/libpcap |
70 |
+# |
71 |
+# With media-libs/libsdl2[-X,wayland], this package does work on a Wayland |
72 |
+# desktop, but (at least on GNOME) the program does not launch in a movable |
73 |
+# and resizable window; whereas with media-libs/libsdl2[X], it does. Thus, |
74 |
+# unconditionally require media-libs/libsdl2[X] for better user experience. |
75 |
+RDEPEND=" |
76 |
+ media-libs/alsa-lib |
77 |
+ media-libs/libsdl2[X,opengl?,sound,threads,video] |
78 |
+ media-libs/sdl2-net |
79 |
+ net-libs/libpcap |
80 |
+ sys-libs/zlib |
81 |
+ X? ( |
82 |
+ x11-libs/libX11 |
83 |
+ x11-libs/libXrandr |
84 |
+ x11-libs/libxkbfile |
85 |
+ ) |
86 |
+ debug? ( sys-libs/ncurses:= ) |
87 |
+ ffmpeg? ( media-video/ffmpeg:= ) |
88 |
+ fluidsynth? ( media-sound/fluidsynth:= ) |
89 |
+ freetype? ( media-libs/freetype ) |
90 |
+ opengl? ( media-libs/libglvnd[X] ) |
91 |
+ png? ( media-libs/libpng:= ) |
92 |
+ slirp? ( net-libs/libslirp ) |
93 |
+" |
94 |
+ |
95 |
+DEPEND=" |
96 |
+ ${RDEPEND} |
97 |
+" |
98 |
+ |
99 |
+PATCHES=( |
100 |
+ # Only needed on 0.84.1; please remove for newer releases |
101 |
+ "${FILESDIR}/${P}-fix-build-error-with-disable-x11.patch" |
102 |
+) |
103 |
+ |
104 |
+pkg_pretend() { |
105 |
+ if use ffmpeg && use !png; then |
106 |
+ ewarn "Setting the 'ffmpeg' USE flag when the 'png' USE flag is" |
107 |
+ ewarn "unset does not have any effect. Unsetting the 'png' USE" |
108 |
+ ewarn "flag disables the video capture feature, so additional" |
109 |
+ ewarn "video capture formats enabled by the 'ffmpeg' USE flag" |
110 |
+ ewarn "will end up being unused." |
111 |
+ fi |
112 |
+} |
113 |
+ |
114 |
+src_prepare() { |
115 |
+ default |
116 |
+ |
117 |
+ # Patch command lines like the following in Makefile.am: |
118 |
+ # -test -x /usr/sbin/setcap && setcap cap_net_raw=ep $(DESTDIR)$(bindir)/dosbox-x |
119 |
+ # |
120 |
+ # The purpose of these commands is, if the 'setcap' program exists and is |
121 |
+ # executable, then invoke it to set capabilities required by the PCAP |
122 |
+ # networking back-end for better out-of-box user experience; otherwise, |
123 |
+ # ignore unsatisfied preconditions or 'setcap' errors since they are not |
124 |
+ # critical, which is achieved by having a '-' in front of each line. |
125 |
+ # |
126 |
+ # Unfortunately, 'test -x /usr/sbin/setcap' does not always work as |
127 |
+ # expected on Gentoo because it ignores the fact that some distributions, |
128 |
+ # including Gentoo, may still have split /sbin and /usr/sbin and install |
129 |
+ # 'setcap' to /sbin. |
130 |
+ # |
131 |
+ # As long as sys-libs/libcap is declared in BDEPEND of this ebuild, the |
132 |
+ # availability of 'setcap' can be assumed, rendering the test redundant. |
133 |
+ # However, successfully setting capabilities via 'setcap' usually requires |
134 |
+ # the root account (which is not guaranteed on Prefix) and xattr support |
135 |
+ # for the file system being used, so the '-' in front of each line is |
136 |
+ # preserved to tolerate the expected 'setcap' failures. |
137 |
+ sed -i -e 's|test -x /usr/sbin/setcap && ||' Makefile.am || |
138 |
+ die "Failed to remove check for setcap in Makefile.am" |
139 |
+ |
140 |
+ eautoreconf |
141 |
+} |
142 |
+ |
143 |
+src_configure() { |
144 |
+ local myconf=( |
145 |
+ # --disable-core-inline could cause compiler errors |
146 |
+ # as of v0.84.1, so enable it unconditionally |
147 |
+ --enable-core-inline |
148 |
+ |
149 |
+ # Always use SDL 2, even though the package provides the option to |
150 |
+ # build with SDL 1.x, because this package is expected to be built |
151 |
+ # with the bundled, heavily-modified version of SDL 1.x if that |
152 |
+ # branch is used. Compiler errors are likely to occur if the |
153 |
+ # bundled version of SDL 1.x is not used. Bundled dependencies |
154 |
+ # should be avoided on Gentoo, so SDL 2 is more preferable. |
155 |
+ --enable-sdl2 |
156 |
+ |
157 |
+ # Explicitly enable ALSA MIDI support, same as default. As of |
158 |
+ # v0.84.1, even when it is disabled, media-libs/alsa-lib will |
159 |
+ # still be automagically linked if it is present in the build |
160 |
+ # environment (presumably for other components of this package), |
161 |
+ # so the dependency cannot be made optional by disabling this |
162 |
+ # option. Plus, disabling this option has no observable effect |
163 |
+ # on build time, build size, or the program's functionality, as |
164 |
+ # 'mididevice=alsa' still works with '--disable-alsa-midi'. |
165 |
+ --enable-alsa-midi |
166 |
+ |
167 |
+ $(use_enable debug '' heavy) |
168 |
+ |
169 |
+ $(use_enable X x11) |
170 |
+ $(use_enable ffmpeg avcodec) |
171 |
+ $(use_enable fluidsynth libfluidsynth) |
172 |
+ $(use_enable freetype) |
173 |
+ $(use_enable opengl) |
174 |
+ $(use_enable png screenshots) |
175 |
+ $(use_enable slirp libslirp) |
176 |
+ ) |
177 |
+ |
178 |
+ econf "${myconf[@]}" |
179 |
+} |
180 |
+ |
181 |
+pkg_preinst() { |
182 |
+ xdg_pkg_preinst |
183 |
+ |
184 |
+ # Returns whether or not the USE flag specified with the first positional |
185 |
+ # argument is newly enabled for this installation of the package. |
186 |
+ newuse() { |
187 |
+ local flag="${1}" |
188 |
+ |
189 |
+ # The 'has_version' call tests if any USE flags are newly enabled. |
190 |
+ # It is to extract information about any existing copy of this |
191 |
+ # package installed on the system, which is why it should be made |
192 |
+ # before the new copy of this package just built is merged. |
193 |
+ use "${flag}" && ! has_version "${CATEGORY}/${PN}[${flag}]" |
194 |
+ } |
195 |
+ |
196 |
+ newuse debug && PRINT_NOTES_FOR_DEBUGGER=1 |
197 |
+ newuse fluidsynth && PRINT_NOTES_FOR_FLUIDSYNTH=1 |
198 |
+} |
199 |
+ |
200 |
+pkg_postinst() { |
201 |
+ xdg_pkg_postinst |
202 |
+ |
203 |
+ if [[ "${PRINT_NOTES_FOR_DEBUGGER}" ]]; then |
204 |
+ elog |
205 |
+ elog "Note on the Debugger" |
206 |
+ elog |
207 |
+ elog "The debugger can only be started when DOSBox-X is launched" |
208 |
+ elog "from a terminal. Otherwise, the \"Start DOSBox-X Debugger\"" |
209 |
+ elog "option in the \"Debug\" drop-down menu would be unavailable." |
210 |
+ elog |
211 |
+ elog "For more information about the debugger, please consult:" |
212 |
+ elog " ${EPREFIX}/usr/share/doc/${PF}/README.debugger*" |
213 |
+ fi |
214 |
+ |
215 |
+ if [[ "${PRINT_NOTES_FOR_FLUIDSYNTH}" ]]; then |
216 |
+ elog |
217 |
+ elog "Note on FluidSynth" |
218 |
+ elog |
219 |
+ elog "To use FluidSynth as the MIDI device for DOSBox-X, a soundfont" |
220 |
+ elog "is required. If no existing soundfont is available, a new one" |
221 |
+ elog "can be installed and configured for DOSBox-X very easily:" |
222 |
+ elog |
223 |
+ elog "1. Install the following package:" |
224 |
+ elog " media-sound/fluid-soundfont" |
225 |
+ elog "2. Add the following lines to DOSBox-X's configuration file:" |
226 |
+ elog " [midi]" |
227 |
+ elog " mididevice=fluidsynth" |
228 |
+ elog |
229 |
+ elog "Usually, there is no need to explicitly specify the soundfont" |
230 |
+ elog "file's path because the package mentioned in step 1 installs" |
231 |
+ elog "soundfont files to a standard location, allowing them to be" |
232 |
+ elog "detected and selected automatically." |
233 |
+ elog |
234 |
+ elog "For advanced FluidSynth configuration, please consult:" |
235 |
+ elog " https://dosbox-x.com/wiki/Guide%3ASetting-up-MIDI-in-DOSBox%E2%80%90X#_fluidsynth" |
236 |
+ fi |
237 |
+} |
238 |
|
239 |
diff --git a/games-emulation/dosbox-x/dosbox-x-9999.ebuild b/games-emulation/dosbox-x/dosbox-x-9999.ebuild |
240 |
new file mode 100644 |
241 |
index 000000000..f2da3a0e0 |
242 |
--- /dev/null |
243 |
+++ b/games-emulation/dosbox-x/dosbox-x-9999.ebuild |
244 |
@@ -0,0 +1,200 @@ |
245 |
+# Copyright 2022 Gentoo Authors |
246 |
+# Distributed under the terms of the GNU General Public License v2 |
247 |
+ |
248 |
+EAPI=8 |
249 |
+ |
250 |
+inherit autotools xdg |
251 |
+ |
252 |
+if [[ "${PV}" == 9999 ]]; then |
253 |
+ inherit git-r3 |
254 |
+ EGIT_REPO_URI="https://github.com/joncampbell123/dosbox-x.git" |
255 |
+else |
256 |
+ SRC_URI="https://github.com/joncampbell123/dosbox-x/archive/dosbox-x-v${PV}.tar.gz" |
257 |
+ S="${WORKDIR}/${PN}-${PN}-v${PV}" |
258 |
+ KEYWORDS="~amd64" |
259 |
+fi |
260 |
+ |
261 |
+DESCRIPTION="Complete, accurate DOS emulator forked from DOSBox" |
262 |
+HOMEPAGE="https://dosbox-x.com/" |
263 |
+ |
264 |
+# Stay consistent with games-emulation/dosbox::gentoo even though source file |
265 |
+# headers specify the GPL version to be "either version 2 of the License, or |
266 |
+# (at your option) any later version." The same header is used in both the |
267 |
+# DOSBox source tree and the DOSBox-X source tree. |
268 |
+LICENSE="GPL-2" |
269 |
+SLOT="0" |
270 |
+ |
271 |
+IUSE="X debug ffmpeg fluidsynth freetype opengl png slirp" |
272 |
+ |
273 |
+BDEPEND=" |
274 |
+ dev-lang/nasm |
275 |
+ sys-libs/libcap |
276 |
+" |
277 |
+ |
278 |
+# Unconditionally pulling in automagically-enabled optional dependencies: |
279 |
+# - media-libs/alsa-lib |
280 |
+# - media-libs/sdl2-net |
281 |
+# - net-libs/libpcap |
282 |
+# |
283 |
+# With media-libs/libsdl2[-X,wayland], this package does work on a Wayland |
284 |
+# desktop, but (at least on GNOME) the program does not launch in a movable |
285 |
+# and resizable window; whereas with media-libs/libsdl2[X], it does. Thus, |
286 |
+# unconditionally require media-libs/libsdl2[X] for better user experience. |
287 |
+RDEPEND=" |
288 |
+ media-libs/alsa-lib |
289 |
+ media-libs/libsdl2[X,opengl?,sound,threads,video] |
290 |
+ media-libs/sdl2-net |
291 |
+ net-libs/libpcap |
292 |
+ sys-libs/zlib |
293 |
+ X? ( |
294 |
+ x11-libs/libX11 |
295 |
+ x11-libs/libXrandr |
296 |
+ x11-libs/libxkbfile |
297 |
+ ) |
298 |
+ debug? ( sys-libs/ncurses:= ) |
299 |
+ ffmpeg? ( media-video/ffmpeg:= ) |
300 |
+ fluidsynth? ( media-sound/fluidsynth:= ) |
301 |
+ freetype? ( media-libs/freetype ) |
302 |
+ opengl? ( media-libs/libglvnd[X] ) |
303 |
+ png? ( media-libs/libpng:= ) |
304 |
+ slirp? ( net-libs/libslirp ) |
305 |
+" |
306 |
+ |
307 |
+DEPEND=" |
308 |
+ ${RDEPEND} |
309 |
+" |
310 |
+ |
311 |
+pkg_pretend() { |
312 |
+ if use ffmpeg && use !png; then |
313 |
+ ewarn "Setting the 'ffmpeg' USE flag when the 'png' USE flag is" |
314 |
+ ewarn "unset does not have any effect. Unsetting the 'png' USE" |
315 |
+ ewarn "flag disables the video capture feature, so additional" |
316 |
+ ewarn "video capture formats enabled by the 'ffmpeg' USE flag" |
317 |
+ ewarn "will end up being unused." |
318 |
+ fi |
319 |
+} |
320 |
+ |
321 |
+src_prepare() { |
322 |
+ default |
323 |
+ |
324 |
+ # Patch command lines like the following in Makefile.am: |
325 |
+ # -test -x /usr/sbin/setcap && setcap cap_net_raw=ep $(DESTDIR)$(bindir)/dosbox-x |
326 |
+ # |
327 |
+ # The purpose of these commands is, if the 'setcap' program exists and is |
328 |
+ # executable, then invoke it to set capabilities required by the PCAP |
329 |
+ # networking back-end for better out-of-box user experience; otherwise, |
330 |
+ # ignore unsatisfied preconditions or 'setcap' errors since they are not |
331 |
+ # critical, which is achieved by having a '-' in front of each line. |
332 |
+ # |
333 |
+ # Unfortunately, 'test -x /usr/sbin/setcap' does not always work as |
334 |
+ # expected on Gentoo because it ignores the fact that some distributions, |
335 |
+ # including Gentoo, may still have split /sbin and /usr/sbin and install |
336 |
+ # 'setcap' to /sbin. |
337 |
+ # |
338 |
+ # As long as sys-libs/libcap is declared in BDEPEND of this ebuild, the |
339 |
+ # availability of 'setcap' can be assumed, rendering the test redundant. |
340 |
+ # However, successfully setting capabilities via 'setcap' usually requires |
341 |
+ # the root account (which is not guaranteed on Prefix) and xattr support |
342 |
+ # for the file system being used, so the '-' in front of each line is |
343 |
+ # preserved to tolerate the expected 'setcap' failures. |
344 |
+ sed -i -e 's|test -x /usr/sbin/setcap && ||' Makefile.am || |
345 |
+ die "Failed to remove check for setcap in Makefile.am" |
346 |
+ |
347 |
+ eautoreconf |
348 |
+} |
349 |
+ |
350 |
+src_configure() { |
351 |
+ local myconf=( |
352 |
+ # --disable-core-inline could cause compiler errors |
353 |
+ # as of v0.84.1, so enable it unconditionally |
354 |
+ --enable-core-inline |
355 |
+ |
356 |
+ # Always use SDL 2, even though the package provides the option to |
357 |
+ # build with SDL 1.x, because this package is expected to be built |
358 |
+ # with the bundled, heavily-modified version of SDL 1.x if that |
359 |
+ # branch is used. Compiler errors are likely to occur if the |
360 |
+ # bundled version of SDL 1.x is not used. Bundled dependencies |
361 |
+ # should be avoided on Gentoo, so SDL 2 is more preferable. |
362 |
+ --enable-sdl2 |
363 |
+ |
364 |
+ # Explicitly enable ALSA MIDI support, same as default. As of |
365 |
+ # v0.84.1, even when it is disabled, media-libs/alsa-lib will |
366 |
+ # still be automagically linked if it is present in the build |
367 |
+ # environment (presumably for other components of this package), |
368 |
+ # so the dependency cannot be made optional by disabling this |
369 |
+ # option. Plus, disabling this option has no observable effect |
370 |
+ # on build time, build size, or the program's functionality, as |
371 |
+ # 'mididevice=alsa' still works with '--disable-alsa-midi'. |
372 |
+ --enable-alsa-midi |
373 |
+ |
374 |
+ $(use_enable debug '' heavy) |
375 |
+ |
376 |
+ $(use_enable X x11) |
377 |
+ $(use_enable ffmpeg avcodec) |
378 |
+ $(use_enable fluidsynth libfluidsynth) |
379 |
+ $(use_enable freetype) |
380 |
+ $(use_enable opengl) |
381 |
+ $(use_enable png screenshots) |
382 |
+ $(use_enable slirp libslirp) |
383 |
+ ) |
384 |
+ |
385 |
+ econf "${myconf[@]}" |
386 |
+} |
387 |
+ |
388 |
+pkg_preinst() { |
389 |
+ xdg_pkg_preinst |
390 |
+ |
391 |
+ # Returns whether or not the USE flag specified with the first positional |
392 |
+ # argument is newly enabled for this installation of the package. |
393 |
+ newuse() { |
394 |
+ local flag="${1}" |
395 |
+ |
396 |
+ # The 'has_version' call tests if any USE flags are newly enabled. |
397 |
+ # It is to extract information about any existing copy of this |
398 |
+ # package installed on the system, which is why it should be made |
399 |
+ # before the new copy of this package just built is merged. |
400 |
+ use "${flag}" && ! has_version "${CATEGORY}/${PN}[${flag}]" |
401 |
+ } |
402 |
+ |
403 |
+ newuse debug && PRINT_NOTES_FOR_DEBUGGER=1 |
404 |
+ newuse fluidsynth && PRINT_NOTES_FOR_FLUIDSYNTH=1 |
405 |
+} |
406 |
+ |
407 |
+pkg_postinst() { |
408 |
+ xdg_pkg_postinst |
409 |
+ |
410 |
+ if [[ "${PRINT_NOTES_FOR_DEBUGGER}" ]]; then |
411 |
+ elog |
412 |
+ elog "Note on the Debugger" |
413 |
+ elog |
414 |
+ elog "The debugger can only be started when DOSBox-X is launched" |
415 |
+ elog "from a terminal. Otherwise, the \"Start DOSBox-X Debugger\"" |
416 |
+ elog "option in the \"Debug\" drop-down menu would be unavailable." |
417 |
+ elog |
418 |
+ elog "For more information about the debugger, please consult:" |
419 |
+ elog " ${EPREFIX}/usr/share/doc/${PF}/README.debugger*" |
420 |
+ fi |
421 |
+ |
422 |
+ if [[ "${PRINT_NOTES_FOR_FLUIDSYNTH}" ]]; then |
423 |
+ elog |
424 |
+ elog "Note on FluidSynth" |
425 |
+ elog |
426 |
+ elog "To use FluidSynth as the MIDI device for DOSBox-X, a soundfont" |
427 |
+ elog "is required. If no existing soundfont is available, a new one" |
428 |
+ elog "can be installed and configured for DOSBox-X very easily:" |
429 |
+ elog |
430 |
+ elog "1. Install the following package:" |
431 |
+ elog " media-sound/fluid-soundfont" |
432 |
+ elog "2. Add the following lines to DOSBox-X's configuration file:" |
433 |
+ elog " [midi]" |
434 |
+ elog " mididevice=fluidsynth" |
435 |
+ elog |
436 |
+ elog "Usually, there is no need to explicitly specify the soundfont" |
437 |
+ elog "file's path because the package mentioned in step 1 installs" |
438 |
+ elog "soundfont files to a standard location, allowing them to be" |
439 |
+ elog "detected and selected automatically." |
440 |
+ elog |
441 |
+ elog "For advanced FluidSynth configuration, please consult:" |
442 |
+ elog " https://dosbox-x.com/wiki/Guide%3ASetting-up-MIDI-in-DOSBox%E2%80%90X#_fluidsynth" |
443 |
+ fi |
444 |
+} |
445 |
|
446 |
diff --git a/games-emulation/dosbox-x/files/dosbox-x-0.84.1-fix-build-error-with-disable-x11.patch b/games-emulation/dosbox-x/files/dosbox-x-0.84.1-fix-build-error-with-disable-x11.patch |
447 |
new file mode 100644 |
448 |
index 000000000..dd5ed658d |
449 |
--- /dev/null |
450 |
+++ b/games-emulation/dosbox-x/files/dosbox-x-0.84.1-fix-build-error-with-disable-x11.patch |
451 |
@@ -0,0 +1,43 @@ |
452 |
+Staged upstream change after the v0.84.1 release; only needed on 0.84.1 |
453 |
+to support the '--disable-x11' configuration option and thus USE='-X'. |
454 |
+ |
455 |
+Closes: https://github.com/joncampbell123/dosbox-x/issues/3602 |
456 |
+ |
457 |
+From 07e51e044acbe05c3e4ebb6c54b67575a811ae09 Mon Sep 17 00:00:00 2001 |
458 |
+From: Wengier <wengierwu@×××××.com> |
459 |
+Date: Fri, 1 Jul 2022 18:12:17 -0400 |
460 |
+Subject: [PATCH] update |
461 |
+ |
462 |
+--- |
463 |
+ src/gui/sdlmain_linux.cpp | 8 ++++---- |
464 |
+ 1 file changed, 4 insertions(+), 4 deletions(-) |
465 |
+ |
466 |
+diff --git a/src/gui/sdlmain_linux.cpp b/src/gui/sdlmain_linux.cpp |
467 |
+index 94dd1875f..b22e987a8 100644 |
468 |
+--- a/src/gui/sdlmain_linux.cpp |
469 |
++++ b/src/gui/sdlmain_linux.cpp |
470 |
+@@ -16,10 +16,6 @@ |
471 |
+ # if C_X11_EXT_XKBRULES |
472 |
+ # include <X11/extensions/XKBrules.h> |
473 |
+ # endif |
474 |
+-#endif |
475 |
+- |
476 |
+-void UpdateWindowDimensions(Bitu width, Bitu height); |
477 |
+-void UpdateWindowMaximized(bool flag); |
478 |
+ |
479 |
+ /* X11 Error handler. |
480 |
+ * Apparently it is possible with SDL2 to resize the window in such a way that |
481 |
+@@ -49,6 +45,10 @@ int X11_ErrorHandler(Display *disp,XErrorEvent *xev) { |
482 |
+ void X11_ErrorHandlerInstall(void) { |
483 |
+ XSetErrorHandler(X11_ErrorHandler); |
484 |
+ } |
485 |
++#endif |
486 |
++ |
487 |
++void UpdateWindowDimensions(Bitu width, Bitu height); |
488 |
++void UpdateWindowMaximized(bool flag); |
489 |
+ |
490 |
+ #if C_X11_XRANDR |
491 |
+ #include <X11/extensions/Xrandr.h> |
492 |
+-- |
493 |
+2.35.1 |
494 |
+ |
495 |
|
496 |
diff --git a/games-emulation/dosbox-x/metadata.xml b/games-emulation/dosbox-x/metadata.xml |
497 |
new file mode 100644 |
498 |
index 000000000..cdbdb12b1 |
499 |
--- /dev/null |
500 |
+++ b/games-emulation/dosbox-x/metadata.xml |
501 |
@@ -0,0 +1,58 @@ |
502 |
+<?xml version="1.0" encoding="UTF-8"?> |
503 |
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> |
504 |
+<pkgmetadata> |
505 |
+ <maintainer type="person"> |
506 |
+ <email>liaoyuan@×××××.com</email> |
507 |
+ <name>Yuan Liao</name> |
508 |
+ </maintainer> |
509 |
+ <longdescription> |
510 |
+ DOSBox-X is a fork of DOSBox. The main focus of DOSBox is just on |
511 |
+ running DOS games, whereas DOSBox-X goes further than this: while it |
512 |
+ "retains compatibility with the wide base of DOS games and DOS gaming |
513 |
+ DOSBox was designed for", it is built to also run DOS applications, |
514 |
+ Windows 3.x, Windows 9x series, and software written for those versions |
515 |
+ of Windows. In particular, Windows 98 runs with superb stability on |
516 |
+ DOSBox-X, which DOSBox cannot achieve yet. |
517 |
+ |
518 |
+ DOSBox-X also ships more user-friendly features than DOSBox, including |
519 |
+ a drop-down menu system for easier alteration to emulation parameters |
520 |
+ and access to the emulator's functions, a graphical configuration tool |
521 |
+ for modifying the configuration file, saving and loading the emulator's |
522 |
+ state, creation of new disk image files, support for directly mounting |
523 |
+ hard disk images with partitions formatted with the FAT32 file system, |
524 |
+ and many more. |
525 |
+ </longdescription> |
526 |
+ <upstream> |
527 |
+ <doc>https://dosbox-x.com/wiki/</doc> |
528 |
+ <remote-id type="github">joncampbell123/dosbox-x</remote-id> |
529 |
+ </upstream> |
530 |
+ <use> |
531 |
+ <flag name="X"> |
532 |
+ Enable X11 integration for better fullscreening functionality |
533 |
+ </flag> |
534 |
+ <flag name="debug"> |
535 |
+ Enable the internal debugger of this program |
536 |
+ </flag> |
537 |
+ <flag name="ffmpeg"> |
538 |
+ Enable MPEG.TS + H.264 video capture format support |
539 |
+ via <pkg>media-video/ffmpeg</pkg> |
540 |
+ </flag> |
541 |
+ <flag name="fluidsynth"> |
542 |
+ Enable FluidSynth to be used as the MIDI synthesizer |
543 |
+ </flag> |
544 |
+ <flag name="freetype"> |
545 |
+ Enable TrueType font (TTF) output and printing support |
546 |
+ via <pkg>media-libs/freetype</pkg> |
547 |
+ </flag> |
548 |
+ <flag name="opengl"> |
549 |
+ Enable OpenGL as a video system to use for output |
550 |
+ </flag> |
551 |
+ <flag name="png"> |
552 |
+ Enable screenshot and video capture support |
553 |
+ via <pkg>media-libs/libpng</pkg> |
554 |
+ </flag> |
555 |
+ <flag name="slirp"> |
556 |
+ Enable the SLIRP back-end for network adapter emulation |
557 |
+ </flag> |
558 |
+ </use> |
559 |
+</pkgmetadata> |