diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2016-05-05 08:59:33 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2016-05-05 15:43:07 +0000 |
commit | 6e40fdc8b8af9c0ef52d3478825a20179003b8b9 (patch) | |
tree | 7d2ca11a7d28f8e300868c3e07240d7e14995b8a /main/php5-memcache | |
parent | aa21ad2c61d37edcd256643fa6ceed2ab0c8c95f (diff) | |
download | aports-6e40fdc8b8af9c0ef52d3478825a20179003b8b9.tar.bz2 aports-6e40fdc8b8af9c0ef52d3478825a20179003b8b9.tar.xz |
main/php5-memcache: rename to php5
Diffstat (limited to 'main/php5-memcache')
-rw-r--r-- | main/php5-memcache/APKBUILD | 53 | ||||
-rw-r--r-- | main/php5-memcache/memcache-faulty-inline.patch | 141 |
2 files changed, 194 insertions, 0 deletions
diff --git a/main/php5-memcache/APKBUILD b/main/php5-memcache/APKBUILD new file mode 100644 index 0000000000..77dec438bd --- /dev/null +++ b/main/php5-memcache/APKBUILD @@ -0,0 +1,53 @@ +# Contributor: Valery Kartel <valery.kartel@gmail.com> +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +_php=php5 +pkgname=${_php}-memcache +_pkgreal=memcache +pkgver=3.0.8 +_pkgver=${pkgver/_rc/RC} +pkgrel=4 +pkgdesc="PHP extension memcache" +url="http://pecl.php.net/package/$_pkgreal" +arch="all" +license="PHP" +depends= +pecldepends="${_php}-dev autoconf" +makedepends="$pecldepends zlib-dev" +install="" +subpackages="" +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 + ./configure --prefix=/usr || return 1 + make || return 1 +} + +package() { + cd "$_builddir" + make INSTALL_ROOT="$pkgdir"/ install || return 1 + install -d "$pkgdir"/etc/php/conf.d || return 1 + echo "extension=$_pkgreal.so" > "$pkgdir"/etc/php/conf.d/$_pkgreal.ini +} + +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/php5-memcache/memcache-faulty-inline.patch b/main/php5-memcache/memcache-faulty-inline.patch new file mode 100644 index 0000000000..b260d02186 --- /dev/null +++ b/main/php5-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_*/ |