diff --git a/games-simulation/corsix_th/additional-files/corsix_th.rdef.in b/games-simulation/corsix_th/additional-files/corsix_th.rdef.in new file mode 100644 index 000000000..3b9179441 --- /dev/null +++ b/games-simulation/corsix_th/additional-files/corsix_th.rdef.in @@ -0,0 +1,25 @@ + +resource app_flags B_SINGLE_LAUNCH | B_ARGV_ONLY; + +resource app_version { + major = @MAJOR@, + middle = @MIDDLE@, + minor = 0, + variety = B_APPV_FINAL, + internal = 0, + short_info = "CorsixTH", + long_info = "Open source clone of Theme Hospital" +}; + +resource app_signature "application/x-vnd.CorsixTH"; + +resource vector_icon { + $"6E6369660605FF0305C305058E0300FF00050103087F00090A042626265A5A5A" + $"5A260A0C2E3A2E463A463A52465246465246523A463A462E3A2E3A3A08032222" + $"225E5E22080C2E463044303E323C3A3C3C3A3C304430462E3A2E3A3A2E3A080B" + $"3A523C504450444646445044503C523A52464646465208043A523C503C443A46" + $"0804523A503C443C463A08044430443C463A462E08042E463A463C443044090A" + $"0401001001158C00040A030102000A05010202C00000170A19970A19C000004C" + $"00004BFFFF0A000100000A0201012024240A0401011001158400040A01010100" + $"0A0303030506000A050304070800" +}; diff --git a/games-simulation/corsix_th/corsix_th-0.30.recipe b/games-simulation/corsix_th/corsix_th-0.30.recipe deleted file mode 100644 index aad8d2adf..000000000 --- a/games-simulation/corsix_th/corsix_th-0.30.recipe +++ /dev/null @@ -1,68 +0,0 @@ -SUMMARY="Open source clone of Theme Hospital" -DESCRIPTION=" -CorsixTH aims to reimplement the game engine of Theme Hospital, and be able to -load the original game data files. This means that you will need a purchased -copy of Theme Hospital, or a copy of the demo, in order to use CorsixTH. After -most of the original engine has been reimplemented in open source code, the -project will serve as a base from which extensions and improvements to the -original game can be made. -" -HOMEPAGE="https://github.com/CorsixTH" -COPYRIGHT="2005-2013 Corsix" -LICENSE="MIT" -REVISION="3" -SOURCE_URI="https://github.com/CorsixTH/CorsixTH/archive/v$portVersion.tar.gz" -CHECKSUM_SHA256="4947ebdc50b01fde0aca797250d50b9806b9e6f3f4323872fd914f033f4c92e7" -SOURCE_FILENAME="CorsixTH-$portVersion.tar.gz" -SOURCE_DIR="CorsixTH-$portVersion" -PATCHES="corsix_th-$portVersion.patchset" - -ARCHITECTURES="!x86_gcc2 x86" -SECONDARY_ARCHITECTURES="x86" - -PROVIDES=" - corsix_th = $portVersion - " -REQUIRES=" - haiku$secondaryArchSuffix - lib:libavcodec$secondaryArchSuffix - lib:libfreetype$secondaryArchSuffix - lib:libluajit_5.1$secondaryArchSuffix - lib:libsdl$secondaryArchSuffix - lib:libsdl_mixer$secondaryArchSuffix - " - -BUILD_REQUIRES=" - haiku${secondaryArchSuffix}_devel - devel:libavcodec$secondaryArchSuffix - devel:libfreetype$secondaryArchSuffix - devel:libluajit_5.1$secondaryArchSuffix - devel:libsdl$secondaryArchSuffix - devel:libsdl_mixer$secondaryArchSuffix - " -BUILD_PREREQUIRES=" - cmd:cmake - cmd:gcc$secondaryArchSuffix - cmd:git - cmd:make - cmd:pkg_config$secondaryArchSuffix - " - -BUILD() -{ - cmake . -DLUA_LIBRARY=/system/$relativeLibDir/libluajit-5.1.so.2.0.2 \ - -DCMAKE_INSTALL_PREFIX=$appsDir - cd CorsixTH - make $jobArgs -} - -INSTALL() -{ - touch CorsixTH/LICENSE.txt - make install - - addattr -f Icon_Haiku -t "'VICN'" "BEOS:ICON" $appsDir/CorsixTH/CorsixTH - addAppDeskbarSymlink $appsDir/CorsixTH/CorsixTH "Corsix Theme Hospital" -} - -# no TEST script available diff --git a/games-simulation/corsix_th/corsix_th-0.62.recipe b/games-simulation/corsix_th/corsix_th-0.62.recipe new file mode 100644 index 000000000..b5e1a7729 --- /dev/null +++ b/games-simulation/corsix_th/corsix_th-0.62.recipe @@ -0,0 +1,90 @@ +SUMMARY="Open source clone of Theme Hospital" +DESCRIPTION=" +CorsixTH aims to reimplement the game engine of Theme Hospital, and be able to \ +load the original game data files. This means that you will need a purchased \ +copy of Theme Hospital, or a copy of the demo, in order to use CorsixTH. After \ +most of the original engine has been reimplemented in open source code, the \ +project will serve as a base from which extensions and improvements to the \ +original game can be made. +" +HOMEPAGE="https://github.com/CorsixTH" +COPYRIGHT="2005-2018 Corsix" +LICENSE="MIT" +REVISION="1" +SOURCE_URI="https://github.com/CorsixTH/CorsixTH/archive/v$portVersion.tar.gz" +CHECKSUM_SHA256="b219270310255493c881a09bb4a5569f34a72cdaf3c3be920c1036a2450317ce" +SOURCE_FILENAME="CorsixTH-$portVersion.tar.gz" +SOURCE_DIR="CorsixTH-$portVersion" +PATCHES="corsix_th-$portVersion.patchset" +ADDITIONAL_FILES="corsix_th.rdef.in" + +ARCHITECTURES="!x86_gcc2 x86 x86_64" +if [ "$targetArchitecture" = x86_gcc2 ]; then +SECONDARY_ARCHITECTURES="x86" +fi + +PROVIDES=" + corsix_th$secondaryArchSuffix = $portVersion + cmd:corsix_th = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libavcodec$secondaryArchSuffix + lib:libfreetype$secondaryArchSuffix + lib:liblua$secondaryArchSuffix >= 5.3 + lib:libsdl2_2.0$secondaryArchSuffix + lib:libsdl2_mixer_2.0$secondaryArchSuffix + lib:lfs$secondaryArchSuffix + lib:lpeg$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libavcodec$secondaryArchSuffix + devel:libfreetype$secondaryArchSuffix + devel:liblua$secondaryArchSuffix >= 5.3 + devel:libsdl2$secondaryArchSuffix + devel:libsdl2_mixer$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:cmake + cmd:gcc$secondaryArchSuffix + cmd:git + cmd:make + cmd:pkg_config$secondaryArchSuffix + cmd:sed + " + +PATCH() +{ + LUAC_DIR=$(finddir B_SYSTEM_LIB_DIRECTORY)$secondaryArchSubDir/lua/5.3/?.so + sed -i \ + -e "s|package.cpath = base_dir .. '?.so;' .. package.cpath|package.cpath = base_dir .. '?.so;' .. package.cpath .. ';$LUAC_DIR'|" \ + CorsixTH/CorsixTH.lua +} + +BUILD() +{ + cmake . -DLUA_LIBRARY=/system/$relativeLibDir/liblua.so.5.3 \ + -DCMAKE_INSTALL_PREFIX=$prefix \ + -DCMAKE_INSTALL_DATAROOTDIR=$dataDir \ + -DSDL_INCLUDE_DIR=/system/$relativeIncludeDir/SDL2 \ + -DSDL_MIXER_INCLUDE_DIR=/system/$relativeIncludeDir/SDL2 \ + -DLUA_INCLUDE_DIR=/system/$relativeIncludeDir/lua53 + cd CorsixTH + make $jobArgs +} + +INSTALL() +{ + touch CorsixTH/LICENSE.txt + make install + local MAJOR="`echo "$portVersion" | cut -d. -f1`" + local MIDDLE="`echo "$portVersion" | cut -d. -f2`" + sed \ + -e "s|@MAJOR@|$MAJOR|" \ + -e "s|@MIDDLE@|$MIDDLE|" \ + $portDir/additional-files/corsix_th.rdef.in > $sourceDir/corsix_th.rdef + addResourcesToBinaries $sourceDir/corsix_th.rdef $prefix/bin/corsix-th + addAppDeskbarSymlink $prefix/bin/corsix-th "Corsix Theme Hospital" +} diff --git a/games-simulation/corsix_th/patches/corsix_th-0.30.patchset b/games-simulation/corsix_th/patches/corsix_th-0.30.patchset deleted file mode 100644 index fdfd773ba..000000000 --- a/games-simulation/corsix_th/patches/corsix_th-0.30.patchset +++ /dev/null @@ -1,77 +0,0 @@ -From 6ffdc30a00c95287e9e42fc65462bbcb17b7cff2 Mon Sep 17 00:00:00 2001 -From: Adrien Destugues -Date: Mon, 13 Jan 2014 21:36:21 +0100 -Subject: Fix config file path. - - -diff --git a/CorsixTH/Lua/config_finder.lua b/CorsixTH/Lua/config_finder.lua -index 5de4dfb..c643f65 100644 ---- a/CorsixTH/Lua/config_finder.lua -+++ b/CorsixTH/Lua/config_finder.lua -@@ -35,7 +35,7 @@ if pathsep == "\\" then - config_path = os.getenv("AppData") or ourpath - else - -- Linux, OS X, etc. -- config_path = os.getenv("XDG_CONFIG_HOME") or pathconcat(os.getenv("HOME") or "~", ".config") -+ config_path = os.getenv("XDG_CONFIG_HOME") or pathconcat(os.getenv("HOME") or "~", "config/settings") - end - if config_path ~= ourpath then - config_path = pathconcat(config_path, "CorsixTH") --- -1.8.3.4 - - -From d2181fb6daaf3b434de528caaaf25c4da8bcb29d Mon Sep 17 00:00:00 2001 -From: Adrien Destugues -Date: Mon, 13 Jan 2014 21:36:49 +0100 -Subject: Add vector icon. - - -diff --git a/Icon_Haiku b/Icon_Haiku -new file mode 100644 -index 0000000000000000000000000000000000000000..e33288c7f66a04b72128533415302926dd613c58 -GIT binary patch -literal 9704 -zcmeHM&u5&Lcu|R06Rn9SFLF?0Jox;4W_EUGx3hJmJQ`ysneN-qe0RRz -z`Fy|M+3!yG?i=YJ*tch=Kr5iPa@xVigeYRXBO`-b`CLJ)7ybPs`#8r>_Yzfe6~u-Z -z{}vPcjInhXGx3G3LR`O3$xl_96AiHlDHp5WfE+bytF%_Vhyq4v)!i64WmrWm;sl;_ -zQSuQUUT-MjWd=v&bFY!Ol>{ycClpeQz_ -z@K=HHS>l63LvkM8zlpBq*(`DDWj`O`er2*ICk$)VrkDymzlo8n<)lya31RlDWhqti -zd`H1x`k$w)2EGpiYGa~+M#f9kdeGo~4`_2?{uq|!%KRpn&So;d8TX^;^t{Qu#;1Xs -z%xnC6;3o6L*#}^cjrrFiTry9Ct6|V+#MF=W3ULFS*X^L5zx8zh_x!D|=5J!AEXT~b -zICi7gaGg1*73iy0ps%;8NV&efn$n@e@L@}Z(4m4`2%UyETtny{$g-Is#NXS|JJHP$ -z(s&neGlVog1l$ZEHK!2A<9X7_`+9`S5ZZv7U0iN=97CcEEb6m}19oAitsdkxE1-O4 -zmq>AKQY^~r+$gTY6)T}wXI++Jji10uO^P-C18|dK;_Q22k1b0XGQ{&J*6BIl3wQSk -z!Rt-*v*?THOgCQ5-;~j^%&5^wPG9+q`khHr3Y!n#ZbeC&wog+kbX1OJ(o{U|7(*k4 -zmBkQK_aJ&UhBVF>n;AnI{|2}jL&Vv4!X8@;?TPTb7^1(q!!F`l#+9+5uXF^viE)gw -zdaE~gXDvU_XT(lB6{whLj|OY3q_&$`Q0r0@T!ed8vfa?#CG>2lX#53?nW3WbL%{hv -zTaLX2%oZvaBHT4p7zPXt^1ppKm)ivGu1ia%UGTr=UZ$x4h>oteOZq*Xku -zGjWD3KhMpLfP9f(?m7j0g6eb7KInWJ7_BX0OL%Fp??tZkS@e_m!F{0!t9ZCaoc(kB -zQSuLn14D!S-jFt4%fY{kaOs6oSUV!6WpT$Fw%AqJu*6V0&VH;x41WGxikc%J-) -zO}|QA)NN}=F-Cj!#z|%Ud3LlQ}c+tB9zZp!2NN2xRI*P+k2ngZfY%)~0T*-_#h67>Mc9bWvRfnazhiim& -zmem91$P=%ex%S(Rn>{g`m8KV{*>P^r6Fr%^EX5~qJnQ-6LQHyo>4ewt4tsU4Iag{_ -zEA^Uuda^QW8<;Pjk9w&?u6&w~ -zagwCu(=k4igP)D?B*vL(ag1{*@vhA??=HD@Ct-fa9rJ;sV=lq+b~$DX=FW3W7shOk -znFMZg3{T)}IA1=*6UT7YrH)~xBpowW36Ev{a{YHs@ynIVA8#H0YWPxjbp1l(c(x?O -za2eP6R%@udmN4;4!98I>Ug8(t#0hg4^~87>O#5S5$58AJ?PTvcCd?-=s9g!enlCS5 -zp2CL^cF>WCu`*3EV3z|Bn&sNIAOSnOUH1HsBgxCnOk#8XBiWqb*>~^{(@~T -zrPZG>o3CUN#Kr}3S+}FK+J<@ZN~`B0UD?uV9`@Kut1G~1Th>`$=HNd@c;YOsXsNTf -z)5?GNb*&XxE(KQSf2P1XiwJPZfQyKLc5O?1cjj$NPh!lrEqTCgksjvYrz1RxbS&Hw -z>C7tiukF<I@`h??ntWyO$7a=%)?hu`u+{>W&5rG - -literal 0 -HcmV?d00001 - --- -1.8.3.4 - diff --git a/games-simulation/corsix_th/patches/corsix_th-0.62.patchset b/games-simulation/corsix_th/patches/corsix_th-0.62.patchset new file mode 100644 index 000000000..033a827ee --- /dev/null +++ b/games-simulation/corsix_th/patches/corsix_th-0.62.patchset @@ -0,0 +1,22 @@ +From 6ffdc30a00c95287e9e42fc65462bbcb17b7cff2 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Mon, 13 Jan 2014 21:36:21 +0100 +Subject: Fix config file path. + + +diff --git a/CorsixTH/Lua/config_finder.lua b/CorsixTH/Lua/config_finder.lua +index 5de4dfb..c643f65 100644 +--- a/CorsixTH/Lua/config_finder.lua ++++ b/CorsixTH/Lua/config_finder.lua +@@ -35,7 +35,7 @@ if pathsep == "\\" then + config_path = os.getenv("AppData") or ourpath + else + -- Linux, OS X, etc. +- config_path = os.getenv("XDG_CONFIG_HOME") or pathconcat(os.getenv("HOME") or "~", ".config") ++ config_path = os.getenv("XDG_CONFIG_HOME") or pathconcat(os.getenv("HOME") or "~", "config/settings") + end + if config_path ~= ourpath then + config_path = pathconcat(config_path, "CorsixTH") +-- +1.8.3.4 +