lua-users home
lua-l archive

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


On 21 January 2015 at 20:15, Timm S. Mueller
<tmueller@schulze-mueller.de> wrote:
> LuaExec is another take on multitasking for Lua.
>
> http://luaexec.neoscientists.org/

Hi!

I gave it a quick spin, and wrote a rockspec for it (it follows
attached — tested only on Linux, but I followed your `config` file).

> - should work with Lua 5.1, 5.2, 5.3, and LuaJIT on POSIX and Windows

I see that the .lua parts use module(), so I believe they run only in
5.1 (or 5.2 with compat flags on). Tweaking so it runs on 5.2 and 5.3
shouldn't be hard (only tedious).

I also suggest having two new build targets in the Makefile, "core"
and "httpd", to build the core libraries and the httpd example
separately. This way, we could have two rockspecs (say, "luaexec" and
"luaexec.httpd"), so one can add the dependencies on luasocket and
luafilesystem only in the second rockspec (which would, of course,
also depend on the first one).

To make your library available via LuaRocks, create an account in the
MoonRocks repository and upload your rockspecs there:
https://rocks.moonscript.org/

Thanks!

-- Hisham
package = "luaexec"
version = "0.80r2-1"
source = {
   url = "http://luaexec.neoscientists.org/releases/luaexec-0.80-r2.tar.gz";,
   md5 = "b8d93420f08ba4b2a68fe79126684017",
   dir = "luaexec-0.80-r2"
}
description = {
   summary = "Another take on multitasking for Lua",
   detailed = [=[
      LuaExec is another take on multitasking for Lua. LuaExec is mainly
      focused on general applicability, simplicity and concise semantics. It
      provides multiple contexts of execution in the most abstract sense,
      behaving understandably, platform-independently and unencumbered by OS
      specific details.
   ]=],
   homepage = "http://luaexec.neoscientists.org";,
   license = "MIT/X11"
}
dependencies = {
   "lua ~> 5.1", -- 5.1 only, because of module()
   -- "lua >= 5.1, < 5.4", -- 5.1, 5.2 and 5.3
   "luasocket",
   "luafilesystem",
}
build = {
   type = "make",
   build_target = "all",
   variables = {
      PREFIX = "$(PREFIX)",
      LUA_LIB = "$(LIBDIR)",
      LUA_SHARE = "$(LUADIR)",
      LUA_INCLUDE = "$(LUA_INCDIR)",
      LUA_ARCH = "", -- let the compiler use its native architecture.
   },
   platforms = {
      solaris = {
         variables = {
            CC_LD_RT = "-R",
         },
      },
      macosx = {
         variables = {
            PLATFORM_LIBS = "",
            CC_LD_RT = "-Wl,-rpath",
            MODCFLAGS = "-bundle -undefined dynamic_lookup -L $(LUA_LIBDIR) $(LDFLAGS)",
         }
      },
      netbsd = {
         variables = {
            CC_LD_RT="-Wl,-rpath=/usr/X11R7/lib:",
         },
      },
      windows = {
         variables = {
            PLATFORM = "winnt",
            DLLEXT = ".dll",
            CC = "$(CC) -DWIN32",
            PLATFORM_LIBS = "-lmsvcrt -lkernel32 -lwinmm -luser32 -lshell32 -ladvapi32",
            LUA_LIBS = "-L $(LUA_LIBDIR) $(LUALIB)",
         },
      }
   }
}