pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/www/elinks Update elinks to 0.11.1nb4:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7983ad10424b
branches:  trunk
changeset: 518259:7983ad10424b
user:      abs <abs%pkgsrc.org@localhost>
date:      Mon Sep 04 20:23:30 2006 +0000

description:
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:

 www/elinks/Makefile         |   4 +-
 www/elinks/distinfo         |   4 +-
 www/elinks/patches/patch-ab |  57 ++++++++++++++++++++++++++++++--------------
 3 files changed, 43 insertions(+), 22 deletions(-)

diffs (92 lines):

diff -r 7bf751eb72ea -r 7983ad10424b www/elinks/Makefile
--- a/www/elinks/Makefile       Mon Sep 04 19:27:56 2006 +0000
+++ b/www/elinks/Makefile       Mon Sep 04 20:23:30 2006 +0000
@@ -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 -r 7bf751eb72ea -r 7983ad10424b www/elinks/distinfo
--- a/www/elinks/distinfo       Mon Sep 04 19:27:56 2006 +0000
+++ b/www/elinks/distinfo       Mon Sep 04 20:23:30 2006 +0000
@@ -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 -r 7bf751eb72ea -r 7983ad10424b www/elinks/patches/patch-ab
--- a/www/elinks/patches/patch-ab       Mon Sep 04 19:27:56 2006 +0000
+++ b/www/elinks/patches/patch-ab       Mon Sep 04 20:23:30 2006 +0000
@@ -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);



Home | Main Index | Thread Index | Old Index