# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=fribidi
pkgver=1.0.15
pkgrel=0
pkgdesc="Free Implementation of the Unicode Bidirectional Algorithm"
url="https://github.com/fribidi/fribidi"
arch="all"
license="LGPL-2.1-or-later"
makedepends="meson"
subpackages="$pkgname-doc $pkgname-static $pkgname-dev"
source="https://github.com/fribidi/fribidi/releases/download/v$pkgver/fribidi-$pkgver.tar.xz"

# secfixes:
#   1.0.12-r0:
#     - CVE-2022-25308
#     - CVE-2022-25309
#     - CVE-2022-25310
#   1.0.7-r1:
#     - CVE-2019-18397

build() {
	abuild-meson \
		-Ddefault_library=both \
	. output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
98295f1a7203f401d63cc1da7cce3be6975729055fea54640d25cf05a6e6bc27d2e1a3f8edd1ddf4c7fc5ff6f7f1e2daf2bf86683d4aed5988ade8bfa5da414f  fribidi-1.0.15.tar.xz
"
