aboutsummaryrefslogtreecommitdiffstats
path: root/testing/php81-pecl-imagick/APKBUILD
blob: e12437c2584a9b850d5b58c4a93bce7bf5ecadbe (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Andy Postnikov <apostnikov@gmail.com>
pkgname=php81-pecl-imagick
_extname=imagick
pkgver=3.7.0_rc1
_pkgver=${pkgver/_rc/RC}
pkgrel=1
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"
depends="php81-common imagemagick"
checkdepends="ghostscript-fonts"
makedepends="php81-dev imagemagick-dev"
subpackages="$pkgname-dev"
source="php-pecl-$_extname-$pkgver.tgz::https://pecl.php.net/get/$_extname-$_pkgver.tgz
	fix-test.patch"
builddir="$srcdir/$_extname-$_pkgver"

build() {
	phpize81
	./configure --prefix=/usr --with-php-config=php-config81
	make
}

check() {
	php81 -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/php81/conf.d
	mkdir -p $_confdir
	echo "extension=$_extname" > $_confdir/$_extname.ini
}

sha512sums="
b90364126e6b2ca9a2065fa4b93e902996a011bb45cbfa9f843a6307964d8108c778ef7af5132a325c35d2aeeea372356fe599a63e85464c25e0c83e6e4b000e  php-pecl-imagick-3.7.0_rc1.tgz
f91e3cb396cb2c0da045035f513185d3d7a50d1ba6abf7f26dd7557b8c19838c64b291cd5b518667e976d5324a8350a347923182fb59769c4d447bf20365fea1  fix-test.patch
"