# Contributor: Zach DeCook <zachdecook@librem.one>
# Maintainer: Zach DeCook <zachdecook@librem.one>
pkgname=aquamarine
pkgver=0.4.1
pkgrel=0
pkgdesc="Aquamarine is a very light linux rendering backend library"
url="https://github.com/hyprwm/aquamarine"
arch="all"
license="BSD-3-Clause"
source="
	https://github.com/hyprwm/aquamarine/archive/v$pkgver/aquamarine-v$pkgver.tar.gz
	use-legacy-libgl.patch
	"
makedepends="
	cmake
	eudev-dev
	hwdata-dev
	hyprutils-dev>=0.1.5
	hyprwayland-scanner>=0.4.0
	libdisplay-info-dev
	libinput-dev
	libseat-dev
	mesa-dev
	pixman-dev
	wayland-dev
	wayland-protocols
	"
subpackages="$pkgname-doc $pkgname-dev"
options="!check" # tests are broken

build() {
	cmake -B build \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DCMAKE_BUILD_TYPE=None
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}


sha512sums="
facdfc86761df68369e8e823f87cf84564b861a5d7ceb9fb8930b32b3bfd5e48d77fcc9953553387e4b61e0b24461fd740e249ca8f6a8791d88a9e41e1e47e9f  aquamarine-v0.4.1.tar.gz
4a5a99577deabca2f3748a30bc6d97c0582a3b18e0d9d1c2a9f7cba8db2c8aa571a458574e4586f6ef70889e059d5f129a997c8c04880dddccbc26d4c0b67627  use-legacy-libgl.patch
"
