Package Details: resvg 0.44.0-1

Git Clone URL: https://aur.archlinux.org/resvg.git (read-only, click to copy)
Package Base: resvg
Description: SVG rendering library and CLI
Upstream URL: https://github.com/RazrFalcon/resvg
Licenses: MPL2
Submitter: flying-sheep
Maintainer: flying-sheep
Last Packager: flying-sheep
Votes: 24
Popularity: 0.067212
First Submitted: 2018-05-24 11:10 (UTC)
Last Updated: 2024-10-19 15:54 (UTC)

Dependencies (13)

Sources (1)

Latest Comments

1 2 3 4 Next › Last »

Kl4rry commented on 2024-07-18 12:12 (UTC)

Consider setting the target dir like this so that if a user has a global override it does not cause problems.

export CARGO_TARGET_DIR=target

sng commented on 2023-10-26 07:15 (UTC) (edited on 2023-10-26 07:22 (UTC) by sng)

$ makepkg  
==> Making package: resvg 0.36.0-1 (Πεμ 26 Οκτ 2023 10:14:49 πμ EEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found resvg-0.36.0.tar.gz
==> Validating source files with sha256sums...
    resvg-0.36.0.tar.gz ... Passed
==> Extracting sources...
  -> Extracting resvg-0.36.0.tar.gz with bsdtar
==> Starting prepare()...
    Updating crates.io index
error: failed to get `gif` as a dependency of package `resvg v0.36.0 (resvg/src/resvg-0.36.0/crates/resvg)`

Caused by:
  failed to fetch `https://github.com/rust-lang/crates.io-index`

Caused by:
  error reading from the zlib stream; class=Zlib (5)

==> ERROR: A failure occurred in prepare().
    Aborting...

I get this error...

This is on a manjaro box

Can you help?

flying-sheep commented on 2023-10-23 16:05 (UTC)

Thanks! The failing test is now skipped upstream, and I updated the kio5 makedep

Riedler commented on 2023-10-21 00:28 (UTC)

heyo, the kio package changed - I think you'll want kio5 instead

msrd0 commented on 2023-09-22 22:07 (UTC)

You might want to disable the known failing test (https://github.com/RazrFalcon/resvg/issues/644), e.g.

diff --git a/PKGBUILD b/PKGBUILD
index 6558114..ac7c74d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -56,7 +56,7 @@ build() {
 check() {
    cd "$pkgname-$pkgver"
    export RUSTUP_TOOLCHAIN=stable
-   cargo test --frozen --all-features
+   cargo test --frozen --all-features -- --skip paint_servers_radialGradient_focal_point_correction
 }

 package() {

msrd0 commented on 2023-09-20 14:59 (UTC)

This package conflicts with the usvg package

flying-sheep commented on 2023-06-10 14:57 (UTC)

I don’t get it. In the prepare() function, the PKGBUILD fetches the dependencies: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=resvg#n21

I don’t know why that doesn’t execute for you. Are you running makepkg --noextract?

Kaylebor commented on 2023-05-30 11:54 (UTC) (edited on 2023-05-30 11:54 (UTC) by Kaylebor)

Hi,

I was trying to install this for the very first time, and it was breaking, because I did not have Rust installed (and thus I had no Cargo packages locally)

Because of that, the PKGBUILD threw an error complaining about making an HTTP request, on this line: cargo build --workspace --frozen --release --all-features

In short, if you cargo build --frozen, but don't have the packages downloaded locally, it will nonetheless try to download them, hit the --frozen tag, and break.

For me, the fix was to remove --frozen before running the build script, but if you were trying to keep specific dependency versions pinned, you might need to do a bit more than that.

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 <caleb@alerque.com>
Date: Thu, 27 Jan 2022 12:45:45 +0300
Subject: [PATCH] Simplify some of the scripting

Signed-off-by: Caleb Maclennan <caleb@alerque.com>
---
 .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 = https://github.com/RazrFalcon/resvg
    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::https://github.com/RazrFalcon/resvg/archive/v0.20.0.tar.gz
+   source = https://github.com/RazrFalcon/resvg/archive/v0.20.0/resvg-0.20.0.tar.gz
    sha256sums = b85b46e1a420c3c0b1a68187615d38d32dccad9cc86dfab114df3645912188c7

 pkgname = resvg
diff --git a/PKGBUILD b/PKGBUILD
index 6ae7373..581194a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,9 @@
 # Maintainer: Philipp A. <flying-sheep@web.de>
+# Contributor: Caleb Maclennan <caleb@alerque.com>
+
 pkgname=resvg
 pkgver=0.20.0
-pkgrel=2
+pkgrel=3
 pkgdesc='SVG rendering library and CLI'
 arch=(i686 x86_64)
 url="https://github.com/RazrFalcon/$pkgname"
@@ -13,15 +15,13 @@ optdepends=(
    'kio: For the dolphin thumbnailer'
 )
 makedepends=(cargo clang qt5-base qt5-tools kio cairo pango cmake extra-cmake-modules)
-source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
+source=("$url/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
 sha256sums=('b85b46e1a420c3c0b1a68187615d38d32dccad9cc86dfab114df3645912188c7')

 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"
        make
    )
-   
+
    (
-       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() {
            -DCMAKE_BUILD_TYPE=Release
        make
    )
-   
+
    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/libresvg.so "$pkgdir/usr/lib/libresvg.so"
-   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/libresvg.so
+   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"
 }
-- 
2.35.0