Message ID | 20181129152008.30897-2-stokito@gmail.com |
---|---|
State | Not Applicable |
Delegated to: | Felix Fietkau |
Headers | show |
Series | libubox installs incorrectly on Ubuntu due to incorrect LUAPATH | expand |
Sergey Ponomarev <stokito@gmail.com> [2018-11-29 17:20:08]: BTW, you're missing commit message here, and you don't usually send cover letters for single patches like this one. It's enough to do: git format-patch -s1 git send-email ... > IF(NOT LUAPATH) > EXECUTE_PROCESS( > - COMMAND lua -e "for k in string.gmatch(package.cpath .. \";\", \"([^;]+)/..so;\") do if k:sub(1,1) == \"/\" then print(k) break end end" > + COMMAND lua -e "for k in string.gmatch(package.cpath .. \";\", \"([^;]+)/..so;\") do if k:sub(1,9) == \"/usr/lib/\" then print(k) break end end" Can't you just provide proper(expected) LUAPATH from your build script? I'm for example using this for testing: rm -fr build ; mkdir build ; cd build cmake \ -D CMAKE_INSTALL_PREFIX=/opt/devel/openwrt/testing \ -D BUILD_LUA=on \ -D LUAPATH=/opt/devel/openwrt/testing/lib/lua/5.1 \ .. make install VERBOSE=99 -- ynezz
diff --git a/lua/CMakeLists.txt b/lua/CMakeLists.txt index 34c9ab1..4a114f6 100644 --- a/lua/CMakeLists.txt +++ b/lua/CMakeLists.txt @@ -17,7 +17,7 @@ ENDIF(APPLE) IF(NOT LUAPATH) EXECUTE_PROCESS( - COMMAND lua -e "for k in string.gmatch(package.cpath .. \";\", \"([^;]+)/..so;\") do if k:sub(1,1) == \"/\" then print(k) break end end" + COMMAND lua -e "for k in string.gmatch(package.cpath .. \";\", \"([^;]+)/..so;\") do if k:sub(1,9) == \"/usr/lib/\" then print(k) break end end" OUTPUT_VARIABLE LUAPATH RESULT_VARIABLE LUA_CHECK_RES OUTPUT_STRIP_TRAILING_WHITESPACE
Signed-off-by: Sergey Ponomarev <stokito@gmail.com> --- lua/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)