now we bundle the lua-redis-parser library with us and it is enabled by default. tested on Linux i386, Linux x86_64, Mac OS X, FreeBSD 8.2 i386, and Solaris 11; added the new option --without-lua_redis_parser to the ./configure script; made the test scaffold emit .t_ file with actual outputs as the expected outputs; released ngx_openresty 1.0.5.0rc3.

This commit is contained in:
agentzh (章亦春)
2011-08-11 10:04:00 +08:00
parent a3dfc21c1a
commit 030ffab7d2
6 changed files with 312 additions and 19 deletions

52
util/configure vendored
View File

@ -140,6 +140,9 @@ for my $opt (@ARGV) {
} elsif ($opt eq '--without-lua_cjson') {
$resty_opts{no_lua_cjson} = 1;
} elsif ($opt eq '--without-lua_redis_parser') {
$resty_opts{no_lua_redis_parser} = 1;
} elsif ($opt eq '--with-debug') {
$resty_opts{debug} = 1;
@ -583,6 +586,53 @@ _EOC_
push @make_install_cmds, "cd $root_dir/build/$dir && " .
"\$(MAKE) install$extra_opts";
}
unless ($opts->{no_lua_redis_parser}) {
my $dir = auto_complete 'lua-redis-parser';
if (!defined $dir) {
die "No lua-redis-parser found";
}
my $lua_inc;
if ($opts->{luajit}) {
$lua_inc = $ENV{LUAJIT_INC};
} else {
$lua_inc = $ENV{LUA_INC};
}
my $extra_opts = " DESTDIR=\$(DESTDIR) LUA_INCLUDE_DIR=$lua_inc " .
"LUA_LIB_DIR=$lualib_prefix";
if ($on_solaris) {
$extra_opts .= " INSTALL=$root_dir/build/install";
if ($opts->{debug}) {
$extra_opts .= " CFLAGS=\"-g -O0 -Wall\"";
}
} else {
if ($opts->{debug}) {
$extra_opts .= " CFLAGS=\"-g -O0 -Wall\"";
}
}
if ($platform eq 'macosx') {
$extra_opts .= " LDFLAGS='-bundle -undefined dynamic_lookup'";
}
if (defined $cc) {
$extra_opts .= " CC=$cc";
} else {
$extra_opts .= " CC=gcc";
}
push @make_cmds, "cd $root_dir/build/$dir && ".
"\$(MAKE)$extra_opts";
push @make_install_cmds, "cd $root_dir/build/$dir && " .
"\$(MAKE) install$extra_opts";
}
}
# prepare nginx configure line
@ -676,6 +726,8 @@ _EOC_
$msg .= <<'_EOC_';
--without-lua_cjson disable the lua-cjson library
--without-lua_redis_parser disable the lua-redis-parser library
--without-lua51 disable the bundled Lua 5.1 interpreter
--with-luajit enable LuaJIT 2.0
--with-libdrizzle=DIR specify the libdrizzle 1.0 (or drizzle) installation prefix

View File

@ -51,7 +51,7 @@ for my $t_file (@t_files) {
warn "\n- $orig";
warn "+ $_";
} elsif (s{\bbuild/$pat[^/ \t\n]*\d[^/ \t\n]*}{build/$dir}g && $orig ne $_) {
} elsif (s{OPENRESTY_BUILD_DIR/$pat[^/ \t\n\w]*\d[^/ \t\n]*}{OPENRESTY_BUILD_DIR/$dir}g && $orig ne $_) {
$changed++;
warn "\n- $orig";

View File

@ -212,6 +212,13 @@ cd ..
#################################
ver=0.09rc4
$root/util/get-tarball "http://github.com/agentzh/lua-redis-parser/tarball/v$ver" -O "lua-redis-parser-$ver.tar.gz" || exit 1
tar -xzf lua-redis-parser-$ver.tar.gz || exit 1
mv agentzh-lua-redis-parser-* lua-redis-parser-$ver || exit 1
#################################
rm *.tar.gz
cd ..

View File

@ -1,7 +1,7 @@
#!/bin/bash
main_ver=1.0.5
minor_ver=0rc2
minor_ver=0rc3
version=$main_ver.$minor_ver
echo $version