[arch-commits] Commit in php-redis/trunk (PKGBUILD)

David Runge dvzrv at archlinux.org
Wed Jul 10 20:14:21 UTC 2019


    Date: Wednesday, July 10, 2019 @ 20:14:20
  Author: dvzrv
Revision: 488596

upgpkg: php-redis 5.0.0-2

Building against php-igbinary. Fixing tests and opened ticket upstream about broken test suite.

Modified:
  php-redis/trunk/PKGBUILD

----------+
 PKGBUILD |   21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-07-10 19:31:55 UTC (rev 488595)
+++ PKGBUILD	2019-07-10 20:14:20 UTC (rev 488596)
@@ -4,13 +4,13 @@
 _name=redis
 _upstream=phpredis
 pkgver=5.0.0
-pkgrel=1
+pkgrel=2
 pkgdesc="An API for communicating with the Redis key-value store"
 arch=('x86_64')
 url="https://github.com/phpredis/phpredis/"
 license=('PHP')
-depends=('php' 'liblzf')
-checkdepends=('redis')
+depends=('php-igbinary' 'liblzf')
+checkdepends=('lsof' 'redis')
 optdepends=('redis: use a local redis instance')
 source=("$pkgname-$pkgver.tar.gz::https://github.com/${_upstream}/${_upstream}/archive/${pkgver}.tar.gz")
 sha512sums=('3826cdb48c2747d36ea3ce44eb046ffb3e56e525181276dfa2b88d5484064aa444ae8254954a93260e8d21a095d690eea908d9394721dc5d169e05e92256b575')
@@ -18,6 +18,11 @@
 prepare() {
   mv -v "${_upstream}-${pkgver}" "$pkgname-$pkgver"
   cd "$pkgname-$pkgver"
+  # tempfile is non-standard, Debian only
+  sed -e 's/tempfile/mktemp/g' -i tests/mkring.sh
+  # the kill after shutdown of redis makes it exit with status code 1
+  sed -e '/kill -9/d' -i tests/mkring.sh
+  # disable the extension by default
   echo ";extension=${_name}" > "${_name}.ini"
   phpize
 }
@@ -25,6 +30,7 @@
 build() {
   cd "$pkgname-$pkgver"
   ./configure --prefix=/usr \
+              --enable-redis-igbinary \
               --enable-redis-lzf \
               --with-liblzf=/usr/lib/
   make
@@ -31,8 +37,15 @@
 }
 
 check() {
+  # tests are partly broken:
+  # https://github.com/phpredis/phpredis/issues/1593
+  export TEST_PHP_EXECUTABLE=/usr/bin/php
+  export TEST_PHP_ARGS="-d extension=igbinary -d extension=${srcdir}/${pkgname}-${pkgver}/modules/redis.so"
   cd "$pkgname-$pkgver"
-  make -k test
+  tests/mkring.sh start
+  $TEST_PHP_EXECUTABLE $TEST_PHP_ARGS tests/TestRedis.php --class Redis
+  $TEST_PHP_EXECUTABLE $TEST_PHP_ARGS tests/TestRedis.php --class RedisArray
+  tests/mkring.sh stop
 }
 
 package() {



More information about the arch-commits mailing list