aboutsummaryrefslogtreecommitdiffstats
path: root/community/kimageformats/APKBUILD
blob: 9d8db0278bb2949ca2485d6ed5908a1e2ce10e68 (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
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-frameworks
pkgname=kimageformats
pkgver=6.2.0
pkgrel=0
pkgdesc="Image format plugins for Qt"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://community.kde.org/Frameworks"
license="LGPL-2.1-or-later"
makedepends="
	extra-cmake-modules
	karchive-dev
	libavif-dev
	libheif-dev
	libraw-dev
	openexr-dev
	qt6-qtbase-dev
	samurai
	"
checkdepends="xvfb-run"
_repo_url="https://invent.kde.org/frameworks/kimageformats.git"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/kimageformats-$pkgver.tar.xz"

case "$CARCH" in
s390x)
	;;
*)
	makedepends="$makedepends libjxl-dev"
	;;
esac

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DKIMAGEFORMATS_HEIF=ON
	cmake --build build
}

check() {
	case "$CARCH" in
		armv7) xvfb-run ctest --test-dir build --output-on-failure -E "kimageformats-read-(psd|hej2|jxl|xcf)" ;;
		s390x) xvfb-run ctest --test-dir build --output-on-failure -E "kimageformats-(read-(psd|hej2|xcf)|write-avif)" ;;
		*) xvfb-run ctest --test-dir build --output-on-failure -E "kimageformats-read-(psd|hej2|xcf)" ;;
	esac
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
eae751e34a2d465b126c4829b5de500fc3ef83c85aa011bd95e5d2e8a4c3f6d144f2e138cd37dac9c51839820834d30c3e6393c61959f0f5c4618f0a7c719124  kimageformats-6.2.0.tar.xz
"