# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=luakit
pkgver=2.3.6
pkgrel=0
pkgdesc="Fast, small, webkit based browser framework extensible by Lua"
url="https://luakit.github.io/"
# armv7: fails to build
# s390x: install fails
# ppc64le, riscv64, loongarch64: no luajit
arch="all !armv7 !ppc64le !s390x !riscv64 !loongarch64"
license="GPL-3.0-or-later"
depends="
	gsettings-desktop-schemas
	gst-plugins-good
	lua5.1-filesystem
	lua5.1-socket
	"
makedepends="webkit2gtk-4.1-dev luajit-dev"
checkdepends="xvfb luacheck lua5.1-luassert"
options="!check bigdocs" #fixme
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/luakit/luakit/archive/refs/tags/$pkgver.tar.gz
	split-docs.patch
	"

build() {
	make DOCDIR=/usr/share/doc/luakit PREFIX=/usr USE_LUAJIT=1 DEVELOPMENT_PATHS=0
}

check() {
	make run-tests
}

package() {
	make DOCDIR=/usr/share/doc/luakit PREFIX=/usr DESTDIR="$pkgdir" install
}

sha512sums="
0f6fe8f4805fe5ee7de5534534e3ad3d2c459aad152d3b5598e7c25d9c06cfee177098cbcd305bbcd351733dea7e03370139a7ecbd1b022b8cee8da6ca242e1c  luakit-2.3.6.tar.gz
cbef5cbbc7fd820ba11da4886e371ccc5029c29745d22c391370d6dc1fa76b503a1d5cb535450ac8c2406d5a1aead92b7bd21ad5baf0b390455a2052765d9aec  split-docs.patch
"
