summaryrefslogtreecommitdiff
path: root/games-puzzle/mirrormagic
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /games-puzzle/mirrormagic
reinit the tree, so we can have metadata
Diffstat (limited to 'games-puzzle/mirrormagic')
-rw-r--r--games-puzzle/mirrormagic/Manifest11
-rw-r--r--games-puzzle/mirrormagic/files/mirrormagic-2.0.2-64bit.patch43
-rw-r--r--games-puzzle/mirrormagic/files/mirrormagic-2.0.2-editor.patch20
-rw-r--r--games-puzzle/mirrormagic/files/mirrormagic-2.0.2-gcc41.patch10
-rw-r--r--games-puzzle/mirrormagic/files/mirrormagic-2.0.2-gcc5.patch483
-rw-r--r--games-puzzle/mirrormagic/files/mirrormagic-2.0.2-parallel.patch11
-rw-r--r--games-puzzle/mirrormagic/files/mirrormagic.xpm292
-rw-r--r--games-puzzle/mirrormagic/metadata.xml8
-rw-r--r--games-puzzle/mirrormagic/mirrormagic-2.0.2-r1.ebuild56
9 files changed, 934 insertions, 0 deletions
diff --git a/games-puzzle/mirrormagic/Manifest b/games-puzzle/mirrormagic/Manifest
new file mode 100644
index 000000000000..3c7882873bcf
--- /dev/null
+++ b/games-puzzle/mirrormagic/Manifest
@@ -0,0 +1,11 @@
+AUX mirrormagic-2.0.2-64bit.patch 888 SHA256 7ec4d6ec4c1ecc4b04053a47236ee77475282adbedd03631b15459b0b8b401b5 SHA512 ff81626db66f62213184402bcb8b47393c6463c4db3daf41eb5008a5358775b95446a9f5dfdbd38535c6a3e15cfc09d2543aea6e84868a31f3f0be7bae8356c0 WHIRLPOOL a29525cead393fd6ec04683635fabf467c50682d725857c50f70b20081667e8d356f10fe86770b07cce70ba9d97a5a2b6506ab5c744416002727ef18b79ed13a
+AUX mirrormagic-2.0.2-editor.patch 499 SHA256 7b11a60c73ef81cb79458ed97966aeb4c7f51076273f609bb8ab23df917a043f SHA512 2d2d497402596b0108b0b79f8ce93d4e7404a64f20107582d40ac5d72291645379f920af5bd156e607f724e0427817bf6557223a7c152ebdf41b6787e81fb353 WHIRLPOOL 310acecd93cb37f5d1fa0ebed74b6860b79dbbb82f9da1e9a1d8bec4a016898752c468ba33fd1f816fb0de73c4c75f32be90954339cdd209eb2a2b72d1cfadf6
+AUX mirrormagic-2.0.2-gcc41.patch 267 SHA256 cef565b18d4902e791b846be7b9a7497fa30a0765e09c1876e6f4bd28bbaf003 SHA512 8cd454154f877257eaa252ee3e5250354ed73ea0e4533048fbac48e6db7bfade345b8740815b8ffde3707df9be71a22655c8982bfe05e74ddfde6814610a2c84 WHIRLPOOL 2277faa34b4f7d69aefc61026da6413accabbac35c947c78b15463368031c7da2ffc3ef6899f7a84c0213c2cf26a27a181b70a76fc81b814c3545540b464eb99
+AUX mirrormagic-2.0.2-gcc5.patch 14581 SHA256 b0f9337010bf1a6492861c280a3164f3d068cce49ac566df2236e8adf5cd5935 SHA512 bf71d63c5bef22cb49f2dd9b63d7e8150ea6e6a49cc2430a834ebd31f07f9b2e26411330550ff181386654b9695682fd9a71a3975df24ead8e1386746756b59b WHIRLPOOL a6e0c08e69e2ff068e27e34a13022bd8d13bcc0a4e7a6744e4457eaa17eb177401b41a003ae130cb4bd1b5b034486a5b02ed3aa37516f9bf1f7d36cb94b4fd29
+AUX mirrormagic-2.0.2-parallel.patch 234 SHA256 c73979621d6cccd67eb30581bce06a8ac2fd53547c9ff85fb8e1b9a32a9779a7 SHA512 34317534acb00fe9947eb53d3c16373866f4ecfd913489b4b9da6e9714ce4b04b0b3ce2680b03ea2fb22913147ac154b4eb0d83f46e76a9bc45c6aaac439c250 WHIRLPOOL 5a30e36a9d091a1a3c16a0a1f227ccd686eca88c8c29de4e0ab1bb173a491427e8f20a3020de2b7f463e32e63800651aa4807022a51f557af79f50abc03054d0
+AUX mirrormagic.xpm 6347 SHA256 3c9f65ca677859140d34427d46ff9213c9f928f30157d028be2f590659671f5b SHA512 5040a6232ba047fe0038276bf574ca22b5270827c21e9dbba0f130f0b25c2157be611cca1e662af2ff8cc43ab78f69a925b6687fcaedc4778672ebfedfe00227 WHIRLPOOL ac0a5eb66869ac94691f783ef7a5ea9b39f5667773394eb2aba9d5d70e0c23a84bec34d18c886c2e7117ae9d00aa0f10dceb70ac9b67cefd2e42289fa87a21c1
+DIST mirrormagic-2.0.2.tar.gz 1168098 SHA256 79b3f13d493523438eeb988beffc272c804bc7a4361b83167a082c77e74b3ce2 SHA512 cd49b1325485b68f2b59341e91f0564693dd12117aa3d6b5078c0a7f0e074114196870af11f0a154a0934cfce7106ba9685d886611f2efeff665ea030d705e03 WHIRLPOOL ac282f63b001b3c7d2d42fe99679fbbfb90659f522900329cff21e2a728896b9c5740b3ebd9888bb203ef1fdf5962d9d5f8977e5f6553a76738a429167efaa03
+EBUILD mirrormagic-2.0.2-r1.ebuild 1293 SHA256 2a7ff2f81010b576d72915129c5c1644dee7fff5e97a5da2f9b5db7c69a1d119 SHA512 134b25e92fd9d566da636f2c9676ed3134746a3174d7502b9037f5a4830f518e019da2facda5d60fef3972894e8b6f43443a9de2299fe503bd5463413325f06b WHIRLPOOL 270399a1123289a02b214ed0a59a707da201a11c4b18cae2a299f766ab8b5dbf62ec0fad1d9c2b487539cc567492efae630bdbb08662b39c1c996f3c35448937
+MISC ChangeLog 2932 SHA256 e86bbf7279c41314ddf0520513c968300138a9b2aa95e3cea5e25fbe599e7cc6 SHA512 1896507848f110041e31d251847bef2ac8388a665de50612afaab4631281bd626ef8582f1ca45890757f00dd03f79a8e3f09efb1e73536faa3a1f7cf10ab2ce7 WHIRLPOOL 71a5c3d5692edb599618c181b0e6e7d3c7d4b8e899510287a9cf56ace08a736c2461f34dda96487bb2850d814a43ea49acd46b76bedc2dc087790ce5cb482a30
+MISC ChangeLog-2015 2255 SHA256 bf67501e867c6c49bdc90940f3837ca4dbb3a2e588d440926174365aaac3ac36 SHA512 4842295ec97c2b8534a07f5b2730be02f3251ac18006c57c1e519474bbcc6528f0011792db8b2948fabcb95e08abfb8381fe18d6bb983d331da30a03f4190074 WHIRLPOOL 0e63e1862b60543a5f625d6d1e49daa11fea19854a01936bb747c3e2269f1f54541a9dcdf457fd5bf868bdba4179a90b71a734b385d0d209ea8ca0afe3378cd7
+MISC metadata.xml 249 SHA256 943b9ce0cd072229b43569ab668dd7ec741d9dfefd942c8921dabd4490b27b0c SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118 WHIRLPOOL b10e21575c78e201a652c8582cd16e3f7c86b13dd20a30f4cea44066fb139440b3c186147dbaae83478f11a20b6f457a99c8b29ee1239a4caaa21eee01250088
diff --git a/games-puzzle/mirrormagic/files/mirrormagic-2.0.2-64bit.patch b/games-puzzle/mirrormagic/files/mirrormagic-2.0.2-64bit.patch
new file mode 100644
index 000000000000..e9b313423699
--- /dev/null
+++ b/games-puzzle/mirrormagic/files/mirrormagic-2.0.2-64bit.patch
@@ -0,0 +1,43 @@
+From Debian:
+
+In src/libgame/gadgets.c, check for 64bit when handling
+GDI_TYPE,GDI_STATE in HandleGadgetTags() and use int instead of
+unsigned long. Should probably really be uint32_t but I'll leave
+that decision to upstream. Thanks Pelle Nilsson (and son).
+64bit check borrowed from bug #496863. Closes: #498912.
+
+--- src/libgame/gadgets.c
++++ src/libgame/gadgets.c
+@@ -18,6 +18,12 @@
+ #include "text.h"
+ #include "misc.h"
+
++/* check for 64bit */
++#ifdef _LP64
++#ifndef L64
++#define L64 1
++#endif
++#endif
+
+ /* values for DrawGadget() */
+ #define DG_UNPRESSED 0
+@@ -301,11 +307,19 @@
+ break;
+
+ case GDI_TYPE:
++#ifdef L64
++ gi->type = va_arg(ap, int);
++#else
+ gi->type = va_arg(ap, unsigned long);
++#endif
+ break;
+
+ case GDI_STATE:
++#ifdef L64
++ gi->state = va_arg(ap, int);
++#else
+ gi->state = va_arg(ap, unsigned long);
++#endif
+ break;
+
+ case GDI_CHECKED:
diff --git a/games-puzzle/mirrormagic/files/mirrormagic-2.0.2-editor.patch b/games-puzzle/mirrormagic/files/mirrormagic-2.0.2-editor.patch
new file mode 100644
index 000000000000..459ffa6bf4aa
--- /dev/null
+++ b/games-puzzle/mirrormagic/files/mirrormagic-2.0.2-editor.patch
@@ -0,0 +1,20 @@
+--- mirrormagic-2.0.2/src/editor.c.orig
++++ mirrormagic-2.0.2/src/editor.c
+@@ -2751,7 +2751,7 @@
+ break;
+ }
+
+- if (!LevelContainsPlayer)
++ if (!LevelContainsPlayer())
+ Request("No Level without Gregor Mc Duffin please !", REQ_CONFIRM);
+ else
+ {
+@@ -2766,7 +2766,7 @@
+ break;
+
+ case GADGET_ID_TEST:
+- if (!LevelContainsPlayer)
++ if (!LevelContainsPlayer())
+ Request("No Level without Gregor Mc Duffin please !", REQ_CONFIRM);
+ else
+ {
diff --git a/games-puzzle/mirrormagic/files/mirrormagic-2.0.2-gcc41.patch b/games-puzzle/mirrormagic/files/mirrormagic-2.0.2-gcc41.patch
new file mode 100644
index 000000000000..c8d386f4e581
--- /dev/null
+++ b/games-puzzle/mirrormagic/files/mirrormagic-2.0.2-gcc41.patch
@@ -0,0 +1,10 @@
+--- src/main.h.old
++++ src/main.h
+@@ -459,7 +459,6 @@
+ #endif
+ extern struct HiScore highscore[];
+ extern struct TapeInfo tape;
+-extern struct JoystickInfo joystick[];
+ extern struct SetupInfo setup;
+ extern struct GameInfo game;
+ extern struct LaserInfo laser;
diff --git a/games-puzzle/mirrormagic/files/mirrormagic-2.0.2-gcc5.patch b/games-puzzle/mirrormagic/files/mirrormagic-2.0.2-gcc5.patch
new file mode 100644
index 000000000000..de2cc8042adc
--- /dev/null
+++ b/games-puzzle/mirrormagic/files/mirrormagic-2.0.2-gcc5.patch
@@ -0,0 +1,483 @@
+gcc5 inline semantics changed and caused a build fauilure (bug #568618).
+
+--- mirrormagic-2.0.2.orig/src/libgame/misc.h
++++ mirrormagic-2.0.2/src/libgame/misc.h
+@@ -137,8 +137,8 @@
+ void sortLevelDirInfo(struct LevelDirInfo **,
+ int (*compare_function)(const void *, const void *));
+
+-inline void swap_numbers(int *, int *);
+-inline void swap_number_pairs(int *, int *, int *, int *);
++extern inline void swap_numbers(int *, int *);
++extern inline void swap_number_pairs(int *, int *, int *, int *);
+
+ char *getUserDataDir(void);
+ char *getSetupDir(void);
+--- mirrormagic-2.0.2.orig/src/libgame/msdos.h
++++ mirrormagic-2.0.2/src/libgame/msdos.h
+@@ -711,7 +711,7 @@
+ Pixmap XCreatePixmap(Display *, Drawable, unsigned int, unsigned int,
+ unsigned int);
+ void XSync(Display *, Bool);
+-inline void XCopyArea(Display *, Drawable, Drawable, GC, int, int,
++extern inline void XCopyArea(Display *, Drawable, Drawable, GC, int, int,
+ unsigned int, unsigned int, int, int);
+ int Read_PCX_to_Pixmap(Display *, Window, GC, char *, Pixmap *, Pixmap *);
+ int XReadBitmapFile(Display *, Drawable, char *,
+--- mirrormagic-2.0.2.orig/src/libgame/sdl.h
++++ mirrormagic-2.0.2/src/libgame/sdl.h
+@@ -314,20 +314,20 @@
+
+ /* SDL function definitions */
+
+-inline void SDLInitVideoDisplay(void);
+-inline void SDLInitVideoBuffer(DrawBuffer **, DrawWindow **, boolean);
+-inline boolean SDLSetVideoMode(DrawBuffer **, boolean);
+-inline void SDLCopyArea(Bitmap *, Bitmap *, int, int, int, int, int, int, int);
+-inline void SDLFillRectangle(Bitmap *, int, int, int, int, unsigned int);
+-inline void SDLDrawSimpleLine(Bitmap *, int, int, int, int, unsigned int);
+-inline void SDLDrawLine(Bitmap *, int, int, int, int, Uint32);
+-inline Pixel SDLGetPixel(Bitmap *, int, int);
++extern inline void SDLInitVideoDisplay(void);
++extern inline void SDLInitVideoBuffer(DrawBuffer **, DrawWindow **, boolean);
++extern inline boolean SDLSetVideoMode(DrawBuffer **, boolean);
++extern inline void SDLCopyArea(Bitmap *, Bitmap *, int, int, int, int, int, int, int);
++extern inline void SDLFillRectangle(Bitmap *, int, int, int, int, unsigned int);
++extern inline void SDLDrawSimpleLine(Bitmap *, int, int, int, int, unsigned int);
++extern inline void SDLDrawLine(Bitmap *, int, int, int, int, Uint32);
++extern inline Pixel SDLGetPixel(Bitmap *, int, int);
+
+ Bitmap *SDLLoadImage(char *);
+
+-inline void SDLOpenAudio(void);
+-inline void SDLCloseAudio(void);
++extern inline void SDLOpenAudio(void);
++extern inline void SDLCloseAudio(void);
+
+-inline void SDLNextEvent(Event *);
++extern inline void SDLNextEvent(Event *);
+
+ #endif /* SDL_H */
+--- mirrormagic-2.0.2.orig/src/libgame/system.c
++++ mirrormagic-2.0.2/src/libgame/system.c
+@@ -172,12 +172,12 @@
+ /* video functions */
+ /* ========================================================================= */
+
+-inline static int GetRealDepth(int depth)
++static int GetRealDepth(int depth)
+ {
+ return (depth == DEFAULT_DEPTH ? video.default_depth : depth);
+ }
+
+-inline void InitVideoDisplay(void)
++void InitVideoDisplay(void)
+ {
+ #if defined(TARGET_SDL)
+ SDLInitVideoDisplay();
+@@ -186,7 +186,7 @@
+ #endif
+ }
+
+-inline void CloseVideoDisplay(void)
++void CloseVideoDisplay(void)
+ {
+ KeyboardAutoRepeatOn();
+
+@@ -198,7 +198,7 @@
+ #endif
+ }
+
+-inline void InitVideoBuffer(DrawBuffer **backbuffer, DrawWindow **window,
++void InitVideoBuffer(DrawBuffer **backbuffer, DrawWindow **window,
+ int width, int height, int depth,
+ boolean fullscreen)
+ {
+@@ -215,7 +215,7 @@
+ #endif
+ }
+
+-inline Bitmap *CreateBitmapStruct(void)
++Bitmap *CreateBitmapStruct(void)
+ {
+ #ifdef TARGET_SDL
+ return checked_calloc(sizeof(struct SDLSurfaceInfo));
+@@ -224,7 +224,7 @@
+ #endif
+ }
+
+-inline Bitmap *CreateBitmap(int width, int height, int depth)
++Bitmap *CreateBitmap(int width, int height, int depth)
+ {
+ Bitmap *new_bitmap = CreateBitmapStruct();
+ int real_depth = GetRealDepth(depth);
+@@ -265,7 +265,7 @@
+ return new_bitmap;
+ }
+
+-inline void FreeBitmap(Bitmap *bitmap)
++void FreeBitmap(Bitmap *bitmap)
+ {
+ if (bitmap == NULL)
+ return;
+@@ -287,7 +287,7 @@
+ free(bitmap);
+ }
+
+-inline void CloseWindow(DrawWindow *window)
++void CloseWindow(DrawWindow *window)
+ {
+ #ifdef TARGET_X11
+ if (window->drawable)
+@@ -300,7 +300,7 @@
+ #endif
+ }
+
+-inline void BlitBitmap(Bitmap *src_bitmap, Bitmap *dst_bitmap,
++void BlitBitmap(Bitmap *src_bitmap, Bitmap *dst_bitmap,
+ int src_x, int src_y,
+ int width, int height,
+ int dst_x, int dst_y)
+@@ -314,7 +314,7 @@
+ #endif
+ }
+
+-inline void ClearRectangle(Bitmap *bitmap, int x, int y, int width, int height)
++void ClearRectangle(Bitmap *bitmap, int x, int y, int width, int height)
+ {
+ #ifdef TARGET_SDL
+ SDLFillRectangle(bitmap, x, y, width, height, 0x000000);
+@@ -329,7 +329,7 @@
+ #endif
+ #endif
+
+-inline void SetClipMask(Bitmap *bitmap, GC clip_gc, Pixmap clip_pixmap)
++void SetClipMask(Bitmap *bitmap, GC clip_gc, Pixmap clip_pixmap)
+ {
+ #ifdef TARGET_X11
+ if (clip_gc)
+@@ -343,7 +343,7 @@
+ #endif
+ }
+
+-inline void SetClipOrigin(Bitmap *bitmap, GC clip_gc, int clip_x, int clip_y)
++void SetClipOrigin(Bitmap *bitmap, GC clip_gc, int clip_x, int clip_y)
+ {
+ #ifdef TARGET_X11
+ if (clip_gc)
+@@ -357,7 +357,7 @@
+ #endif
+ }
+
+-inline void BlitBitmapMasked(Bitmap *src_bitmap, Bitmap *dst_bitmap,
++void BlitBitmapMasked(Bitmap *src_bitmap, Bitmap *dst_bitmap,
+ int src_x, int src_y,
+ int width, int height,
+ int dst_x, int dst_y)
+@@ -371,7 +371,7 @@
+ #endif
+ }
+
+-inline void DrawSimpleWhiteLine(Bitmap *bitmap, int from_x, int from_y,
++void DrawSimpleWhiteLine(Bitmap *bitmap, int from_x, int from_y,
+ int to_x, int to_y)
+ {
+ #ifdef TARGET_SDL
+@@ -384,7 +384,7 @@
+ }
+
+ #if !defined(TARGET_X11_NATIVE)
+-inline void DrawLine(Bitmap *bitmap, int from_x, int from_y,
++void DrawLine(Bitmap *bitmap, int from_x, int from_y,
+ int to_x, int to_y, Pixel pixel, int line_width)
+ {
+ int x, y;
+@@ -414,7 +414,7 @@
+ }
+ #endif
+
+-inline void DrawLines(Bitmap *bitmap, struct XY *points, int num_points,
++void DrawLines(Bitmap *bitmap, struct XY *points, int num_points,
+ Pixel pixel)
+ {
+ #if !defined(TARGET_X11_NATIVE)
+@@ -438,7 +438,7 @@
+ #endif
+ }
+
+-inline Pixel GetPixel(Bitmap *bitmap, int x, int y)
++Pixel GetPixel(Bitmap *bitmap, int x, int y)
+ {
+ #if defined(TARGET_SDL)
+ return SDLGetPixel(bitmap, x, y);
+@@ -458,7 +458,7 @@
+ #endif
+ }
+
+-inline Pixel GetPixelFromRGB(Bitmap *bitmap, unsigned int color_r,
++Pixel GetPixelFromRGB(Bitmap *bitmap, unsigned int color_r,
+ unsigned int color_g, unsigned int color_b)
+ {
+ Pixel pixel;
+@@ -481,7 +481,7 @@
+ return pixel;
+ }
+
+-inline Pixel GetPixelFromRGBcompact(Bitmap *bitmap, unsigned int color)
++Pixel GetPixelFromRGBcompact(Bitmap *bitmap, unsigned int color)
+ {
+ unsigned int color_r = (color >> 16) & 0xff;
+ unsigned int color_g = (color >> 8) & 0xff;
+@@ -491,7 +491,7 @@
+ }
+
+ /* execute all pending screen drawing operations */
+-inline void FlushDisplay(void)
++void FlushDisplay(void)
+ {
+ #ifndef TARGET_SDL
+ XFlush(display);
+@@ -499,14 +499,14 @@
+ }
+
+ /* execute and wait for all pending screen drawing operations */
+-inline void SyncDisplay(void)
++void SyncDisplay(void)
+ {
+ #ifndef TARGET_SDL
+ XSync(display, FALSE);
+ #endif
+ }
+
+-inline void KeyboardAutoRepeatOn(void)
++void KeyboardAutoRepeatOn(void)
+ {
+ #ifdef TARGET_SDL
+ SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY / 2,
+@@ -518,7 +518,7 @@
+ #endif
+ }
+
+-inline void KeyboardAutoRepeatOff(void)
++void KeyboardAutoRepeatOff(void)
+ {
+ #ifdef TARGET_SDL
+ SDL_EnableKeyRepeat(0, SDL_DEFAULT_REPEAT_INTERVAL);
+@@ -529,7 +529,7 @@
+ #endif
+ }
+
+-inline boolean PointerInWindow(DrawWindow *window)
++boolean PointerInWindow(DrawWindow *window)
+ {
+ #ifdef TARGET_SDL
+ return TRUE;
+@@ -546,7 +546,7 @@
+ #endif
+ }
+
+-inline boolean SetVideoMode(boolean fullscreen)
++boolean SetVideoMode(boolean fullscreen)
+ {
+ #ifdef TARGET_SDL
+ return SDLSetVideoMode(&backbuffer, fullscreen);
+@@ -567,7 +567,7 @@
+ #endif
+ }
+
+-inline boolean ChangeVideoModeIfNeeded(boolean fullscreen)
++boolean ChangeVideoModeIfNeeded(boolean fullscreen)
+ {
+ #ifdef TARGET_SDL
+ if ((fullscreen && !video.fullscreen_enabled && video.fullscreen_available)||
+@@ -600,7 +600,7 @@
+ /* audio functions */
+ /* ========================================================================= */
+
+-inline void OpenAudio(void)
++void OpenAudio(void)
+ {
+ /* always start with reliable default values */
+ audio.sound_available = FALSE;
+@@ -627,7 +627,7 @@
+ #endif
+ }
+
+-inline void CloseAudio(void)
++void CloseAudio(void)
+ {
+ #if defined(TARGET_SDL)
+ SDLCloseAudio();
+@@ -640,7 +640,7 @@
+ audio.sound_enabled = FALSE;
+ }
+
+-inline void SetAudioMode(boolean enabled)
++void SetAudioMode(boolean enabled)
+ {
+ if (!audio.sound_available)
+ return;
+@@ -653,7 +653,7 @@
+ /* event functions */
+ /* ========================================================================= */
+
+-inline void InitEventFilter(EventFilter filter_function)
++void InitEventFilter(EventFilter filter_function)
+ {
+ #ifdef TARGET_SDL
+ /* set event filter to filter out certain events */
+@@ -661,7 +661,7 @@
+ #endif
+ }
+
+-inline boolean PendingEvent(void)
++boolean PendingEvent(void)
+ {
+ #ifdef TARGET_SDL
+ return (SDL_PollEvent(NULL) ? TRUE : FALSE);
+@@ -670,7 +670,7 @@
+ #endif
+ }
+
+-inline void NextEvent(Event *event)
++void NextEvent(Event *event)
+ {
+ #ifdef TARGET_SDL
+ SDLNextEvent(event);
+@@ -679,7 +679,7 @@
+ #endif
+ }
+
+-inline Key GetEventKey(KeyEvent *event, boolean with_modifiers)
++Key GetEventKey(KeyEvent *event, boolean with_modifiers)
+ {
+ #ifdef TARGET_SDL
+ #if 0
+@@ -707,7 +707,7 @@
+ #endif
+ }
+
+-inline boolean CheckCloseWindowEvent(ClientMessageEvent *event)
++boolean CheckCloseWindowEvent(ClientMessageEvent *event)
+ {
+ if (event->type != EVENT_CLIENTMESSAGE)
+ return FALSE;
+@@ -724,7 +724,7 @@
+ }
+
+
+-inline void dummy(void)
++void dummy(void)
+ {
+ #ifdef TARGET_SDL
+ #else
+--- mirrormagic-2.0.2.orig/src/libgame/system.h
++++ mirrormagic-2.0.2/src/libgame/system.h
+@@ -278,41 +278,41 @@
+ void InitGfxDoor2Info(int, int, int, int);
+ void InitGfxScrollbufferInfo(int, int);
+
+-inline void InitVideoDisplay(void);
+-inline void CloseVideoDisplay(void);
+-inline void InitVideoBuffer(DrawBuffer **,DrawWindow **, int,int,int, boolean);
+-inline Bitmap *CreateBitmapStruct(void);
+-inline Bitmap *CreateBitmap(int, int, int);
+-inline void FreeBitmap(Bitmap *);
+-inline void BlitBitmap(Bitmap *, Bitmap *, int, int, int, int, int, int);
+-inline void ClearRectangle(Bitmap *, int, int, int, int);
+-inline void SetClipMask(Bitmap *, GC, Pixmap);
+-inline void SetClipOrigin(Bitmap *, GC, int, int);
+-inline void BlitBitmapMasked(Bitmap *, Bitmap *, int, int, int, int, int, int);
+-inline void DrawSimpleWhiteLine(Bitmap *, int, int, int, int);
+-inline void DrawLines(Bitmap *, struct XY *, int, Pixel);
+-inline Pixel GetPixel(Bitmap *, int, int);
+-inline Pixel GetPixelFromRGB(Bitmap *, unsigned int,unsigned int,unsigned int);
+-inline Pixel GetPixelFromRGBcompact(Bitmap *, unsigned int);
+-
+-inline void FlushDisplay(void);
+-inline void SyncDisplay(void);
+-inline void KeyboardAutoRepeatOn(void);
+-inline void KeyboardAutoRepeatOff(void);
+-inline boolean PointerInWindow(DrawWindow *);
+-inline boolean SetVideoMode(boolean);
+-inline boolean ChangeVideoModeIfNeeded(boolean);
++extern inline void InitVideoDisplay(void);
++extern inline void CloseVideoDisplay(void);
++extern inline void InitVideoBuffer(DrawBuffer **,DrawWindow **, int,int,int, boolean);
++extern inline Bitmap *CreateBitmapStruct(void);
++extern inline Bitmap *CreateBitmap(int, int, int);
++extern inline void FreeBitmap(Bitmap *);
++extern inline void BlitBitmap(Bitmap *, Bitmap *, int, int, int, int, int, int);
++extern inline void ClearRectangle(Bitmap *, int, int, int, int);
++extern inline void SetClipMask(Bitmap *, GC, Pixmap);
++extern inline void SetClipOrigin(Bitmap *, GC, int, int);
++extern inline void BlitBitmapMasked(Bitmap *, Bitmap *, int, int, int, int, int, int);
++extern inline void DrawSimpleWhiteLine(Bitmap *, int, int, int, int);
++extern inline void DrawLines(Bitmap *, struct XY *, int, Pixel);
++extern inline Pixel GetPixel(Bitmap *, int, int);
++extern inline Pixel GetPixelFromRGB(Bitmap *, unsigned int,unsigned int,unsigned int);
++extern inline Pixel GetPixelFromRGBcompact(Bitmap *, unsigned int);
++
++extern inline void FlushDisplay(void);
++extern inline void SyncDisplay(void);
++extern inline void KeyboardAutoRepeatOn(void);
++extern inline void KeyboardAutoRepeatOff(void);
++extern inline boolean PointerInWindow(DrawWindow *);
++extern inline boolean SetVideoMode(boolean);
++extern inline boolean ChangeVideoModeIfNeeded(boolean);
+
+ Bitmap *LoadImage(char *);
+
+-inline void OpenAudio(void);
+-inline void CloseAudio(void);
+-inline void SetAudioMode(boolean);
+-
+-inline void InitEventFilter(EventFilter);
+-inline boolean PendingEvent(void);
+-inline void NextEvent(Event *event);
+-inline Key GetEventKey(KeyEvent *, boolean);
+-inline boolean CheckCloseWindowEvent(ClientMessageEvent *);
++extern inline void OpenAudio(void);
++extern inline void CloseAudio(void);
++extern inline void SetAudioMode(boolean);
++
++extern inline void InitEventFilter(EventFilter);
++extern inline boolean PendingEvent(void);
++extern inline void NextEvent(Event *event);
++extern inline Key GetEventKey(KeyEvent *, boolean);
++extern inline boolean CheckCloseWindowEvent(ClientMessageEvent *);
+
+ #endif /* SYSTEM_H */
+--- mirrormagic-2.0.2.orig/src/libgame/x11.c
++++ mirrormagic-2.0.2/src/libgame/x11.c
+@@ -21,7 +21,7 @@
+ static void X11InitDisplay();
+ static DrawWindow *X11InitWindow();
+
+-inline void X11InitVideoDisplay(void)
++void X11InitVideoDisplay(void)
+ {
+ /* initialize X11 video */
+ X11InitDisplay();
+@@ -30,7 +30,7 @@
+ video.default_depth = XDefaultDepth(display, screen);
+ }
+
+-inline void X11InitVideoBuffer(DrawBuffer **backbuffer, DrawWindow **window)
++void X11InitVideoBuffer(DrawBuffer **backbuffer, DrawWindow **window)
+ {
+ *window = X11InitWindow();
+
+--- mirrormagic-2.0.2.orig/src/libgame/x11.h
++++ mirrormagic-2.0.2/src/libgame/x11.h
+@@ -286,8 +286,8 @@
+
+ /* X11 function definitions */
+
+-inline void X11InitVideoDisplay(void);
+-inline void X11InitVideoBuffer(DrawBuffer **, DrawWindow **);
++extern inline void X11InitVideoDisplay(void);
++extern inline void X11InitVideoBuffer(DrawBuffer **, DrawWindow **);
+ Bitmap *X11LoadImage(char *);
+
+ #endif /* X11_H */
diff --git a/games-puzzle/mirrormagic/files/mirrormagic-2.0.2-parallel.patch b/games-puzzle/mirrormagic/files/mirrormagic-2.0.2-parallel.patch
new file mode 100644
index 000000000000..9b538a688816
--- /dev/null
+++ b/games-puzzle/mirrormagic/files/mirrormagic-2.0.2-parallel.patch
@@ -0,0 +1,11 @@
+--- src/Makefile.old
++++ src/Makefile
+@@ -146,7 +146,7 @@
+ endif
+
+
+-all: libgame_dir $(PROGNAME)
++all: $(PROGNAME)
+
+ $(PROGNAME): $(LIBGAME) $(OBJS) $(ICON)
+ $(CC) $(PROFILING) $(OBJS) $(ICON) $(LIBGAME) $(LDFLAGS) -o $(PROGNAME)
diff --git a/games-puzzle/mirrormagic/files/mirrormagic.xpm b/games-puzzle/mirrormagic/files/mirrormagic.xpm
new file mode 100644
index 000000000000..4e98696d3ef1
--- /dev/null
+++ b/games-puzzle/mirrormagic/files/mirrormagic.xpm
@@ -0,0 +1,292 @@
+/* XPM */
+static char * mirrormagic_xpm[] = {
+"32 32 257 2",
+" c None",
+". c #000000",
+"+ c #999999",
+"@ c #77AAFF",
+"# c #4C2208",
+"$ c #6E4C08",
+"% c #7F7F7F",
+"& c #AACCFF",
+"* c #777777",
+"= c #BB6622",
+"- c #0000CC",
+"; c #994411",
+"> c #00FF00",
+", c #EECC11",
+"' c #5D5D5D",
+") c #447F44",
+"! c #555555",
+"~ c #0000AA",
+"{ c #3B3B3B",
+"] c #009900",
+"^ c #990000",
+"/ c #007F00",
+"( c #005500",
+"_ c #CCCCCC",
+": c #CC0000",
+"< c #7F0000",
+"[ c #19447F",
+"} c #AAAAAA",
+"| c #FF0000",
+"1 c #331900",
+"2 c #888888",
+"3 c #000055",
+"4 c #663300",
+"5 c #6E6E6E",
+"6 c #666666",
+"7 c #DD9911",
+"8 c #5D3311",
+"9 c #00337F",
+"0 c #FFFFFF",
+"a c #00CC00",
+"b c #4C4C4C",
+"c c #FFFF00",
+"d c #444444",
+"e c #00AA00",
+"f c #7F7F00",
+"g c #DDDDDD",
+"h c #0066FF",
+"i c #006600",
+"j c #004C00",
+"k c #776608",
+"l c #3388FF",
+"m c #BBBBBB",
+"n c #0000FF",
+"o c #000000",
+"p c #000000",
+"q c #000000",
+"r c #000000",
+"s c #000000",
+"t c #000000",
+"u c #000000",
+"v c #000000",
+"w c #000000",
+"x c #000000",
+"y c #000000",
+"z c #000000",
+"A c #000000",
+"B c #000000",
+"C c #000000",
+"D c #000000",
+"E c #000000",
+"F c #000000",
+"G c #000000",
+"H c #000000",
+"I c #000000",
+"J c #000000",
+"K c #000000",
+"L c #000000",
+"M c #000000",
+"N c #000000",
+"O c #000000",
+"P c #000000",
+"Q c #000000",
+"R c #000000",
+"S c #000000",
+"T c #000000",
+"U c #000000",
+"V c #000000",
+"W c #000000",
+"X c #000000",
+"Y c #000000",
+"Z c #000000",
+"` c #000000",
+" . c #000000",
+".. c #000000",
+"+. c #000000",
+"@. c #000000",
+"#. c #000000",
+"$. c #000000",
+"%. c #000000",
+"&. c #000000",
+"*. c #000000",
+"=. c #000000",
+"-. c #000000",
+";. c #000000",
+">. c #000000",
+",. c #000000",
+"'. c #000000",
+"). c #000000",
+"!. c #000000",
+"~. c #000000",
+"{. c #000000",
+"]. c #000000",
+"^. c #000000",
+"/. c #000000",
+"(. c #000000",
+"_. c #000000",
+":. c #000000",
+"<. c #000000",
+"[. c #000000",
+"}. c #000000",
+"|. c #000000",
+"1. c #000000",
+"2. c #000000",
+"3. c #000000",
+"4. c #000000",
+"5. c #000000",
+"6. c #000000",
+"7. c #000000",
+"8. c #000000",
+"9. c #000000",
+"0. c #000000",
+"a. c #000000",
+"b. c #000000",
+"c. c #000000",
+"d. c #000000",
+"e. c #000000",
+"f. c #000000",
+"g. c #000000",
+"h. c #000000",
+"i. c #000000",
+"j. c #000000",
+"k. c #000000",
+"l. c #000000",
+"m. c #000000",
+"n. c #000000",
+"o. c #000000",
+"p. c #000000",
+"q. c #000000",
+"r. c #000000",
+"s. c #000000",
+"t. c #000000",
+"u. c #000000",
+"v. c #000000",
+"w. c #000000",
+"x. c #000000",
+"y. c #000000",
+"z. c #000000",
+"A. c #000000",
+"B. c #000000",
+"C. c #000000",
+"D. c #000000",
+"E. c #000000",
+"F. c #000000",
+"G. c #000000",
+"H. c #000000",
+"I. c #000000",
+"J. c #000000",
+"K. c #000000",
+"L. c #000000",
+"M. c #000000",
+"N. c #000000",
+"O. c #000000",
+"P. c #000000",
+"Q. c #000000",
+"R. c #000000",
+"S. c #000000",
+"T. c #000000",
+"U. c #000000",
+"V. c #000000",
+"W. c #000000",
+"X. c #000000",
+"Y. c #000000",
+"Z. c #000000",
+"`. c #000000",
+" + c #000000",
+".+ c #000000",
+"++ c #000000",
+"@+ c #000000",
+"#+ c #000000",
+"$+ c #000000",
+"%+ c #000000",
+"&+ c #000000",
+"*+ c #000000",
+"=+ c #000000",
+"-+ c #000000",
+";+ c #000000",
+">+ c #000000",
+",+ c #000000",
+"'+ c #000000",
+")+ c #000000",
+"!+ c #000000",
+"~+ c #000000",
+"{+ c #000000",
+"]+ c #000000",
+"^+ c #000000",
+"/+ c #000000",
+"(+ c #000000",
+"_+ c #000000",
+":+ c #000000",
+"<+ c #000000",
+"[+ c #000000",
+"}+ c #000000",
+"|+ c #000000",
+"1+ c #000000",
+"2+ c #000000",
+"3+ c #000000",
+"4+ c #000000",
+"5+ c #000000",
+"6+ c #000000",
+"7+ c #000000",
+"8+ c #000000",
+"9+ c #000000",
+"0+ c #000000",
+"a+ c #000000",
+"b+ c #000000",
+"c+ c #000000",
+"d+ c #000000",
+"e+ c #000000",
+"f+ c #000000",
+"g+ c #000000",
+"h+ c #000000",
+"i+ c #000000",
+"j+ c #000000",
+"k+ c #000000",
+"l+ c #000000",
+"m+ c #000000",
+"n+ c #000000",
+"o+ c #000000",
+"p+ c #000000",
+"q+ c #000000",
+"r+ c #000000",
+"s+ c #000000",
+"t+ c #000000",
+"u+ c #000000",
+"v+ c #000000",
+"w+ c #000000",
+"x+ c #000000",
+"y+ c #000000",
+"z+ c #000000",
+"A+ c #000000",
+"B+ c #000000",
+"C+ c #000000",
+"D+ c #000000",
+"E+ c #000000",
+"F+ c #000000",
+"G+ c #000000",
+"H+ c #000000",
+" ",
+" - n n l h h : n - ~ ",
+" n - - l l h n n n n - ",
+" , 7 l l h h n : n n n n ~ ~ 7 , ",
+" c 7 = h l h h n n n n n - - ~ = 7 c ",
+" c , 7 , 7 ~ h h h n n n - - ~ ~ ~ 7 , 7 , c ",
+" , , 7 7 = ~ h h n n - - ~ ~ ~ ~ ~ = 7 7 , , ",
+" , 7 = - ~ l _ } b 4 4 b b b ~ ~ - = 7 , ",
+" ~ ~ 4 4 4 ~ m g 1 1 = = 1 1 d d h ~ 4 4 ~ ~ ",
+" ~ ~ ~ ~ 4 4 4 l g g 7 7 , 7 ; ; d { @ h 4 4 4 ~ ~ ~ ",
+" ~ ~ ~ ~ h h l l 0 g 7 7 , 7 ; ; d { @ @ h n 4 ~ ~ ~ n ",
+" @ @ @ @ @ @ l l 0 g } 7 , , ; d d { @ l h h n n n - - ",
+" @ @ | @ @ l 0 2 0 g } = = d d d { @ l h n n n n - - ",
+" @ @ & & @ @ l g + _ 2 2 6 6 ! @ @ l h n ^ n - - ",
+" @ & & @ @ l l } 2 _ _ 2 2 @ @ h h n n n n - - ",
+" @ @ @ | l l + _ _ } _ l @ h h h n n n - - ",
+" @ @ @ @ l l + _ _ _ } _ @ h h n n n n - - ",
+" @ @ @ l l h } _ _ } } h h h n n n - - ",
+" @ @ @ l l h h _ _ } } } h n ^ n - - - ",
+" @ n h h h h } _ _ } 2 2 n n - - - ",
+" @ n n h h h } _ _ _ 2 ~ n n ~ - - ",
+" n n n n | h ~ } } } ~ ~ - ~ ~ ~ - ",
+" h n n n h h h - ~ } } } - - ^ ~ ~ - ",
+" h n n h h h n - n - - * * ~ ~ ~ - ",
+" h n h h h h n - n - - - - ~ ~ ~ - - ",
+" h l h h h l h h n n : - - - ~ ~ ~ ~ ^ - ",
+" h @ h | l l h n n n - - - ~ ~ ~ ~ ~ ~ - ",
+" n l @ l l l l h n n - ~ - - ~ ~ ~ ^ ~ ~ ~ - ",
+" n l @ l l l h n n - - ~ ~ - ~ ~ ~ ~ ~ ~ ~ - ",
+" n | h h h = ; ; 4 ~ - ~ ~ ~ - = ; ; 4 ~ ~ ~ ^ - ",
+" n - h h = = ; ; 4 4 ~ ~ ~ ~ = = ; ; 4 4 ~ ~ ~ - ",
+" "};
diff --git a/games-puzzle/mirrormagic/metadata.xml b/games-puzzle/mirrormagic/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-puzzle/mirrormagic/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-puzzle/mirrormagic/mirrormagic-2.0.2-r1.ebuild b/games-puzzle/mirrormagic/mirrormagic-2.0.2-r1.ebuild
new file mode 100644
index 000000000000..acc743eb9cbd
--- /dev/null
+++ b/games-puzzle/mirrormagic/mirrormagic-2.0.2-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils toolchain-funcs games
+
+DESCRIPTION="a game like Deflektor (C 64) or Mindbender (Amiga)"
+HOMEPAGE="http://www.artsoft.org/mirrormagic/"
+SRC_URI="http://www.artsoft.org/RELEASES/unix/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="sdl"
+
+RDEPEND="!sdl? ( x11-libs/libX11 )
+ sdl? (
+ media-libs/libsdl[video]
+ media-libs/sdl-mixer
+ media-libs/sdl-image
+ )"
+DEPEND="${RDEPEND}
+ !sdl? ( x11-libs/libXt )"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-gcc41.patch \
+ "${FILESDIR}"/${P}-parallel.patch \
+ "${FILESDIR}"/${P}-64bit.patch \
+ "${FILESDIR}"/${P}-gcc5.patch \
+ "${FILESDIR}"/${P}-editor.patch
+ rm -f ${PN} || die
+}
+
+src_compile() {
+ emake \
+ -C src \
+ CC="$(tc-getCC)" \
+ AR="$(tc-getAR)" \
+ RANLIB="$(tc-getRANLIB)" \
+ OPTIONS="${CFLAGS}" \
+ EXTRA_LDFLAGS="${LDFLAGS}" \
+ RO_GAME_DIR="${GAMES_DATADIR}"/${PN} \
+ RW_GAME_DIR="${GAMES_STATEDIR}"/${PN} \
+ TARGET=$(usex sdl sdl x11)
+}
+
+src_install() {
+ dogamesbin ${PN}
+ insinto "${GAMES_DATADIR}"/${PN}
+ doins -r graphics levels music sounds
+ doicon "${FILESDIR}"/${PN}.xpm
+ make_desktop_entry ${PN} "Mirror Magic II"
+ dodoc CHANGES CREDITS README TODO
+ prepgamesdirs
+}