46 lines
1.3 KiB
Bash
46 lines
1.3 KiB
Bash
# shellcheck shell=bash
|
|
# Part of JoeyLib, Copyright (c) 2026 Scott Duensing, under the MIT License.
|
|
# See LICENSE.md for license information.
|
|
# SPDX-License-Identifier: MIT
|
|
#
|
|
# NinjaTrackerPlus: Ninjaforce's IIgs MOD replayer, shipped as Merlin
|
|
# source plus the PHP converter tools/joeymod uses for .MOD -> .NTP.
|
|
# Redistribution is granted by the copyright holder. The URL is not
|
|
# versioned, so the pin is the archive's checksum.
|
|
|
|
compDescription="IIgs audio: NinjaTrackerPlus replayer source + ntpconverter.php"
|
|
compGroups="toolchain:iigs"
|
|
compRequires="host"
|
|
compHostDeps="unzip php-cli"
|
|
compUrl="https://www.ninjaforce.com/downloads/ntpsources.zip"
|
|
compSha256="461260e35dc0b10176c05865d01c4e31694f704c0c3a9e5760fc093623dc52fb"
|
|
compPin="$compSha256"
|
|
|
|
|
|
compInstall() {
|
|
local zip
|
|
local s
|
|
zip="$(fetchFile "$compUrl" "$compSha256")"
|
|
rm -rf "$compDir"
|
|
extractArchive "$zip" "$compDir"
|
|
# The sources ship with CRLF line endings, which Merlin32 rejects as
|
|
# "Unknown line".
|
|
for s in "$compDir"/*.s; do
|
|
sed -i 's/\r$//' "$s"
|
|
done
|
|
}
|
|
|
|
|
|
compInstalled() {
|
|
[ -f "$compDir/ninjatrackerplus.s" ] && [ -f "$compDir/ntpconverter.php" ]
|
|
}
|
|
|
|
|
|
compVerify() {
|
|
! grep -q $'\r' "$compDir/ninjatrackerplus.s"
|
|
}
|
|
|
|
|
|
compEnv() {
|
|
envVar IIGS_NTP_DIR "$compDir"
|
|
}
|