Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37519829
en ru br
ALT Linux repositórios
S:1.0.93-alt3
5.0: 1.0.92-alt1

Group :: Sistema/Bibliotecas
RPM: tolua++

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: tolua++-1.0.93-no-buildin-bytecode.patch
Download


diff -urN tolua++-1.0.93/src/bin/SCsub tolua++-1.0.93.no-builtin/src/bin/SCsub
--- tolua++-1.0.93/src/bin/SCsub	2008-04-21 02:05:35.000000000 +0200
+++ tolua++-1.0.93.no-builtin/src/bin/SCsub	2014-10-01 15:54:39.001158444 +0200
@@ -5,8 +5,8 @@
 	]
 
 
-toluabind = env.LuaBinding('toluabind.c', 'tolua_scons.pkg', 'tolua', bootstrap = True)
+#toluabind = env.LuaBinding('toluabind.c', 'tolua_scons.pkg', 'tolua', bootstrap = True)
 
-env.bin_target = env.Program('#/bin/'+env['tolua_bin'], src + [toluabind], LIBS = ['$tolua_lib'] + env['LIBS'])
+env.bin_target = env.Program('#/bin/'+env['tolua_bin'], src, LIBS = ['$tolua_lib'] + env['LIBS'])
 
 env.bootstrap_target = env.Program('#/bin/'+env['TOLUAPP_BOOTSTRAP'], src + ['toluabind_default.c', env.lib_target_static], LIBS = env['LIBS'])
diff -urN tolua++-1.0.93/src/bin/tolua.c tolua++-1.0.93.no-builtin/src/bin/tolua.c
--- tolua++-1.0.93/src/bin/tolua.c	2006-07-29 04:45:56.000000000 +0200
+++ tolua++-1.0.93.no-builtin/src/bin/tolua.c	2014-10-01 16:06:09.791424704 +0200
@@ -145,7 +145,7 @@
   }
   lua_pop(L,1);
  }
-/* #define TOLUA_SCRIPT_RUN */
+#define TOLUA_SCRIPT_RUN
 #ifndef TOLUA_SCRIPT_RUN
  {
   int tolua_tolua_open (lua_State* L);
@@ -153,16 +153,17 @@
  }
 #else
  {
-  char* p;
-  char  path[BUFSIZ];
-  strcpy(path,argv[0]);
-  p = strrchr(path,'/');
-  if (p==NULL) p = strrchr(path,'\\');
-  p = (p==NULL) ? path : p+1;
-  sprintf(p,"%s","../src/bin/lua/");
-  lua_pushstring(L,path); lua_setglobal(L,"path");
-		strcat(path,"all.lua");
-  lua_dofile(L,path);
+  lua_pushstring(L, "/usr/share/tolua++/"); lua_setglobal(L,"path");
+  if (luaL_loadfile(L, "/usr/share/tolua++/all.lua") != 0) {
+    fprintf(stderr, "luaL_loadfile failed\n");
+    return 1;
+  }
+  if (lua_pcall(L, 0,0,0) != 0) {
+    const char *errmsg = lua_tostring(L, -1);
+    fprintf(stderr, "lua_pcall failed: %s\n", errmsg);
+    lua_pop(L, 1);
+    return 1;
+  }
  }
 #endif
  return 0;
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009