Package Details: resvg 0.29.0-1

Git Clone URL: (read-only, click to copy)
Package Base: resvg
Description: SVG rendering library and CLI
Upstream URL:
Licenses: MPL2
Submitter: flying-sheep
Maintainer: flying-sheep
Last Packager: flying-sheep
Votes: 19
Popularity: 0.008875
First Submitted: 2018-05-24 11:10 (UTC)
Last Updated: 2023-02-06 17:07 (UTC)

Latest Comments

1 2 3 Next › Last »

flying-sheep commented on 2022-01-27 12:40 (UTC)

Thanks! Your patch didn’t apply for some reason, but I think I got everything.

alerque commented on 2022-01-27 09:51 (UTC)

Sorry if my tone was too abrupt.

The package is functional (thanks for that), my remaining comments are just some style tips for you. Obviously some of this is preference. I find it easier to read & review more terse code that cuts straight to the chase rather than trying to follow a bunch of subshells, etc. For example rather than ( cd path ; make ... ) you can just do make -C path. Rather than a for loop to install two things, you can just tell it to install the two things.

Here is a patch with some simplifications taking advantage of standard install features etc. It also tweaks a few things that are part of Arch package guidelines such as creating build directories in prepare() and not setting unused variables (prepare() doesn't need the exports, they do nothing there). Feel free to cherry pick bits or just apply it with git am < file.patch:

From b28ea50b456cbc16f0f0e0e45d2999d785f0aeac Mon Sep 17 00:00:00 2001
From: Caleb Maclennan <>
Date: Thu, 27 Jan 2022 12:45:45 +0300
Subject: [PATCH] Simplify some of the scripting

Signed-off-by: Caleb Maclennan <>
 .SRCINFO |  4 ++--
 PKGBUILD | 39 +++++++++++++++------------------------
 2 files changed, 17 insertions(+), 26 deletions(-)

diff --git a/.SRCINFO b/.SRCINFO
index e7a6ab4..aac077b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
 pkgbase = resvg
    pkgdesc = SVG rendering library and CLI
    pkgver = 0.20.0
-   pkgrel = 2
+   pkgrel = 3
    url =
    arch = i686
    arch = x86_64
@@ -19,7 +19,7 @@ pkgbase = resvg
    optdepends = qt5-base: For the Qt backend
    optdepends = cairo: For the cairo backend
    optdepends = kio: For the dolphin thumbnailer
-   source = resvg-0.20.0.tar.gz::
+   source =
    sha256sums = b85b46e1a420c3c0b1a68187615d38d32dccad9cc86dfab114df3645912188c7

 pkgname = resvg
diff --git a/PKGBUILD b/PKGBUILD
index 6ae7373..581194a 100644
@@ -1,7 +1,9 @@
 # Maintainer: Philipp A. <>
+# Contributor: Caleb Maclennan <>
 pkgdesc='SVG rendering library and CLI'
 arch=(i686 x86_64)
@@ -13,15 +15,13 @@ optdepends=(
    'kio: For the dolphin thumbnailer'
 makedepends=(cargo clang qt5-base qt5-tools kio cairo pango cmake extra-cmake-modules)

 prepare() {
    cd "$pkgname-$pkgver"
-   export RUSTUP_TOOLCHAIN=stable
-   export CARGO_TARGET_DIR=target
    cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
+   mkdir -p tools/kde-dolphin-thumbnailer/build

 build() {
@@ -30,17 +30,15 @@ build() {
    export RUSTUP_TOOLCHAIN=stable
    export CARGO_TARGET_DIR=target
    cargo build --workspace --frozen --release --all-features
        cd tools/viewsvg
        qmake PREFIX="$pkgdir/usr"
-       cd tools/kde-dolphin-thumbnailer
-       mkdir -p build
-       cd build
+       cd tools/kde-dolphin-thumbnailer/build
        cmake .. \
            -Wno-dev \
            -DCMAKE_CXX_FLAGS="-L../../../target/release" \
@@ -49,30 +47,23 @@ build() {
    cargo doc --release --no-deps -p resvg-capi

 check() {
    cd "$pkgname-$pkgver"
    export RUSTUP_TOOLCHAIN=stable
    cargo test --frozen --all-features

 package() {
    cd "$pkgname-$pkgver"
-   for tool in resvg usvg; do
-       install -Dm755 target/release/$tool "$pkgdir/usr/bin/$tool"
-   done
-   install -Dm755 tools/viewsvg/viewsvg "$pkgdir/usr/bin/viewsvg"
-   (
-       cd tools/kde-dolphin-thumbnailer/build
-       make install
-   )
-   install -Dm755 target/release/ "$pkgdir/usr/lib/"
-   install -d "$pkgdir/usr/share/doc/resvg"  "$pkgdir/usr/include"
-   install -Dm644 c-api/*.h "$pkgdir/usr/include/"
+   install -Dm755 -t "$pkgdir/usr/bin/" target/release/{resvg,usvg}
+   install -Dm755 -t "$pkgdir/usr/bin/" tools/viewsvg/viewsvg
+   make -C tools/kde-dolphin-thumbnailer/build install
+   install -Dm755 -t "$pkgdir/usr/lib/" target/release/
+   install -Dm644 -t "$pkgdir/usr/include/" c-api/*.h
+   install -d "$pkgdir/usr/share/doc/resvg"
    cp -r target/doc/* "$pkgdir/usr/share/doc/resvg"

flying-sheep commented on 2022-01-27 08:24 (UTC)

Ah, with --workspace I can build all the Rust things.

I don’t think the Rust packaging guidelines existed when I wrote this packages so easy with the tone.

alerque commented on 2022-01-26 13:47 (UTC)

There are a number of things that could use cleaning up with this packaging. Can you review the Rust package guidelines because there are a number of things that can be fixed such as prefetching dependencies, running tests, building with the right lock options, etc. that need attention. Additionally please desist with the msg2 business (that's a deprecated private function that's going away) and just don't output anything that isn't part of the upstream build output. The scripting is kind of convoluted too, it takes more code to setup a conditional and call extra processes than it would to just manually run the two correct commands in the appropriate directories.

flying-sheep commented on 2021-02-17 14:02 (UTC) (edited on 2021-02-17 14:04 (UTC) by flying-sheep)

No, you read that incorrectly.

As you can see, kio is both a build dependency and an optional dependency. That’s because a component of this package links against kio, and therefore needs kio when this package is being built or if you need that component.

Build this package and remove the unneeded build dependencies afterwards via:

makepkg -si
sudo pacman -Sc

Even the installed size of the deps is less than 100MB. For me that would add 18 seconds to the build time.

$ LANG=C pacman -Qi karchive kauth kbookmarks kcodecs kcompletion kconfig kconfigwidgets kcoreaddons kcrash kdbusaddons kded kglobalaccel kguiaddons ki18n kiconthemes kio kitemviews kjobwidgets knotifications kservice ktextwidgets kwallet kwidgetsaddons kwindowsystem kxmlgui | \
  grep 'Installed Size' | cut -d' ' -f 5-6 | sed 's| ||;s|B$||' | \
  LANG=C numfmt --from=iec-i | awk '{s+=$1} END {print s}' | numfmt --to=iec

BuZZ-dEE commented on 2021-02-09 07:31 (UTC)

Is it correct, that resvg has all these KDE dependencies?:

karchive-5.78.0-1 kauth-5.78.0-1 kbookmarks-5.78.0-1 kcodecs-5.78.0-1 kcompletion-5.78.0-2 kconfig-5.78.0-1 kconfigwidgets-5.78.0-1 kcoreaddons-5.78.0-1 kcrash-5.78.0-1 kdbusaddons-5.78.0-1 kded-5.78.0-1 kglobalaccel-5.78.0-1 kguiaddons-5.78.0-1 ki18n-5.78.0-1 kiconthemes-5.78.0-1 kio-5.78.0-3 kitemviews-5.78.0-1 kjobwidgets-5.78.0-1 knotifications-5.78.0-1 kservice-5.78.0-1 ktextwidgets-5.78.0-1 kwallet-5.78.0-1 kwidgetsaddons-5.78.0-1 kwindowsystem-5.78.0-1 kxmlgui-5.78.0-1

rien333 commented on 2021-01-05 12:01 (UTC)

That worked. Sorry, I always forget to run rustup update.

flying-sheep commented on 2021-01-05 10:56 (UTC) (edited on 2021-01-05 10:57 (UTC) by flying-sheep)

@rien333 see here:

You need to update Rust to at least 1.45 apparently.

rien333 commented on 2021-01-04 12:00 (UTC)

Thanks for the recent update! Unfortunately, I'm getting this error about halfway compiling:

   Compiling memmap2 v0.1.0
   Compiling rustybuzz v0.3.0
   Compiling fontdb v0.5.1
error[E0277]: the trait bound `char: std::iter::Step` is not satisfied
   --> /home/rw/.cargo/registry/src/
450 |                 for u in '0'..='9' {
    |                          ^^^^^^^^^ the trait `std::iter::Step` is not implemented for `char`
    = note: required because of the requirements on the impl of `std::iter::Iterator` for `std::ops::RangeInclusive<char>`

   Compiling flate2 v1.0.19
error: aborting due to previous error

For more information about this error, try `rustc --explain E0277`.
error: could not compile `rustybuzz`.

To learn more, run the command again with --verbose.
==> ERROR: A failure occurred in build().
error making: resvg

nyanpasu64 commented on 2020-11-03 13:18 (UTC)

I can't get it to build:

The following warnings were emitted during compilation:

warning: clang-10: error: unknown argument: '-fvar-tracking-assignments'
warning: clang-10: error: unknown argument: '-fvar-tracking-assignments'
warning: clang-10: error: unknown argument: '-fvar-tracking-assignments'
warning: clang-10: error: unknown argument: '-fvar-tracking-assignments'
warning: clang-10: error: unknown argument: '-fvar-tracking-assignments'

error: failed to run custom build command for `tiny-skia v0.1.0`

Caused by:
  process didn't exit successfully: `/home/nyanpasu64/.cache/yay/resvg/src/resvg-0.11.0/target/release/build/tiny-skia-066268c03211979b/build-script-build` (exit code: 1)
  --- stdout
  TARGET = Some("x86_64-unknown-linux-gnu")
  OPT_LEVEL = Some("3")
  HOST = Some("x86_64-unknown-linux-gnu")
  CXX_x86_64-unknown-linux-gnu = None
  CXX_x86_64_unknown_linux_gnu = None
  HOST_CXX = None
  CXX = Some("clang++")
  CXXFLAGS_x86_64-unknown-linux-gnu = None
  CXXFLAGS_x86_64_unknown_linux_gnu = None
  CXXFLAGS = Some("-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -g -fvar-tracking-assignments -fdebug-prefix-map=/home/nyanpasu64/.cache/yay/resvg/src=/usr/src/debug")
  DEBUG = Some("false")
  running: "clang++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=x86_64-unknown-linux-gnu" "-march=x86-64" "-mtune=generic" "-O2" "-pipe" "-fno-plt" "-g" "-fvar-tracking-assignments" "-fdebug-prefix-map=/home/nyanpasu64/.cache/yay/resvg/src=/usr/src/debug" "-I" "skia" "-I" "skia/include/third_party/skcms" "-I" "skia-c" "-std=c++17" "-fPIC" "-fno-exceptions" "-fno-rtti" "-fstrict-aliasing" "-fvisibility=hidden" "-fdata-sections" "-ffunction-sections" "-fvisibility-inlines-hidden" "-Wno-unused-function" "-Wno-unused-parameter" "-Wno-unused-private-field" "-DSK_DEBUG=1" "-o" "/home/nyanpasu64/.cache/yay/resvg/src/resvg-0.11.0/target/release/build/tiny-skia-b655a227c00daeed/out/skia/src/core/SkAlphaRuns.o" "-c" "skia/src/core/SkAlphaRuns.cpp"
  running: "clang++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=x86_64-unknown-linux-gnu" "-march=x86-64" "-mtune=generic" "-O2" "-pipe" "-fno-plt" "-g" "-fvar-tracking-assignments" "-fdebug-prefix-map=/home/nyanpasu64/.cache/yay/resvg/src=/usr/src/debug" "-I" "skia" "-I" "skia/include/third_party/skcms" "-I" "skia-c" "-std=c++17" "-fPIC" "-fno-exceptions" "-fno-rtti" "-fstrict-aliasing" "-fvisibility=hidden" "-fdata-sections" "-ffunction-sections" "-fvisibility-inlines-hidden" "-Wno-unused-function" "-Wno-unused-parameter" "-Wno-unused-private-field" "-DSK_DEBUG=1" "-o" "/home/nyanpasu64/.cache/yay/resvg/src/resvg-0.11.0/target/release/build/tiny-skia-b655a227c00daeed/out/skia/src/core/SkArenaAlloc.o" "-c" "skia/src/core/SkArenaAlloc.cpp"
  running: "clang++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=x86_64-unknown-linux-gnu" "-march=x86-64" "-mtune=generic" "-O2" "-pipe" "-fno-plt" "-g" "-fvar-tracking-assignments" "-fdebug-prefix-map=/home/nyanpasu64/.cache/yay/resvg/src=/usr/src/debug" "-I" "skia" "-I" "skia/include/third_party/skcms" "-I" "skia-c" "-std=c++17" "-fPIC" "-fno-exceptions" "-fno-rtti" "-fstrict-aliasing" "-fvisibility=hidden" "-fdata-sections" "-ffunction-sections" "-fvisibility-inlines-hidden" "-Wno-unused-function" "-Wno-unused-parameter" "-Wno-unused-private-field" "-DSK_DEBUG=1" "-o" "/home/nyanpasu64/.cache/yay/resvg/src/resvg-0.11.0/target/release/build/tiny-skia-b655a227c00daeed/out/skia/src/core/SkAnalyticEdge.o" "-c" "skia/src/core/SkAnalyticEdge.cpp"
  running: "clang++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=x86_64-unknown-linux-gnu" "-march=x86-64" "-mtune=generic" "-O2" "-pipe" "-fno-plt" "-g" "-fvar-tracking-assignments" "-fdebug-prefix-map=/home/nyanpasu64/.cache/yay/resvg/src=/usr/src/debug" "-I" "skia" "-I" "skia/include/third_party/skcms" "-I" "skia-c" "-std=c++17" "-fPIC" "-fno-exceptions" "-fno-rtti" "-fstrict-aliasing" "-fvisibility=hidden" "-fdata-sections" "-ffunction-sections" "-fvisibility-inlines-hidden" "-Wno-unused-function" "-Wno-unused-parameter" "-Wno-unused-private-field" "-DSK_DEBUG=1" "-o" "/home/nyanpasu64/.cache/yay/resvg/src/resvg-0.11.0/target/release/build/tiny-skia-b655a227c00daeed/out/skia/src/core/SkAAClip.o" "-c" "skia/src/core/SkAAClip.cpp"
  cargo:warning=clang-10: error: unknown argument: '-fvar-tracking-assignments'
  cargo:warning=clang-10: error: unknown argument: '-fvar-tracking-assignments'
  exit code: 1
  exit code: 1
  running: "clang++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=x86_64-unknown-linux-gnu" "-march=x86-64" "-mtune=generic" "-O2" "-pipe" "-fno-plt" "-g" "-fvar-tracking-assignments" "-fdebug-prefix-map=/home/nyanpasu64/.cache/yay/resvg/src=/usr/src/debug" "-I" "skia" "-I" "skia/include/third_party/skcms" "-I" "skia-c" "-std=c++17" "-fPIC" "-fno-exceptions" "-fno-rtti" "-fstrict-aliasing" "-fvisibility=hidden" "-fdata-sections" "-ffunction-sections" "-fvisibility-inlines-hidden" "-Wno-unused-function" "-Wno-unused-parameter" "-Wno-unused-private-field" "-DSK_DEBUG=1" "-o" "/home/nyanpasu64/.cache/yay/resvg/src/resvg-0.11.0/target/release/build/tiny-skia-b655a227c00daeed/out/skia/src/core/SkBitmapCache.o" "-c" "skia/src/core/SkBitmapCache.cpp"
  cargo:warning=clang-10: error: unknown argument: '-fvar-tracking-assignments'
  cargo:warning=clang-10: error: unknown argument: '-fvar-tracking-assignments'
  exit code: 1
  exit code: 1
  cargo:warning=clang-10: error: unknown argument: '-fvar-tracking-assignments'
  exit code: 1

  --- stderr

  error occurred: Command "clang++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=x86_64-unknown-linux-gnu" "-march=x86-64" "-mtune=generic" "-O2" "-pipe" "-fno-plt" "-g" "-fvar-tracking-assignments" "-fdebug-prefix-map=/home/nyanpasu64/.cache/yay/resvg/src=/usr/src/debug" "-I" "skia" "-I" "skia/include/third_party/skcms" "-I" "skia-c" "-std=c++17" "-fPIC" "-fno-exceptions" "-fno-rtti" "-fstrict-aliasing" "-fvisibility=hidden" "-fdata-sections" "-ffunction-sections" "-fvisibility-inlines-hidden" "-Wno-unused-function" "-Wno-unused-parameter" "-Wno-unused-private-field" "-DSK_DEBUG=1" "-o" "/home/nyanpasu64/.cache/yay/resvg/src/resvg-0.11.0/target/release/build/tiny-skia-b655a227c00daeed/out/skia/src/core/SkAAClip.o" "-c" "skia/src/core/SkAAClip.cpp" with args "clang++" did not execute successfully (status code exit code: 1).