aboutsummaryrefslogtreecommitdiffstats
path: root/main/php-memcache
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2016-02-09 10:08:09 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2016-02-09 10:08:22 +0000
commit0aa4af1a9360dbbcccf3327bc451b0813a60d42b (patch)
tree54b6ca44aad36f52755337ffadd22243418e9bcb /main/php-memcache
parentafda767e9a8654587a75ad22013402f92f85daf9 (diff)
downloadaports-0aa4af1a9360dbbcccf3327bc451b0813a60d42b.tar.bz2
aports-0aa4af1a9360dbbcccf3327bc451b0813a60d42b.tar.xz
main/php-memcache: fix relocation error. Fixes #5064
Diffstat (limited to 'main/php-memcache')
-rw-r--r--main/php-memcache/APKBUILD25
-rw-r--r--main/php-memcache/memcache-faulty-inline.patch141
2 files changed, 161 insertions, 5 deletions
diff --git a/main/php-memcache/APKBUILD b/main/php-memcache/APKBUILD
index af5eaf5fd2..c36da9f7c2 100644
--- a/main/php-memcache/APKBUILD
+++ b/main/php-memcache/APKBUILD
@@ -4,7 +4,7 @@ pkgname=php-memcache
_pkgreal=memcache
pkgver=3.0.8
_pkgver=${pkgver/_rc/RC}
-pkgrel=3
+pkgrel=4
pkgdesc="PHP extension memcache"
url="http://pecl.php.net/package/$_pkgreal"
arch="all"
@@ -14,10 +14,22 @@ pecldepends="php-dev autoconf"
makedepends="$pecldepends zlib-dev"
install=""
subpackages=""
-source="http://pecl.php.net/get/$_pkgreal-$_pkgver.tgz"
+source="http://pecl.php.net/get/$_pkgreal-$_pkgver.tgz
+ memcache-faulty-inline.patch
+ "
_builddir="$srcdir"/$_pkgreal-$_pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
build() {
cd "$_builddir"
phpize || return 1
@@ -32,6 +44,9 @@ package() {
echo "extension=$_pkgreal.so" > "$pkgdir"/etc/php/conf.d/$_pkgreal.ini
}
-md5sums="24505e9b263d2c77f8ae5e9b4725e7d1 memcache-3.0.8.tgz"
-sha256sums="2cae5b423ffbfd33a259829849f6000d4db018debe3e29ecf3056f06642e8311 memcache-3.0.8.tgz"
-sha512sums="916c6b21ab7c1021128626c0df35ef0b83cb76b6115fe7c45b003ca4f78ad9484bf3c998bc7ebdee19f84349ff1e56759f74e75aee5bc70b1de9a03c45a99bc3 memcache-3.0.8.tgz"
+md5sums="24505e9b263d2c77f8ae5e9b4725e7d1 memcache-3.0.8.tgz
+15c48766f52bb560bbf02b5015800ef4 memcache-faulty-inline.patch"
+sha256sums="2cae5b423ffbfd33a259829849f6000d4db018debe3e29ecf3056f06642e8311 memcache-3.0.8.tgz
+f0eaec9c3f9715ea1cf7e75f2ae4a7e3558751058a1dc16ebe206e18682faf67 memcache-faulty-inline.patch"
+sha512sums="916c6b21ab7c1021128626c0df35ef0b83cb76b6115fe7c45b003ca4f78ad9484bf3c998bc7ebdee19f84349ff1e56759f74e75aee5bc70b1de9a03c45a99bc3 memcache-3.0.8.tgz
+236e0ae64e64d6874d0f3aa9951b14e6125c88250f5ffa876fa5906473a94fa9d70e95df2e6b9cc52fadcc90b1a3655cbac9dea5300b828ca4f70ca0e6b69ce5 memcache-faulty-inline.patch"
diff --git a/main/php-memcache/memcache-faulty-inline.patch b/main/php-memcache/memcache-faulty-inline.patch
new file mode 100644
index 0000000000..b260d02186
--- /dev/null
+++ b/main/php-memcache/memcache-faulty-inline.patch
@@ -0,0 +1,141 @@
+diff -ru a/memcache_pool.c b/memcache_pool.c
+--- a/memcache_pool.c
++++ b/memcache_pool.c
+@@ -40,7 +40,7 @@
+
+ ZEND_DECLARE_MODULE_GLOBALS(memcache)
+
+-inline void mmc_buffer_alloc(mmc_buffer_t *buffer, unsigned int size) /*
++void mmc_buffer_alloc(mmc_buffer_t *buffer, unsigned int size) /*
+ ensures space for an additional size bytes {{{ */
+ {
+ register size_t newlen;
+@@ -48,7 +48,7 @@
+ }
+ /* }}} */
+
+-inline void mmc_buffer_free(mmc_buffer_t *buffer) /* {{{ */
++void mmc_buffer_free(mmc_buffer_t *buffer) /* {{{ */
+ {
+ if (buffer->value.c != NULL) {
+ smart_str_free(&(buffer->value));
+@@ -1677,7 +1677,7 @@
+ }
+ /* }}} */
+
+-inline int mmc_prepare_key_ex(const char *key, unsigned int key_len, char *result, unsigned int *result_len) /* {{{ */
++int mmc_prepare_key_ex(const char *key, unsigned int key_len, char *result, unsigned int *result_len) /* {{{ */
+ {
+ unsigned int i;
+ if (key_len == 0) {
+@@ -1695,7 +1695,7 @@
+ }
+ /* }}} */
+
+-inline int mmc_prepare_key(zval *key, char *result, unsigned int *result_len) /* {{{ */
++int mmc_prepare_key(zval *key, char *result, unsigned int *result_len) /* {{{ */
+ {
+ if (Z_TYPE_P(key) == IS_STRING) {
+ return mmc_prepare_key_ex(Z_STRVAL_P(key), Z_STRLEN_P(key), result, result_len);
+diff -ru a/memcache_pool.h b/memcache_pool.h
+--- a/memcache_pool.h
++++ b/memcache_pool.h
+@@ -129,8 +129,8 @@
+ #define mmc_buffer_release(b) memset((b), 0, sizeof(*(b)))
+ #define mmc_buffer_reset(b) (b)->value.len = (b)->idx = 0
+
+-inline void mmc_buffer_alloc(mmc_buffer_t *, unsigned int);
+-inline void mmc_buffer_free(mmc_buffer_t *);
++void mmc_buffer_alloc(mmc_buffer_t *, unsigned int);
++void mmc_buffer_free(mmc_buffer_t *);
+
+ /* stream handlers */
+ typedef struct mmc_stream mmc_stream_t;
+@@ -385,8 +385,8 @@
+ double timeval_to_double(struct timeval tv);
+ struct timeval double_to_timeval(double sec);
+
+-inline int mmc_prepare_key_ex(const char *, unsigned int, char *, unsigned int *);
+-inline int mmc_prepare_key(zval *, char *, unsigned int *);
++int mmc_prepare_key_ex(const char *, unsigned int, char *, unsigned int *);
++int mmc_prepare_key(zval *, char *, unsigned int *);
+
+ #define mmc_str_left(h, n, hlen, nlen) ((hlen) >= (nlen) ? memcmp((h), (n), (nlen)) == 0 : 0)
+
+diff -ru a/memcache_queue.c b/memcache_queue.c
+--- a/memcache_queue.c
++++ b/memcache_queue.c
+@@ -26,7 +26,7 @@
+ #include "php.h"
+ #include "memcache_queue.h"
+
+-MMC_QUEUE_INLINE void mmc_queue_push(mmc_queue_t *queue, void *ptr) {
++void mmc_queue_push(mmc_queue_t *queue, void *ptr) {
+ if (mmc_queue_contains(queue, ptr)) return;
+
+ if (queue->len >= queue->alloc) {
+@@ -53,7 +53,7 @@
+ queue->len++;
+ }
+
+-MMC_QUEUE_INLINE void *mmc_queue_pop(mmc_queue_t *queue) {
++void *mmc_queue_pop(mmc_queue_t *queue) {
+ if (queue->len) {
+ void *ptr;
+
+@@ -73,7 +73,7 @@
+ return NULL;
+ }
+
+-MMC_QUEUE_INLINE int mmc_queue_contains(mmc_queue_t *queue, void *ptr) {
++int mmc_queue_contains(mmc_queue_t *queue, void *ptr) {
+ if (queue != NULL) {
+ int i;
+
+@@ -87,14 +87,14 @@
+ return 0;
+ }
+
+-MMC_QUEUE_INLINE void mmc_queue_free(mmc_queue_t *queue) {
++void mmc_queue_free(mmc_queue_t *queue) {
+ if (queue->items != NULL) {
+ efree(queue->items);
+ }
+ memset(queue, 0, sizeof(*queue));
+ }
+
+-MMC_QUEUE_INLINE void mmc_queue_copy(mmc_queue_t *target, mmc_queue_t *source) {
++void mmc_queue_copy(mmc_queue_t *target, mmc_queue_t *source) {
+ if (target->alloc != source->alloc) {
+ target->alloc = source->alloc;
+ target->items = erealloc(target->items, sizeof(*target->items) * target->alloc);
+@@ -106,7 +106,7 @@
+ target->len = source->len;
+ }
+
+-MMC_QUEUE_INLINE void mmc_queue_remove(mmc_queue_t *queue, void *ptr) {
++void mmc_queue_remove(mmc_queue_t *queue, void *ptr) {
+ void *item;
+ mmc_queue_t original = *queue;
+ mmc_queue_release(queue);
+diff -ru a/memcache_queue.h b/memcache_queue.h
+--- a/memcache_queue.h
++++ b/memcache_queue.h
+@@ -43,12 +43,12 @@
+ #define MMC_QUEUE_INLINE inline
+ #endif
+
+-MMC_QUEUE_INLINE void mmc_queue_push(mmc_queue_t *, void *);
+-MMC_QUEUE_INLINE void *mmc_queue_pop(mmc_queue_t *);
+-MMC_QUEUE_INLINE int mmc_queue_contains(mmc_queue_t *, void *);
+-MMC_QUEUE_INLINE void mmc_queue_free(mmc_queue_t *);
+-MMC_QUEUE_INLINE void mmc_queue_copy(mmc_queue_t *, mmc_queue_t *);
+-MMC_QUEUE_INLINE void mmc_queue_remove(mmc_queue_t *, void *);
++extern void mmc_queue_push(mmc_queue_t *, void *);
++extern void *mmc_queue_pop(mmc_queue_t *);
++extern int mmc_queue_contains(mmc_queue_t *, void *);
++extern void mmc_queue_free(mmc_queue_t *);
++extern void mmc_queue_copy(mmc_queue_t *, mmc_queue_t *);
++extern void mmc_queue_remove(mmc_queue_t *, void *);
+
+ #endif /*MEMCACHE_QUEUE_H_*/