Skip to content

Commit

Permalink
Release version 0.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
moteus committed Dec 23, 2013
1 parent 035d57c commit 9540148
Show file tree
Hide file tree
Showing 4 changed files with 156 additions and 4 deletions.
94 changes: 94 additions & 0 deletions rockspecs/lzmq-0.3.3-1.rockspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
package = "lzmq"
version = "0.3.3-1"

source = {
url = "/~https://github.com/moteus/lzmq/archive/v0.3.3.zip",
dir = "lzmq-0.3.3",
}

description = {
summary = "Lua bindings to ZeroMQ",
homepage = "/~https://github.com/moteus/lzmq",
license = "MIT/X11",
}

dependencies = {
"lua >= 5.1",
-- "lua-llthreads >= 1.2"
}

external_dependencies = {
platforms = {
windows = {
ZMQ = {
header = "zmq.h",
library = "libzmq",
}
};
unix = {
ZMQ = {
header = "zmq.h",
-- library = "zmq", -- does not work !?
}
};
}
}

build = {
copy_directories = {"test", "examples"},

type = "builtin",

platforms = {
windows = { modules = {
["lzmq.timer"] = {
defines = {'USE_PERF_COUNT'}
},
["lzmq"] = {
libraries = {"libzmq"},
}
}},
unix = { modules = {
["lzmq.timer"] = {
defines = {'USE_CLOCK_MONOTONIC', 'USE_GETTIMEOFDAY'},
libraries = {"rt"},
},
["lzmq"] = {
libraries = {"zmq"},
}
}}
},

modules = {
["lzmq"] = {
sources = {'src/lzmq.c','src/lzutils.c','src/poller.c',
'src/zcontext.c','src/zerror.c','src/zmsg.c',
'src/zpoller.c','src/zsocket.c'},
incdirs = {"$(ZMQ_INCDIR)"},
libdirs = {"$(ZMQ_LIBDIR)"},
defines = {
'LUAZMQ_USE_SEND_AS_BUF',
'LUAZMQ_USE_TEMP_BUFFERS',
'LUAZMQ_USE_ERR_TYPE_OBJECT',
-- 'LUAZMQ_USE_ERR_TYPE_NUMBER'
-- 'LUAZMQ_USE_ERR_TYPE_STRING'
},
},
["lzmq.timer"] = {
sources = {'src/ztimer.c','src/lzutils.c'},
},
["lzmq.loop" ] = "src/lua/lzmq/loop.lua";
["lzmq.poller" ] = "src/lua/lzmq/poller.lua";
["lzmq.threads" ] = "src/lua/lzmq/threads.lua";
["lzmq.ffi" ] = "src/lua/lzmq/ffi.lua";
["lzmq.ffi.api" ] = "src/lua/lzmq/ffi/api.lua";
["lzmq.ffi.error" ] = "src/lua/lzmq/ffi/error.lua";
["lzmq.ffi.loop" ] = "src/lua/lzmq/ffi/loop.lua";
["lzmq.ffi.poller" ] = "src/lua/lzmq/ffi/poller.lua";
["lzmq.ffi.timer" ] = "src/lua/lzmq/ffi/timer.lua";
["lzmq.ffi.threads" ] = "src/lua/lzmq/ffi/threads.lua";
["lzmq.llthreads.ex" ] = "src/lua/lzmq/llthreads/ex.lua";
["lzmq.impl.threads" ] = "src/lua/lzmq/impl/threads.lua";
["lzmq.impl.loop" ] = "src/lua/lzmq/impl/loop.lua";
},
}
58 changes: 58 additions & 0 deletions rockspecs/lzmq-ffi-0.3.3-1.rockspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
package = "lzmq-ffi"
version = "0.3.3-1"

source = {
url = "/~https://github.com/moteus/lzmq/archive/v0.3.3.zip",
dir = "lzmq-0.3.3",
}

description = {
summary = "Lua bindings to ZeroMQ",
homepage = "/~https://github.com/moteus/lzmq",
license = "MIT/X11",
}

dependencies = {
"lua >= 5.1",
-- "lua-llthreads >= 1.2"
-- "lzmq-timer"
}

build = {
copy_directories = {"test", "examples"},

type = "builtin",

platforms = {
windows = { modules = {
["lzmq.timer"] = {
defines = {'USE_PERF_COUNT'}
}
}},
unix = { modules = {
["lzmq.timer"] = {
defines = {'USE_CLOCK_MONOTONIC', 'USE_GETTIMEOFDAY'},
libraries = {"rt"},
}
}}
},

modules = {
["lzmq.timer"] = {
sources = {'src/ztimer.c','src/lzutils.c'},
},
["lzmq" ] = "src/lua/lzmq/ffi/lzmq.lua";
["lzmq.ffi" ] = "src/lua/lzmq/ffi.lua";

["lzmq.loop" ] = "src/lua/lzmq/loop.lua";
["lzmq.poller" ] = "src/lua/lzmq/ffi/poller.lua";
["lzmq.threads" ] = "src/lua/lzmq/threads.lua";

["lzmq.ffi.api" ] = "src/lua/lzmq/ffi/api.lua";
["lzmq.ffi.error" ] = "src/lua/lzmq/ffi/error.lua";

["lzmq.llthreads.ex" ] = "src/lua/lzmq/llthreads/ex.lua";
["lzmq.impl.threads" ] = "src/lua/lzmq/impl/threads.lua";
["lzmq.impl.loop" ] = "src/lua/lzmq/impl/loop.lua";
},
}
6 changes: 3 additions & 3 deletions src/lua/lzmq/ffi.lua
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,8 @@ local RANDOM_PORT_MAX = 0xFFFF

function Socket:bind_to_random_port(address, port, tries)
port = port or RANDOM_PORT_BASE
tries = RANDOM_PORT_MAX - port + 1
tries = tries or (RANDOM_PORT_MAX - port + 1)

assert(type(address) == 'string')
assert((port > 0) and (port <= RANDOM_PORT_MAX), "invalid port number")
assert(tries > 0, "invalid max tries value")
Expand Down Expand Up @@ -1069,7 +1069,7 @@ end

do -- zmq

zmq._VERSION = "0.3.3-dev"
zmq._VERSION = "0.3.3"

function zmq.version(unpack)
local mj,mn,pt = api.zmq_version()
Expand Down
2 changes: 1 addition & 1 deletion src/lzmq.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ LUAZMQ_EXPORT int luazmq_socket (lua_State *L, void *skt, unsigned char own) {
#define LUAZMQ_VERSION_MAJOR 0
#define LUAZMQ_VERSION_MINOR 3
#define LUAZMQ_VERSION_PATCH 3
#define LUAZMQ_VERSION_COMMENT "dev"
// #define LUAZMQ_VERSION_COMMENT "dev"

//-----------------------------------------------------------
// common
Expand Down

0 comments on commit 9540148

Please sign in to comment.