mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 03:30:05 +02:00
Add MirrorMagic.
This commit is contained in:
54
games-puzzle/mirrormagic/mirrormagic-2.0.2.recipe
Normal file
54
games-puzzle/mirrormagic/mirrormagic-2.0.2.recipe
Normal file
@@ -0,0 +1,54 @@
|
||||
SUMMARY="a game like Deflektor (C64) or Mindbender (Amiga) "
|
||||
HOMEPAGE="http://www.artsoft.org/mirrormagic/"
|
||||
LICENSE="GNU GPL v2"
|
||||
COPYRIGHT="1989-2003 Artsoft Entertainment"
|
||||
SRC_URI="http://www.artsoft.org/RELEASES/unix/mirrormagic/mirrormagic-2.0.2.tar.gz"
|
||||
#CHECKSUM_MD5="10c03c69d2df6bcae9d835d18215978f"
|
||||
REVISION="1"
|
||||
ARCHITECTURES="x86_gcc2"
|
||||
|
||||
PROVIDES="
|
||||
mirrormagic = $portVersion
|
||||
app:mirrormagic = $portVersion
|
||||
"
|
||||
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix >= $haikuVersion
|
||||
lib:libsdl$secondaryArchSuffix
|
||||
lib:libsdl_image$secondaryArchSuffix
|
||||
lib:libsdl_mixer$secondaryArchSuffix
|
||||
"
|
||||
BUILD_REQUIRES="
|
||||
devel:libsdl$secondaryArchSuffix
|
||||
devel:libsdl_image$secondaryArchSuffix
|
||||
devel:libsdl_mixer$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel >= $haikuVersion
|
||||
haiku_devel >= $haikuVersion
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
"
|
||||
|
||||
PATCHES="mirrormagic-2.0.2.patchset"
|
||||
BUILD()
|
||||
{
|
||||
# parallel build not available.
|
||||
make sdl
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
destDir="$appsDir/Mirror Magic"
|
||||
mkdir -p "$destDir"
|
||||
cp -r mirrormagic graphics levels music sounds "$destDir"
|
||||
addAppDeskbarSymlink "$destDir/mirrormagic" "Mirror Magic"
|
||||
}
|
||||
|
||||
# ----- DESCRIPTION -----------------------------------------------------------
|
||||
|
||||
DESCRIPTION="
|
||||
Make the Laser reach the target by rotating mirrors, but take care of not
|
||||
overheating.
|
||||
"
|
||||
106
games-puzzle/mirrormagic/patches/mirrormagic-2.0.2.patchset
Normal file
106
games-puzzle/mirrormagic/patches/mirrormagic-2.0.2.patchset
Normal file
@@ -0,0 +1,106 @@
|
||||
From 5e9e47e0aa86949c07c14a0012180614695ba74b Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Mon, 20 Jan 2014 20:59:52 +0100
|
||||
Subject: Remove hardcoded -lm
|
||||
|
||||
|
||||
diff --git a/src/Makefile b/src/Makefile
|
||||
index 6ab93a5..6944437 100644
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -113,7 +113,7 @@ OPTIONS = -O3 -Wall
|
||||
endif
|
||||
|
||||
CFLAGS = $(OPTIONS) $(SYS_CFLAGS) $(CONFIG)
|
||||
-LDFLAGS = $(SYS_LDFLAGS) $(EXTRA_LDFLAGS) -lm
|
||||
+LDFLAGS = $(SYS_LDFLAGS) $(EXTRA_LDFLAGS)
|
||||
|
||||
|
||||
SRCS = main.c \
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
|
||||
From 587046f039a7a29ed96383d9d73b1d605a398701 Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Mon, 20 Jan 2014 21:07:38 +0100
|
||||
Subject: Have MirrorMagic looks for files in its own dir.
|
||||
|
||||
|
||||
diff --git a/src/main.c b/src/main.c
|
||||
index 0e3f90e..7a2cfaa 100644
|
||||
--- a/src/main.c
|
||||
+++ b/src/main.c
|
||||
@@ -620,6 +620,8 @@ int num_element_info = sizeof(element_info)/sizeof(char *);
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
+ chdir(dirname(argv[0]));
|
||||
+
|
||||
InitCommandName(argv[0]);
|
||||
InitExitFunction(CloseAllAndExit);
|
||||
InitPlatformDependantStuff();
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
|
||||
From 78ab3228259485da50b6a78fa66d47ea08ae6f4f Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Mon, 20 Jan 2014 21:29:11 +0100
|
||||
Subject: Fix settings dir.
|
||||
|
||||
|
||||
diff --git a/src/init.c b/src/init.c
|
||||
index 923da8c..e287635 100644
|
||||
--- a/src/init.c
|
||||
+++ b/src/init.c
|
||||
@@ -23,6 +23,10 @@
|
||||
#include "tools.h"
|
||||
#include "files.h"
|
||||
|
||||
+#if __HAIKU__
|
||||
+#include <storage/FindDirectory.h>
|
||||
+#endif
|
||||
+
|
||||
static void InitPlayerInfo(void);
|
||||
static void InitLevelInfo(void);
|
||||
static void InitSound(void);
|
||||
@@ -33,10 +37,20 @@ static void InitElementProperties(void);
|
||||
|
||||
void OpenAll(void)
|
||||
{
|
||||
+#if __HAIKU__
|
||||
+ char dir[256];
|
||||
+ find_directory(B_USER_SETTINGS_DIRECTORY, 0, true, dir, sizeof(dir));
|
||||
+ strcat(dir, "/mirrormagic");
|
||||
+ InitProgramInfo(dir,
|
||||
+ PROGRAM_TITLE_STRING, WINDOW_TITLE_STRING,
|
||||
+ ICON_TITLE_STRING, X11_ICON_FILENAME, X11_ICONMASK_FILENAME,
|
||||
+ MSDOS_POINTER_FILENAME);
|
||||
+#else
|
||||
InitProgramInfo(UNIX_USERDATA_DIRECTORY,
|
||||
PROGRAM_TITLE_STRING, WINDOW_TITLE_STRING,
|
||||
ICON_TITLE_STRING, X11_ICON_FILENAME, X11_ICONMASK_FILENAME,
|
||||
MSDOS_POINTER_FILENAME);
|
||||
+#endif
|
||||
|
||||
InitPlayerInfo();
|
||||
|
||||
diff --git a/src/libgame/misc.c b/src/libgame/misc.c
|
||||
index 7a55d94..a46a298 100644
|
||||
--- a/src/libgame/misc.c
|
||||
+++ b/src/libgame/misc.c
|
||||
@@ -348,7 +348,9 @@ char *getRealName()
|
||||
|
||||
char *getHomeDir()
|
||||
{
|
||||
-#if defined(PLATFORM_UNIX)
|
||||
+#if __HAIKU__
|
||||
+ return "";
|
||||
+#elif defined(PLATFORM_UNIX)
|
||||
static char *home_dir = NULL;
|
||||
|
||||
if (!home_dir)
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
Reference in New Issue
Block a user