# Description: Multibyte string module for PHP
# URL: https://www.php.net
# Maintainer: Juergen Daubert, jue at crux dot nu
# Depends on: oniguruma libpcre2

name=php-mbstring
version=8.3.6
release=1
source=(https://www.php.net/distributions/php-$version.tar.xz)

build() {
	cd php-$version

	./configure \
		--disable-all \
		--enable-mbstring=shared \
		--with-external-pcre
	make build-modules

	install -d $PKG/{etc/php/conf.d,usr/lib/php/extensions}
	install -m 755 modules/mbstring.so $PKG/usr/lib/php/extensions/

	printf 'extension=%s\n' mbstring.so > $PKG/etc/php/conf.d/mbstring.ini
}
