diff options
author | root <root@rshg054.dnsready.net> | 2012-12-12 02:49:40 -0800 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-12-12 02:49:40 -0800 |
commit | 6768c115af3c5f0772bcf7b02f34a88a880876c0 (patch) | |
tree | cf59712968581c230363f5604ad8f253cc0b5d87 /community/luasocket | |
parent | ab94338181959432cf0046ce0a9643307dab9366 (diff) |
Wed Dec 12 02:43:53 PST 2012
Diffstat (limited to 'community/luasocket')
-rw-r--r-- | community/luasocket/PKGBUILD | 55 | ||||
-rw-r--r-- | community/luasocket/lua52.patch | 168 |
2 files changed, 208 insertions, 15 deletions
diff --git a/community/luasocket/PKGBUILD b/community/luasocket/PKGBUILD index 21e96f09d..88c9d5714 100644 --- a/community/luasocket/PKGBUILD +++ b/community/luasocket/PKGBUILD @@ -1,27 +1,52 @@ -# $Id: PKGBUILD 49637 2011-06-18 20:20:18Z foutrelis $ +# $Id: PKGBUILD 81121 2012-12-12 00:49:32Z eric $ # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> # Contributor: Anders Bergh <anders1@gmail.com> -pkgname=luasocket +pkgbase=luasocket +pkgname=(lua-socket lua51-socket) pkgver=2.0.2 -pkgrel=5 -pkgdesc="Luasocket is the most comprehensive networking support library for the Lua language." +pkgrel=1 +pkgdesc='Networking support library for the Lua language' arch=('i686' 'x86_64') -url="http://www.cs.princeton.edu/~diego/professional/luasocket/" +url='http://www.cs.princeton.edu/~diego/professional/luasocket/' license=('MIT') -depends=(lua) +replaces=('luasocket') +conflicts=('luasocket') +makedepends=('lua' 'lua51') source=(http://luaforge.net/frs/download.php/2664/luasocket-$pkgver.tar.gz - luasocket-arch.patch - luasocket-unixsocket.patch) + luasocket-unixsocket.patch + lua52.patch) md5sums=('41445b138deb7bcfe97bff957503da8e' - '3270f42ff374f230c6450f49132f8625' - '8d116bb70bd7a2fa15cbe949d4cfc35e') + '8d116bb70bd7a2fa15cbe949d4cfc35e' + '6f9c6416dd70a7bc1a867003f08c2752') build() { - cd "$srcdir/$pkgname-$pkgver" - patch -p1 < $srcdir/luasocket-arch.patch - patch -p1 < $srcdir/luasocket-unixsocket.patch + msg2 'Building with lua 5.2' + cp -a $pkgbase-$pkgver $pkgbase-$pkgver-52 + cd $pkgbase-$pkgver-52 + patch -Np1 -i "$srcdir/luasocket-unixsocket.patch" + patch -Np1 -i "$srcdir/lua52.patch" make - make DESTDIR="$pkgdir" install - install -D -m0644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE + msg2 'Building with lua 5.1' + cd ../$pkgbase-$pkgver + patch -Np1 -i "$srcdir/luasocket-unixsocket.patch" + make LUAINC=-I/usr/include/lua5.1 +} + +package_lua-socket() { + depends=('lua') + cd $pkgbase-$pkgver + make DESTDIR="$pkgdir/" \ + INSTALL_TOP_SHARE='$(DESTDIR)/usr/share/lua/5.1' \ + INSTALL_TOP_LIB='$(DESTDIR)/usr/lib/lua/5.1' install + install -D -m0644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} + +package_lua51-socket() { + depends=('lua51') + cd $pkgbase-$pkgver + make DESTDIR="$pkgdir/" \ + INSTALL_TOP_SHARE='$(DESTDIR)/usr/share/lua/5.2' \ + INSTALL_TOP_LIB='$(DESTDIR)/usr/lib/lua/5.2' install + install -D -m0644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } diff --git a/community/luasocket/lua52.patch b/community/luasocket/lua52.patch new file mode 100644 index 000000000..4eef574ee --- /dev/null +++ b/community/luasocket/lua52.patch @@ -0,0 +1,168 @@ +diff -wbBur luasocket-2.0.2/src/auxiliar.c luasocket-2.0.2.my/src/auxiliar.c +--- luasocket-2.0.2/src/auxiliar.c 2007-10-15 08:21:05.000000000 +0400 ++++ luasocket-2.0.2.my/src/auxiliar.c 2012-11-14 18:23:14.000000000 +0400 +@@ -24,7 +24,7 @@ + * Creates a new class with given methods + * Methods whose names start with __ are passed directly to the metatable. + \*-------------------------------------------------------------------------*/ +-void auxiliar_newclass(lua_State *L, const char *classname, luaL_reg *func) { ++void auxiliar_newclass(lua_State *L, const char *classname, luaL_Reg *func) { + luaL_newmetatable(L, classname); /* mt */ + /* create __index table to place methods */ + lua_pushstring(L, "__index"); /* mt,"__index" */ +diff -wbBur luasocket-2.0.2/src/auxiliar.h luasocket-2.0.2.my/src/auxiliar.h +--- luasocket-2.0.2/src/auxiliar.h 2007-10-15 08:21:05.000000000 +0400 ++++ luasocket-2.0.2.my/src/auxiliar.h 2012-11-14 18:23:42.000000000 +0400 +@@ -35,7 +35,7 @@ + #include "lauxlib.h" + + int auxiliar_open(lua_State *L); +-void auxiliar_newclass(lua_State *L, const char *classname, luaL_reg *func); ++void auxiliar_newclass(lua_State *L, const char *classname, luaL_Reg *func); + void auxiliar_add2group(lua_State *L, const char *classname, const char *group); + void auxiliar_setclass(lua_State *L, const char *classname, int objidx); + void *auxiliar_checkclass(lua_State *L, const char *classname, int objidx); +diff -wbBur luasocket-2.0.2/src/except.c luasocket-2.0.2.my/src/except.c +--- luasocket-2.0.2/src/except.c 2007-10-15 08:21:05.000000000 +0400 ++++ luasocket-2.0.2.my/src/except.c 2012-11-14 18:23:23.000000000 +0400 +@@ -21,7 +21,7 @@ + static int do_nothing(lua_State *L); + + /* except functions */ +-static luaL_reg func[] = { ++static luaL_Reg func[] = { + {"newtry", global_newtry}, + {"protect", global_protect}, + {NULL, NULL} +diff -wbBur luasocket-2.0.2/src/inet.c luasocket-2.0.2.my/src/inet.c +--- luasocket-2.0.2/src/inet.c 2007-10-15 08:21:05.000000000 +0400 ++++ luasocket-2.0.2.my/src/inet.c 2012-11-14 18:23:47.000000000 +0400 +@@ -21,7 +21,7 @@ + static int inet_global_gethostname(lua_State *L); + + /* DNS functions */ +-static luaL_reg func[] = { ++static luaL_Reg func[] = { + { "toip", inet_global_toip }, + { "tohostname", inet_global_tohostname }, + { "gethostname", inet_global_gethostname}, +diff -wbBur luasocket-2.0.2/src/luasocket.c luasocket-2.0.2.my/src/luasocket.c +--- luasocket-2.0.2/src/luasocket.c 2007-10-15 08:21:05.000000000 +0400 ++++ luasocket-2.0.2.my/src/luasocket.c 2012-11-14 18:23:26.000000000 +0400 +@@ -47,7 +47,7 @@ + /*-------------------------------------------------------------------------*\ + * Modules and functions + \*-------------------------------------------------------------------------*/ +-static const luaL_reg mod[] = { ++static const luaL_Reg mod[] = { + {"auxiliar", auxiliar_open}, + {"except", except_open}, + {"timeout", timeout_open}, +@@ -59,7 +59,7 @@ + {NULL, NULL} + }; + +-static luaL_reg func[] = { ++static luaL_Reg func[] = { + {"skip", global_skip}, + {"__unload", global_unload}, + {NULL, NULL} +diff -wbBur luasocket-2.0.2/src/mime.c luasocket-2.0.2.my/src/mime.c +--- luasocket-2.0.2/src/mime.c 2007-10-15 08:21:05.000000000 +0400 ++++ luasocket-2.0.2.my/src/mime.c 2012-11-14 18:23:31.000000000 +0400 +@@ -48,7 +48,7 @@ + static size_t qppad(UC *input, size_t size, luaL_Buffer *buffer); + + /* code support functions */ +-static luaL_reg func[] = { ++static luaL_Reg func[] = { + { "dot", mime_global_dot }, + { "b64", mime_global_b64 }, + { "eol", mime_global_eol }, +diff -wbBur luasocket-2.0.2/src/select.c luasocket-2.0.2.my/src/select.c +--- luasocket-2.0.2/src/select.c 2007-10-15 08:21:05.000000000 +0400 ++++ luasocket-2.0.2.my/src/select.c 2012-11-14 18:23:35.000000000 +0400 +@@ -27,7 +27,7 @@ + static int global_select(lua_State *L); + + /* functions in library namespace */ +-static luaL_reg func[] = { ++static luaL_Reg func[] = { + {"select", global_select}, + {NULL, NULL} + }; +diff -wbBur luasocket-2.0.2/src/tcp.c luasocket-2.0.2.my/src/tcp.c +--- luasocket-2.0.2/src/tcp.c 2007-10-15 08:21:05.000000000 +0400 ++++ luasocket-2.0.2.my/src/tcp.c 2012-11-14 18:23:38.000000000 +0400 +@@ -38,7 +38,7 @@ + static int meth_dirty(lua_State *L); + + /* tcp object methods */ +-static luaL_reg tcp[] = { ++static luaL_Reg tcp[] = { + {"__gc", meth_close}, + {"__tostring", auxiliar_tostring}, + {"accept", meth_accept}, +@@ -73,7 +73,7 @@ + }; + + /* functions in library namespace */ +-static luaL_reg func[] = { ++static luaL_Reg func[] = { + {"tcp", global_create}, + {NULL, NULL} + }; +diff -wbBur luasocket-2.0.2/src/timeout.c luasocket-2.0.2.my/src/timeout.c +--- luasocket-2.0.2/src/timeout.c 2007-10-15 08:21:05.000000000 +0400 ++++ luasocket-2.0.2.my/src/timeout.c 2012-11-14 18:23:21.000000000 +0400 +@@ -33,7 +33,7 @@ + static int timeout_lua_gettime(lua_State *L); + static int timeout_lua_sleep(lua_State *L); + +-static luaL_reg func[] = { ++static luaL_Reg func[] = { + { "gettime", timeout_lua_gettime }, + { "sleep", timeout_lua_sleep }, + { NULL, NULL } +diff -wbBur luasocket-2.0.2/src/udp.c luasocket-2.0.2.my/src/udp.c +--- luasocket-2.0.2/src/udp.c 2007-10-15 08:21:05.000000000 +0400 ++++ luasocket-2.0.2.my/src/udp.c 2012-11-14 18:23:44.000000000 +0400 +@@ -43,7 +43,7 @@ + static int meth_dirty(lua_State *L); + + /* udp object methods */ +-static luaL_reg udp[] = { ++static luaL_Reg udp[] = { + {"__gc", meth_close}, + {"__tostring", auxiliar_tostring}, + {"close", meth_close}, +@@ -76,7 +76,7 @@ + }; + + /* functions in library namespace */ +-static luaL_reg func[] = { ++static luaL_Reg func[] = { + {"udp", global_create}, + {NULL, NULL} + }; +diff -wbBur luasocket-2.0.2/src/unix.c luasocket-2.0.2.my/src/unix.c +--- luasocket-2.0.2/src/unix.c 2007-10-15 08:21:05.000000000 +0400 ++++ luasocket-2.0.2.my/src/unix.c 2012-11-14 18:23:17.000000000 +0400 +@@ -39,7 +39,7 @@ + static const char *unix_trybind(p_unix un, const char *path); + + /* unix object methods */ +-static luaL_reg un[] = { ++static luaL_Reg un[] = { + {"__gc", meth_close}, + {"__tostring", auxiliar_tostring}, + {"accept", meth_accept}, +@@ -71,7 +71,7 @@ + }; + + /* our socket creation function */ +-static luaL_reg func[] = { ++static luaL_Reg func[] = { + {"unix", global_create}, + {NULL, NULL} + }; |