mirror of
https://github.com/koreader/koreader.git
synced 2025-12-13 20:36:53 +01:00
doc: fix and improve build requirements (#14713)
- gettext is required since the switch to binary translations catalogs - add shellcheck and shfmt to the optional dependencies for linting - clarify minimum required and recommended versions
This commit is contained in:
@@ -12,17 +12,18 @@ You can skip most of the following instructions if desired, and use our premade
|
|||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
To get and compile the source you must have:
|
To get and compile the source you must have:
|
||||||
- `autoconf`: version greater than 2.64
|
- `autoconf`: version > 2.64
|
||||||
- `bash`: version 4.0 or greater
|
- `bash`: version >= 4.0
|
||||||
- `cmake`: version 3.17.5 or greater
|
- `cmake`: version >= 3.17.5
|
||||||
- `gcc/g++` or `clang/clang++`: with C11 & C++17 support
|
- `gcc/g++` or `clang/clang++`: with C11 & C++17 support
|
||||||
|
- `gettext`
|
||||||
- `git`
|
- `git`
|
||||||
- `make`: version 4.1 or greater
|
- `make`: version >= 4.1 (recommended: >= 4.4 for transparent `-j` / `-l` handling)
|
||||||
- `meson`: version 1.2.0 or greater
|
- `meson`: version >= 1.2.0
|
||||||
- `nasm`
|
- `nasm`
|
||||||
- `ninja`
|
- `ninja` (recommended: >= 1.13.2 for make job server support)
|
||||||
- `patch`
|
- `patch`
|
||||||
- `perl`: version 5 or greater
|
- `perl`: version >= 5
|
||||||
- `pkg-config` or `pkgconf`
|
- `pkg-config` or `pkgconf`
|
||||||
- `unzip`
|
- `unzip`
|
||||||
- `wget`
|
- `wget`
|
||||||
@@ -31,10 +32,9 @@ For running the emulator / tests:
|
|||||||
- `SDL2`
|
- `SDL2`
|
||||||
|
|
||||||
Optional:
|
Optional:
|
||||||
- `7z`: for packing releases
|
- `7z`: for packing releases and the Android build assets
|
||||||
- `ccache`: recommended for faster recompilation times
|
- `ccache`: recommended for faster recompilation times
|
||||||
- `gettext`: for updating translations
|
- `luacheck`, `shellcheck` and `shfmt`: for linting the codebase with `./kodev check`
|
||||||
- `luacheck`: for linting the codebase with `./kodev check`
|
|
||||||
|
|
||||||
### Alpine Linux
|
### Alpine Linux
|
||||||
|
|
||||||
@@ -42,8 +42,9 @@ Install the prerequisites using apk:
|
|||||||
|
|
||||||
```
|
```
|
||||||
sudo apk add autoconf automake bash cmake coreutils curl diffutils \
|
sudo apk add autoconf automake bash cmake coreutils curl diffutils \
|
||||||
findutils g++ gcc git grep gzip libtool linux-headers make meson \
|
findutils g++ gcc gettext-dev git grep gzip libtool linux-headers \
|
||||||
nasm ninja-build patch perl pkgconf procps-ng sdl2 tar unzip wget
|
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`
|
**Note:** don't forget to add `/usr/lib/ninja-build/bin` to `$PATH`
|
||||||
@@ -51,7 +52,7 @@ so the real ninja is used (and not the binary provided by samurai).
|
|||||||
|
|
||||||
Optional:
|
Optional:
|
||||||
```
|
```
|
||||||
sudo apk add 7zip ccache gettext-dev luacheck
|
sudo apk add 7zip ccache luacheck shellcheck shfmt
|
||||||
```
|
```
|
||||||
|
|
||||||
### Arch Linux
|
### Arch Linux
|
||||||
@@ -65,7 +66,7 @@ run0 pacman -S base-devel ca-certificates cmake gcc-libs git \
|
|||||||
|
|
||||||
Optional:
|
Optional:
|
||||||
```
|
```
|
||||||
run0 pacman -S 7zip ccache luacheck
|
run0 pacman -S 7zip ccache luacheck shellcheck shfmt
|
||||||
```
|
```
|
||||||
|
|
||||||
### Debian/Ubuntu
|
### Debian/Ubuntu
|
||||||
@@ -74,20 +75,21 @@ Install the prerequisites using APT:
|
|||||||
|
|
||||||
```
|
```
|
||||||
sudo apt install autoconf automake build-essential ca-certificates cmake \
|
sudo apt install autoconf automake build-essential ca-certificates cmake \
|
||||||
gcc-multilib git libsdl2-2.0-0 libtool libtool-bin meson nasm ninja-build \
|
gcc-multilib gettext git libsdl2-2.0-0 libtool libtool-bin meson nasm \
|
||||||
patch perl pkg-config unzip wget
|
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:
|
**Note:** Debian distributions might need `meson` to be installed from `bookworm-backports`
|
||||||
|
because the version provided by the default repositories is too old:
|
||||||
```
|
```
|
||||||
sudo apt install meson/bookworm-backports
|
sudo apt install meson/bookworm-backports
|
||||||
```
|
```
|
||||||
The bookworm-backports repository was already included on Linux Mint Dedian Edition 6.
|
The bookworm-backports repository was already included on Linux Mint Debian Edition 6.
|
||||||
Otherwise, follow full up-to-date instructions from here: https://wiki.debian.org/Backports.
|
Otherwise, follow full up-to-date instructions from here: https://wiki.debian.org/Backports.
|
||||||
|
|
||||||
Optional:
|
Optional:
|
||||||
```
|
```
|
||||||
sudo apt install ccache gettext lua-check p7zip-full
|
sudo apt install ccache lua-check p7zip-full shellcheck shfmt
|
||||||
```
|
```
|
||||||
|
|
||||||
### Fedora/Red Hat
|
### Fedora/Red Hat
|
||||||
@@ -95,17 +97,17 @@ sudo apt install ccache gettext lua-check p7zip-full
|
|||||||
Install the prerequisites using DNF:
|
Install the prerequisites using DNF:
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo dnf install autoconf automake cmake gcc gcc-c++ git libtool meson nasm \
|
sudo dnf install autoconf automake cmake gcc gcc-c++ gettext git libtool meson \
|
||||||
ninja-build patch perl-FindBin procps-ng SDL2 unzip wget
|
nasm ninja-build patch perl-FindBin procps-ng SDL2 unzip wget
|
||||||
```
|
```
|
||||||
|
|
||||||
Optional:
|
Optional:
|
||||||
```
|
```
|
||||||
sudo dnf install ccache gettext p7zip
|
sudo dnf install ccache p7zip
|
||||||
```
|
```
|
||||||
And for luacheck:
|
And for luacheck:
|
||||||
```
|
```
|
||||||
sudo dnf install lua-argparse lua-filesystem luarocks
|
sudo dnf install lua-argparse lua-filesystem luarocks shellcheck shfmt
|
||||||
luarocks install luacheck
|
luarocks install luacheck
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -115,7 +117,8 @@ Install the prerequisites using [Homebrew](https://brew.sh/):
|
|||||||
|
|
||||||
```
|
```
|
||||||
brew install autoconf automake bash binutils cmake coreutils findutils \
|
brew install autoconf automake bash binutils cmake coreutils findutils \
|
||||||
gnu-getopt libtool make meson nasm ninja pkg-config sdl2 util-linux
|
gettext 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
|
You will also have to ensure Homebrew's findutils, gnu-getopt, make & util-linux are in your path, e.g., via
|
||||||
@@ -125,7 +128,7 @@ export PATH="$(brew --prefix)/opt/findutils/libexec/gnubin:$(brew --prefix)/opt/
|
|||||||
|
|
||||||
Optional:
|
Optional:
|
||||||
```
|
```
|
||||||
brew install ccache gettext luacheck p7zip
|
brew install ccache luacheck p7zip shellcheck shfmt
|
||||||
```
|
```
|
||||||
|
|
||||||
*Note:* You can override the default targeted minimum deployment version by setting `MACOSX_DEPLOYMENT_TARGET`:
|
*Note:* You can override the default targeted minimum deployment version by setting `MACOSX_DEPLOYMENT_TARGET`:
|
||||||
|
|||||||
@@ -7,26 +7,27 @@ pkgs.mkShell {
|
|||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
autoconf
|
autoconf
|
||||||
automake
|
automake
|
||||||
libtool
|
|
||||||
cmake
|
cmake
|
||||||
gcc
|
gcc
|
||||||
|
gettext
|
||||||
git
|
git
|
||||||
gnumake
|
gnumake
|
||||||
|
gnupatch
|
||||||
|
libtool
|
||||||
meson
|
meson
|
||||||
nasm
|
nasm
|
||||||
ninja
|
ninja
|
||||||
gnupatch
|
|
||||||
perl
|
perl
|
||||||
pkg-config
|
pkg-config
|
||||||
|
SDL2
|
||||||
unzip
|
unzip
|
||||||
wget
|
wget
|
||||||
|
# optional
|
||||||
SDL2
|
|
||||||
|
|
||||||
p7zip
|
|
||||||
ccache
|
ccache
|
||||||
gettext
|
|
||||||
luajitPackages.luacheck
|
luajitPackages.luacheck
|
||||||
|
p7zip
|
||||||
|
shellcheck
|
||||||
|
shfmt
|
||||||
];
|
];
|
||||||
|
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
|
|||||||
Reference in New Issue
Block a user