mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-08 21:00:05 +02:00
172 lines
5.7 KiB
Bash
172 lines
5.7 KiB
Bash
SUMMARY="Fantasy computer for making, playing and sharing tiny games"
|
|
DESCRIPTION="ProjectX description."
|
|
HOMEPAGE="http://projectX"
|
|
COPYRIGHT="2017 Vadim Grigoruk"
|
|
LICENSE="MIT"
|
|
REVISION="1"
|
|
SOURCE_URI="https://github.com/nesbox/TIC-80/archive/v$portVersion/TIC-80-v$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="a004bbc7b316a4b60d461ac4612fca4ab07e96ed1d1445086e70d1fc4d95961b"
|
|
PATCHES="tic_80-$portVersion.patchset"
|
|
SOURCE_DIR="TIC-80-$portVersion"
|
|
|
|
# quickjs bumped to a later version that actually builds on Haiku
|
|
# s7 is actually in the tic tree but that version is broken
|
|
# lpeg is in haikuports but only gives us a .so, whose name does not start
|
|
# with "lib" so it's hard to use
|
|
_argparse_rev="0d5f5d0745df14a3f373f7eed85bf524714f4524"
|
|
_blip_buf_rev="330226d9b55ecbeea644e17b5e0f096a165ca07e"
|
|
_lpeg_rev="73d8614a8dea404cf7bfe25a6e4cea7183dc9fb7"
|
|
_moonscript_rev="17179283012b392bff972ad66231d73bfeec6e90"
|
|
_msf_gif_rev="7829c8f439d013deeb54eba94761403e1da2a960"
|
|
_naett_rev="10a9624456829e5f2b4c264e14760301125d12eb"
|
|
_pocketpy_rev="7312afdad24bb308037088d34b32ed0078fed7d2"
|
|
_quickjs_rev="db3d3f09cdec7106d6e330aa1eb3fae50ed8fdc4"
|
|
_s7_rev="288587c78dbddc6164ae334550203730084c89b2"
|
|
_wasm3_rev="8523770b80ea1f78afcac21d837f9dfd50f0bed6"
|
|
_wren_rev="4a18fc489f9ea3d253b20dd40f4cdad0d6bb40eb"
|
|
_zip_rev="d7df626f3aa457e01669f65e61bf8f484e352941"
|
|
_submodules="
|
|
argparse-$_argparse_rev
|
|
blip-buf-$_blip_buf_rev
|
|
lpeg-$_lpeg_rev
|
|
moonscript-$_moonscript_rev
|
|
msf_gif-$_msf_gif_rev
|
|
naett-$_naett_rev
|
|
pocketpy-$_pocketpy_rev
|
|
quickjs-$_quickjs_rev
|
|
s7-$_s7_rev
|
|
wasm3-$_wasm3_rev
|
|
wren-$_wren_rev
|
|
zip-$_zip_rev
|
|
"
|
|
|
|
# maybe I can generate all these extra source URIs from a simpler list?
|
|
|
|
SOURCE_URI_2="https://github.com/blueloveTH/pocketpy/archive/$_pocketpy_rev.tar.gz"
|
|
CHECKSUM_SHA256_2="093b5d02c2b4b21d11edeb49b40c4e91bb49274f91e990b8fdb2dde72f51f6f2"
|
|
|
|
SOURCE_URI_3="https://github.com/nesbox/quickjs/archive/$_quickjs_rev.tar.gz"
|
|
CHECKSUM_SHA256_3="c664d199faaa27e9e2b6f02f9a675de0596e55853f9435d33aa6bb8fc22c5833"
|
|
|
|
SOURCE_URI_4="https://github.com/kuba--/zip/archive/$_zip_rev.tar.gz"
|
|
CHECKSUM_SHA256_4="f121ff9a6df3414afe958c341c0e3f05d638e43e3be735a9dad8d05ce9322c49"
|
|
|
|
SOURCE_URI_5="https://github.com/erkkah/naett/archive/$_naett_rev.tar.gz"
|
|
CHECKSUM_SHA256_5="f476b55a6983fc08150ed37cc91dbc0a0a24e05c0891de7e1c86b0536ac8eb76"
|
|
PATCHES_5="tic_80-$portVersion-source5.patchset"
|
|
|
|
SOURCE_URI_6="https://github.com/cofyc/argparse/archive/$_argparse_rev.tar.gz"
|
|
CHECKSUM_SHA256_6="b14cfe4b95a4cd1cf148eeecf0dba94ebf5b4312de12f5f5254e7040017477f1"
|
|
|
|
SOURCE_URI_7="https://github.com/nesbox/blip-buf/archive/$_blip_buf_rev.tar.gz"
|
|
CHECKSUM_SHA256_7="e86870ecb4b7c3feac6afbf5ddd0aff809e14b2d16d9bde251b712fd4ecd6d99"
|
|
|
|
SOURCE_URI_8="https://github.com/wasm3/wasm3/archive/$_wasm3_rev.tar.gz"
|
|
CHECKSUM_SHA256_8="0dc7fad64c1d9d65dfa822cf79e471edab36190d8eb0fb7bf87f9064f846299c"
|
|
|
|
SOURCE_URI_9="https://github.com/wren-lang/wren/archive/$_wren_rev.tar.gz"
|
|
CHECKSUM_SHA256_9="fb885f12767ea8b1101145b9d86735995e28c5298b712c1c3f71ed9bbf17f567"
|
|
|
|
SOURCE_URI_10="https://cm-gitlab.stanford.edu/bil/s7/-/archive/$_s7_rev.tar.gz"
|
|
CHECKSUM_SHA256_10="c659b283147188c180014a5e6586978fa2d4e163bc78f9062b98e28933d6916c"
|
|
|
|
SOURCE_URI_11="https://github.com/nesbox/moonscript/archive/$_moonscript_rev.tar.gz"
|
|
CHECKSUM_SHA256_11="10f0ebf82ae92a1389d353b349bef25deea594aebb3a65d09f36cd1193d7de18"
|
|
|
|
SOURCE_URI_12="https://github.com/nesbox/lpeg/archive/$_lpeg_rev.tar.gz"
|
|
CHECKSUM_SHA256_12="600d8644b51e5cb4d628627cd430d7beccf1d5af72a2844270983c85563de3a4"
|
|
|
|
SOURCE_URI_13="https://github.com/notnullnotvoid/msf_gif/archive/$_msf_gif_rev.tar.gz"
|
|
CHECKSUM_SHA256_13="d73fe9395b7826e38b734feb90307a50bb32622049e1ec4d6b89ae693dae9aa6"
|
|
|
|
ADDITIONAL_FILES="tic80.rdef.in"
|
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
PROVIDES="
|
|
tic_80$secondaryArchSuffix = $portVersion
|
|
cmd:tic80$secondaryArchSuffix = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
lib:libcurl$secondaryArchSuffix
|
|
lib:libgif$secondaryArchSuffix
|
|
lib:libjanet$secondaryArchSuffix
|
|
lib:liblua$secondaryArchSuffix
|
|
lib:libpng16$secondaryArchSuffix
|
|
lib:libSDL2_2.0$secondaryArchSuffix
|
|
lib:libsquirrel$secondaryArchSuffix
|
|
lib:libz$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
devel:libcurl$secondaryArchSuffix
|
|
devel:libgif$secondaryArchSuffix
|
|
devel:libjanet$secondaryArchSuffix
|
|
devel:liblua$secondaryArchSuffix >= 5.3
|
|
devel:libpng16$secondaryArchSuffix
|
|
devel:libSDL2_2.0$secondaryArchSuffix
|
|
devel:libsquirrel$secondaryArchSuffix
|
|
devel:libz$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:cmake
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:make
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
cmd:python3
|
|
"
|
|
|
|
PATCH()
|
|
{
|
|
local MINOR="`echo "$portVersion" | cut -d. -f3`"
|
|
sed -i "s/VERSION_REVISION 0/VERSION_REVISION $MINOR/" \
|
|
CMakeLists.txt
|
|
}
|
|
|
|
BUILD()
|
|
{
|
|
pushd vendor
|
|
for _mod in $_submodules; do
|
|
_mod_rev=${_mod##*-}
|
|
_mod_name=$(echo $_mod | sed -e "s/-$_mod_rev//")
|
|
rm -rf $_mod_name
|
|
ln -sf ../../../sources*/$_mod $_mod_name
|
|
done
|
|
popd
|
|
|
|
cmake -Bbuild -S. -DCMAKE_BUILD_TYPE=Release \
|
|
$cmakeDirArgs \
|
|
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
|
|
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
|
|
-DBUILD_DEMO_CARTS:BOOL=OFF
|
|
|
|
cmake --build build $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
make -C build install
|
|
|
|
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
|
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
|
local MINOR="`echo "$portVersion" | cut -d. -f3`"
|
|
local APP_NAME="TIC-80"
|
|
local LONG_INFO="$SUMMARY"
|
|
local APP_SIGNATURE="x-vnd.tic-80"
|
|
sed \
|
|
-e "s|@MAJOR@|$MAJOR|" \
|
|
-e "s|@MIDDLE@|$MIDDLE|" \
|
|
-e "s|@MINOR@|$MINOR|" \
|
|
-e "s|@LONG_INFO@|$LONG_INFO|" \
|
|
-e "s|@APP_NAME@|$APP_NAME|" \
|
|
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
|
|
$portDir/additional-files/tic80.rdef.in > tic80.rdef
|
|
|
|
addResourcesToBinaries tic80.rdef $prefix/bin/tic80
|
|
|
|
addAppDeskbarSymlink $prefix/bin/tic80 TIC-80
|
|
}
|