Ports: Add jakt

This commit is contained in:
Ali Mohammad Pur 2023-07-04 21:42:16 +03:30 committed by Jelle Raaijmakers
parent 2b19d1b5ab
commit 72b9f47bb1
Notes: sideshowbarker 2024-07-17 01:04:03 +09:00
2 changed files with 48 additions and 0 deletions

View file

@ -114,6 +114,7 @@ This list is also available at [ports.serenityos.net](https://ports.serenityos.n
| [`indent`](indent/) | GNU indent | 2.2.11 | https://www.gnu.org/software/indent/ |
| [`isl`](isl/) | Integer Set Library | 0.24 | https://libisl.sourceforge.io/ |
| [`ja2`](ja2/) | Jagged Alliance 2 Stracciatella | 0.15.x | https://github.com/safarp/ja2-stracciatella/tree/0.15.x |
| [`jakt`](jakt/) | Jakt Programming Language | | https://github.com/SerenityOS/jakt |
| [`jfduke3d`](jfduke3d/) | JonoF's Duke Nukem 3D Port | 41cd46b | https://github.com/jonof/jfduke3d |
| [`joe`](joe/) | joe's own editor | 4.6 | https://joe-editor.sourceforge.io/ |
| [`jot`](jot/) | jot (OpenBSD) | 6.6 | https://github.com/ibara/libpuffy |

47
Ports/jakt/package.sh Executable file
View file

@ -0,0 +1,47 @@
#!/usr/bin/env -S bash ../.port_include.sh
port='jakt'
version='git'
useconfigure='true'
depends=(
'llvm'
)
commit_hash='063e9767ff80db1a1cfe1a805cc8b7e2e577d9f3'
archive_hash='0cb858291d0426e80c8378d7d5876a2a8de747467a289bb691782316c79a2f59'
files="https://github.com/SerenityOS/jakt/archive/${commit_hash}.tar.gz jakt.tar.gz ${archive_hash}"
auth_type='sha256'
workdir="jakt-${commit_hash}"
configure() {
host_env
install_path="$(realpath "${workdir}/jakt-install")"
run cmake \
-GNinja \
-B build-host \
-S . \
-DCMAKE_BUILD_TYPE=Release \
-DSERENITY_SOURCE_DIR="${SERENITY_SOURCE_DIR}" \
-DCMAKE_INSTALL_PREFIX="${install_path}"
target_env
# FIXME: CMAKE_INSTALL_PREFIX should be correctly set by the cmake toolchain file,
# but CMakeToolchain.txt sets it to the host path /usr/local.
run cmake \
-GNinja \
-B build \
-S . \
-DCMAKE_TOOLCHAIN_FILE="${SERENITY_BUILD_DIR}/CMakeToolchain.txt" \
-DSERENITY_SOURCE_DIR="${SERENITY_SOURCE_DIR}" \
-DCMAKE_BUILD_TYPE=Release \
-DJAKT_BOOTSTRAP_COMPILER="${install_path}/bin/jakt" \
-DCMAKE_INSTALL_PREFIX="${SERENITY_INSTALL_ROOT}/usr/local"
}
build() {
run cmake --build build-host
run cmake --install build-host
run cmake --build build
}
install() {
run cmake --install build
}