doc: update building instructions

- remove unnecessary LUA requirements already provided by the build system
- clarify necessary vs optional requirements
- simplify macOS instructions around the minimum targeted deployment version
This commit is contained in:
Benoit Pierre
2025-06-14 12:36:13 +02:00
committed by Frans de Jonge
parent b8369d743a
commit b373941a6f

View File

@@ -14,9 +14,7 @@ You can skip most of the following instructions if desired, and use our premade
To get and compile the source you must have:
- `autoconf`: version greater than 2.64
- `bash`: version 4.0 or greater
- `ccache`: optional, but recommended
- `cmake`: version 3.17.5 or greater
- `gettext`
- `gcc/g++` or `clang/clang++`: with C11 & C++17 support
- `git`
- `make`: version 4.1 or greater
@@ -29,33 +27,45 @@ To get and compile the source you must have:
- `unzip`
- `wget`
For testing:
- `busted`
- `lua`: version 5.1
- `luarocks`
For running the emulator / tests:
- `SDL2`
Optional:
- `7z`: for packing releases
- `ccache`: recommended for faster recompilation times
- `gettext`: for updating translations
- `luacheck`: for linting the codebase with `./kodev check`
### Alpine Linux
Install the prerequisites using apk:
```
sudo apk add autoconf automake bash cmake coreutils curl diffutils \
findutils g++ gcc gettext-dev git grep gzip libtool linux-headers \
lua5.1-busted luarocks5.1 make meson nasm ninja-build patch perl \
pkgconf procps-ng sdl2 tar unzip wget
findutils g++ gcc git grep gzip libtool linux-headers make meson \
nasm ninja-build patch perl pkgconf procps-ng sdl2 tar unzip wget
```
**Note:** don't forget to add `/usr/lib/ninja-build/bin` to `$PATH`
so the real ninja is used (and not the binary provided by samurai).
Optional:
```
sudo apk add 7zip ccache gettext-dev luacheck
```
### Arch Linux
Install the prerequisites using pacman:
```
run0 pacman -S base-devel ca-certificates cmake gcc-libs git \
lua51-busted luarocks meson nasm ninja perl sdl2 unzip wget
meson nasm ninja perl sdl2 unzip wget
```
Optional:
```
run0 pacman -S 7zip ccache luacheck
```
### Debian/Ubuntu
@@ -63,9 +73,9 @@ run0 pacman -S base-devel ca-certificates cmake gcc-libs git \
Install the prerequisites using APT:
```
sudo apt-get install autoconf automake build-essential ca-certificates cmake \
gcc-multilib gettext git libsdl2-2.0-0 libtool libtool-bin lua-busted \
lua5.1 luarocks meson nasm ninja-build patch perl pkg-config unzip wget
sudo apt install autoconf automake build-essential ca-certificates cmake \
gcc-multilib git libsdl2-2.0-0 libtool libtool-bin meson nasm ninja-build \
patch perl pkg-config unzip wget
```
**Note:** Debian distributions might need `meson` to be installed from `bookworm-backports`) because the version provided by the default repositories is too old:
@@ -75,19 +85,28 @@ sudo apt install meson/bookworm-backports
The bookworm-backports repository was already included on Linux Mint Dedian Edition 6.
Otherwise, follow full up-to-date instructions from here: https://wiki.debian.org/Backports.
Optional:
```
sudo apt install ccache gettext lua-check p7zip-full
```
### Fedora/Red Hat
Install the prerequisites using DNF:
```
sudo dnf install autoconf automake cmake gettext gcc gcc-c++ git libtool \
lua5.1 luarocks meson nasm ninja-build patch perl-FindBin procps-ng \
SDL2 unzip wget
sudo dnf install autoconf automake cmake gcc gcc-c++ git libtool meson nasm \
ninja-build patch perl-FindBin procps-ng SDL2 unzip wget
```
And for busted:
Optional:
```
luarocks --lua-version=5.1 --local install busted
sudo dnf install ccache gettext p7zip
```
And for luacheck:
```
sudo dnf install lua-argparse lua-filesystem luarocks
luarocks install luacheck
```
### macOS
@@ -96,7 +115,7 @@ Install the prerequisites using [Homebrew](https://brew.sh/):
```
brew install autoconf automake bash binutils cmake coreutils findutils \
gnu-getopt libtool make meson nasm ninja p7zip pkg-config sdl2 util-linux
gnu-getopt libtool make meson nasm ninja pkg-config sdl2 util-linux
```
You will also have to ensure Homebrew's findutils, gnu-getopt, make & util-linux are in your path, e.g., via
@@ -104,12 +123,15 @@ You will also have to ensure Homebrew's findutils, gnu-getopt, make & util-linux
export PATH="$(brew --prefix)/opt/findutils/libexec/gnubin:$(brew --prefix)/opt/gnu-getopt/bin:$(brew --prefix)/opt/make/libexec/gnubin:$(brew --prefix)/opt/util-linux/bin:${PATH}"
```
*Note:* With current XCode versions, you *will* need to set a minimum deployment version higher than `10.04`. Otherwise, you'll hit various linking errors related to missing unwinding libraries/symbols.
On Mojave, `10.09` has been known to behave with XCode 10, And `10.14` with XCode 11. When in doubt, go with your current macOS version.
Optional:
```
brew install ccache gettext luacheck p7zip
```
*Note:* You can override the default targeted minimum deployment version by setting `MACOSX_DEPLOYMENT_TARGET`:
```
export MACOSX_DEPLOYMENT_TARGET=10.09
```
*Note:* On Catalina (10.15), you will currently *NOT* want to deploy for `10.15`, as [XCode is currently broken in that configuration](https://forums.developer.apple.com/thread/121887)! (i.e., deploy for `10.14` instead).
## Getting the source