blobwars: bump to 2.00 (#4587)

* blobwars: bump to 2.00
This commit is contained in:
Raheem Idowu
2020-02-24 15:39:42 +04:00
committed by GitHub
parent 0a7541249b
commit 188c837670
2 changed files with 155 additions and 0 deletions

View File

@@ -0,0 +1,68 @@
SUMMARY="Metal Blob Solid is a 2D platform game"
DESCRIPTION="Since their world was invaded by an alien race, the Blobs have \
faced a lifetime of war. But now they have a chance to win the war once and \
for all. In Blob Wars: Metal Blob Solid, you take on the role of a fearless \
Blob agent, Bob. Bob's mission is to infiltrate the various enemy bases around \
the Blobs' homeworld and rescue as many MIAs as possible. But standing in his \
way are many vicious aliens, other Blobs who have been assimilated and the \
evil alien leader, Galdov."
HOMEPAGE="https://www.parallelrealities.co.uk/p/blob-wars-metal-blob-solid.html"
COPYRIGHT="2004, 2005 Milan Babuskov"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="http://sourceforge.net/projects/blobwars/files/blobwars-$portVersion.tar.gz"
CHECKSUM_SHA256="c406279f6cdf2aed3c6edb8d8be16efeda0217494acd525f39ee2bd3e77e4a99"
PATCHES="blobwars-$portVersion.patchset"
ARCHITECTURES="?x86_gcc2 ?x86 ?x86_64"
PROVIDES="
blobwars = $portVersion
app:blobwars = $portVersion
"
REQUIRES="
haiku
lib:libintl
lib:libSDL2_2.0
lib:libSDL2_image_2.0
lib:libSDL2_mixer_2.0
lib:libSDL2_net_2.0
lib:libSDL2_ttf_2.0
lib:libz
"
BUILD_REQUIRES="
haiku_devel
devel:libintl
devel:libSDL2_2.0
devel:libSDL2_image_2.0
devel:libSDL2_mixer_2.0
devel:libSDL2_net_2.0
devel:libSDL2_ttf_2.0
devel:libz
"
BUILD_PREREQUIRES="
cmd:gcc
cmd:make
cmd:pkg_config
"
BUILD()
{
make $jobArgs
}
INSTALL()
{
mkdir -p $appsDir/BlobWars/{data,doc,icons,sound,gfx,locale}
cp blobwars $appsDir/BlobWars/
cp -r data/* $appsDir/BlobWars/data/
cp -r doc $appsDir/BlobWars/
cp -r icons $appsDir/BlobWars/
cp -r sound $appsDir/BlobWars/
cp -r gfx $appsDir/BlobWars/
cp -r locale $appsDir/BlobWars/
addAppDeskbarSymlink $appsDir/BlobWars/blobwars BlobWars
}

View File

@@ -0,0 +1,87 @@
From 705e6fef3e9e204cda28a50c65578bb2c9f0f6d6 Mon Sep 17 00:00:00 2001
From: Abdur-Raheem Idowu <abdurraheemidowu@gmail.com>
Date: Wed, 15 Jan 2020 12:08:38 +0000
Subject: fixed makefile
diff --git a/Makefile b/Makefile
index 54ef5ae..64f18b1 100755
--- a/Makefile
+++ b/Makefile
@@ -21,8 +21,8 @@ MEDAL_SERVER_PORT = 80
CXXFLAGS += `pkg-config --cflags sdl2 SDL2_mixer SDL2_image SDL2_ttf SDL2_net` -DVERSION=$(VERSION) -DRELEASE=$(RELEASE) -DUSEPAK=$(USEPAK)
CXXFLAGS += -DPAKNAME=\"$(PAKNAME)\" -DPAKLOCATION=\"$(DATADIR)\" -DUNIX -DGAMEPLAYMANUAL=\"$(DOCDIR)index.html\" -Wall
CXXFLAGS += -DLOCALEDIR=\"$(LOCALEDIR)\" -DMEDAL_SERVER_HOST=\"$(MEDAL_SERVER_HOST)\" -DMEDAL_SERVER_PORT=$(MEDAL_SERVER_PORT)
-CXXFLAGS += $(CFLAGS) -Werror
-LIBS = `pkg-config --libs sdl2 SDL2_mixer SDL2_image SDL2_ttf SDL2_net` -lz
+CXXFLAGS += $(CFLAGS)
+LIBS = `sdl2-config --libs` -lSDL2_mixer -lSDL2_image -lSDL2_ttf -lSDL2_net -lz -lintl
PAKLIBS = -lz
OBJS += CAudio.o
--
2.19.0
From d31f923295de3bda6f40a4f8dd8c13452c2ae990 Mon Sep 17 00:00:00 2001
From: Abdur-Raheem Idowu <abdurraheemidowu@gmail.com>
Date: Wed, 15 Jan 2020 12:24:24 +0000
Subject: Removed duplicate declarations
diff --git a/src/headers.h b/src/headers.h
index 389b34b..ae64e8b 100644
--- a/src/headers.h
+++ b/src/headers.h
@@ -56,7 +56,7 @@ extern DECLSPEC int SDLCALL SDL_GetGamma(float *red, float *green, float *blue);
#define textdomain(x) while(false)
#endif
-#if !defined(OpenBSD) && !defined(FreeBSD) && !defined(__APPLE__)
+#if !defined(OpenBSD) && !defined(FreeBSD) && !defined(__APPLE__) && !defined(__HAIKU__)
static inline void strlcat(char *dest, const char *src, size_t n) { strncat(dest, src, n - 1); }
static inline void strlcpy(char *dest, const char *src, size_t n) { strncpy(dest, src, n); dest[n - 1] = 0; }
#endif
--
2.19.0
From be609d5c68a6509b3507be3ddfc1ac4167678fc3 Mon Sep 17 00:00:00 2001
From: Abdur-Raheem Idowu <abdurraheemidowu@gmail.com>
Date: Wed, 15 Jan 2020 18:21:04 +0000
Subject: Allows launch from Tracker and Deskbar
diff --git a/src/main.cpp b/src/main.cpp
index dbab69d..5177aba 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -19,6 +19,10 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+#ifdef __HAIKU__
+#include <unistd.h>
+#include <libgen.h>
+#endif
#include "main.h"
@@ -122,6 +126,14 @@ int main(int argc, char *argv[])
#if !USEPAK
debug(("Not Using PAK...\n"));
#endif
+
+ #ifdef __HAIKU__
+ char* binpath = realpath(argv[0], NULL);
+ if (binpath != NULL) {
+ chdir(dirname(binpath));
+ free(binpath);
+ }
+ #endif
#if RELEASE
#ifdef PAKLOCATION
--
2.19.0