# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libunistring
pkgver=1.4.2
pkgrel=0
pkgdesc="Library for manipulating Unicode strings and C strings"
url="https://www.gnu.org/software/libunistring/"
arch="all"
options="!check"  # Tests fail with musl locale library
license="GPL-2.0-or-later OR LGPL-3.0-or-later"
subpackages="$pkgname-static $pkgname-dev $pkgname-doc"
source="https://ftp.gnu.org/gnu/libunistring/libunistring-$pkgver.tar.xz"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var
	make
}

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

sha512sums="
0215f7f40f426227eca5174140654a3fa43ac1520eeb212c2ba08043470f905687b2703afdda12e9635359a6187643900136b6bb11b422bd7567d17ca71b555f  libunistring-1.4.2.tar.xz
"
