summaryrefslogtreecommitdiff
path: root/www/elinks
diff options
context:
space:
mode:
authorabs <abs@pkgsrc.org>2006-09-04 20:23:30 +0000
committerabs <abs@pkgsrc.org>2006-09-04 20:23:30 +0000
commita350f5bfc2206bb83a80e97efe0d50779bbee50f (patch)
tree062f972ee76ce6d42bd1f0f320b12e3246554d6d /www/elinks
parenteb09e1d482629b8d64e97bdd5b114d1f935bfaa7 (diff)
downloadpkgsrc-a350f5bfc2206bb83a80e97efe0d50779bbee50f.tar.gz
Update elinks to 0.11.1nb4:
The API for lua changed such that old style initialisations would compile fine but fail at runtime which is a touch unelpful. Adjust for new API.
Diffstat (limited to 'www/elinks')
-rw-r--r--www/elinks/Makefile4
-rw-r--r--www/elinks/distinfo4
-rw-r--r--www/elinks/patches/patch-ab57
3 files changed, 43 insertions, 22 deletions
diff --git a/www/elinks/Makefile b/www/elinks/Makefile
index 9f330c1c088..26baf827198 100644
--- a/www/elinks/Makefile
+++ b/www/elinks/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.25 2006/08/14 22:38:23 wiz Exp $
+# $NetBSD: Makefile,v 1.26 2006/09/04 20:23:30 abs Exp $
DISTNAME= elinks-0.11.1
-PKGREVISION= 3
+PKGREVISION= 4
CATEGORIES= www
MASTER_SITES= http://elinks.or.cz/download/
EXTRACT_SUFX= .tar.bz2
diff --git a/www/elinks/distinfo b/www/elinks/distinfo
index 7b6b766d59f..4498890ecbe 100644
--- a/www/elinks/distinfo
+++ b/www/elinks/distinfo
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.14 2006/08/14 22:38:23 wiz Exp $
+$NetBSD: distinfo,v 1.15 2006/09/04 20:23:30 abs Exp $
SHA1 (elinks-0.11.1.tar.bz2) = dfa18f2745976e34ce3ee27227ce9bce81495a77
RMD160 (elinks-0.11.1.tar.bz2) = 2c5039a2e3d7ee3fc283d3041cac40f3c7853520
Size (elinks-0.11.1.tar.bz2) = 2612791 bytes
SHA1 (patch-aa) = 1912232785a6db8412362a512408c87a75a1ecce
-SHA1 (patch-ab) = 5371f16969050a82dd901ed4ae9000bb3fd15b54
+SHA1 (patch-ab) = aa78236b743aad1bfe84516e4c3a0f4da796f77f
SHA1 (patch-ac) = f7dc18652782a5ad0768a5693a69bcadc6e5754d
diff --git a/www/elinks/patches/patch-ab b/www/elinks/patches/patch-ab
index 274b36200fa..82913f784fe 100644
--- a/www/elinks/patches/patch-ab
+++ b/www/elinks/patches/patch-ab
@@ -1,22 +1,43 @@
-$NetBSD: patch-ab,v 1.3 2006/08/14 22:38:24 wiz Exp $
+$NetBSD: patch-ab,v 1.4 2006/09/04 20:23:30 abs Exp $
---- src/scripting/lua/core.c.orig 2006-01-29 13:10:39.000000000 +0000
+--- src/scripting/lua/core.c.orig 2006-09-04 21:19:38.000000000 +0100
+++ src/scripting/lua/core.c
-@@ -633,7 +633,7 @@ do_hooks_file(LS, unsigned char *prefix,
- if (file_can_read(file)) {
- int oldtop = lua_gettop(S);
+@@ -644,23 +644,24 @@ do_hooks_file(LS, unsigned char *prefix,
+ void
+ init_lua(struct module *module)
+ {
+- static const luaL_reg lualibs[] = {
+- { "base", luaopen_base },
+- { "table", luaopen_table },
+- { "io", luaopen_io },
+- { "string", luaopen_string },
+- { "math", luaopen_math },
+- { NULL, NULL }
+- };
+- const luaL_reg *lib;
++ static const luaL_Reg lualibs[] = {
++ {"", luaopen_base},
++ {LUA_TABLIBNAME, luaopen_table},
++ {LUA_IOLIBNAME, luaopen_io},
++ {LUA_OSLIBNAME, luaopen_os},
++ {LUA_STRLIBNAME, luaopen_string},
++ {LUA_MATHLIBNAME, luaopen_math},
++ {NULL, NULL}
++ };
++ const luaL_Reg *lib = lualibs;
-- if (lua_dofile(S, file) != 0)
-+ if (luaL_dofile(S, file) != 0)
- sleep(3); /* Let some time to see error messages. */
- lua_settop(S, oldtop);
- }
-@@ -755,7 +755,7 @@ handle_ret_eval(struct session *ses)
- int oldtop = lua_gettop(L);
+ L = lua_open();
- if (prepare_lua(ses) == 0) {
-- lua_dostring(L, expr);
-+ luaL_dostring(L, expr);
- lua_settop(L, oldtop);
- finish_lua();
- }
+- for (lib = lualibs; lib->func != NULL; lib++) {
+- lib->func(l); /* Open the library */
+- /* Flush stack to ignore any result from the library load */
+- lua_settop(l, 0);
+- }
++ for (; lib->func; lib++) {
++ lua_pushcfunction(L, lib->func);
++ lua_pushstring(L, lib->name);
++ lua_call(L, 1, 0);
++ }
+
+ lua_register(L, LUA_ALERT, l_alert);
+ lua_register(L, "current_url", l_current_url);