From db7d5da29ea7fe0e732d7d7155c7aad9d4029f83 Mon Sep 17 00:00:00 2001 From: Schrijvers Luc Date: Sat, 31 Aug 2019 00:05:30 +0200 Subject: [PATCH] gemdropx, fix references to libSDL* (#4147) --- games-puzzle/gemdropx/gemdropx-0.9.recipe | 45 +++++++++---------- .../gemdropx/patches/gemdropx-0.9.patch | 42 ----------------- .../gemdropx/patches/gemdropx-0.9.patchset | 42 +++++++++++++++++ 3 files changed, 64 insertions(+), 65 deletions(-) delete mode 100644 games-puzzle/gemdropx/patches/gemdropx-0.9.patch create mode 100644 games-puzzle/gemdropx/patches/gemdropx-0.9.patchset diff --git a/games-puzzle/gemdropx/gemdropx-0.9.recipe b/games-puzzle/gemdropx/gemdropx-0.9.recipe index 9da4574e7..a01c92d3c 100644 --- a/games-puzzle/gemdropx/gemdropx-0.9.recipe +++ b/games-puzzle/gemdropx/gemdropx-0.9.recipe @@ -1,40 +1,38 @@ -SUMMARY="Gem Drop X is a fast-paced puzzle game" -DESCRIPTION=" -Gem Drop X is a fast-paced puzzle game where it is your job to clear the \ -screen of gems before they squash you! (You are at the bottom, they are at the \ -top, and they keep coming!)\ +SUMMARY="A fast-paced puzzle game" +DESCRIPTION="Gem Drop X is a fast-paced puzzle game where it is your job to \ +clear the screen of gems before they squash you! (You are at the bottom, they \ +are at the top, and they keep coming!) \ Gem Drop X was directly ported from the original GemDrop for the Atari 8-bit, \ -which was based on "Magical Drop III" by SNK.\ +which was based on \"Magical Drop III\" by SNK. \ You grab gems (up to 10) of the same color and use them to knock more gems \ off the screen. Match 3 or more of the same color in a column and >BAM!< \ they explode! Any adjacent gems of the same color also explode, causing a \ -chain reaction that might cover the entire screen!\ -The more gems that disappear with one shot, the higher the score you get! -" +chain reaction that might cover the entire screen! \ +The more gems that disappear with one shot, the higher the score you get!" HOMEPAGE="http://www.newbreedsoftware.com/gemdropx/" COPYRIGHT="2002 Bill Kendrick" LICENSE="GNU GPL v2" -REVISION="1" +REVISION="2" SOURCE_URI="ftp://ftp.tuxpaint.org/unix/x/gemdropx/src/gemdropx-$portVersion.tar.gz" CHECKSUM_SHA256="e50495d292a1d456c28044efbf07c16d8865f8d95e1caba86f4c5b2e3fb1d28f" -PATCHES="gemdropx-$portVersion.patch" +PATCHES="gemdropx-$portVersion.patchset" ARCHITECTURES="x86_gcc2 ?x86 ?x86_64" PROVIDES=" gemdropx = $portVersion - app:gemdropx = $portVersion + app:GemdropX = $portVersion " REQUIRES=" - haiku$secondaryArchSuffix - lib:libsdl - lib:libsdl_mixer + haiku + lib:libSDL_1.2 + lib:libSDL_mixer_1.2 " BUILD_REQUIRES=" - haiku${secondaryArchSuffix}_devel - devel:libsdl - devel:libsdl_mixer + haiku_devel + devel:libSDL + devel:libSDL_mixer " BUILD_PREREQUIRES=" cmd:gcc @@ -43,14 +41,15 @@ BUILD_PREREQUIRES=" BUILD() { - make + make DATA_PREFIX=$dataDir/gemdropx } INSTALL() { - mkdir -p $appsDir/GemdropX - cp -r data/ $appsDir/GemdropX - cp gemdropx $appsDir/GemdropX/gemdropx + mkdir -p $appsDir $dataDir/gemdropx + cp -r data/* $dataDir/gemdropx + cp gemdropx $appsDir + mv $appsDir/gemdropx $appsDir/GemdropX - addAppDeskbarSymlink $appsDir/GemdropX/gemdropx "GemdropX" + addAppDeskbarSymlink $appsDir/GemdropX } diff --git a/games-puzzle/gemdropx/patches/gemdropx-0.9.patch b/games-puzzle/gemdropx/patches/gemdropx-0.9.patch deleted file mode 100644 index 5c085005b..000000000 --- a/games-puzzle/gemdropx/patches/gemdropx-0.9.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- gemdropx-0.9/gemdropx.c.org 2014-10-19 08:12:42.397672448 +0200 -+++ gemdropx-0.9/gemdropx.c 2014-10-19 08:09:18.373555200 +0200 -@@ -29,6 +29,7 @@ - #include - #include - #include -+#include - - #ifndef EMBEDDED - #include -@@ -2560,7 +2561,10 @@ - SDL_version sdlver; - #endif - -- -+ #ifdef __HAIKU__ -+ chdir(dirname(argv[0])); -+ #endif -+ - no_music = 0; - - if (argc == 2) ---- gemdropx-0.9/Makefile.org 2014-10-19 08:51:57.785383424 +0200 -+++ gemdropx-0.9/Makefile 2014-10-19 08:51:18.383254528 +0200 -@@ -14,7 +14,7 @@ - # Added 'install' target (finally!): May 18, 2002 - - --DATA_PREFIX=/usr/local/share/gemdropx -+DATA_PREFIX=./data - SDL_CFLAGS := $(shell sdl-config --cflags) - SDL_LDFLAGS := $(shell sdl-config --libs) - CC=gcc -@@ -61,7 +61,7 @@ - - - gemdropx: gemdropx.o -- $(CXX) $(CFLAGS) -o gemdropx gemdropx.o $(GFX_LIB) -lm -+ $(CXX) $(CFLAGS) -o gemdropx gemdropx.o $(GFX_LIB) - - - gemdropx.o: gemdropx.c diff --git a/games-puzzle/gemdropx/patches/gemdropx-0.9.patchset b/games-puzzle/gemdropx/patches/gemdropx-0.9.patchset new file mode 100644 index 000000000..84247ec3a --- /dev/null +++ b/games-puzzle/gemdropx/patches/gemdropx-0.9.patchset @@ -0,0 +1,42 @@ +From 77612a6dd99f58ee2fe8701cf1fd8009df19a21c Mon Sep 17 00:00:00 2001 +From: begasus +Date: Fri, 30 Aug 2019 13:01:47 +0200 +Subject: Import partial previous patch, fix config path + + +diff --git a/gemdropx.c b/gemdropx.c +index 6af83e5..3125d2c 100644 +--- a/gemdropx.c ++++ b/gemdropx.c +@@ -29,6 +29,7 @@ + #include + #include + #include ++#include + + #ifndef EMBEDDED + #include +@@ -2560,7 +2561,10 @@ int main(int argc, char * argv[]) + SDL_version sdlver; + #endif + +- ++ #ifdef __HAIKU__ ++ chdir(dirname(argv[0])); ++ #endif ++ + no_music = 0; + + if (argc == 2) +@@ -2655,7 +2659,7 @@ int main(int argc, char * argv[]) + + /* Get max level: */ + +- sprintf(datafile, "%s/.gemdropx", getenv("HOME")); ++ sprintf(datafile, "%s/config/settings/gemdropx", getenv("HOME")); + + fi = fopen(datafile, "r"); + if (fi != NULL) +-- +2.21.0 +