mirror of
https://github.com/yann64/haikuports.git
synced 2026-03-19 01:46:00 +01:00
sdlinvaders: fix recipe (#6490)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From fbe17a7a031bfc9ce9efd6c4d0fdcbc81c329232 Mon Sep 17 00:00:00 2001
|
||||
From dfeebcbe34b05ff5a8a343b7e89bb1ff713ed210 Mon Sep 17 00:00:00 2001
|
||||
From: Victor Gamper <victor@wenzeslaus.de>
|
||||
Date: Sun, 12 Dec 2021 22:33:39 +0100
|
||||
Subject: switch the workdir to the data directory
|
||||
@@ -48,7 +48,7 @@ index f4f650b..0928de6 100644
|
||||
2.30.2
|
||||
|
||||
|
||||
From dd67e242d625404c5249081cca20bf59cd7ea2d5 Mon Sep 17 00:00:00 2001
|
||||
From a541928fe0f484bbd288923254f3892a71556f34 Mon Sep 17 00:00:00 2001
|
||||
From: Victor Gamper <victor@wenzeslaus.de>
|
||||
Date: Mon, 13 Dec 2021 17:53:22 +0100
|
||||
Subject: Use find_directory instead of hard coded paths
|
||||
@@ -130,3 +130,74 @@ index 0928de6..8c4a3ad 100644
|
||||
--
|
||||
2.30.2
|
||||
|
||||
|
||||
From ed93c823882892986dee98e572fce74fad95477c Mon Sep 17 00:00:00 2001
|
||||
From: Victor Gamper <victor@wenzeslaus.de>
|
||||
Date: Wed, 22 Dec 2021 17:55:24 +0100
|
||||
Subject: fix build for gcc11
|
||||
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index cdd498f..3daa85d 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,5 +1,5 @@
|
||||
-CC=gcc -Wall -ansi -pedantic
|
||||
-CFLAGS=-g `sdl-config --cflags --libs` -Wall -ansi -pedantic -lSDL_image
|
||||
+CC=gcc -Wall -pedantic -frepo -fcommon
|
||||
+CFLAGS=-g `sdl-config --cflags --libs` -Wall -pedantic -lSDL_image
|
||||
SRC=main.c graphics.c SFont.c alien.c weapons.c music.c
|
||||
TARGET=SDLInvaders
|
||||
|
||||
--
|
||||
2.30.2
|
||||
|
||||
|
||||
From 95db0ae228050574fbb1df49194e35416db97bb7 Mon Sep 17 00:00:00 2001
|
||||
From: Victor Gamper <victor@wenzeslaus.de>
|
||||
Date: Thu, 23 Dec 2021 13:26:14 +0100
|
||||
Subject: disable fullscreen by default
|
||||
|
||||
|
||||
diff --git a/main.c b/main.c
|
||||
index 8c4a3ad..f32e4e4 100644
|
||||
--- a/main.c
|
||||
+++ b/main.c
|
||||
@@ -53,7 +53,11 @@ int sound = 0;
|
||||
#else
|
||||
int sound = 1;
|
||||
#endif
|
||||
-int fullscreen=1;
|
||||
+#ifdef __HAIKU__
|
||||
+int fullscreen=0;
|
||||
+#else
|
||||
+inf fullscreen=1;
|
||||
+#endif
|
||||
extern int wavenumber;
|
||||
int max_shots = INIT_MAX_SHOTS;
|
||||
extern int game_points;
|
||||
@@ -673,8 +677,13 @@ void TextHelp(char *argv[])
|
||||
{
|
||||
puts("The newest version can be obtained at http://www.sdlinvaders.de/\n");
|
||||
printf("Usage: %s [options]\n",argv[0]);
|
||||
+ #ifdef __HAIKU__
|
||||
+ puts(" [-f, --fullscreen] start in fullscreen mode");
|
||||
+ puts(" [-w, --windowed] start in windowed mode (default)");
|
||||
+ #else
|
||||
puts(" [-f, --fullscreen] start in fullscreen mode (default)");
|
||||
puts(" [-w, --windowed] start in windowed mode");
|
||||
+ #endif
|
||||
puts(" [-s, --nosound] start without sound");
|
||||
puts(" [-e, --easy] play in easy mode - only for wimps");
|
||||
puts(" [-h, --help] this text\n");
|
||||
@@ -853,6 +862,7 @@ int main(int argc, char *argv[])
|
||||
chdir(buffer);
|
||||
|
||||
/* set the highscore position */
|
||||
+ result = find_directory(B_SYSTEM_SETTINGS_DIRECTORY, volume, false, buffer, sizeof(buffer));
|
||||
highscore_file_path = malloc(strlen(buffer + strlen(HIGHSCORE_FILE) + 1));
|
||||
strcpy(highscore_file_path, buffer);
|
||||
strcat(highscore_file_path, HIGHSCORE_FILE);
|
||||
--
|
||||
2.30.2
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ DESCRIPTION="SDLInvaders is a game inspired by the arcade classic Space Invaders
|
||||
HOMEPAGE="https://sourceforge.net/projects/sdlinvaders/"
|
||||
COPYRIGHT="Niels Weber"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="1"
|
||||
REVISION="2"
|
||||
SOURCE_URI="https://master.dl.sourceforge.net/project/sdlinvaders/sdlinvaders/0.7.6/SDLInvaders-0.7.6.tar.bz2?viasf=1"
|
||||
CHECKSUM_SHA256="7646ce1d6f93e554f972f47529bcca01cb7228ccc6cd41fd5fa28d7e5e91fd75"
|
||||
SOURCE_FILENAME="SDLInvaders-0.7.6.tar.bz2"
|
||||
@@ -37,18 +37,11 @@ BUILD_REQUIRES="
|
||||
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:clang$secondaryArchSuffix
|
||||
cmd:make$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD() {
|
||||
if [ $targetArchitecture == "x86" ] || [ $targetArchitecture == "x86_gcc2" ]; then
|
||||
# for some reason, the x86 build doesn't like clang
|
||||
make
|
||||
else
|
||||
# use clang instead of gcc, as gcc fails to compile
|
||||
make CC=clang
|
||||
fi
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL() {
|
||||
|
||||
Reference in New Issue
Block a user