upgraded luajit to v2.1-20140305, lua-cjson to 2.1.0.1, lua-resty-core to 0.0.4, lua-resty-redis to 0.20, and ngx_lua to 0.9.5; bundled the ngx_lua_upstream module and the lua-resty-upstream-healthcheck library.

This commit is contained in:
Yichun Zhang (agentzh) 2014-03-12 16:02:20 -07:00
parent e36d505d80
commit f8783f35b1
2 changed files with 36 additions and 14 deletions

24
util/configure vendored
View File

@ -71,6 +71,7 @@ my @modules = (
[http_postgres => 'ngx_postgres', 'disabled'],
[http_srcache => 'srcache-nginx-module'],
[http_lua => 'ngx_lua'],
[http_lua_upstream => 'ngx_lua_upstream'],
[http_headers_more => 'headers-more-nginx-module'],
[http_array_var => 'array-var-nginx-module'],
[http_memc => 'memc-nginx-module'],
@ -188,6 +189,9 @@ for my $opt (@ARGV) {
} elsif ($opt eq '--without-lua_resty_core') {
$resty_opts{no_lua_resty_core} = 1;
} elsif ($opt eq '--without-lua_resty_upstream_healthcheck') {
$resty_opts{no_lua_resty_upstream_healthcheck} = 1;
} elsif ($opt eq '--without-lua_rds_parser') {
$resty_opts{no_lua_rds_parser} = 1;
@ -400,6 +404,7 @@ _END_
if (!$opts->{lua}
&& !$opts->{lua_path}
&& !$opts->{no_http_lua}
&& !$opts->{no_http_lua_upstream}
&& !$opts->{luajit_path})
{
$opts->{luajit} = 1;
@ -665,25 +670,27 @@ _EOC_
}
my $extra_opts = " DESTDIR=\$(DESTDIR) LUA_INCLUDE_DIR=$lua_inc " .
"LUA_LIB_DIR=$lualib_prefix";
"LUA_CMODULE_DIR=$lualib_prefix LUA_MODULE_DIR=$lualib_prefix";
if ($on_solaris) {
$extra_opts .= " INSTALL=$root_dir/build/install";
#$extra_opts .= " INSTALL=$root_dir/build/install";
if ($opts->{debug}) {
$extra_opts .= " CFLAGS=\"-g -O -Wall -pedantic -DMISSING_ISINF\"";
$extra_opts .= " CJSON_CFLAGS=\"-g -O -fpic -DUSE_INTERNAL_ISINF\"";
} else {
$extra_opts .= " CFLAGS=\"-g -O3 -Wall -pedantic -DMISSING_ISINF\"";
$extra_opts .= " CJSON_CFLAGS=\"-g -fpic -DUSE_INTERNAL_ISINF\"";
}
} else {
if ($opts->{debug}) {
$extra_opts .= " CFLAGS=\"-g -O -Wall -pedantic\"";
$extra_opts .= " CJSON_CFLAGS=\"-g -O -fpic\"";
} else {
$extra_opts .= " CJSON_CFLAGS=\"-g -fpic\"";
}
}
if ($platform eq 'macosx') {
$extra_opts .= " LDFLAGS='-bundle -undefined dynamic_lookup'";
$extra_opts .= " CJSON_LDFLAGS='-bundle -undefined dynamic_lookup'";
}
if (defined $cc) {
@ -794,10 +801,11 @@ _EOC_
}
for my $key (qw(dns memcached redis mysql string upload websocket
lock core))
lock core upstream_healthcheck))
{
unless ($opts->{"no_lua_resty_$key"}) {
my $name = "lua-resty-$key";
(my $key2 = $key) =~ s/_/-/g;
my $name = "lua-resty-$key2";
my $dir = auto_complete $name;
if (!defined $dir) {
die "No $name found";

View File

@ -301,13 +301,20 @@ mv chaoslawful-drizzle-nginx-module-* drizzle-nginx-module-$ver || exit 1
#################################
ver=0.9.4
ver=0.9.5
$root/util/get-tarball "https://github.com/chaoslawful/lua-nginx-module/tarball/v$ver" -O lua-nginx-module-$ver.tar.gz || exit 1
tar -xzf lua-nginx-module-$ver.tar.gz || exit 1
mv chaoslawful-lua-nginx-module-* ngx_lua-$ver || exit 1
#################################
ver=0.01
$root/util/get-tarball "https://github.com/agentzh/lua-upstream-nginx-module/tarball/v$ver" -O lua-upstream-nginx-module-$ver.tar.gz || exit 1
tar -xzf lua-upstream-nginx-module-$ver.tar.gz || exit 1
mv agentzh-lua-upstream-nginx-module-* ngx_lua_upstream-$ver || exit 1
#################################
ver=0.03
$root/util/get-tarball "https://github.com/agentzh/array-var-nginx-module/tarball/v$ver" -O array-var-nginx-module-$ver.tar.gz || exit 1
tar -xzf array-var-nginx-module-$ver.tar.gz || exit 1
@ -424,7 +431,7 @@ echo
#################################
ver=2.1-20140129
ver=2.1-20140305
$root/util/get-tarball "https://github.com/agentzh/luajit2/archive/v$ver.tar.gz" -O "LuaJIT-$ver.tar.gz" || exit 1
tar -xzf LuaJIT-$ver.tar.gz || exit 1
mv luajit2-* LuaJIT-$ver || exit 1
@ -445,8 +452,8 @@ mv luajit2-* LuaJIT-$ver || exit 1
#################################
ver=1.0.3
$root/util/get-tarball "http://www.kyne.com.au/~mark/software/old/lua-cjson-$ver.tar.gz" -O "lua-cjson-$ver.tar.gz" || exit 1
ver=2.1.0.1
$root/util/get-tarball "https://github.com/agentzh/lua-cjson/archive/$ver.tar.gz" -O "lua-cjson-$ver.tar.gz" || exit 1
tar -xzf lua-cjson-$ver.tar.gz || exit 1
cd lua-cjson-$ver || exit 1
#patch -p1 < $root/patches/lua_cjson-$ver-array_detection_fix.patch || exit 1
@ -482,7 +489,7 @@ mv agentzh-lua-resty-memcached-* lua-resty-memcached-$ver || exit 1
#################################
ver=0.18
ver=0.19
$root/util/get-tarball "https://github.com/agentzh/lua-resty-redis/tarball/v$ver" -O "lua-resty-redis-$ver.tar.gz" || exit 1
tar -xzf lua-resty-redis-$ver.tar.gz || exit 1
mv agentzh-lua-resty-redis-* lua-resty-redis-$ver || exit 1
@ -524,13 +531,20 @@ mv agentzh-lua-resty-lock-* lua-resty-lock-$ver || exit 1
#################################
ver=0.0.3
ver=0.0.4
$root/util/get-tarball "https://github.com/agentzh/lua-resty-core/tarball/v$ver" -O "lua-resty-core-$ver.tar.gz" || exit 1
tar -xzf lua-resty-core-$ver.tar.gz || exit 1
mv agentzh-lua-resty-core-* lua-resty-core-$ver || exit 1
#################################
ver=0.01
$root/util/get-tarball "https://github.com/agentzh/lua-resty-upstream-healthcheck/tarball/v$ver" -O "lua-resty-upstream-healthcheck-$ver.tar.gz" || exit 1
tar -xzf lua-resty-upstream-healthcheck-$ver.tar.gz || exit 1
mv agentzh-lua-resty-upstream-healthcheck-* lua-resty-upstream-healthcheck-$ver || exit 1
#################################
rm *.tar.gz
cd ..