Skia-pathops on Raspberry Pi
Manim needs it and it isn't buildable directly, so here is a theoritical steps on to get them working.
I'll follow the version of skia which is fairly recent and tested on other platforms so that it works.
First there are necessary stuff that I assume is already installed.
- Python 3.7+
- Ninja (can be installed with
pip
,pip install ninja
) - Git
- GCC or any other C/CPP compilers
Building GN
This is the buildsystem that skia uses, so building first is necessary. We'll the version
from d62642c920e6a0d1756316d225a90fd6faa9e21e
.
- Clone GN repository and checkout to
d62642c920e6a0d1756316d225a90fd6faa9e21e
git clone https://gn.googlesource.com/gn.git --depth=1
cd gn
git checkout d62642c920e6a0d1756316d225a90fd6faa9e21e
- Run this script present in their source files
python build/gen.py --out-path=out/
- Run ninja in
out
directory
ninja -C out/
- Add
$pwd/out
to PATH variable, so thatgn
command is available in terminal. Or copy it to a different location, you'll need it in the future.
Most likely this should go without any errors.
Building Skia
- Get the builder
git clone --recurse-submodules https://github.com/fonttools/skia-builder.git
cd skia-builder
- Run the main script passing the path where you built
gn
previously (replace<gn_path>
with it).
python build_skia.py --no-fetch-gn --gn-path="<gn_path>" --archive-file "libskia-rpi.zip"
The zip can then be used to built the bindings.