# Contributor: Zach DeCook <zachdecook@librem.one>
maintainer="Zach DeCook <zachdecook@librem.one>"
pkgname=xcur2png
pkgver=0.7.1
pkgrel=2
pkgdesc="Convert X cursors to PNG images and xcursorgen config-file"
url="https://github.com/eworm-de/xcur2png"
arch="all"
license="GPL-3.0-or-later"
subpackages="$pkgname-doc"
source="
	https://github.com/eworm-de/xcur2png/archive/$pkgver/xcur2png-$pkgver.tar.gz
	gcc14.patch
	0001-fix-wrong-math.patch
	"
makedepends="autoconf automake libpng-dev libxcursor-dev"
checkdepends="adwaita-icon-theme"

build() {
	aclocal
	autoheader
	autoconf
	automake --add-missing
	./configure --prefix=/usr
	make
}

check() {
	./xcur2png /usr/share/icons/Adwaita/cursors/default
}

package() {
	make -j1 DESTDIR="$pkgdir" install
}


sha512sums="
3964546602c902674732e47e81e2998171fe37cef08a94c6d3375a7ef905d02141cf312f9c005f506bfac12ce82cd9af1a9d553d6cfb9f8cf1a4f59951fdea1c  xcur2png-0.7.1.tar.gz
f5269af85746d9e6f29e6a04310b0030b9b02dc079f7631a414f99e4abf8ff557796e8fe1f74d594586ca1d3a3f6e167b1bab69204994880eb54cb9f20c1cec5  gcc14.patch
715d2757746a7dc049808f38f60eef9b616802e8b9d8abcff01f3ce7114bce68968c0b5cf55d095e651453d87f3a1039eee7b7ca14501deed54a9f7217b0c46c  0001-fix-wrong-math.patch
"
