Ports: Add vlang weekly.2021.28 package

This commit is contained in:
pancake 2021-07-13 00:59:46 +02:00 committed by Gunnar Beutner
parent 60713c5fcf
commit eb7b755937
2 changed files with 23 additions and 0 deletions

View file

@ -118,6 +118,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^
| [`quake`](quake/) | Quake | 0.65 | https://github.com/SerenityOS/SerenityQuake |
| [`quake2`](quake2/) | QuakeII | 0.1 | https://github.com/SerenityOS/SerenityQuakeII |
| [`r0`](r0/) | r0 (minimalistic commandline hexadecimal editor) | 0.8 | https://github.com/radareorg/r0 |
| [`vlang`](vlang/) | V programming language | weekly.2021.28 | https://github.com/vlang/v |
| [`radare2`](radare2/) | radare2 reverse engineering framework | 5.4.0-git | https://github.com/radareorg/radare2 |
| [`readline`](readline/) | GNU Readline Library | 8.1 | https://tiswww.case.edu/php/chet/readline/rltop.html |
| [`rsync`](rsync/) | rsync | 3.1.3 | https://rsync.samba.org/ |

22
Ports/vlang/package.sh Executable file
View file

@ -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"
}