diff --git a/games-strategy/7kaa/7kaa-2.15.4p1.recipe b/games-strategy/7kaa/7kaa-2.15.4p1.recipe new file mode 100644 index 000000000..995bf881d --- /dev/null +++ b/games-strategy/7kaa/7kaa-2.15.4p1.recipe @@ -0,0 +1,86 @@ +SUMMARY="Seven Kingdoms: Ancient Adversaries" +DESCRIPTION="Seven Kingdoms, designed by Trevor Chan, brings a unique blend of Real-Time Strategy \ +with the addition of trade, diplomacy, and espionage. + +The game enables players to compete against up to six other kingdoms allowing players to \ +conquer opponents by defeating them in war (with troops or machines), capturing their \ +buildings with spies, or offering opponents money for their kingdom." +HOMEPAGE="https://www.7kfans.com/" +COPYRIGHT="Enlight Software Ltd." +LICENSE="GNU GPL v2" +REVISION="1" +SOURCE_URI="https://github.com/the3dfxdude/7kaa/releases/download/v2.15.4p1/7kaa-2.15.4p1.tar.xz" +CHECKSUM_SHA256="f0265c077025d77b435f1c10b8ba178bdb16329e51ab735330ebaa71a104fbf8" +PATCHES="7kaa-2.15.4p1.patchset" +ADDITIONAL_FILES="7kaa.rdef.in" + +ARCHITECTURES="all !x86_gcc2" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + 7kaa$secondaryArchSuffix + app:SevenKingdoms + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libcurl$secondaryArchSuffix + lib:libenet$secondaryArchSuffix + lib:libopenal$secondaryArchSuffix + lib:libSDL2_2.0$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + cmd:curl_config$secondaryArchSuffix + devel:libopenal$secondaryArchSuffix + devel:libcurl$secondaryArchSuffix + devel:libSDL2_2.0$secondaryArchSuffix + devel:libenet$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:autoconf + cmd:awk + cmd:gcc$secondaryArchSuffix + cmd:g++$secondaryArchSuffix + cmd:make + " + +BUILD() { + # for some reason the configure script doesn't find these variables by itself + CURL_CFLAGS=$(curl-config --cflags) + CURL_LIBS=$(curl-config --libs) + export CURL_CFLAGS + export CURL_LIBS + + runConfigure ./configure pkgdatadir=$dataDir/7kaa + make $jobArgs + make install +} + +INSTALL() { + # prepare the rdef file + local MAJOR="`echo "$portVersion" | cut -d. -f1`" + local MIDDLE="`echo "$portVersion" | cut -d. -f2`" + local MINOR="`echo "$portVersion" | cut -d. -f3 | cut -dp -f1`" + local SHORT_INFO="$SUMMARY" + local LONG_INFO="$SUMMARY" + + sed \ + -e "s|@MAJOR@|$MAJOR|" \ + -e "s|@MIDDLE@|$MIDDLE|" \ + -e "s|@MINOR@|$MINOR|" \ + -e "s|@SHORT_INFO@|$SHORT_INFO|" \ + -e "s|@LONG_INFO@|$LONG_INFO|" \ + $portDir/additional-files/7kaa.rdef.in > $portDir/7kaa.rdef + + mkdir -p $appsDir + mkdir -p $dataDir + + mv data/ $dataDir/7kaa + + mv $binDir/7kaa $appsDir/"Seven Kingdoms" + + addResourcesToBinaries $portDir/7kaa.rdef $appsDir/"Seven Kingdoms" + addAppDeskbarSymlink $appsDir/"Seven Kingdoms" + +} diff --git a/games-strategy/7kaa/additional-files/7kaa.rdef.in b/games-strategy/7kaa/additional-files/7kaa.rdef.in new file mode 100644 index 000000000..914b99a8b --- /dev/null +++ b/games-strategy/7kaa/additional-files/7kaa.rdef.in @@ -0,0 +1,42 @@ +resource app_flags B_SINGLE_LAUNCH | B_ARGV_ONLY; + +resource app_version { + major = @MAJOR@, + middle = @MIDDLE@, + minor = @MINOR@, + + variety = B_APPV_FINAL, + internal = 0, + + short_info = "@SHORT_INFO@", + long_info = "@LONG_INFO@" +}; + +resource app_signature "application/x-vnd.7kaa"; + +resource vector_icon { + $"6E6369660503FFF500020004028FFF06AAFFFF0000030000FF05660501060605" + $"EA02C4A1B96C4C5055C613C62CC3A2C65FC521C5F9C22350300608BEBEC171B9" + $"53C309BB37C3C1BA7F48BB51C2FC4CC314C43EC263C65F44C6395050C47BC494" + $"C3D5C4ADC496C490C4A1BB2BC4AABB2AC3FDBB2F50300A043030BFA649BFB3C3" + $"6250300607EE2EBFCCB953B824CA22B993C69FB7F6CA93B8ADCAF4B8BACAC6B8" + $"24CAC3BA35CACEBCCFCADBBB36C9BEBB0DCA75BC50C4C7C270B96C0A0430B92D" + $"B979BC1DD1BABC36D194B9390605EA02C92935C448C62C5050CA5FBC6BC92BBF" + $"2CCAABBBBDCA02BB44150A02010430ACF9B1740215810004178100040A020102" + $"12408291000000000000401CD1C6165AC80FEB01158100040A0001000233630B" + $"3F922CBF75D4337EC84AA09AC871A00A0201001233630B3F922CBF75D4337EC8" + $"4AA09AC871A00215820004178100040A000103024016EE0000000000003F9247" + $"C6ACAF4624190A020103124016EE0000000000003F9247C6ACAF462419021581" + $"0004178100040A0001000233630B3F922CBF75D4337EC84AA09AC871A00A0201" + $"011240A278000000000000409DEBC8218FC0CAF30215810004178100040A0201" + $"051240B8610000000000003F5D2FC85E624219A90215810004178100040A0201" + $"051240B861000000000000BF73BDC85E624C7DDA0215810004178100040A0001" + $"010240A278000000000000409DEBC8218FC0CAF30A0001050240B86100000000" + $"00003F5D2FC85E624219A90A0001050240B861000000000000BF73BDC85E624C" + $"7DDA0A00010002AFB3C6BFFFFE3FFFFEAFB3C6479F384B86D80A02010012AFB3" + $"C6BFFFFE3FFFFEAFB3C6479F384B86D80215810004178100040A00010002B244" + $"C7BFFFF5BFF3BD323DD94B0DAE4B83260A02010012B244C7BFFFF5BFF3BD323D" + $"D94B0DAE4B83260215810004178100040A040104024000000000000000004053" + $"EFC7C800C537DE0A03010230B30C120215810004178100040A00010220B30C12" + $"0A010102023E6D8130F524B0F5243E6D81473A04C4A29F" +}; diff --git a/games-strategy/7kaa/additional-files/7kaaLogo b/games-strategy/7kaa/additional-files/7kaaLogo new file mode 100644 index 000000000..7fe83d07d Binary files /dev/null and b/games-strategy/7kaa/additional-files/7kaaLogo differ diff --git a/games-strategy/7kaa/patches/7kaa-2.15.4p1.patchset b/games-strategy/7kaa/patches/7kaa-2.15.4p1.patchset new file mode 100644 index 000000000..52ed629c7 --- /dev/null +++ b/games-strategy/7kaa/patches/7kaa-2.15.4p1.patchset @@ -0,0 +1,29 @@ +From 2805a040fc833ecb35a407b77a07a6a08b36c654 Mon Sep 17 00:00:00 2001 +From: Victor Gamper +Date: Fri, 31 Dec 2021 02:19:54 +0100 +Subject: 7kaa: fixed the config folder creation + + +diff --git a/src/OMISC.cpp b/src/OMISC.cpp +index 409c1b1..d2e85a5 100644 +--- a/src/OMISC.cpp ++++ b/src/OMISC.cpp +@@ -1216,6 +1216,15 @@ int misc_mkdir(char *path) + // necessary. + int Misc::mkpath(char *abs_path) + { ++ #ifdef __HAIKU__ ++ char* cmd = (char*) malloc(strlen(abs_path) + strlen("mkdir -p ") + 1); ++ strcpy(cmd, abs_path); ++ strcat(cmd, "mkdir -p "); ++ system(cmd); ++ free(cmd); ++ return 1; ++ #endif ++ + char path_copy[FilePath::MAX_FILE_PATH]; + int count; + +-- +2.30.2 +