Subject: [PATCH] community/imv: re-enable riscv64 et al

From: Drew DeVault <[email-masked]>
Date: Fri, 14 Jan 2022 23:03:23 +0000

---
 community/imv/APKBUILD | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/community/imv/APKBUILD b/community/imv/APKBUILD
index 1958f90a92..61a688c2b7 100644
--- a/community/imv/APKBUILD
+++ b/community/imv/APKBUILD
@@ -1,11 +1,10 @@
 # Maintainer: Drew DeVault <[email-masked]>
 pkgname=imv
 pkgver=4.3.1
-pkgrel=1
+pkgrel=2
 pkgdesc="Image viewer for X11/Wayland"
 url="https://sr.ht/~exec64/imv"
-# s390x, mips64 and riscv64 blocked by librsvg
-arch="all !s390x !mips64 !riscv64"
+arch="all"
 license="MIT"
 makedepends="
 	meson
@@ -13,7 +12,6 @@ makedepends="
 	fontconfig-dev
 	freeimage-dev
 	sdl2_ttf-dev
-	librsvg-dev
 	wayland-dev
 	mesa-dev
 	libxkbcommon-dev
@@ -31,6 +29,16 @@ source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~exec64/imv/archive/v$pkgver.
 	"
 builddir="$srcdir/$pkgname-v$pkgver"
 
+case $CARCH in
+	s390x|mips64|riscv64)
+		_rsvg=""
+		;;
+	*)
+		makedepends="$makedepends librsvg-dev"
+		_rsvg="-Dlibrsvg=enabled"
+		;;
+esac
+
 build() {
 	abuild-meson \
 		-Dwindows=all \
@@ -40,9 +48,9 @@ build() {
 		-Dlibtiff=disabled \
 		-Dlibpng=disabled \
 		-Dlibjpeg=disabled \
-		-Dlibrsvg=enabled \
 		-Dlibnsgif=disabled \
 		-Dlibheif=disabled \
+		$_rsvg \
 		. output
 	meson compile ${JOBS:+-j ${JOBS}} -C output
 }
-- 
2.34.1