I tried installing nginx + modsecurity. So I added "security" module in NGINX_MODULES_HTTP. It pulled in modsecurity 2.7.7 and nginx 1.4.7. It installed modsecurity cleanly but failed to install nginx saying lua.h mis missing. When I did "emerge lua" and then tried nginx then it worked fine. Perhaps we need to make such dependency automatically.
Hi and thanks for the bug report. I can confirm this. The bug lies in configuring mod_security build in src_configure() _after_ nginx, which makes the nginx build use the default generated one. This included LUA_CFLAGS. I'll update ebuilds for nginx 1.4.x and 1.5.x and send to co-maintainer shortly.
Fix just landed in 1.4.7-r1
This was fixed a while ago (as latest comment states)