Add initial FreeBSD script & installation doc (#30981)
This PR adds initial FreeBSD support for building Zed: * Adds `script/freebsd` to install required dependencies on FreeBSD * Adds `docs/freebsd.md` with build instructions and notes * ⚠️ Mentions that `webrtc` is still **work-in-progress** on FreeBSD. Related to : #15309 I’m currently working at discussions : [Discussions](https://github.com/zed-industries/zed/discussions/29550) Release Notes: - N/A --------- Co-authored-by: Peter Tripp <peter@zed.dev>
This commit is contained in:
parent
dc63138089
commit
65a93a0036
4 changed files with 70 additions and 0 deletions
35
script/freebsd
Executable file
35
script/freebsd
Executable file
|
@ -0,0 +1,35 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -xeuo pipefail
|
||||
|
||||
# if root or if sudo/unavailable, define an empty variable
|
||||
if [ "$(id -u)" -eq 0 ]; then
|
||||
maysudo=''
|
||||
else
|
||||
maysudo="$(command -v sudo || command -v doas || true)"
|
||||
fi
|
||||
|
||||
function finalize {
|
||||
# after packages install (curl, etc), get the rust toolchain
|
||||
which rustup >/dev/null 2>&1 || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
echo "Finished installing FreeBSD dependencies with script/freebsd"
|
||||
}
|
||||
|
||||
# FreeBSD
|
||||
# https://www.freebsd.org/ports/
|
||||
pkg=$(command -v pkg || true)
|
||||
if [[ -n $pkg ]]; then
|
||||
deps=(
|
||||
cmake
|
||||
gcc
|
||||
git
|
||||
llvm
|
||||
protobuf
|
||||
rustup-init
|
||||
libx11
|
||||
alsa-lib
|
||||
)
|
||||
$maysudo "$pkg" install "${deps[@]}"
|
||||
finalize
|
||||
exit 0
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue