aboutsummaryrefslogtreecommitdiffstats
path: root/testing/uwsgi
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2013-03-07 09:25:54 +0000
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2013-03-07 09:27:21 +0000
commit02608d80cbe6f907dc29b0a1612f5cacd11d42a9 (patch)
treeb45c1d3747b7dedea75db39738cdef5145eeee5f /testing/uwsgi
parent145344949e4754123186613cd9ed6254b990af28 (diff)
downloadaports-02608d80cbe6f907dc29b0a1612f5cacd11d42a9.tar.bz2
aports-02608d80cbe6f907dc29b0a1612f5cacd11d42a9.tar.xz
testing/uwsgi: Lua binding for cache update function
Diffstat (limited to 'testing/uwsgi')
-rw-r--r--testing/uwsgi/APKBUILD13
-rw-r--r--testing/uwsgi/lua-cache-update.patch45
2 files changed, 53 insertions, 5 deletions
diff --git a/testing/uwsgi/APKBUILD b/testing/uwsgi/APKBUILD
index 22551376a6..7bcc28613b 100644
--- a/testing/uwsgi/APKBUILD
+++ b/testing/uwsgi/APKBUILD
@@ -2,14 +2,14 @@
# Maintainer:
pkgname=uwsgi
pkgver=1.4.8
-pkgrel=0
+pkgrel=1
pkgdesc="uWSGI application container server"
url=http://projects.unbit.it/uwsgi/
arch=all
license=GPL-2
makedepends="linux-headers lua-dev python python-dev zeromq-dev"
subpackages="uwsgi-lua uwsgi-python:py"
-source="http://projects.unbit.it/downloads/uwsgi-${pkgver}.tar.gz futimes.patch include-sched.patch"
+source="http://projects.unbit.it/downloads/uwsgi-${pkgver}.tar.gz futimes.patch include-sched.patch lua-cache-update.patch"
_builddir=$srcdir/$pkgname-$pkgver
prepare() {
@@ -65,10 +65,13 @@ py() {
md5sums="10af354eccaae9c447bd5bdc69bcce12 uwsgi-1.4.8.tar.gz
2c9aeb5b2adf1fa45ef4ed6bda47236a futimes.patch
-02c43e001d5f44eb421079e17f9db003 include-sched.patch"
+02c43e001d5f44eb421079e17f9db003 include-sched.patch
+3bba1063b54043561f520d6986e35057 lua-cache-update.patch"
sha256sums="3c35893927a065ed89775cf5a8f66f66d71b060618f4611efbcca76e520aac37 uwsgi-1.4.8.tar.gz
9ad8375325195e577e6b91a1cf7539817b58fbb4efef248d01a4b704a0e8749f futimes.patch
-25cb58a02a9f1f62be227592a31152e960f51d44a9e9d14751375a9468152e90 include-sched.patch"
+25cb58a02a9f1f62be227592a31152e960f51d44a9e9d14751375a9468152e90 include-sched.patch
+fe79c823399c750618572531e8c9ccfa2394da329ce16516af79887f493c1a2d lua-cache-update.patch"
sha512sums="7ead90c0740db0ebc28256b312a98e8de610b62cc82504c738cc2f3d2b0819ae673eb1875ea31abc3e511dc76db9af9fb15f4d1ae2a62f6b67b2a5966cfe2bab uwsgi-1.4.8.tar.gz
9e867a3483197adb5ab99334d0e9f092dab44201ddbead99a4649309fd0584e6793531a147e096459984d26d0a73754688426df1fb4686c041d3889f3d29fdef futimes.patch
-d454dcc5ee0a121ff44584e0da98055e6596e8a750315fe4ce6a5fbc615697b2a19b9b32c51ac9878587a855ec3f072e87a3e4e097a8b743699f58ed0d84ec0f include-sched.patch"
+d454dcc5ee0a121ff44584e0da98055e6596e8a750315fe4ce6a5fbc615697b2a19b9b32c51ac9878587a855ec3f072e87a3e4e097a8b743699f58ed0d84ec0f include-sched.patch
+baf97b56448c8a38334036b11c4fb36805ccfb3b867443afe3b1ee5b91bf10981d61f690184e51fa9e492b6318b657530e2f3f11d803dce17cef1a16c56719ab lua-cache-update.patch"
diff --git a/testing/uwsgi/lua-cache-update.patch b/testing/uwsgi/lua-cache-update.patch
new file mode 100644
index 0000000000..6943a97c9a
--- /dev/null
+++ b/testing/uwsgi/lua-cache-update.patch
@@ -0,0 +1,45 @@
+--- uwsgi-1.4.3/plugins/lua/lua_plugin.c
++++ uwsgi-1.4.3.new/plugins/lua/lua_plugin.c
+@@ -157,6 +157,34 @@
+
+ }
+
++static int uwsgi_api_cache_update(lua_State *L) {
++
++ int args = lua_gettop(L);
++ const char *key ;
++ const char *value ;
++ uint64_t expires = 0;
++ size_t vallen;
++
++
++ if (args > 1) {
++
++ key = lua_tolstring(L, 1, NULL);
++ value = lua_tolstring(L, 2, &vallen);
++ if (args > 2) {
++ expires = lua_tonumber(L, 3);
++ }
++
++ uwsgi_cache_set((char *)key, strlen(key), (char *)value,
++ (uint16_t) vallen, expires,
++ UWSGI_CACHE_FLAG_UPDATE);
++
++ }
++
++ lua_pushnil(L);
++ return 1;
++
++}
++
+ static int uwsgi_api_register_signal(lua_State *L) {
+
+ int args = lua_gettop(L);
+@@ -298,6 +326,7 @@
+ {"send_message", uwsgi_api_send_message},
+ {"cache_get", uwsgi_api_cache_get},
+ {"cache_set", uwsgi_api_cache_set},
++ {"cache_update", uwsgi_api_cache_update},
+ {"register_signal", uwsgi_api_register_signal},
+ {"register_rpc", uwsgi_api_register_rpc},
+ {NULL, NULL}