# Contributor: Fabio Ribeiro # Maintainer: Fabio Ribeiro pkgname=php7-pecl-msgpack _pkgreal=msgpack pkgver=2.0.3 pkgrel=1 pkgdesc="PHP extension provides API for communicating with MessagePack serialization - PECL" url="https://pecl.php.net/package/msgpack" arch="all !armv7" # tests fails on armv7 license="PHP" depends="php7-session php7-sockets" makedepends="php7-dev autoconf re2c" source="https://pecl.php.net/get/$_pkgreal-$pkgver.tgz 7c1eb7f70b82bcf611bebc9a9cfd88d5832443a1.patch " # Patch skips broken tests https://github.com/msgpack/msgpack-php/issues/123 builddir="$srcdir"/$_pkgreal-$pkgver provides="php7-msgpack=$pkgver-r$pkgrel" # for backward compatibility replaces="php7-msgpack" # for backward compatibility build() { cd "$builddir" phpize7 ./configure --prefix=/usr --with-php-config=php-config7 make } check() { cd "$builddir" # Tests require session and sockets extensions which are not bundled sed -i 's#PHP_TEST_SHARED_EXTENSIONS = `#PHP_TEST_SHARED_EXTENSIONS = -d extension=/usr/lib/php7/modules/session.so -d extension=/usr/lib/php7/modules/sockets.so `#' Makefile case "$CARCH" in aarch64 | armv7) rm -f tests/035.phpt # https://github.com/msgpack/msgpack-php/issues/123#issuecomment-451620789 ;; esac make NO_INTERACTION=1 REPORT_EXIT_STATUS=1 test } package() { cd "$builddir" make INSTALL_ROOT="$pkgdir"/ install install -d "$pkgdir"/etc/php7/conf.d echo "extension=$_pkgreal.so" > "$pkgdir"/etc/php7/conf.d/50_$_pkgreal.ini } sha512sums="4eaf5d2cd50796349414d8272e210f1c8c2e82d72383f440e13d31742a75b0e2fa1f48bd916c057b4c65778bd90eace7dcc0cdb86931620963e666f3aa6905db msgpack-2.0.3.tgz ae8c505b64631e310020f3addf561a0c5855ebed07eaa0e4c1155dbd77a6e25a2e824d87684298d91f021cf8d028b88a6883f26c21cbea40d8acf46332dd2ce9 7c1eb7f70b82bcf611bebc9a9cfd88d5832443a1.patch"