diff options
Diffstat (limited to 'dev-lua/lua-utf8/lua-utf8-0.1.1.ebuild')
-rw-r--r-- | dev-lua/lua-utf8/lua-utf8-0.1.1.ebuild | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/dev-lua/lua-utf8/lua-utf8-0.1.1.ebuild b/dev-lua/lua-utf8/lua-utf8-0.1.1.ebuild new file mode 100644 index 000000000000..00f5147b88b0 --- /dev/null +++ b/dev-lua/lua-utf8/lua-utf8-0.1.1.ebuild @@ -0,0 +1,43 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit toolchain-funcs + +DESCRIPTION="UTF-8 support for Lua" +HOMEPAGE="https://github.com/starwing/luautf8" +SRC_URI="https://github.com/starwing/luautf8/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" +IUSE="luajit test" + +RESTRICT="!test? ( test )" + +BDEPEND="virtual/pkgconfig" +RDEPEND=" + !luajit? ( >=dev-lang/lua-5.1:= ) + luajit? ( dev-lang/luajit:2 )" +DEPEND="${RDEPEND}" + +S="${WORKDIR}/${PN//-/}-${PV}" + +src_prepare() { + default + + cp -v ${FILESDIR}/${PN}.Makefile ${S}/Makefile || die +} + +src_compile() { + emake DESTDIR="${D}" PREFIX="${EPREFIX}" MY_USE_LUA="$(usex luajit 'luajit' 'lua')" PKG_CONFIG="$(tc-getPKG_CONFIG)" +} + +src_install() { + emake DESTDIR="${D}" PREFIX="${EPREFIX}" MY_USE_LUA="$(usex luajit 'luajit' 'lua')" PKG_CONFIG="$(tc-getPKG_CONFIG)" install + einstalldocs +} + +src_test() { + LUA_CPATH=./src/?.so $(usex luajit 'luajit' 'lua') test.lua || die +} |