openmortal: new recipe (#4747)

This commit is contained in:
Crestwave
2020-03-10 19:07:52 +08:00
committed by GitHub
parent dbb92a8c0f
commit dfa5515e46
2 changed files with 95 additions and 0 deletions

View File

@@ -0,0 +1,74 @@
SUMMARY="A parody of the once popular coin-up fighting game, Mortal Kombat"
DESCRIPTION="Mortál Szombat is a parody of the popular coin-up game, Mortal \
Kombat. It is currently playable (maybe even enjoyable), although it is still \
under development. Only two-player game is supported, single-player games \
against computer opponent is not planned yet. There are currently 18 available \
characters, and several more in the making!"
HOMEPAGE="https://openmortal.sourceforge.net/"
COPYRIGHT="2003 the OpenMortal Team"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="https://downloads.sourceforge.net/openmortal/openmortal-$portVersion.tar.bz2"
CHECKSUM_SHA256="9c302560d71ddcd3473ba2a1022fd118cbce87a4cd4b3080cb46288a410bb710"
PATCHES="openmortal-$portVersion.patch"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
openmortal$secondaryArchSuffix = $portVersion
app:OpenMortal = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libfreetype$secondaryArchSuffix
lib:libperl
lib:libSDL_1.2$secondaryArchSuffix
lib:libSDL_gfx$secondaryArchSuffix
lib:libSDL_image_1.2$secondaryArchSuffix
lib:libSDL_mixer_1.2$secondaryArchSuffix
lib:libSDL_net_1.2$secondaryArchSuffix
lib:libSDL_ttf$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libfreetype$secondaryArchSuffix
devel:libSDL$secondaryArchSuffix
devel:libSDL_gfx$secondaryArchSuffix
devel:libSDL_image$secondaryArchSuffix
devel:libSDL_mixer$secondaryArchSuffix
devel:libSDL_net$secondaryArchSuffix
devel:libSDL_ttf$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:perl
cmd:sed
"
defineDebugInfoPackage openmortal$secondaryArchSuffix \
"$appsDir/OpenMortal"
PATCH()
{
sed -i 's/CChallengeMenu::CChallengeMenu/CChallengeMenu/g' src/OnlineChat.cpp
sed -i "s|require '\([A-Z].*\)'|require './\1'|g" data/script/*
sed -i "s|require 'DataHelper.pl'|require '../script/DataHelper.pl'|g" data/characters/*.pl
}
BUILD()
{
runConfigure --omit-dirs "docDir dataRootDir" \
./configure --build=x86 --host=
make $jobArgs
}
INSTALL()
{
make install
install -m 755 -d "$appsDir"
mv "$binDir/openmortal" "$appsDir/OpenMortal"
addAppDeskbarSymlink "$appsDir/OpenMortal"
}

View File

@@ -0,0 +1,21 @@
--- a/src/State.cpp
+++ b/src/State.cpp
@@ -14,6 +14,7 @@
#include "SDL_keysym.h"
#include "SDL_mixer.h"
+#include <FindDirectory.h>
#include <string>
#include <fstream>
//include <unistd.h>
@@ -44,7 +45,9 @@
}
return "c:\\openmortal.ini";
#else
- return std::string(getenv("HOME")) + "/.openmortalrc";
+ char path[B_PATH_NAME_LENGTH];
+ find_directory(B_USER_SETTINGS_DIRECTORY, 0, false, path, sizeof(path));
+ return std::string(path) + "/openmortalrc";
#endif
}