As seen previously, installing a Flatpak is a relatively simple matter – and with Flatpak bundles even a one-click story. Now, building a Flatpak and the corresponding repository is a slightly different story that I want to tell you with my adventure making a Flatpak for the latest 0.92 version of Inkscape.
I won’t go into detail about the build process itself which is described just alright in the Flatpak developer documentation and a series of blogposts by Flatpak developer Alexander Larsson. Unfortunately, it is not 100% complete and I had to resort to the manpages and existing Flatpak descriptions of other projects to get going.
So first thing you want to do is skip the manual
flatpak build process and
flatpak-builder tool right away. You want to make a package for a real
program and not some toy that does not have any external dependencies anyway,
right? So that’s what I did: I wrote a org.inkscape.Inkscape.json, listing each and
every dependency of Inkscape. Now here is a message to the dear runtime
providers: please provide a runtime for applications based on the C++ versions
of the GNOME libraries such as gtkmm. I wasted tons of brain matter and CPU
cycles hunting down and compiling1 all the correct library versions2.
Speaking of depdendency hell: the dependency “resolution” of
is anything but smart. It caches build output but marks it dirty if any of the
previously declared modules is changed even if there is no direct dependency
between those two modules. Yay!
But besides those issues making the package, pushing the repo to a server and installing the package from a remote is actually a pleasant ride …
If I find a cheap location to store the repo and bundle, I will let you know.
Update: You can find the resulting Flatpak bundle on the main inkscape.org website.
Have I told you what a mess Boost is? C++: ✓. Custom build tool: ✓. SourceForge download: ✓. 2: A salute to our brave package maintainers!