[arch-commits] Commit in php-memcache/repos (4 files)

Evangelos Foutras foutrelis at archlinux.org
Sat Dec 8 12:59:02 UTC 2018


    Date: Saturday, December 8, 2018 @ 12:59:00
  Author: foutrelis
Revision: 412332

archrelease: copy trunk to community-staging-x86_64

Added:
  php-memcache/repos/community-staging-x86_64/
  php-memcache/repos/community-staging-x86_64/PKGBUILD
    (from rev 412331, php-memcache/trunk/PKGBUILD)
  php-memcache/repos/community-staging-x86_64/php-memcache.install
    (from rev 412331, php-memcache/trunk/php-memcache.install)
  php-memcache/repos/community-staging-x86_64/php73.patch
    (from rev 412331, php-memcache/trunk/php73.patch)

----------------------+
 PKGBUILD             |   77 +++++++++++++++++++++++++++++++++++++++++++++++++
 php-memcache.install |   10 ++++++
 php73.patch          |   31 +++++++++++++++++++
 3 files changed, 118 insertions(+)

Copied: php-memcache/repos/community-staging-x86_64/PKGBUILD (from rev 412331, php-memcache/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2018-12-08 12:59:00 UTC (rev 412332)
@@ -0,0 +1,77 @@
+# Maintainer: Evangelos Foutras <evangelos at foutrelis.com>
+
+pkgname=php-memcache
+pkgver=3.0.8
+pkgrel=7
+_commit=fdbd46bbc6f53ed6e024521895e142cbfc9b3340
+pkgdesc="Memcache module for PHP"
+arch=('x86_64')
+url="http://pecl.php.net/package/memcache"
+license=('PHP')
+depends=('php')
+makedepends=('git')
+checkdepends=('memcached')
+backup=('etc/php/conf.d/memcache.ini')
+install=php-memcache.install
+#source=(https://pecl.php.net/get/memcache-$pkgver.tgz)
+source=("git+https://github.com/websupport-sk/pecl-memcache.git#commit=$_commit"
+        php73.patch)
+sha256sums=('SKIP'
+            '4192de8fde7e69ce8d14053d1e0842d61239da4ca9a1317a9451075c4188be0f')
+
+prepare() {
+  cd "$srcdir/pecl-memcache"
+
+  # https://github.com/php/php-src/blob/php-7.3.0RC1/UPGRADING.INTERNALS#L90-L96
+  patch -Np1 -i ../php73.patch
+
+  # Disable UDP tests
+  sed -i "s|^\(\$udpPort2\? =\) .*|\1 0;|" tests/connect.inc
+
+  # Remove flaky tests
+  #   [tests/040.phpt] memcache->increment()/decrement() with multiple keys
+  #   [tests/042.phpt] memcache->set() with multiple values
+  #   strange keys [tests/005.phpt]
+  #   ini_set('session.save_handler') [tests/036.phpt]
+  #   ini_set('memcache.session_redundancy') [tests/044.phpt]
+  #   ini_set('session.save_handler') with unix domain socket [tests/053.phpt]
+  #   session locking [tests/057.phpt]
+  rm tests/{005,036,040,042,044,053,057}.phpt
+}
+
+build() {
+  cd "$srcdir/pecl-memcache"
+
+  phpize
+  ./configure --prefix=/usr
+  make
+}
+
+check() {
+  cd "$srcdir/pecl-memcache"
+
+  sed -i "s|^\(\$domainsocket =\) .*|\1 'unix://$PWD/memcached.sock';|" \
+    tests/connect.inc
+
+  memcached_pids=()
+  memcached -p 11211 -U 11211 >/dev/null        & memcached_pids+=($!)
+  memcached -p 11212 -U 11212 >/dev/null        & memcached_pids+=($!)
+  memcached -s "$PWD/memcached.sock" >/dev/null & memcached_pids+=($!)
+
+  local ret=0
+  make test NO_INTERACTION=1 REPORT_EXIT_STATUS=1 || ret=1
+
+  kill ${memcached_pids[@]}
+
+  return $ret
+}
+
+package() {
+  cd "$srcdir/pecl-memcache"
+
+  make INSTALL_ROOT="$pkgdir" install
+  echo ';extension=memcache.so' >memcache.ini
+  install -Dm644 memcache.ini "$pkgdir/etc/php/conf.d/memcache.ini"
+}
+
+# vim:set ts=2 sw=2 et:

Copied: php-memcache/repos/community-staging-x86_64/php-memcache.install (from rev 412331, php-memcache/trunk/php-memcache.install)
===================================================================
--- community-staging-x86_64/php-memcache.install	                        (rev 0)
+++ community-staging-x86_64/php-memcache.install	2018-12-08 12:59:00 UTC (rev 412332)
@@ -0,0 +1,10 @@
+post_install() {
+  echo '
+    ==> PHP extension
+
+    A config file was stored under /etc/php/conf.d/. In order to use this
+    extension make sure to uncomment it from its config file.
+    '
+}
+
+# vim:set ts=2 sw=2 et:

Copied: php-memcache/repos/community-staging-x86_64/php73.patch (from rev 412331, php-memcache/trunk/php73.patch)
===================================================================
--- community-staging-x86_64/php73.patch	                        (rev 0)
+++ community-staging-x86_64/php73.patch	2018-12-08 12:59:00 UTC (rev 412332)
@@ -0,0 +1,31 @@
+diff --git a/php7/memcache.c b/php7/memcache.c
+index c7d4e0a..1818db4 100644
+--- a/php7/memcache.c
++++ b/php7/memcache.c
+@@ -721,7 +721,7 @@ mmc_t *mmc_find_persistent(const char *host, int host_len, unsigned short port,
+ 		mmc = mmc_server_new(host, host_len, port, udp_port, 1, timeout, retry_interval);
+ 		le->type = le_memcache_server;
+ 		le->ptr  = mmc;
+-		GC_REFCOUNT(le) = 1;
++		GC_SET_REFCOUNT(le, 1);
+ 
+ 		/* register new persistent connection */
+ 		if (zend_hash_str_update_mem(&EG(persistent_list), key, key_len, le, sizeof(*le)) == NULL) {
+@@ -779,7 +779,7 @@ static mmc_t *php_mmc_pool_addserver(
+ 		pool->failure_callback = &php_mmc_failure_callback;
+ 		list_res = zend_register_resource(pool, le_memcache_pool);
+ 		add_property_resource(mmc_object, "connection", list_res);
+-		GC_REFCOUNT(list_res)++;
++		GC_ADDREF(list_res);
+ 	}
+ 	else {
+ 		pool = zend_fetch_resource_ex(connection, "connection", le_memcache_pool);
+@@ -863,7 +863,7 @@ static void php_mmc_connect(INTERNAL_FUNCTION_PARAMETERS, zend_bool persistent)
+ 		mmc_object = return_value;
+ 		object_init_ex(mmc_object, memcache_ce);
+ 		add_property_resource(mmc_object, "connection", list_res);
+-		GC_REFCOUNT(list_res)++;
++		GC_ADDREF(list_res);
+ 	} else {
+ 		RETVAL_TRUE;
+ 	}



More information about the arch-commits mailing list