summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Payno <vpayno+gentoo@gmail.com>2020-01-27 11:12:44 -0800
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2020-03-15 16:22:04 -0700
commit8708d8768b354a6dbe60a1cc796da9dd843acecb (patch)
tree1e9d5396b06eb2941caef551789cc9b5f9020bee /dev-lua/lua-utf8/lua-utf8-0.1.1.ebuild
parentapp-metrics/node_exporter: revbump for install location and go migration (diff)
downloadgentoo-8708d8768b354a6dbe60a1cc796da9dd843acecb.tar.gz
gentoo-8708d8768b354a6dbe60a1cc796da9dd843acecb.tar.bz2
gentoo-8708d8768b354a6dbe60a1cc796da9dd843acecb.zip
dev-lua/lua-utf8: UTF8 module for Lua (new package)
Signed-off-by: Victor Payno <vpayno+gentoo@gmail.com> UTF-8 support for Lua Closes: https://github.com/gentoo/gentoo/pull/14477 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
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.ebuild43
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
+}