Installing Aseprite on Fedora 31

Since I’m trying my hand at some game projects, I need to edit sprites. People say nice things about several pixel-oriented paint programs. Probably the two that get the most nice mentions are Piksel and Aseprite. Piksel looks nice and is free, but it seems intended to be run in the browser with some online account, and I’d prefer to avoid another one of those right at this moment. At $15, Aseprite feels like a bargain if it’s something I will really use. I’d definitely like to try it out before paying for it, though. There don’t seem to be any trial options on the steam store, and they don’t offer a version on their site for Fedora. At a glance, the non-steam store options all look to be selling .deb files for Ubuntu similar to the trial option.

Fortunately they develop it in the open, and my handiness with build tools far exceeds my handiness with paint programs. The instructions for building on Linux have a few gaps, especially for non-Debian. Here’s what I’ve worked out based on the other platforms.

(I will offer some variant of this as a PR to the project if they are interested.)

Aseprite depends on their own fork of Skia, a cross-platform graphics library maintained by Google. There seem to be no Fedora packages for Skia, and none of the usual suspects are publishing them, so the usual shortcut of grabbing the spec file for upstream, changing package names, and using it with the fork doesn’t apply.

Aseprite Dependencies

Packaged by the OS

Most of the non-bundled dependencies other than skia are packaged by Fedora:

sudo dnf install -y gcc-c++ cmake ninja-build libX11-devel libXcursor-devel libXi-devel mesa-libGL-devel fontconfig-devel


Skia’s build system relies heavily on python 2. Because that has been deprecated, Fedora has (and others have or will soon) switched /usr/bin/python to python 3. For most tools, you can just explicitly invoke python 2 and it’s a non-issue. But some of the scripts in this build system rely on the shebang #!/usr/bin/env python while only being compatible with python 2. The work-around for that is a virtualenv. Make sure virtualenv-python3 is installed from the system repository if it isn’t already. Then set up a virtualenv for Skia and activate it:

virtualenv -p python2 $HOME/venv-skia
source $HOME/venv-skia/bin/activate

Running the remaining tools from the activated prompt will cause #/usr/bin/env python to find a python 2 interpreter.

Clone the repository

Be sure to get aseprite’s fork of skia and use the aseprite-m81 branch!

git clone -b aseprite-m81
cd skia
python2 tools/git-sync-deps

Generate the build files

Note: These selections were made based on my desire to just use Skia to build Aseprite; read their build documentation if you want to use it for some other purpose.

bin/gn gen out/Release-x64 --args="is_debug=false is_official_build=true"

Note that there are options to use some of the bundled libraries by supplying different arguments here. Since I’m not building this for distribution (Aseprite’s license would not allow that anyway!) the build goes quicker if I just use the versions supplied by my distribution.

Install the required headers and libraries from the system repositories

Even though skia mentions Fedora support, they don’t list the OS packages needed to build it. The following is what I used, derived from what they list for Ubuntu/Debian:

sudo dnf install freeglut-devel fontconfig-devel freetype-devel giflib-devel mesa-libGL-devel mesa-libGLU-devel harfbuzz-devel libicu-devel libjpeg-turbo-devel libpng-devel libwebp-devel

Compile Skia

ninja -C out/Release-x64

Check out, build, install Aseprite

Aseprite uses submodules heavily, so be sure to clone with --recursive.

USE_SHARED_FREETYPE is required on this system because the system-wide freetype library does not match the one in Aseprite and skia was built using it.

git clone --recursive
mkdir cmake-linux-ninja-build
cd cmake-linux-ninja-build
cmake -G Ninja \                                                                                                   100%  
    -DLAF_BACKEND=skia \
    -DSKIA_DIR=$HOME/scratch/skia \
    -DSKIA_LIBRARY_DIR=$HOME/scratch/skia/out/Release-x64 \
ninja install

With that, I have aseprite installed in $HOME/.local/bin, which is on my path by default.

This was all good to learn, but if I’m still using this by the time an update I want to use comes out, and that update includes Fedora support as the FAQ promises, I plan to just suck it up, install Steam on my laptop, and buy it on Steam. If this turns out to be something I use frequently, it’ll be easily worth $15, and having Steam on this machine is heavier than I want, but lighter than carrying around a large pile of dependencies used to build this. (The skia build tree is 3.6G and the aseprite build tree is 2.4G.)

I’m trying on Kev Quirk’s “100 Days To Offload” idea. You can see details and join yourself by visiting