Gentoo Archives: gentoo-commits

From: Ionen Wolkens <ionen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-emulation/desmume/files/, games-emulation/desmume/
Date: Wed, 02 Jun 2021 02:38:20
Message-Id: 1622600552.a7478e660bb64d23fb8790cd93567f898ff0d314.ionen@gentoo
1 commit: a7478e660bb64d23fb8790cd93567f898ff0d314
2 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jun 1 11:59:05 2021 +0000
4 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
5 CommitDate: Wed Jun 2 02:22:32 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a7478e66
7
8 games-emulation/desmume: add 0.9.11_p20210409 snapshot
9
10 Upstream labels their stable 0.9.11 release as '(do not use)'
11 and is missing 6 years worth of changes, they instead suggest
12 to use current git autobuilds.
13
14 Current hasn't changed in some time and should be a fair
15 snapshot (not that it isn't without some issues, included patch
16 to fix cli option issues with gtk+:3 port).
17
18 Removes gtk+:2 and migrates to meson / gtk+:3 / libsdl2.
19
20 USE=gui enabled by default because the cli version is very
21 limited and more useful for debugging.
22
23 Closes: https://bugs.gentoo.org/701138
24 Closes: https://github.com/gentoo/gentoo/pull/20947
25 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
26
27 games-emulation/desmume/Manifest | 1 +
28 .../desmume/desmume-0.9.11_p20210409.ebuild | 50 ++++++++++++
29 .../desmume-0.9.11_p20210409-fix-gtk-cliopts.patch | 91 ++++++++++++++++++++++
30 games-emulation/desmume/metadata.xml | 5 ++
31 4 files changed, 147 insertions(+)
32
33 diff --git a/games-emulation/desmume/Manifest b/games-emulation/desmume/Manifest
34 index bb91d3bfd1d..a715a37faf4 100644
35 --- a/games-emulation/desmume/Manifest
36 +++ b/games-emulation/desmume/Manifest
37 @@ -1 +1,2 @@
38 DIST desmume-0.9.11.tar.gz 5359305 BLAKE2B 31764dcb2d0facf32eddd5c66f40e2268f8afd5c2562bf246b93bb60c191d7888587991732014dee11417016515a4367bda9acf79f699703754aa904dcaeeb01 SHA512 160cb6ec0ede04ad1fbddde2b7b04aa41fa464c8338d7eb9d7536196a82d8d716889b40be4fb831a22e3fe8532b947f7f0b41311601b6842be2516dff7cae46c
39 +DIST desmume-0.9.11_p20210409.tar.gz 13157043 BLAKE2B f8e582005555357cb632478ba8d2730e51a5cb8dbbee05d4af138df19a015ced6cff721fb53f87224774aed8287f91a01da5600f5548189fd0e264e5b3037fd8 SHA512 1897b3b35c7e997876ff53a36849a39b85bd49c737dab61f68c376e3cb294486f9edded98924275e8ee91e5b008e9d3814987edaab7306217c17dbc094f69348
40
41 diff --git a/games-emulation/desmume/desmume-0.9.11_p20210409.ebuild b/games-emulation/desmume/desmume-0.9.11_p20210409.ebuild
42 new file mode 100644
43 index 00000000000..752de42b7cb
44 --- /dev/null
45 +++ b/games-emulation/desmume/desmume-0.9.11_p20210409.ebuild
46 @@ -0,0 +1,50 @@
47 +# Copyright 1999-2021 Gentoo Authors
48 +# Distributed under the terms of the GNU General Public License v2
49 +
50 +EAPI=7
51 +
52 +inherit meson xdg
53 +
54 +MY_COMMIT="e8f619c44a23ebba06be1fb4442483d481477b81"
55 +
56 +DESCRIPTION="Nintendo DS emulator"
57 +HOMEPAGE="https://desmume.org/"
58 +SRC_URI="https://github.com/TASVideos/desmume/archive/${MY_COMMIT}.tar.gz -> ${P}.tar.gz"
59 +S="${WORKDIR}/${PN}-${MY_COMMIT}"
60 +
61 +LICENSE="GPL-2"
62 +SLOT="0"
63 +KEYWORDS="~amd64 ~x86"
64 +IUSE="gdb +gui openal wifi"
65 +
66 +RDEPEND="
67 + dev-libs/glib:2
68 + media-libs/alsa-lib
69 + media-libs/libsdl2[X,opengl,sound,video]
70 + media-libs/libsoundtouch:=
71 + net-libs/libpcap
72 + sys-libs/zlib:=
73 + virtual/opengl
74 + x11-libs/agg
75 + x11-libs/libX11
76 + gui? ( x11-libs/gtk+:3 )
77 + openal? ( media-libs/openal )"
78 +DEPEND="
79 + ${RDEPEND}
80 + x11-base/xorg-proto"
81 +
82 +PATCHES=(
83 + "${FILESDIR}"/${P}-fix-gtk-cliopts.patch
84 +)
85 +DOCS=( ${PN}/{AUTHORS,ChangeLog,README,README.LIN,doc/.} )
86 +
87 +src_configure() {
88 + local EMESON_SOURCE="${S}/${PN}/src/frontend/posix"
89 + local emesonargs=(
90 + $(meson_use gdb gdb-stub)
91 + $(meson_use gui frontend-gtk)
92 + $(meson_use openal)
93 + $(meson_use wifi)
94 + )
95 + meson_src_configure
96 +}
97
98 diff --git a/games-emulation/desmume/files/desmume-0.9.11_p20210409-fix-gtk-cliopts.patch b/games-emulation/desmume/files/desmume-0.9.11_p20210409-fix-gtk-cliopts.patch
99 new file mode 100644
100 index 00000000000..f773385748a
101 --- /dev/null
102 +++ b/games-emulation/desmume/files/desmume-0.9.11_p20210409-fix-gtk-cliopts.patch
103 @@ -0,0 +1,91 @@
104 +Fix unusable command line options since GTK+:3 migration.
105 +
106 +https://github.com/TASVideos/desmume/pull/416
107 +From: Ingo Saitz <Ingo.Saitz@×××××××××××××××××.de>
108 +Date: Sun, 3 Jan 2021 16:00:38 +0100
109 +--- a/desmume/src/commandline.cpp
110 ++++ b/desmume/src/commandline.cpp
111 +@@ -41,7 +41,8 @@
112 + , _load_to_memory(-1)
113 +-, _play_movie_file(0)
114 +-, _record_movie_file(0)
115 +-, _cflash_image(0)
116 +-, _cflash_path(0)
117 +-, _gbaslot_rom(0)
118 ++, nds_file("")
119 ++, play_movie_file("")
120 ++, record_movie_file("")
121 ++, cflash_image("")
122 ++, cflash_path("")
123 ++, gbaslot_rom("")
124 + , _bios_arm9(NULL)
125 +@@ -60,4 +61,4 @@
126 + , _texture_smooth(-1)
127 +-, _slot1(NULL)
128 +-, _slot1_fat_dir(NULL)
129 ++, slot1("")
130 ++, slot1_fat_dir("")
131 + , _slot1_fat_dir_type(false)
132 +@@ -68,3 +69,3 @@
133 + #endif
134 +-, _console_type(NULL)
135 ++, console_type("")
136 + , _advanscene_import(NULL)
137 +@@ -360,4 +361,4 @@
138 + case OPT_SLOT2_CFLASH_IMAGE: cflash_image = optarg; break;
139 +- case OPT_SLOT2_CFLASH_DIR: _cflash_path = optarg; break;
140 +- case OPT_SLOT2_GBAGAME: _gbaslot_rom = optarg; break;
141 ++ case OPT_SLOT2_CFLASH_DIR: cflash_path = optarg; break;
142 ++ case OPT_SLOT2_GBAGAME: gbaslot_rom = optarg; break;
143 +
144 +@@ -520,4 +521,5 @@
145 +
146 +- if((_cflash_image && _gbaslot_rom) || (_cflash_path && _gbaslot_rom)) {
147 ++ if((cflash_image != "" && gbaslot_rom != "") || (cflash_path != "" && gbaslot_rom != "")) {
148 + printerror("Cannot specify both cflash and gbaslot rom (both occupy SLOT-2)\n");
149 ++ return false;
150 + }
151 +--- a/desmume/src/commandline.h
152 ++++ b/desmume/src/commandline.h
153 +@@ -88,7 +88,2 @@
154 + private:
155 +- char* _play_movie_file;
156 +- char* _record_movie_file;
157 +- char* _cflash_image;
158 +- char* _cflash_path;
159 +- char* _gbaslot_rom;
160 + char* _bios_arm9, *_bios_arm7;
161 +@@ -109,5 +104,2 @@
162 + #endif
163 +- char* _slot1;
164 +- char *_slot1_fat_dir;
165 +- char* _console_type;
166 + char* _advanscene_import;
167 +--- a/desmume/src/frontend/posix/gtk/main.cpp
168 ++++ b/desmume/src/frontend/posix/gtk/main.cpp
169 +@@ -3555,12 +3555,9 @@
170 +
171 +-static void
172 +-handle_open(GApplication *application,
173 +- GFile **files,
174 +- gint n_files,
175 +- const gchar *hint,
176 ++static gint
177 ++ignore_command_line(GApplication *application,
178 ++ GApplicationCommandLine *command_line,
179 + gpointer user_data)
180 + {
181 +- configured_features *my_config = static_cast<configured_features*>(user_data);
182 +- my_config->nds_file = g_file_get_path(files[0]);
183 + common_gtk_main(application, user_data);
184 ++ return 0;
185 + }
186 +@@ -3584,6 +3581,5 @@
187 +
188 +- // TODO: pass G_APPLICATION_HANDLES_COMMAND_LINE instead.
189 +- GtkApplication *app = gtk_application_new("org.desmume.DeSmuME", G_APPLICATION_HANDLES_OPEN);
190 ++ GtkApplication *app = gtk_application_new("org.desmume.DeSmuME", G_APPLICATION_HANDLES_COMMAND_LINE);
191 + g_signal_connect (app, "activate", G_CALLBACK(common_gtk_main), &my_config);
192 +- g_signal_connect (app, "open", G_CALLBACK(handle_open), &my_config);
193 ++ g_signal_connect (app, "command-line", G_CALLBACK(ignore_command_line), &my_config);
194 + g_action_map_add_action_entries(G_ACTION_MAP(app),
195
196 diff --git a/games-emulation/desmume/metadata.xml b/games-emulation/desmume/metadata.xml
197 index 3aa5e0a6909..52b0e3d68a4 100644
198 --- a/games-emulation/desmume/metadata.xml
199 +++ b/games-emulation/desmume/metadata.xml
200 @@ -5,6 +5,11 @@
201 <email>games@g.o</email>
202 <name>Gentoo Games Project</name>
203 </maintainer>
204 + <use>
205 + <flag name="gdb">Enable support for the remote GDB stub</flag>
206 + <flag name="openal">Use <pkg>media-libs/openal</pkg> for microphone input</flag>
207 + <flag name="wifi">Enable support for Wi-Fi (experimental and discouraged)</flag>
208 + </use>
209 <upstream>
210 <remote-id type="github">TASVideos/desmume</remote-id>
211 <remote-id type="sourceforge">desmume</remote-id>