306.10. inkscape-1.4.4
Vector graphics editor — SVG drawing, PDF import, CorelDRAW and Visio files
| Version | 1.4.4, release 1 |
| Shelf | graphics — Graphics applications: painting, vector, photo development and management, image viewers, screenshot and image optimisers |
| Phase | 44_apps (Applications), 230 of 422 in build order |
| Licence | GPL-3.0-or-later |
| Homepage | https://inkscape.org/ |
| Build time | 53.9 SBU |
| Installed size | 73.5 MiB in 4762 files |
| Recipe | ports/core/graphics/inkscape/kpkgbuild |
About
Inkscape is a vector graphics editor whose native format is SVG. It draws and edits paths, shapes, text and gradients, traces bitmaps, imports PDF, EPS, CorelDRAW, Visio and WordPerfect graphics, and exports PNG, PDF, PostScript and more, from its window or from inkscape on the command line. The port builds it on GTK 3 through gtkmm, with the Python extensions that ship with it.
Sources
inkscape-1.4.4.tar.xz(51.4 MiB)
sha256bbce5753a1e08b871a5cf16c665eb060700aaab9a6a379dc63f4c4d9b3b8856e
upstream: https://media.inkscape.org/dl/resources/file/inkscape-1.4.4.tar.xz
archive copy: sources-2/graphics--inkscape-1.4.4.tar.xz
Dependencies
Depends on: cmake, ninja, pkgconf, gettext, perl, python3, gtkmm3, gtk3, glibmm2.66, libsigc++2, cairomm1.14, pangomm2.46, harfbuzz, pango, fontconfig, freetype2, gsl, bdwgc, lcms2, double-conversion, lib2geom, poppler, cairo, glib, libcdr, libvisio, libwpg, librevenge, libjpeg-turbo, libpng, potrace, gspell, gtksourceview4, boost, libxslt, libxml2, zlib, readline, libepoxy, libX11, python3-lxml, numpy, python3-tinycss2, python3-cssselect, python3-scour, python3-pyserial, python3-pyparsing, python3-packaging, python3-pillow, python3-gobject, graphicsmagick.
Required by: no port names it.
Patches
build.sh applies these; kpkg applies nothing by itself.
poppler-26.05.patch— fix: support for popler >= 26.05 font encoding changePoppler version 26.05.0 changed the return type of gfx8bit->getEncoding() from char** to const std::array<const char*,256>&. this caused a compilation error due to type incompatibility: error: assigning to 'char **' from incompatible type 'const std::array<const char *, 256> error: no viable conversion from 'const std::array<const char *, 256>' to 'char **'
poppler-26.06.patch— Fix Building with Poppler 26.06.0- pdfparser: Some `const PDFRectangle *` to `const PDFRectangle &` [1] - pdfparser: Some `const GfxColor *` to `const GfxColor &` [2] - pdf-utils: Add a `getRect(const PDFRectangle &)` alongside `getRect(const PDFRectangle *)` - poppler-cairo-font-engine: `getKey()` now returns std::string and not char[], so change `strcmp` to `std::string(...).compare(...)` [3] - poppler-utils: `obj->dictGetKey()` etc. were removed; use `obj->dict()->getKey()` instead (these have also existed in poppler since the beginning, so shouldn't break any old poppler) [4,5] - svg-builder: `convertGfxColor` now takes `const GfxColor &` as input. A convenience function taking `const GfxColor *` (for older poppler) now calls the new one after confirming `color` is a valid pointer - svg-builder: `_addStopToGradient` now takes `const GfxColor &` as input. This was used only in `convertGfxColor` and therefore doesn't need a helper function for compatibility - testfiles pdf-utils-test: `<poppler/*.h>` to `<*.h>` (see e3eb1210) - testfiles pdf-utils-test: Some `const PDFRectangle *` to `const PDFRectangle &` [1]
Fixes https://gitlab.com/inkscape/inkscape/-/work_items/6210
Upstream Commits:
[1] https://gitlab.freedesktop.org/poppler/poppler/-/commit/d50a4510 [2] https://gitlab.freedesktop.org/poppler/poppler/-/commit/0f94f530 [3] https://gitlab.freedesktop.org/poppler/poppler/-/commit/a3de7f8a [4] https://gitlab.freedesktop.org/poppler/poppler/-/commit/bb13b0f5 [5] https://gitlab.freedesktop.org/poppler/poppler/-/commit/8ae0f8e7
poppler-26.07.patch— Fix building with Poppler 26.07.01. `arrayGetfoo()` to `getArray()->getFoo()` [1] 2. `streamGetFoo()` to `getStream()->getFoo()` [2] 3. indextolabel now requires an `std::string *` and not `GooString *` introduced _POPPLER_STRING_26_7 that changes accordingly.
Relevant poppler commits:
[1] [Remove Object::arrayGetNF](https://gitlab.freedesktop.org/poppler/poppler/-/commit/d9ffc4c29d1975a5c81d6bac9d8a1b6dc5aa1f50): Technically only arrayGetNF was removed, but perusing the commit shows that all `arrayGetFoo` are being changed. I assume they are slated for removal in future releases.
[2] [Remove Object::streamGetDict](gitlab.freedesktop.org/poppler/poppler/-/commit/87edb5a5c40e67e782e54a14a2251547b4acdfb5)
[3] [Use std::string instead of GooString for label](https://gitlab.freedesktop.org/poppler/poppler/-/commit/9e34004aae04064f1b798b5e711e13d0dddacf9e)
(cherry picked from commit 9262f83aff7d8a6cadcb42446f9b943a561910cf)
poppler-26.08.patch— Fix building with Poppler 26.08.0, which now returns std::optional<std::string> from getDocInfoStringEntry, by adding a matching getString() overload.poppler-version-check.patch— Fix incorrect Poppler version check1ad89c941bad5e42a3378cd8644a4c4cd3b6ea71 adapts to changes in Poppler 26.06.0, so that should what be the version we check for.
Identified by @PBS in https://gitlab.com/inkscape/inkscape/-/merge_requests/7968#note_3526749691
Installation
From the repository root, inside the build container, this is the line kdosbuild runs for the port:
script/chroot/exec.sh bash -c 'source script/phases/44_apps/phase.env && kpkg install inkscape'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/graphics/inkscape.
1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.
cd /ports/core/graphics/inkscape
echo 'bbce5753a1e08b871a5cf16c665eb060700aaab9a6a379dc63f4c4d9b3b8856e inkscape-1.4.4.tar.xz' | sha256sum -c -
2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.
SRC_ROOT=/var/cache/kpkg/work/inkscape
SRC=$SRC_ROOT/inkscape-1.4.4
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf inkscape-1.4.4.tar.xz -C "$SRC" --strip-components=1
Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.
3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
for p in poppler-26.05 poppler-26.06 poppler-26.07 poppler-version-check poppler-26.08; do
patch -p1 -i "$PORT_SRC/$p.patch"
done
cmake -S . -B build -G Ninja \
-D CMAKE_POLICY_VERSION_MINIMUM=3.5 \
-D CMAKE_INSTALL_PREFIX=/usr \
-D CMAKE_INSTALL_LIBDIR=lib \
-D CMAKE_BUILD_TYPE=Release \
-D BUILD_SHARED_LIBS=ON \
-D BUILD_TESTING=OFF \
-D WITH_INTERNAL_2GEOM=OFF \
-D ENABLE_POPPLER=ON \
-D ENABLE_POPPLER_CAIRO=ON \
-D ENABLE_LCMS=ON \
-D WITH_IMAGE_MAGICK=OFF \
-D WITH_GRAPHICS_MAGICK=ON \
-D WITH_LIBCDR=ON \
-D WITH_LIBVISIO=ON \
-D WITH_LIBWPG=ON \
-D WITH_GSPELL=ON \
-D WITH_GSOURCEVIEW=ON \
-D WITH_GNU_READLINE=ON \
-D WITH_OPENMP=ON \
-D WITH_SVG2=ON \
-D WITH_X11=ON \
-D WITH_NLS=ON \
-D WITH_JEMALLOC=OFF \
-D WITH_MANPAGE_COMPRESSION=OFF \
-D ENABLE_BINRELOC=OFF \
-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build
rm -rf "$PKG/usr/share/inkscape/extensions/inkman"
find "$PKG/usr/share/man" -mindepth 1 -maxdepth 1 ! -name 'man[0-9]*' -exec rm -rf {} +
find "$PKG/usr/share/inkscape/tutorials" -name '*.*.*' -exec rm -f {} +
cat > "$PKG/usr/share/applications/org.inkscape.Inkscape.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=Inkscape
GenericName=Vector Graphics Editor
Comment=Create and edit Scalable Vector Graphics images
TryExec=inkscape
Exec=inkscape %F
Icon=org.inkscape.Inkscape
Terminal=false
StartupNotify=true
StartupWMClass=org.inkscape.Inkscape
MimeType=image/svg+xml;image/svg+xml-compressed;application/vnd.corel-draw;application/pdf;application/postscript;image/x-eps;application/illustrator;image/x-wmf;image/x-emf;application/x-xccx;application/x-xcdt;application/x-xcmx;image/x-xcdr;application/visio;application/x-visio;application/vnd.visio;application/vnd.ms-visio.viewer;application/visio.drawing;application/vsd;application/x-vsd;image/x-vsd;
Categories=Graphics;VectorGraphics;GTK;
Keywords=image;editor;vector;drawing;svg;inkscape;
Actions=new-window;
[Desktop Action new-window]
Name=Open a New Window
Exec=inkscape
DESKTOP
chmod 644 "$PKG/usr/share/applications/org.inkscape.Inkscape.desktop"
The switches, and why each is set:
-D BUILD_SHARED_LIBS=ON— Builds Inkscape’s internal library,inkscape_base, as a shared library that the program links; upstream’s default, named.-D WITH_INTERNAL_2GEOM=OFF— Uses the tree’s lib2geom instead of the copy in the tarball; upstream’s default, named.-D ENABLE_POPPLER=ON,-D ENABLE_POPPLER_CAIRO=ON— PDF import through poppler, and its Cairo renderer for the import dialog’s preview. Thepoppler-*patches are what keep this importer compiling against the tree’s poppler.-D WITH_IMAGE_MAGICK=OFF,-D WITH_GRAPHICS_MAGICK=ON— The raster effects under Extensions > Raster, and reading an embedded image’s resolution, link Magick++ from graphicsmagick. Upstream’s ImageMagick probe asks for ImageMagick 6; its option is off so the probe is not made, and without either library the raster effects are absent.-D ENABLE_LCMS=ON,-D WITH_LIBCDR=ON,-D WITH_LIBVISIO=ON,-D WITH_LIBWPG=ON,-D WITH_GSPELL=ON,-D WITH_GSOURCEVIEW=ON,-D WITH_GNU_READLINE=ON,-D WITH_OPENMP=ON,-D WITH_SVG2=ON,-D WITH_X11=ON— Upstream’s defaults, named: colour management through lcms2, the CorelDRAW, Visio and WordPerfect importers, spell checking, syntax colouring in the XML and CSS editors, readline ininkscape --shell, OpenMP threads for filters, the SVG 2 features, and GTK 3’s X11 half for running under Xwayland.-D WITH_NLS=ON— Builds the gettext set-up, which binds theinkscapetext domain to its catalog directory at start. Every extension Inkscape loads, at every start and every export, asks for that binding withbindtextdomain("inkscape", NULL); on musl an unbound domain answersNULL, which Inkscape stores in astd::stringand crashes on. The option needsmsgfmtfrom gettext, and without it upstream turns itself back off with only a status message. The translations it compiles are removed bykpkg, so the package is still English only (see Size and language policy).-D WITH_JEMALLOC=OFF— The C library’s allocator rather than jemalloc; upstream’s default, named.-D WITH_MANPAGE_COMPRESSION=OFF— Installs the manual pages uncompressed, like every other page on the image. Upstream gzips them whenevergzipis found.-D ENABLE_BINRELOC=OFF— Fixed install paths rather than ones found relative to the program at run time; upstream’s default, named.
The common switches of each build system are explained in the Flag glossary.
4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/inkscape, prunes what the image does not ship, lints the tree and rolls it reproducibly:
tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
--mtime=@$SOURCE_DATE_EPOCH \
--use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
-cf inkscape-1.4.4-1.tar.xz -C "$PKG" .
5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/inkscape, and runs the triggers its paths call for.
Contents
Installed programs: inkscape, inkview.
Installed directories: /usr/lib/inkscape, /usr/share/inkscape, /usr/share/licenses/inkscape.
Short descriptions
inkscape |
an SVG (Scalable Vector Graphics) editing program. |
inkview |
an SVG viewer and slideshow program. |
Notes
Upstream looks for gspell, gtksourceview, the CorelDRAW, Visio and WordPerfect libraries, readline, OpenMP and the Magick++ library and, when one is not found, turns its option off with no error. Naming the option ON does not make the library required; it is the library’s entry in depends that keeps the feature in the package.
The patches are upstream’s own commits for poppler releases newer than this Inkscape release, and the loop in build.sh applies them in the order of their commit dates, which puts the version-check correction before the last of the release fixes. The PDF importer uses poppler’s private headers, whose interface changes with every poppler release, so a poppler update can need another such patch.
After the install, build.sh removes the extension manager, extensions/inkman, which installs extensions from the network into a private Python environment and fails on a machine with no network; the translated manual-page directories; and every translated tutorial file, any name with a language before its extension (tutorial-<name>.<language>.svg and translated screenshots such as potrace.<language>.png), keeping the English tutorial-<name>.svg and its images.
Upstream’s desktop entry is replaced by one with StartupWMClass=org.inkscape.Inkscape: GTK 3 takes the Wayland app_id from the program name, which Inkscape sets to its application id. The hicolor PNG icons it names are upstream’s.