Gentoo Archives: gentoo-commits

From: Jeroen Roovers <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-misc/macopix/, x11-misc/macopix/files/
Date: Fri, 04 Sep 2020 10:35:36
Message-Id: 1599215730.f7975b43b9ab055cb20601870d6ea9c87d5f424f.jer@gentoo
1 commit: f7975b43b9ab055cb20601870d6ea9c87d5f424f
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 4 09:59:50 2020 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 4 10:35:30 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f7975b43
7
8 x11-misc/macopix: Version 3.4.0
9
10 Package-Manager: Portage-3.0.5, Repoman-3.0.1
11 Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
12
13 x11-misc/macopix/Manifest | 1 +
14 .../files/macopix-3.4.0-CVE-2015-8614.patch | 143 +++++++++
15 x11-misc/macopix/files/macopix-3.4.0-Werror.patch | 11 +
16 .../macopix/files/macopix-3.4.0-fno-common.patch | 357 +++++++++++++++++++++
17 x11-misc/macopix/files/macopix-3.4.0-windres.patch | 11 +
18 x11-misc/macopix/macopix-3.4.0.ebuild | 84 +++++
19 6 files changed, 607 insertions(+)
20
21 diff --git a/x11-misc/macopix/Manifest b/x11-misc/macopix/Manifest
22 index 62b2cb2f5ac..560229d73c8 100644
23 --- a/x11-misc/macopix/Manifest
24 +++ b/x11-misc/macopix/Manifest
25 @@ -1,4 +1,5 @@
26 DIST macopix-1.7.4.tar.bz2 725481 BLAKE2B 1712dba8efe53fa78077d77faf7a84654bb87c72b6d9067484ce8b54da448326543082e2a245fbe1b61c824084744f51c0de321076a0e23586514c694840a040 SHA512 6010f98ecd3aad4325e81f037589cc4e79d857d513687f5243adb6ef3768ace5cddf4f5cdce977a75a4dc769b52bb541bdeefe92cdc012471de950ee81592db7
27 +DIST macopix-3.4.0.tar.gz 2854634 BLAKE2B 95ecb17588562a86db7e2c7b8c0832ebaea5b56e2c80814c365058954ce2655ac91f0109b1b0db4f7b8c1a98fde7162ee6c23fe3b2187cbeb22681714df2a595 SHA512 99b9dbbc7ca0cb3fa9c1881800e019ccae1c6439f300f479625a5b4877a0578b4a68b131ecbc0adc4a4393a867fd0ac9df7b52adaf2057f14142d1ddaf54fd53
28 DIST macopix-mascot-HxB-euc-ja-0.30.tar.gz 803473 BLAKE2B 943f30f19bf2108a7e412ca0404f8c47324fc2e9bac5c13c9fcf35d6a4c9944f25afee3754898e6449f46247572c35a42cbe9f7c1b123f3e9e00fc0f33a0a260 SHA512 8897bd6d30fe3372e91d00add2a1af5d7fd7384ce7668aa9b21952d5be863d04c63af8bb98846c59f54a87af3b60acbd008f6c62b68a22038f29a07e7ba19333
29 DIST macopix-mascot-comic_party-euc-ja-1.02.tar.gz 20656 BLAKE2B d2a7022cad1856dcebc7594acad449d4de1909ab7f33788b69c562c2d376427d91e993b2c4300a968566d7fed8d3a7e6f7596ef3adcc7897ed6a1c8fd3bb5815 SHA512 b71a586faef6b878c150e7e8e412c70d8d08919736695108efe2f119aaa01347befcaf222990fbaba10daa57120645e5c77b5534df0e4224feddbaa15c80ecf2
30 DIST macopix-mascot-cosmos-euc-ja-1.02.tar.gz 329269 BLAKE2B 87d2357778f6e5d91232054dca16abc71224c1837a7a66569c8891d0720e0ffb2e9ab8745c76f44d0c8827a89afc412d703a1e66e2e46b3c8d7e49940d8c7880 SHA512 05b126b872c7ddf7dfe5b6fdd9654b8f97f6e005d8fa8ad30277a379c333cb0defaad43f9165db4712fc7e4d755fdddd34dce49a99f89c56f4dc951340fc7b1b
31
32 diff --git a/x11-misc/macopix/files/macopix-3.4.0-CVE-2015-8614.patch b/x11-misc/macopix/files/macopix-3.4.0-CVE-2015-8614.patch
33 new file mode 100644
34 index 00000000000..9bd9d9ecbd9
35 --- /dev/null
36 +++ b/x11-misc/macopix/files/macopix-3.4.0-CVE-2015-8614.patch
37 @@ -0,0 +1,143 @@
38 +From c3bbb22f131ea6e273d4921bd60c73e78a13e00b Mon Sep 17 00:00:00 2001
39 +From: "Ying-Chun Liu (PaulLiu)" <paulliu@××××××.org>
40 +Date: Sat, 8 Aug 2020 03:45:19 +0800
41 +Subject: [PATCH] src/codeconv.c: Fix CVE-2015-8614
42 +
43 +This code comes from the latest claws-mail upstream which fixes
44 +the security issue.
45 +
46 +Signed-off-by: Ying-Chun Liu (PaulLiu) <paulliu@××××××.org>
47 +---
48 + src/codeconv.c | 74 ++++++++++++++++++++++++++++++++------------------
49 + 1 file changed, 48 insertions(+), 26 deletions(-)
50 +
51 +diff --git a/src/codeconv.c b/src/codeconv.c
52 +index 254843e..0efbc13 100644
53 +--- a/src/codeconv.c
54 ++++ b/src/codeconv.c
55 +@@ -128,10 +128,14 @@ typedef enum
56 + void conv_jistoeuc(gchar *outbuf, gint outlen, const gchar *inbuf)
57 + {
58 + const guchar *in = inbuf;
59 +- guchar *out = outbuf;
60 ++ gchar *out = outbuf;
61 + JISState state = JIS_ASCII;
62 +
63 +- while (*in != '\0') {
64 ++ /*
65 ++ * Loop outputs up to 3 bytes in each pass (aux kanji) and we
66 ++ * need 1 byte to terminate the output
67 ++ */
68 ++ while (*in != '\0' && (out - outbuf) < outlen - 4) {
69 + if (*in == ESC) {
70 + in++;
71 + if (*in == '$') {
72 +@@ -192,6 +196,7 @@ void conv_jistoeuc(gchar *outbuf, gint outlen, const gchar *inbuf)
73 + }
74 +
75 + *out = '\0';
76 ++ return ;
77 + }
78 +
79 + #define JIS_HWDAKUTEN 0x5e
80 +@@ -263,10 +268,15 @@ static gint conv_jis_hantozen(guchar *outbuf, guchar jis_code, guchar sound_sym)
81 + void conv_euctojis(gchar *outbuf, gint outlen, const gchar *inbuf)
82 + {
83 + const guchar *in = inbuf;
84 +- guchar *out = outbuf;
85 ++ gchar *out = outbuf;
86 + JISState state = JIS_ASCII;
87 +
88 +- while (*in != '\0') {
89 ++ /*
90 ++ * Loop outputs up to 6 bytes in each pass (aux shift + aux
91 ++ * kanji) and we need up to 4 bytes to terminate the output
92 ++ * (ASCII shift + null)
93 ++ */
94 ++ while (*in != '\0' && (out - outbuf) < outlen - 10) {
95 + if (isascii(*in)) {
96 + K_OUT();
97 + *out++ = *in++;
98 +@@ -286,26 +296,32 @@ void conv_euctojis(gchar *outbuf, gint outlen, const gchar *inbuf)
99 + }
100 + } else if (iseuchwkana1(*in)) {
101 + if (iseuchwkana2(*(in + 1))) {
102 +- guchar jis_ch[2];
103 +- gint len;
104 +-
105 +- if (iseuchwkana1(*(in + 2)) &&
106 +- iseuchwkana2(*(in + 3)))
107 +- len = conv_jis_hantozen
108 +- (jis_ch,
109 +- *(in + 1), *(in + 3));
110 +- else
111 +- len = conv_jis_hantozen
112 +- (jis_ch,
113 +- *(in + 1), '\0');
114 +- if (len == 0)
115 +- in += 2;
116 +- else {
117 +- K_IN();
118 +- in += len * 2;
119 +- *out++ = jis_ch[0];
120 +- *out++ = jis_ch[1];
121 +- }
122 ++ if (0) {
123 ++ HW_IN();
124 ++ in++;
125 ++ *out++ = *in++ & 0x7f;
126 ++ } else {
127 ++ guchar jis_ch[2];
128 ++ gint len;
129 ++
130 ++ if (iseuchwkana1(*(in + 2)) &&
131 ++ iseuchwkana2(*(in + 3)))
132 ++ len = conv_jis_hantozen
133 ++ (jis_ch,
134 ++ *(in + 1), *(in + 3));
135 ++ else
136 ++ len = conv_jis_hantozen
137 ++ (jis_ch,
138 ++ *(in + 1), '\0');
139 ++ if (len == 0)
140 ++ in += 2;
141 ++ else {
142 ++ K_IN();
143 ++ in += len * 2;
144 ++ *out++ = jis_ch[0];
145 ++ *out++ = jis_ch[1];
146 ++ }
147 ++ }
148 + } else {
149 + K_OUT();
150 + in++;
151 +@@ -340,14 +356,19 @@ void conv_euctojis(gchar *outbuf, gint outlen, const gchar *inbuf)
152 +
153 + K_OUT();
154 + *out = '\0';
155 ++ return ;
156 + }
157 +
158 + void conv_sjistoeuc(gchar *outbuf, gint outlen, const gchar *inbuf)
159 + {
160 + const guchar *in = inbuf;
161 +- guchar *out = outbuf;
162 ++ gchar *out = outbuf;
163 +
164 +- while (*in != '\0') {
165 ++ /*
166 ++ * Loop outputs up to 2 bytes in each pass and we need 1 byte
167 ++ * to terminate the output
168 ++ */
169 ++ while (*in != '\0' && (out - outbuf) < outlen - 3) {
170 + if (isascii(*in)) {
171 + *out++ = *in++;
172 + } else if (issjiskanji1(*in)) {
173 +@@ -386,6 +407,7 @@ void conv_sjistoeuc(gchar *outbuf, gint outlen, const gchar *inbuf)
174 + }
175 +
176 + *out = '\0';
177 ++ return ;
178 + }
179 +
180 + void conv_anytoeuc(gchar *outbuf, gint outlen, const gchar *inbuf)
181
182 diff --git a/x11-misc/macopix/files/macopix-3.4.0-Werror.patch b/x11-misc/macopix/files/macopix-3.4.0-Werror.patch
183 new file mode 100644
184 index 00000000000..e3f84dba8e3
185 --- /dev/null
186 +++ b/x11-misc/macopix/files/macopix-3.4.0-Werror.patch
187 @@ -0,0 +1,11 @@
188 +--- a/m4/visibility.m4
189 ++++ b/m4/visibility.m4
190 +@@ -32,7 +32,7 @@
191 + AC_MSG_CHECKING([whether the -Werror option is usable])
192 + AC_CACHE_VAL([gl_cv_cc_vis_werror], [
193 + gl_save_CFLAGS="$CFLAGS"
194 +- CFLAGS="$CFLAGS -Werror"
195 ++ CFLAGS="$CFLAGS -Werror -setthisupforfailure"
196 + AC_COMPILE_IFELSE(
197 + [AC_LANG_PROGRAM([[]], [[]])],
198 + [gl_cv_cc_vis_werror=yes],
199
200 diff --git a/x11-misc/macopix/files/macopix-3.4.0-fno-common.patch b/x11-misc/macopix/files/macopix-3.4.0-fno-common.patch
201 new file mode 100644
202 index 00000000000..74599704646
203 --- /dev/null
204 +++ b/x11-misc/macopix/files/macopix-3.4.0-fno-common.patch
205 @@ -0,0 +1,357 @@
206 +From f29175b892026dbc4a8ad321e426f22e0a09b248 Mon Sep 17 00:00:00 2001
207 +From: "Ying-Chun Liu (PaulLiu)" <paulliu@××××××.org>
208 +Date: Sat, 8 Aug 2020 03:48:43 +0800
209 +Subject: [PATCH] Porting to gcc 10
210 +
211 +GCC will reject multiple definitions of global variables starting
212 +from gcc-10. We need to move the definitions to a real object file.
213 +And in headers we only extern it.
214 +
215 +Signed-off-by: Ying-Chun Liu (PaulLiu) <paulliu@××××××.org>
216 +---
217 + src/main.c | 42 ++++++++++++++++++
218 + src/main.h | 123 +++++++++++++++++++++++++++++++----------------------
219 + 2 files changed, 113 insertions(+), 52 deletions(-)
220 +
221 +diff --git a/src/main.c b/src/main.c
222 +index 7944618..ce187a1 100644
223 +--- a/src/main.c
224 ++++ b/src/main.c
225 +@@ -35,6 +35,48 @@
226 + // *** GLOBAL ARGUMENT ***
227 +
228 + gboolean FlagInstalledMenu;
229 ++enum MENU_EXT_t MENU_EXT;
230 ++enum MaCoPiXFolder_t MaCoPiXFolder;
231 ++enum ClockMode_t ClockMode;
232 ++enum HomePos_t HomePos;
233 ++enum MoveMode_t MoveMode;
234 ++#ifdef USE_OSX
235 ++enum MAC_LAYER_MODE_t MAC_LAYER_MODE;
236 ++#endif
237 ++enum FFPos_t FFPos;
238 ++enum AutoBar_t AutoBar;
239 ++enum PosBalloon_t PosBalloon;
240 ++enum TypBalloon_t TypBalloon;
241 ++enum DuetAnimeMode_t DuetAnimeMode;
242 ++enum TypInterpolate_t TypInterpolate;
243 ++enum ClockType_t ClockType;
244 ++enum MenuSelect_t MenuSelect;
245 ++enum GuiFontConf_t GuiFontConf;
246 ++enum GuiColorConf_t GuiColorConf;
247 ++enum SetReleaseData_t SetReleaseData;
248 ++enum MailStatus0_t MailStatus0;
249 ++enum MailPixPos_t MailPixPos;
250 ++enum MailStatus_t MailStatus;
251 ++enum SignalAction_t SignalAction;
252 ++enum ConsMode_t ConsMode;
253 ++enum ScanMenuDir_t ScanMenuDir;
254 ++enum CompositeFlag_t CompositeFlag;
255 ++#ifdef USE_GTK3
256 ++GdkPixbuf *pixbuf_main, *pixbuf_clk, *pixbuf_bal;
257 ++#ifdef USE_WIN32
258 ++GdkPixbuf *pixbuf_sdw;
259 ++#endif
260 ++#else // USE_GTK3
261 ++GdkPixmap *pixmap_main, *pixmap_clk, *pixmap_bal;
262 ++#ifdef USE_WIN32
263 ++GdkPixmap *pixmap_sdw;
264 ++#endif
265 ++#endif // USE_GTK3
266 ++gint window_x, window_y;
267 ++gboolean supports_alpha;
268 ++gboolean flag_balloon;
269 ++
270 ++pid_t http_pid;
271 +
272 + // Prototype of functions in this file
273 + #ifdef USE_GTK3
274 +diff --git a/src/main.h b/src/main.h
275 +index 496815e..42577a6 100644
276 +--- a/src/main.h
277 ++++ b/src/main.h
278 +@@ -217,10 +217,11 @@
279 + #define MENU_EXTRACT_GTAR_COMMAND "tar -zxf %s -C %s "
280 +
281 + // MENU
282 +-enum{ MENU_MENU,
283 ++enum MENU_EXT_t { MENU_MENU,
284 + MENU_LHA,
285 + MENU_TAR
286 +- }MENU_EXT;
287 ++};
288 ++extern enum MENU_EXT_t MENU_EXT;
289 +
290 +
291 + // 画像ファイル用拡張子
292 +@@ -252,11 +253,12 @@ enum{ MENU_MENU,
293 + #define SOUNDDIR "sound" G_DIR_SEPARATOR_S
294 +
295 + // Folder
296 +-enum{ FOLDER_DEFAULT,
297 ++enum MaCoPiXFolder_t { FOLDER_DEFAULT,
298 + FOLDER_PIX,
299 + FOLDER_SOUND,
300 + FOLDER_CURRENT
301 +- }MaCoPiXFolder;
302 ++};
303 ++extern enum MaCoPiXFolder_t MaCoPiXFolder;
304 +
305 + // 個人用セーブファイル
306 + // (USER_DIR中に作成 : マスコット非依存パラメータを保存)
307 +@@ -292,10 +294,11 @@ enum{ FOLDER_DEFAULT,
308 +
309 +
310 + // CLOCK_MODE
311 +-enum{ CLOCK_NO,
312 ++enum ClockMode_t { CLOCK_NO,
313 + CLOCK_PIXMAP,
314 + CLOCK_PANEL
315 +-}ClockMode;
316 ++};
317 ++extern enum ClockMode_t ClockMode;
318 +
319 + //ANIME
320 + #define MAX_PIXMAP 64
321 +@@ -330,47 +333,54 @@ enum{ CLOCK_NO,
322 + #define ROOTOFF_Y (-10)
323 +
324 + // Home Position Mode
325 +-enum{ HOMEPOS_NEVER, HOMEPOS_VANISH, HOMEPOS_BAR } HomePos;
326 ++enum HomePos_t { HOMEPOS_NEVER, HOMEPOS_VANISH, HOMEPOS_BAR };
327 ++extern enum HomePos_t HomePos;
328 +
329 + // Titlebar Offset for Focus Follow
330 + enum{ FF_BAR_ABS, FF_BAR_REL };
331 +
332 +
333 + // MOVE mode
334 +-enum{
335 ++enum MoveMode_t {
336 + MOVE_FIX,
337 + MOVE_FOCUS
338 +-}MoveMode;
339 ++};
340 ++extern enum MoveMode_t MoveMode;
341 +
342 + #ifdef USE_OSX
343 +-enum {
344 ++enum MAC_LAYER_MODE_t {
345 + MAC_LAYER_DEFAULT,
346 + MAC_LAYER_TOP,
347 + NUM_MAC_LAYER
348 +-}MAC_LAYER_MODE;
349 ++};
350 ++extern enum MAC_LAYER_MODE_t MAC_LAYER_MODE;
351 + #endif
352 +
353 + // Focus Follow 基準位置
354 +-enum{ FF_SIDE_LEFT, FF_SIDE_RIGHT } FFPos;
355 ++enum FFPos_t { FF_SIDE_LEFT, FF_SIDE_RIGHT };
356 ++extern enum FFPos_t FFPos;
357 +
358 + // Focus Autobar タイトルバー算出法
359 +-enum{ AUTOBAR_MANUAL, AUTOBAR_ORDINAL, AUTOBAR_COMPIZ } AutoBar;
360 ++enum AutoBar_t { AUTOBAR_MANUAL, AUTOBAR_ORDINAL, AUTOBAR_COMPIZ };
361 ++extern enum AutoBar_t AutoBar;
362 +
363 +
364 + // Balloon Position
365 +-enum{
366 ++enum PosBalloon_t{
367 + BAL_POS_LEFT,
368 + BAL_POS_RIGHT
369 +- } PosBalloon;
370 ++ };
371 ++extern enum PosBalloon_t PosBalloon;
372 +
373 + // Balloon Mode
374 +-enum{BALLOON_NORMAL,
375 ++enum TypBalloon_t {BALLOON_NORMAL,
376 + BALLOON_MAIL,
377 + BALLOON_POPERROR,
378 + BALLOON_SOCKMSG,
379 + BALLOON_DUET,
380 + BALLOON_SYS
381 +- } TypBalloon;
382 ++ };
383 ++extern enum TypBalloon_t TypBalloon;
384 +
385 + // Biff用 Balloonの自然消滅コマ数
386 + #define BALLOON_EXPIRE 150
387 +@@ -394,39 +404,41 @@ typedef enum {
388 + #define DEF_DUET_DELAY 20
389 +
390 + // Duet Anime mode
391 +-enum{
392 ++enum DuetAnimeMode_t {
393 + DUET_CLICK,
394 + DUET_RANDOM
395 +- }DuetAnimeMode;
396 +-
397 ++ };
398 ++extern enum DuetAnimeMode_t DuetAnimeMode;
399 +
400 + // Interpolation Style for Magnification
401 +-enum{ MAG_IP_NEAREST,
402 ++enum TypInterpolate_t { MAG_IP_NEAREST,
403 + MAG_IP_TILES,
404 + MAG_IP_BILINEAR,
405 + MAG_IP_HYPER
406 +- } TypInterpolate;
407 +-
408 ++ };
409 ++extern enum TypInterpolate_t TypInterpolate;
410 +
411 + //Clock タイプ
412 +-enum{ CLOCK_TYPE_24S,
413 ++enum ClockType_t { CLOCK_TYPE_24S,
414 + CLOCK_TYPE_24M,
415 + CLOCK_TYPE_12S,
416 +- CLOCK_TYPE_12M } ClockType;
417 +-
418 ++ CLOCK_TYPE_12M };
419 ++extern enum ClockType_t ClockType;
420 +
421 + // Font size ratio for AM/PM sign
422 + #define CLOCK_AMPM_RATIO 0.6
423 +
424 + // Install mode
425 +-enum{ MENU_SELECT,
426 ++enum MenuSelect_t { MENU_SELECT,
427 + MENU_INSTALL_USER,
428 + MENU_INSTALL_COMMON,
429 + START_MENU_SELECT,
430 + START_MENU_INSTALL_USER,
431 + START_MENU_INSTALL_COMMON,
432 + NUM_INSTALL_MODE
433 +- } MenuSelect;
434 ++ };
435 ++extern enum MenuSelect_t MenuSelect;
436 ++
437 +
438 + //DEFAULT Alpha
439 + #define DEF_ALPHA_MAIN 100
440 +@@ -542,14 +554,15 @@ static GdkColor color_lred= {0, 0xFFFF, 0xBBBB, 0xBBBB};
441 +
442 +
443 + // for Callback of Configuration Dialog
444 +-enum{CONF_FONT_CLK,
445 ++enum GuiFontConf_t {CONF_FONT_CLK,
446 + CONF_FONT_BAL,
447 + CONF_DEF_FONT_CLK,
448 + CONF_DEF_FONT_BAL,
449 + INIT_DEF_FONT_CLK,
450 +- INIT_DEF_FONT_BAL} GuiFontConf;
451 ++ INIT_DEF_FONT_BAL};
452 ++extern enum GuiFontConf_t GuiFontConf;
453 +
454 +-enum{CONF_COLOR_CLK,
455 ++enum GuiColorConf_t {CONF_COLOR_CLK,
456 + CONF_COLOR_CLKBG,
457 + CONF_COLOR_CLKBD,
458 + CONF_COLOR_CLKSD,
459 +@@ -568,19 +581,21 @@ enum{CONF_COLOR_CLK,
460 + CONF_COLOR_FS_BG0,
461 + CONF_COLOR_FS_BG1,
462 + NUM_CONF_COLOR
463 +-} GuiColorConf;
464 +-
465 +-enum{ SET_RELEASE_BALLOON, SET_RELEASE_CLOCK } SetReleaseData;
466 +-
467 ++};
468 ++extern enum GuiColorConf_t GuiColorConf;
469 +
470 ++enum SetReleaseData_t { SET_RELEASE_BALLOON, SET_RELEASE_CLOCK };
471 ++extern enum SetReleaseData_t SetReleaseData;
472 +
473 + // Setting for BIFF
474 + #define DEF_MAIL_INTERVAL 60
475 +
476 +
477 +-enum{ MAIL_NO, MAIL_LOCAL, MAIL_POP3, MAIL_APOP, MAIL_QMAIL, MAIL_PROCMAIL } MailStatus0;
478 ++enum MailStatus0_t { MAIL_NO, MAIL_LOCAL, MAIL_POP3, MAIL_APOP, MAIL_QMAIL, MAIL_PROCMAIL };
479 ++extern enum MailStatus0_t MailStatus0;
480 +
481 +-enum{ MAIL_PIX_LEFT, MAIL_PIX_RIGHT } MailPixPos;
482 ++enum MailPixPos_t { MAIL_PIX_LEFT, MAIL_PIX_RIGHT };
483 ++extern enum MailPixPos_t MailPixPos;
484 +
485 + #undef POP_DEBUG /* pop3 debugging mode */
486 +
487 +@@ -609,7 +624,8 @@ enum{ MAIL_PIX_LEFT, MAIL_PIX_RIGHT } MailPixPos;
488 + #define BIFF_TOOLTIPS TRUE
489 +
490 +
491 +-enum{ NO_MAIL, OLD_MAIL, NEW_MAIL, KEEP_NEW_MAIL } MailStatus;
492 ++enum MailStatus_t { NO_MAIL, OLD_MAIL, NEW_MAIL, KEEP_NEW_MAIL };
493 ++extern enum MailStatus_t MailStatus;
494 +
495 + // mail status; array subscripts
496 +
497 +@@ -637,14 +653,17 @@ enum{ NO_MAIL, OLD_MAIL, NEW_MAIL, KEEP_NEW_MAIL } MailStatus;
498 +
499 +
500 + // 時報用設定
501 +-enum{ SIGACT_NO, SIGACT_CLICK, SIGACT_CHANGE } SignalAction;
502 ++enum SignalAction_t { SIGACT_NO, SIGACT_CLICK, SIGACT_CHANGE };
503 ++extern enum SignalAction_t SignalAction;
504 +
505 +
506 + // Consistency Check
507 +-enum{ CONS_MANUAL, CONS_AUTOOW, CONS_IGNORE } ConsMode;
508 ++enum ConsMode_t { CONS_MANUAL, CONS_AUTOOW, CONS_IGNORE };
509 ++extern enum ConsMode_t ConsMode;
510 +
511 + // メニューの場所
512 +-enum{ SMENU_DIR_COMMON, SMENU_DIR_USER } ScanMenuDir;
513 ++enum ScanMenuDir_t { SMENU_DIR_COMMON, SMENU_DIR_USER };
514 ++extern enum ScanMenuDir_t ScanMenuDir;
515 +
516 +
517 + typedef enum {
518 +@@ -661,11 +680,11 @@ typedef enum {
519 +
520 +
521 + // COMPOSITE_FLAG
522 +-enum{ COMPOSITE_FALSE,
523 ++enum CompositeFlag_t { COMPOSITE_FALSE,
524 + COMPOSITE_TRUE,
525 + COMPOSITE_UNKNOWN
526 +-}CompositeFlag;
527 +-
528 ++};
529 ++extern enum CompositeFlag_t CompositeFlag;
530 +
531 +
532 +
533 +@@ -1137,21 +1156,21 @@ typedef struct{
534 +
535 + /////////// Global Arguments //////////
536 + #ifdef USE_GTK3
537 +-GdkPixbuf *pixbuf_main, *pixbuf_clk, *pixbuf_bal;
538 ++extern GdkPixbuf *pixbuf_main, *pixbuf_clk, *pixbuf_bal;
539 + #ifdef USE_WIN32
540 +-GdkPixbuf *pixbuf_sdw;
541 ++extern GdkPixbuf *pixbuf_sdw;
542 + #endif
543 + #else // USE_GTK3
544 +-GdkPixmap *pixmap_main, *pixmap_clk, *pixmap_bal;
545 ++extern GdkPixmap *pixmap_main, *pixmap_clk, *pixmap_bal;
546 + #ifdef USE_WIN32
547 +-GdkPixmap *pixmap_sdw;
548 ++extern GdkPixmap *pixmap_sdw;
549 + #endif
550 + #endif // USE_GTK3
551 +-gint window_x, window_y;
552 +-gboolean supports_alpha;
553 +-gboolean flag_balloon;
554 ++extern gint window_x, window_y;
555 ++extern gboolean supports_alpha;
556 ++extern gboolean flag_balloon;
557 +
558 +-pid_t http_pid;
559 ++extern pid_t http_pid;
560 +
561 +
562 + /////////// Proto types //////////
563
564 diff --git a/x11-misc/macopix/files/macopix-3.4.0-windres.patch b/x11-misc/macopix/files/macopix-3.4.0-windres.patch
565 new file mode 100644
566 index 00000000000..39d509bcd35
567 --- /dev/null
568 +++ b/x11-misc/macopix/files/macopix-3.4.0-windres.patch
569 @@ -0,0 +1,11 @@
570 +--- a/configure.ac
571 ++++ b/configure.ac
572 +@@ -57,7 +57,7 @@
573 + AC_PROG_YACC
574 + AM_PROG_LIBTOOL
575 +
576 +-AC_CHECK_PROG(WINDRES, windres, windres)
577 ++AC_CHECK_PROG(WINDRES, windres-does-not-exist, windres)
578 + AM_CONDITIONAL(HAVE_WINDRES, test x"$WINDRES" != x)
579 +
580 + # Checks for header files.
581
582 diff --git a/x11-misc/macopix/macopix-3.4.0.ebuild b/x11-misc/macopix/macopix-3.4.0.ebuild
583 new file mode 100644
584 index 00000000000..4765b8dbb41
585 --- /dev/null
586 +++ b/x11-misc/macopix/macopix-3.4.0.ebuild
587 @@ -0,0 +1,84 @@
588 +# Copyright 1999-2020 Gentoo Authors
589 +# Distributed under the terms of the GNU General Public License v2
590 +
591 +EAPI=7
592 +inherit autotools
593 +
594 +DESCRIPTION="MaCoPiX (Mascot Constructive Pilot for X) is a desktop mascot application"
595 +HOMEPAGE="http://rosegray.sakura.ne.jp/macopix/index-e.html"
596 +
597 +BASE_URI="http://rosegray.sakura.ne.jp/macopix"
598 +SRC_URI="${BASE_URI}/${P}.tar.gz"
599 +
600 +# NOTE: These mascots are not redistributable on commercial CD-ROM.
601 +# The author granted to use them under Gentoo Linux.
602 +MACOPIX_MASCOTS="
603 + macopix-mascot-HxB-euc-ja-0.30
604 + macopix-mascot-marimite-euc-ja-2.20
605 + macopix-mascot-cosmos-euc-ja-1.02
606 + macopix-mascot-mizuiro-euc-ja-1.02
607 + macopix-mascot-pia2-euc-ja-1.02
608 + macopix-mascot-tsukihime-euc-ja-1.02
609 + macopix-mascot-triangle_heart-euc-ja-1.02
610 + macopix-mascot-comic_party-euc-ja-1.02
611 + macopix-mascot-kanon-euc-ja-1.02
612 + macopix-mascot-one-euc-ja-1.02
613 +"
614 +
615 +for i in ${MACOPIX_MASCOTS} ; do
616 + SRC_URI+=" ${BASE_URI}/${i}.tar.gz"
617 +done
618 +
619 +# program itself is GPL-2, and mascots are free-noncomm
620 +LICENSE="GPL-2 free-noncomm"
621 +SLOT="0"
622 +KEYWORDS="~amd64 ~ppc ~x86"
623 +IUSE="gnutls nls"
624 +
625 +RDEPEND="
626 + dev-libs/glib:2
627 + media-libs/libpng:0=
628 + sys-devel/gettext
629 + gnutls? ( net-libs/gnutls )
630 + !gnutls? ( dev-libs/openssl:0= )
631 + x11-libs/gtk+:3
632 +"
633 +DEPEND="
634 + ${RDEPEND}
635 + virtual/pkgconfig
636 +"
637 +PATCHES=(
638 + "${FILESDIR}"/${PN}-3.4.0-CVE-2015-8614.patch
639 + "${FILESDIR}"/${PN}-3.4.0-Werror.patch
640 + "${FILESDIR}"/${PN}-3.4.0-fno-common.patch
641 + "${FILESDIR}"/${PN}-3.4.0-windres.patch
642 +)
643 +
644 +src_prepare() {
645 + default
646 +
647 + eautoreconf
648 +}
649 +
650 +src_configure() {
651 + econf \
652 + $(use_with gnutls)
653 +}
654 +
655 +src_install() {
656 + default
657 +
658 + dodoc AUTHORS ChangeLog* NEWS *README*
659 +
660 + # install mascots
661 + for d in ${MACOPIX_MASCOTS} ; do
662 + einfo "Installing ${d}..."
663 + cd "${WORKDIR}/${d}" || die
664 + insinto /usr/share/"${PN}"
665 + doins *.mcpx *.menu
666 + insinto /usr/share/"${PN}"/pixmap
667 + doins *.png
668 + docinto "${d}"
669 + dodoc README.jp
670 + done
671 +}