2020-11-27 21:03:20 +02:00

43 lines
1.6 KiB
Plaintext

# Contributor: Fabio Ribeiro <fabiorphp@gmail.com>
# Maintainer: Andy Postnikov <apostnikov@gmail.com>
pkgname=php8-pecl-msgpack
_extname=msgpack
pkgver=2.1.2
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="adce1ab7e6dba603398a2caa1f318c85748d9f991d8f56aaf7b93417c65146ca77916241549e76ef3bdfece0cf893990221e77c251e6369403740b02ae6bcff7 php-pecl-msgpack-2.1.2.tgz"