[arch-commits] Commit in php-memcached/repos (3 files)

Pierre Schmitz pierre at archlinux.org
Sat Dec 8 12:49:47 UTC 2018


    Date: Saturday, December 8, 2018 @ 12:49:46
  Author: pierre
Revision: 412318

archrelease: copy trunk to community-staging-x86_64

Added:
  php-memcached/repos/community-staging-x86_64/
  php-memcached/repos/community-staging-x86_64/PKGBUILD
    (from rev 412317, php-memcached/trunk/PKGBUILD)
  php-memcached/repos/community-staging-x86_64/php-7.3.patch
    (from rev 412317, php-memcached/trunk/php-7.3.patch)

---------------+
 PKGBUILD      |   41 +++++++++++++++++++++++++++
 php-7.3.patch |   85 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 126 insertions(+)

Copied: php-memcached/repos/community-staging-x86_64/PKGBUILD (from rev 412317, php-memcached/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2018-12-08 12:49:46 UTC (rev 412318)
@@ -0,0 +1,41 @@
+# Maintainer: Evangelos Foutras <evangelos at foutrelis.com>
+
+pkgname=php-memcached
+pkgver=3.0.4
+pkgrel=3
+pkgdesc="PHP extension for interfacing with memcached via libmemcached library"
+arch=('x86_64')
+url="https://github.com/php-memcached-dev/php-memcached"
+license=('PHP')
+depends=('php' 'libmemcached')
+makedepends=('git')
+backup=('etc/php/conf.d/memcached.ini')
+source=("git+https://github.com/php-memcached-dev/php-memcached.git#tag=v$pkgver"
+        'php-7.3.patch')
+sha256sums=('SKIP'
+            '14f68fdb7352fedc4a086acd8fa68eda32299facfc56a89ee01bf331828d4aef')
+
+prepare() {
+  cd "$srcdir/$pkgname"
+
+  patch -p1 -i "$srcdir/php-7.3.patch"
+}
+
+build() {
+  cd "$srcdir/$pkgname"
+
+  phpize
+  ./configure --prefix=/usr
+  make
+}
+
+package() {
+  cd "$srcdir/$pkgname"
+
+  make INSTALL_ROOT="$pkgdir" install
+
+  install -d "$pkgdir/etc/php/conf.d"
+  echo ';extension=memcached.so' >"$pkgdir/etc/php/conf.d/memcached.ini"
+}
+
+# vim:set ts=2 sw=2 et:

Copied: php-memcached/repos/community-staging-x86_64/php-7.3.patch (from rev 412317, php-memcached/trunk/php-7.3.patch)
===================================================================
--- community-staging-x86_64/php-7.3.patch	                        (rev 0)
+++ community-staging-x86_64/php-7.3.patch	2018-12-08 12:49:46 UTC (rev 412318)
@@ -0,0 +1,85 @@
+From 8bfdbcc9063dafcb25fdb1d1705e07ee027d7379 Mon Sep 17 00:00:00 2001
+From: Aaron Stone <aaron at serendipity.cx>
+Date: Thu, 29 Mar 2018 23:26:46 -0700
+Subject: [PATCH] Update for new PHP 7.3 REFCOUNT macros (#390)
+
+---
+ .travis.yml             | 3 +++
+ php_memcached.c         | 4 ++--
+ php_memcached_private.h | 7 +++++++
+ php_memcached_session.c | 2 +-
+ 4 files changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/.travis.yml b/.travis.yml
+index d2457f5..26973f0 100644
+--- a/.travis.yml
++++ b/.travis.yml
+@@ -3,12 +3,15 @@ dist: trusty
+ 
+ language: php
+ php:
++    - master
+     - 7.2
+     - 7.1
+     - 7.0
+ 
+ matrix:
+     fast_finish: true
++    allow_failures:
++        - php: master
+ 
+ env:
+     - LIBMEMCACHED_VERSION=1.0.18 # Debian Jessie / Ubuntu Xenial
+diff --git a/php_memcached.c b/php_memcached.c
+index a42ff19..bd0f559 100644
+--- a/php_memcached.c
++++ b/php_memcached.c
+@@ -1298,7 +1298,7 @@ static PHP_METHOD(Memcached, __construct)
+ 		le.type = php_memc_list_entry();
+ 		le.ptr  = intern->memc;
+ 
+-		GC_REFCOUNT(&le) = 1;
++		GC_SET_REFCOUNT(&le, 1);
+ 
+ 		/* plist_key is not a persistent allocated key, thus we use str_update here */
+ 		if (zend_hash_str_update_mem(&EG(persistent_list), ZSTR_VAL(plist_key), ZSTR_LEN(plist_key), &le, sizeof(le)) == NULL) {
+@@ -3831,7 +3831,7 @@ PHP_METHOD(MemcachedServer, on)
+ 
+ 		Z_TRY_ADDREF(fci.function_name);
+ 		if (fci.object) {
+-			GC_REFCOUNT(fci.object)++;
++			GC_ADDREF(fci.object);
+ 		}
+ 	}
+ 	RETURN_BOOL(rc);
+diff --git a/php_memcached_private.h b/php_memcached_private.h
+index a04e19b..abc0459 100644
+--- a/php_memcached_private.h
++++ b/php_memcached_private.h
+@@ -72,6 +72,13 @@ typedef unsigned long int uint32_t;
+ #  endif
+ #endif
+ 
++/* Backwards compatibility for GC API change in PHP 7.3 */
++#if PHP_VERSION_ID < 70300
++#  define GC_ADDREF(p)            ++GC_REFCOUNT(p)
++#  define GC_DELREF(p)            --GC_REFCOUNT(p)
++#  define GC_SET_REFCOUNT(p, rc)  GC_REFCOUNT(p) = rc
++#endif
++
+ /****************************************
+   Structures and definitions
+ ****************************************/
+diff --git a/php_memcached_session.c b/php_memcached_session.c
+index d8e9be6..607a02c 100644
+--- a/php_memcached_session.c
++++ b/php_memcached_session.c
+@@ -376,7 +376,7 @@ PS_OPEN_FUNC(memcached)
+ 		le.type = s_memc_sess_list_entry();
+ 		le.ptr  = memc;
+ 
+-		GC_REFCOUNT(&le) = 1;
++		GC_SET_REFCOUNT(&le, 1);
+ 
+ 		/* plist_key is not a persistent allocated key, thus we use str_update here */
+ 		if (zend_hash_str_update_mem(&EG(persistent_list), plist_key, plist_key_len, &le, sizeof(le)) == NULL) {


More information about the arch-commits mailing list