Skip to content
Permalink
Browse files
Fix configuration to support LuaRocks 3.x
For the moment the default version is still 2.4.4 because for some
reason a LuaJIT profile will fail with version 3.0.0 of LuaRocks.
  • Loading branch information
aperezdc committed Jul 21, 2018
1 parent bf58c44 commit c360934
Showing 1 changed file with 13 additions and 7 deletions.
@@ -38,16 +38,22 @@ __rockz_luarocks_install () {
[[ ${answer} = y ]] || __rockz_die 'LuaRocks intallation aborted by user'
fi

local -a confopts=(
--force-config
--prefix="$1"
--with-lua="$1"
--with-lua-lib="${3:h}"
--with-lua-include="$4"
)

case ${ROCKZ_LUAROCKS_VERSION} in
2.*.*) confopts+=( --with-downloader=curl ) ;;
esac

tar -xzf "${tarball}"
rm "${tarball}" "${tarball}.asc"
cd "luarocks-${ROCKZ_LUAROCKS_VERSION}"
./configure \
--with-downloader=curl \
--force-config \
--prefix="$1" \
--with-lua="$1" \
--with-lua-lib="$3" \
--with-lua-include="$4"
./configure "${confopts[@]}"
make -s bootstrap
rm -rf "../luarocks-${ROCKZ_LUAROCKS_VERSION}"
popd -q

0 comments on commit c360934

Please sign in to comment.