@@ -6,6 +6,7 @@ libxml2_path="invalid"
6
6
openssl_path=" {{@@openssl//:openssl}}"
7
7
luarocks_host_path=" {{@@luarocks//:luarocks_host}}"
8
8
luajit_path=" {{@@openresty//:luajit}}"
9
+ lua_path=" {{@@lua//:lua}}"
9
10
kongrocks_path=" invalid"
10
11
cross_deps_libyaml_path=" {{@@cross_deps_libyaml//:libyaml}}"
11
12
CC={{CC}}
@@ -72,23 +73,28 @@ if [[ $CC != /* ]]; then
72
73
LD=$root_path /$LD
73
74
fi
74
75
75
- echo "
76
+ cat << EOF > $ROCKS_CONFIG
76
77
rocks_trees = {
77
78
{ name = [[system]], root = [[$ROCKS_DIR ]] }
78
79
}
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;
81
84
gcc_rpath = false -- disable default rpath, add our own
82
85
variables = {
83
86
CC = '$CC ',
84
87
LD = '$LD ',
85
88
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]]
86
92
}
87
- " > $ROCKS_CONFIG
93
+ EOF
88
94
89
95
LUAROCKS_HOST=$luarocks_host_path
90
96
91
- host_luajit =$root_path /$luajit_path /bin/luajit
97
+ host_lua =$root_path /$lua_path /bin/lua
92
98
93
99
cat << EOF > $@
94
100
LIB_RPATH=$LIB_RPATH
114
120
# force the interpreter here instead of invoking luarocks directly,
115
121
# some distros has BINPRM_BUF_SIZE smaller than the shebang generated,
116
122
# 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 \$ @ \\
118
124
OPENSSL_DIR=$OPENSSL_DIR \\
119
125
CRYPTO_DIR=$OPENSSL_DIR \\
120
126
EXPAT_DIR=$EXPAT_DIR \\
0 commit comments