# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libeconf
pkgver=0.8.3
pkgrel=0
pkgdesc="Enhanced Config File Parser"
url="https://github.com/openSUSE/libeconf"
arch="all"
license="MIT"
makedepends="meson"
checkdepends="bash"
subpackages="$pkgname-static $pkgname-dev $pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/openSUSE/libeconf/archive/refs/tags/v$pkgver.tar.gz
	musl-tests.patch
	"

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

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

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

sha512sums="
3ca9bfd85f0a6d7e1ff963257d0e427cf6aec2df2f8a8178b7ade7b2122f5321686d75b7eabe9c8ebe5b6414a32d2e22c06a760ac296285a950c2ed24b792deb  libeconf-0.8.3.tar.gz
28431c1f80ee7815991584ef6307dabe593b4da58b9406e6f1a9cb30bfba3e925a48c83b0d3824427631bede5b1249b0c87e0d9fb55971d4ecf90805076b25dd  musl-tests.patch
"
