# Contributor: Galen Abell <galen@galenabell.com>
# Maintainer: Galen Abell <galen@galenabell.com>
pkgname=catimg
pkgver=2.7.0
pkgrel=3
pkgdesc="terminal image renderer"
url="https://github.com/posva/catimg"
arch="all"
license="MIT"
makedepends="cmake samurai"
options="!check" # no tests
subpackages="$pkgname-doc"
source="catimg-$pkgver.tar.gz::https://github.com/posva/catimg/archive/$pkgver.tar.gz
	gcc14.patch
	"

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		cmake_crossopts="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=None \
		$cmake_crossopts
	cmake --build build
}

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

sha512sums="
85b19183a2dc666aeb5655d6b66a40d325160d6ac8b5d38c00bad14ee79d69f2277ba0378af6ea84570a0d41c10d52950d658c0872dc1007e7ae17da7b6abdec  catimg-2.7.0.tar.gz
36b5e3de493fc3189e86856f81f64238e55ca15cb652311580858137e1f2e685093f418ed2b0036dcc76580a40767b8a00ae588f59ec133434a61e98184d0b6d  gcc14.patch
"
