1 # Copyright 1999-2019 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 LUA_COMPAT
=( lua5-1 lua5-2 lua5-3 lua5-4 luajit
)
7 inherit lua git-r3 autotools
9 DESCRIPTION
="Lua Unix Module"
10 HOMEPAGE
="http://25thandclement.com/~william/projects/lunix.html"
11 EGIT_REPO_URI
="https://25thandClement.com/~william/projects/lunix.git"
13 if [[ "${PV}" == *999* ]]; then
16 EGIT_COMMIT
="rel-${PV}"
17 KEYWORDS
="~amd64 ~arm ~x86"
32 "${FILESDIR}/${P}-no-static-assert.patch" # static assert detection seems broken sometimes
36 if ! test -d "${S}.${ELUA}" ; then
37 cp -ral "${S}/" "${S}.${ELUA}" || die
40 cd "${S}.${ELUA}" || die
48 lua_foreach_impl lua_src_prepare
52 cd "${S}.${ELUA}" || die
57 lua_foreach_impl lua_src_configure
62 cd "${S}.${ELUA}" || die
67 "includedir=$(lua_get_include_dir)"
68 "libdir=$($(tc-getPKG_CONFIG) --variable libdir ${ELUA}))"
71 if [[ ${ELUA} == "lua5.1" ||
${ELUA} == "luajit" ]]; then
75 if [[ ${ELUA} == "lua5.2" ]]; then
79 if [[ ${ELUA} == "lua5.3" ||
${ELUA} == "lua5.4" ]]; then
85 lua_foreach_impl this_compile
89 # Upstream makefile really, really doesn't respect DESTDIR and has a
90 # dozen layers of indirection
91 cd "${S}.${ELUA}" || die
93 instdir
="$(lua_get_cmod_dir)"
94 exeinto
"${instdir#${EPREFIX}}"
95 if [[ ${ELUA} == "lua5.1" ||
${ELUA} == "luajit" ]]; then
99 if [[ ${ELUA} == "lua5.2" ]]; then
100 doexe src
/5.2/unix.so
103 if [[ ${ELUA} == "lua5.3" ||
${ELUA} == "lua5.4" ]]; then
104 doexe src
/5.3/unix.so
109 lua_foreach_impl this_install