Build systems typically look for lua.pc and fall back to lua5.1.pc if not compatible with lua-5.2. On gentoo, lua5.1.pc and lua5.2.pc have the same --cflags and --libs output, and do not tell the build system how to find the required version of the headers/library. occam ~ # diff -u /usr/lib/pkgconfig/lua5.[12].pc --- /usr/lib/pkgconfig/lua5.1.pc 2015-01-14 14:37:42.000000000 +0100 +++ /usr/lib/pkgconfig/lua5.2.pc 2015-01-14 14:35:50.000000000 +0100 @@ -3,9 +3,9 @@ # vars from install Makefile # grep '^V=' ../Makefile -V= 5.1 +V= # grep '^R=' ../Makefile -R= 5.1.5 +R= 5.2.3 # grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/' prefix= /usr occam ~ # grep V\\\|R /usr/lib/pkgconfig/lua5.1.pc # grep '^V=' ../Makefile V= 5.1 # grep '^R=' ../Makefile R= 5.1.5 INSTALL_LMOD= ${prefix}/share/lua/${V} INSTALL_CMOD= ${prefix}/lib64/lua/${V} Version: ${R} Requires: occam ~ # emerge -pvq lua:5.1 lua:5.2 [ebuild R ] dev-lang/lua-5.1.5-r100 USE="deprecated readline -emacs -static" ABI_X86="32 (64) (-x32)" [ebuild R ] dev-lang/lua-5.2.3-r1 USE="deprecated readline -emacs -static" ABI_X86="32 (64) (-x32)"
Lua-5.2 is already prohibited, and current 5.3 and 5.4 have proper pkgconfigs