@@ -6,6 +6,7 @@ libxml2_path="invalid"
66openssl_path=" {{@@openssl//:openssl}}"
77luarocks_host_path=" {{@@luarocks//:luarocks_host}}"
88luajit_path=" {{@@openresty//:luajit}}"
9+ lua_path=" {{@@lua//:lua}}"
910kongrocks_path=" invalid"
1011cross_deps_libyaml_path=" {{@@cross_deps_libyaml//:libyaml}}"
1112CC={{CC}}
@@ -72,23 +73,28 @@ if [[ $CC != /* ]]; then
7273 LD=$root_path /$LD
7374fi
7475
75- echo "
76+ cat << EOF > $ROCKS_CONFIG
7677rocks_trees = {
7778 { name = [[system]], root = [[$ROCKS_DIR ]] }
7879}
79- local_cache = '$CACHE_DIR '
80- show_downloads = true
80+ lua_version = "5.1";
81+ lua_interpreter = "${luajit_path} /bin/luajit";
82+ local_cache = '$CACHE_DIR ';
83+ show_downloads = true;
8184gcc_rpath = false -- disable default rpath, add our own
8285variables = {
8386 CC = '$CC ',
8487 LD = '$LD ',
8588 LDFLAGS = '-Wl,-rpath,$LIB_RPATH ',
89+ LUA_DIR = [[$root_path /$luajit_path ]],
90+ LUA_INCDIR = [[$root_path /$luajit_path /include/luajit-2.1]],
91+ LUA_BINDIR = [[$root_path /$luajit_path /bin]]
8692}
87- " > $ROCKS_CONFIG
93+ EOF
8894
8995LUAROCKS_HOST=$luarocks_host_path
9096
91- host_luajit =$root_path /$luajit_path /bin/luajit
97+ host_lua =$root_path /$lua_path /bin/lua
9298
9399cat << EOF > $@
94100LIB_RPATH=$LIB_RPATH
114120# force the interpreter here instead of invoking luarocks directly,
115121# some distros has BINPRM_BUF_SIZE smaller than the shebang generated,
116122# which is usually more than 160 bytes
117- $host_luajit $root_path /$LUAROCKS_HOST /bin/luarocks \$ private_rocks_args \$ @ \\
123+ $host_lua $root_path /$LUAROCKS_HOST /bin/luarocks \$ private_rocks_args \$ @ \\
118124 OPENSSL_DIR=$OPENSSL_DIR \\
119125 CRYPTO_DIR=$OPENSSL_DIR \\
120126 EXPAT_DIR=$EXPAT_DIR \\
0 commit comments