aboutsummaryrefslogtreecommitdiffstats
path: root/community/php8-pecl-msgpack/APKBUILD
blob: 0b0e91f99aa84e5454b97c1a6d966bdfb59bfa41 (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: Fabio Ribeiro <fabiorphp@gmail.com>
# Maintainer: Andy Postnikov <apostnikov@gmail.com>
pkgname=php8-pecl-msgpack
_extname=msgpack
pkgver=2.2.0_rc1
_pkgver=${pkgver/_rc/RC}
pkgrel=0
pkgdesc="PHP 8 extension provides API for communicating with MessagePack serialization - PECL"
url="https://pecl.php.net/package/msgpack"
arch="all"
license="BSD-3-Clause"
depends="php8-session php8-sockets"
makedepends="php8-dev"
source="php-pecl-$_extname-$_pkgver.tgz::https://pecl.php.net/get/$_extname-$_pkgver.tgz"
builddir="$srcdir"/$_extname-$_pkgver
provides="php-msgpack=$pkgver-r$pkgrel" # for backward compatibility
replaces="php-msgpack" # for backward compatibility

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

check() {
	rm -f tests/034.phpt # XFAIL https://github.com/msgpack/msgpack-php/issues/136
	rm -f tests/035.phpt # fails on ppc64le as of slow environment https://github.com/msgpack/msgpack-php/issues/123
	# Tests require session and sockets extensions which are not bundled
	local _depsdir=/usr/lib/php8/modules
	make NO_INTERACTION=1 REPORT_EXIT_STATUS=1 test PHP_TEST_SHARED_EXTENSIONS="
		-d extension=$_depsdir/session.so \
		-d extension=$_depsdir/sockets.so \
		-d extension=modules/$_extname.so" TESTS=--show-diff
}

package() {
	make INSTALL_ROOT="$pkgdir" install
	local _confdir="$pkgdir"/etc/php8/conf.d
	install -d $_confdir
	echo "extension=$_extname" > $_confdir/50_$_extname.ini
}

sha512sums="
4ddb9b6e9f4d9255d49c10e03a9ad4b37cf869f30b5e3c333518314bdbdfa8d4d20996a24954da19cba6352e76e02488b813fe6aa107c8fe390d6ca85d625096  php-pecl-msgpack-2.2.0RC1.tgz
"