diff options
author | pancake <pancake@nopcode.org> | 2021-07-13 00:59:46 +0200 |
---|---|---|
committer | Gunnar Beutner <gunnar@beutner.name> | 2021-07-13 23:30:59 +0200 |
commit | eb7b7559373767996a80e48e20c58e08fe251c98 (patch) | |
tree | 03cb980f151444baebb259e09d3047bf09e83eba /Ports/vlang | |
parent | 60713c5fcf43638dd50813fdc17ee92315109e0a (diff) | |
download | serenity-eb7b7559373767996a80e48e20c58e08fe251c98.zip |
Ports: Add vlang weekly.2021.28 package
Diffstat (limited to 'Ports/vlang')
-rwxr-xr-x | Ports/vlang/package.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Ports/vlang/package.sh b/Ports/vlang/package.sh new file mode 100755 index 0000000000..08f5cfd60a --- /dev/null +++ b/Ports/vlang/package.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env -S bash ../.port_include.sh +port=v +auth_type=sha256 +version=weekly.2021.28 +files="https://codeload.github.com/vlang/v/tar.gz/refs/tags/$version v-$version.tar.gz a6a28e5a7984439d20e8cc31a01984ced065da9d7bd9ccc1a171f94ca2a06c68" + +build() { + ( + cd "$workdir" + make CC=gcc all # local build + ./v -prod -cc "$CC" -o v2 cmd/v + ) +} + +install() { + # v requires having rw access to the srcdir to rebuild on demand + # so we just copy that into the default user's home for now. + # proper system-wide dist builds will be added in vlang later + mkdir -p "${SERENITY_INSTALL_ROOT}/home/anon/vlang" + cp -rf "$workdir"/* "${SERENITY_INSTALL_ROOT}/home/anon/vlang" + ln -fs "${SERENITY_INSTALL_ROOT}/home/anon/vlang/v2" "${SERENITY_INSTALL_ROOT}/usr/local/bin/v" +} |