#!/usr/bin/env bash
name='kimageformats'
release='2'
version='6.0.0'
url='https://community.kde.org/Frameworks'
description='Image format plugins for Qt5'
email='brkt8khn@gmail.com'
maintainer='brkt8khn'
license=('GPLv3')
source=("https://download.kde.org/stable/frameworks/${version%.*}/kimageformats-${version}.tar.xz")
depends=(qt6-base)
makedepends=(extra-cmake-modules karchive libavif libheif libraw libjxl openexr)
sha256sums=('1ddd28f2fb8ac2c95556f792418c2b6190a04050ac31b27aa82ea11c1af0879c')
group=(kde.frameworks)
uses=()
arch=('x86_64')

cd $name-$version

setup () {
cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_TESTING=OFF \
		-DKIMAGEFORMATS_HEIF=ON

}

build () {
	cmake --build build
}

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

