Skip to content

Commit

Permalink
Provide at least some support for build from Arch.
Browse files Browse the repository at this point in the history
  • Loading branch information
saurik committed Mar 23, 2024
1 parent 17dd0ea commit dde7948
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -10,7 +10,7 @@ Of course, you do need to have the requisite build tooling installed... in addit

(At this point I will note, as this has come up multiple times: it is neither practical nor appropriate for Orchid's documentation to detail how to install any of these toolchains. The instructions are different for every operating system, are different for every single distribution of Linux, and are often even different for specific versions of a distribution. FWIW, developers already have most of this software installed; and, if you don't, these projects have their own documentation.)

That said, the "usual algorithm" of "try to build it, and if you get an error saying you are missing X, just install X" should work, so I'd just dive in (like, honestly, I'm shocked you are reading this); that said, if you are "feeling lucky", you can run env/setup-mac.sh (if using macOS) or env/setup-lnx.sh (if using Ubuntu), which are scripts that install everything on either macOS or (specifically and only) Ubuntu (and thereby can serve as "documentation" if you refuse to just dive in).
That said, the "usual algorithm" of "try to build it, and if you get an error saying you are missing X, just install X" should work, so I'd just dive in (like, honestly, I'm shocked you are reading this); that said, if you are "feeling lucky", you can run env/setup-mac.sh (if using macOS) or env/setup-lnx.sh (if using Ubuntu/Arch), which are scripts that install everything on either macOS or (specifically and only) Ubuntu (and thereby can serve as "documentation" if you refuse to just dive in).

Given that you have a box capable of compiling other projects (as we aren't using anything "weird", really... meson is probably the rarest dependency we have, and it will be extremely obvious) you can then just go into any subfolder you want (such as app-{android,ios}, or cli-shared/srv-daemon and run "make". Seriously: it's that easy... if it breaks for some reason other than "you ran out of memory / disk space" or "command X not found" (which you can trivially solve), please file an issue.

Expand Down
19 changes: 19 additions & 0 deletions env/lnx-arch.sh
@@ -0,0 +1,19 @@
#!/bin/bash
set -e

pacman -Sy \
ubuntu-keyring \
bc tcl vim \
curl git rsync wget \
fakeroot talloc \
cpio rpm-tools unzip zstd \
clang lld llvm \
binutils aarch64-linux-gnu-binutils \
libc++ libc++abi \
python-pip python-setuptools \
jdk17-openjdk \
bison flex gperf \
gettext groff texinfo \
autoconf autoconf-archive automake \
libtool meson ninja pkgconf \
qemu-system-{x86,aarch64} \
5 changes: 3 additions & 2 deletions env/setup-apt.sh → env/lnx-ubuntu.sh
Expand Up @@ -5,20 +5,21 @@ export DEBIAN_FRONTEND=noninteractive
apt-get update

apt-get -y install \
ubuntu-keyring \
bc tcl xxd \
curl git-core rsync wget \
fakeroot libtalloc-dev \
cpio rpm unzip zstd \
clang clang-tidy lld llvm \
binutils-{aarch64,x86-64}-linux-gnu \
binutils-{x86-64,aarch64}-linux-gnu \
libc++-dev libc++abi-dev \
g++-multilib gcc-multilib \
python3-pip python3-setuptools \
openjdk-11-jre-headless \
bison flex gperf \
gettext groff texinfo \
autoconf autoconf-archive automake \
libtool ninja-build pkg-config \
qemu-system-{x86,arm} \

function usable() {
# Ubuntu bionic ships meson 0.45, which is too old to build glib
Expand Down
3 changes: 2 additions & 1 deletion env/setup-lnx.sh
Expand Up @@ -7,6 +7,7 @@ else
sudo=(sudo -EH)
fi

"${sudo[@]}" env/setup-apt.sh
. /etc/os-release
"${sudo[@]}" "env/lnx-${ID}.sh"

env/setup-all.sh
2 changes: 1 addition & 1 deletion env/uname.mk
Expand Up @@ -13,6 +13,6 @@ uname-m := $(shell uname -m)
uname-s := $(shell uname -s)
uname-o := $(shell uname -o 2>/dev/null)

objcopy = $(host/$*)-objcopy
objcopy = $(shell which $(host/$*)-objcopy objcopy 2>&1 | head -n1)

-include $(pwd)/uname-$(uname-s).mk

0 comments on commit dde7948

Please sign in to comment.