aboutsummaryrefslogtreecommitdiffstats
path: root/community/imv/APKBUILD
blob: 1958f90a926e90f4d9877b5519303c79f0eb1925 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=imv
pkgver=4.3.1
pkgrel=1
pkgdesc="Image viewer for X11/Wayland"
url="https://sr.ht/~exec64/imv"
# s390x, mips64 and riscv64 blocked by librsvg
arch="all !s390x !mips64 !riscv64"
license="MIT"
makedepends="
	meson
	asciidoc
	fontconfig-dev
	freeimage-dev
	sdl2_ttf-dev
	librsvg-dev
	wayland-dev
	mesa-dev
	libxkbcommon-dev
	glu-dev
	pango-dev
	inih-dev
	"
checkdepends="
	cmocka
	cmocka-dev
	"
subpackages="$pkgname-doc $pkgname-wayland $pkgname-x11"
source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~exec64/imv/archive/v$pkgver.tar.gz
	move-wayland-and-x11-to-libexec.patch
	"
builddir="$srcdir/$pkgname-v$pkgver"

build() {
	abuild-meson \
		-Dwindows=all \
		-Dtest=enabled \
		-Dman=enabled \
		-Dfreeimage=enabled \
		-Dlibtiff=disabled \
		-Dlibpng=disabled \
		-Dlibjpeg=disabled \
		-Dlibrsvg=enabled \
		-Dlibnsgif=disabled \
		-Dlibheif=disabled \
		. output
	meson compile ${JOBS:+-j ${JOBS}} -C output
}

check() {
	meson test --no-rebuild -v -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

wayland() {
	pkgdesc="Image viewer for Wayland"
	depends="$pkgname=$pkgver-r$pkgrel"
	install_if="$pkgname=$pkgver-r$pkgrel wayland-libs-server"

	amove usr/libexec/imv-wayland
}

x11() {
	pkgdesc="Image viewer for X11"
	depends="$pkgname=$pkgver-r$pkgrel"
	install_if="$pkgname=$pkgver-r$pkgrel libx11"

	amove usr/libexec/imv-x11
}

sha512sums="
f70b95f3f99d7d6a9276370650cef0885938464e3a40ab1768231292ba35d9040f7196a5853ea1268fe6d47cf08d129b3fbae1ca215df96d12ccd85b7efd1ee6  imv-4.3.1.tar.gz
e14260a79083393a5e81933adafe654892d6fc9e33f18eb906e9bcccc4227a9862851e234a0f14b457e87b8a9a7de71168d8b4fa18677b83105ab24bf3dcc60f  move-wayland-and-x11-to-libexec.patch
"