aports/testing/php81-pecl-imagick/APKBUILD

50 lines
1.5 KiB
Text

# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Andy Postnikov <apostnikov@gmail.com>
pkgname=php81-pecl-imagick
_extname=imagick
pkgver=3.8.0_rc2
_pkgver=${pkgver/_rc/RC}
pkgrel=0
pkgdesc="PHP 8.1 extension provides a wrapper to the ImageMagick library - PECL"
url="https://pecl.php.net/package/imagick"
arch="all !x86" # https://gitlab.alpinelinux.org/alpine/aports/-/issues/12537
license="PHP-3.01"
_phpv=81
_php=php$_phpv
depends="$_php-common imagemagick"
checkdepends="ghostscript-fonts
imagemagick-jpeg
imagemagick-svg
"
makedepends="$_php-dev imagemagick-dev"
subpackages="$pkgname-dev"
source="php-pecl-$_extname-$pkgver.tgz::https://pecl.php.net/get/$_extname-$_pkgver.tgz"
builddir="$srcdir/$_extname-$_pkgver"
install_if="php-$_extname php$_phpv"
build() {
phpize$_phpv
./configure --prefix=/usr --with-php-config=php-config$_phpv
make
}
check() {
$_php -dextension=modules/$_extname.so --ri $_extname
# see https://gitlab.alpinelinux.org/alpine/aports/-/issues/12537
[ "$CARCH" = x86 ] && rm -f tests/166_Imagick_waveImage_basic.phpt
make NO_INTERACTION=1 REPORT_EXIT_STATUS=1 test TESTS=--show-diff
}
package() {
make INSTALL_ROOT="$pkgdir" install
local _confdir="$pkgdir"/etc/$_php/conf.d
mkdir -p $_confdir
echo "extension=$_extname" > $_confdir/$_extname.ini
}
sha512sums="
f94ef037df8afb371b8b8b0cac96fc72e4719b0c73537b65ceb36ba5db10b6b172b94374b41349ffba6854fa1177344007bf528e378cb720fe562fd9d4170185 php-pecl-imagick-3.8.0_rc2.tgz
"