54 lines
1.9 KiB
Bash
54 lines
1.9 KiB
Bash
# Part of JoeyLib, Copyright (c) 2026 Scott Duensing, under the MIT License.
|
|
# See LICENSE.md for license information.
|
|
# SPDX-License-Identifier: MIT
|
|
#
|
|
# pspdev v20261001: the PSP homebrew toolchain the psp port (make psp)
|
|
# builds with -- psp-gcc, the PSPSDK, newlib, and the tools that make an
|
|
# EBOOT.PBP (mksfo, pack-pbp, psp-fixup-imports) -- prebuilt by the pspdev
|
|
# project for each distribution family, unpacked into toolchains/opt/pspdev.
|
|
# Fedora gets the Fedora build, Debian the Debian one and every other apt
|
|
# system (Ubuntu, Mint) the Ubuntu one: each needs its own glibc.
|
|
|
|
compDescription="psp: pspdev v20261001 (psp-gcc, PSPSDK)"
|
|
compGroups="toolchain:psp"
|
|
compRequires="host"
|
|
compHostDeps="tar"
|
|
pspdevRelease="v20261001"
|
|
pspdevHostId="$( (. /etc/os-release 2>/dev/null && printf '%s' "${ID:-}") || true)"
|
|
if [ "$(distroFamily)" = "dnf" ]; then
|
|
pspdevFlavour="fedora-latest"
|
|
compSha256="7874d4d696f1abe58d3d17fd8ae365e9b129c4bea16b383bf708655037c0e21c"
|
|
elif [ "$pspdevHostId" = "debian" ]; then
|
|
pspdevFlavour="debian-latest"
|
|
compSha256="39b20efc7c8492cdbd9929178f45afc801dabb0967b7c882573520f22536920c"
|
|
else
|
|
pspdevFlavour="ubuntu-latest-x86_64"
|
|
compSha256="a86efe624e770005290919617859e9df24bd8fcd3e364f4587f23ec7364b0acd"
|
|
fi
|
|
compUrl="https://github.com/pspdev/pspdev/releases/download/$pspdevRelease/pspdev-$pspdevFlavour.tar.gz"
|
|
compPin="$compSha256"
|
|
|
|
|
|
compInstall() {
|
|
local archive
|
|
# Every flavour's file has the same name: cache it under the release's.
|
|
archive="$(fetchFile "$compUrl" "$compSha256" "pspdev-$pspdevRelease-$pspdevFlavour.tar.gz")"
|
|
rm -rf "$compDir"
|
|
extractArchive "$archive" "$compDir" 1
|
|
}
|
|
|
|
|
|
compInstalled() {
|
|
[ -x "$compDir/bin/psp-gcc" ] && [ -x "$compDir/bin/pack-pbp" ]
|
|
}
|
|
|
|
|
|
compVerify() {
|
|
PSPDEV="$compDir" verifyCompiles "$compDir/bin/psp-gcc" && verifyLinked "$compDir/bin"
|
|
}
|
|
|
|
|
|
compEnv() {
|
|
envVar PSPDEV "$compDir"
|
|
envVar PSP_CC "$compDir/bin/psp-gcc"
|
|
}
|