The nginx ebuild does not allow a user to specify if to build against lua or luajit. I recommend an introduction of a use flag that allow's the user to specify lua or luajit linking. Reproducible: Always Steps to Reproduce: 1. emerge dev-lang/luajit dev-lang/lua 2. emerge nginx 3. ldd /usr/sbin/nginx shows that nginx is linked against luajit You can work around this by 1. emerge -C lua 2. emerge nginx 3. emerge lua
Got a typo Steps to Reproduce: 1. emerge dev-lang/luajit dev-lang/lua 2. emerge nginx 3. ldd /usr/sbin/nginx shows that nginx is linked against lua (not luajit)
This problem occurs with both 1.4 and 1.5 versions of nginx.
I don't love this approach, but I guess there might be no other options. How does other packages handle this?
Older ebuilds included a luajit use flag The lua section looked like: if use nginx_modules_http_lua; then http_enabled=1 if use luajit; then export LUAJIT_LIB=$(pkg-config --variable libdir luajit) export LUAJIT_INC=$(pkg-config --variable includedir luajit) else export LUA_LIB=$(pkg-config --variable libdir lua) export LUA_INC=$(pkg-config --variable includedir lua) fi myconf+=" --add-module=${DEVEL_KIT_MODULE_WD}" myconf+=" --add-module=${HTTP_LUA_MODULE_WD}" fi
We've introduced support for this in our nginx-overlay (layman -a nginx-overlay). It will land in gentoo-x86 shortly, but feel free to try it out ahead. More info here: https://github.com/gentoo/nginx-overlay
luajit USE flag readded in nginx-1.7.3