aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authortobil4sk <tobil4sk@outlook.com>2026-02-03 22:47:50 +0000
committerGitHub <noreply@github.com>2026-02-03 19:47:50 -0300
commit47301d83aba58925e1b9594023621ebb27070cdb (patch)
tree73021b5366687ec1683b9e66505e74f22f71d31b /configure
parentacf1f47e7f1b1ecbc147e41cae51ddfd06ad898d (diff)
downloadluarocks-main.tar.gz
luarocks-main.tar.bz2
luarocks-main.zip
Improve flexibility around vendored librariesmain
compat53 is vendored since #1757 as it is required to run luarocks with lua 5.1 or 5.2. However, this introduced some issues as the GNUmakefile install rule places these in the same place where `luarocks install compat53` would install them. This means you get conflicts if you install the actual package: ``` Warning: /.../prefix/share/lua/5.1/compat53/init.lua is not tracked by this installation of LuaRocks. Moving it to /.../prefix/share/lua/5.1/compat53/init.lua~ Warning: /.../prefix/share/lua/5.1/compat53/module.lua is not tracked by this installation of LuaRocks. Moving it to /.../prefix/share/lua/5.1/compat53/module.lua~ Warning: /.../prefix/share/lua/5.1/compat53/file_mt.lua is not tracked by this installation of LuaRocks. Moving it to /.../prefix/share/lua/5.1/compat53/file_mt.lua~ ``` It is also not ideal for linux package maintainers to include a vendored package, see: https://github.com/luarocks/luarocks/pull/1757#issuecomment-3409873412. To solve these issues, this patchset makes the following changes: - GNUmakefile now places the compat53 files under `luarocks/vendor/compat53` (which is added internally to the luarocks script's `package.path`). This way a user's installation of compat53 does not interfere at all with luarocks one. - Added `--with-system-compat53` option to configure script for external packaging systems. - Fixed install.bat's logic for deciding whether to vendor compat53, as the current script includes it for every version. install.bat already places luarocks sources outside of LUAPATH, so that part can stay as is. I've also inverted the version check to avoid the need for future patches like: #1850.
Diffstat (limited to '')
-rwxr-xr-xconfigure7
1 files changed, 7 insertions, 0 deletions
diff --git a/configure b/configure
index 170f4ede..7253dc61 100755
--- a/configure
+++ b/configure
@@ -143,6 +143,9 @@ For specialized uses of LuaRocks:
143 (e.g. when only deploying binary packages) 143 (e.g. when only deploying binary packages)
144 you do not need lua.h installed. This flag 144 you do not need lua.h installed. This flag
145 skips the check for lua.h in "configure". 145 skips the check for lua.h in "configure".
146 --with-system-rocks Use an external installation of rocks required
147 for running luarocks instead instead of the
148 vendored versions.
146 149
147EOF 150EOF
148} 151}
@@ -301,6 +304,9 @@ do
301 --disable-incdir-check) 304 --disable-incdir-check)
302 DISABLE_INCDIR_CHECK=yes 305 DISABLE_INCDIR_CHECK=yes
303 ;; 306 ;;
307 --with-system-rocks)
308 WITH_SYSTEM_ROCKS=yes
309 ;;
304 310
305 # Old options that no longer apply 311 # Old options that no longer apply
306 # -------------------------------- 312 # --------------------------------
@@ -500,6 +506,7 @@ LUA_BINDIR=$LUA_BINDIR
500LUA_INCDIR=$LUA_INCDIR 506LUA_INCDIR=$LUA_INCDIR
501LUA_LIBDIR=$LUA_LIBDIR 507LUA_LIBDIR=$LUA_LIBDIR
502FORCE_CONFIG=$FORCE_CONFIG 508FORCE_CONFIG=$FORCE_CONFIG
509WITH_SYSTEM_ROCKS=$WITH_SYSTEM_ROCKS
503EOF 510EOF
504 511
505echo 512echo