diff options
Diffstat (limited to 'dev-lua/lua-utf8')
-rw-r--r-- | dev-lua/lua-utf8/Manifest | 1 | ||||
-rw-r--r-- | dev-lua/lua-utf8/lua-utf8-0.1.3.ebuild | 70 | ||||
-rw-r--r-- | dev-lua/lua-utf8/metadata.xml | 4 |
3 files changed, 75 insertions, 0 deletions
diff --git a/dev-lua/lua-utf8/Manifest b/dev-lua/lua-utf8/Manifest index b2369602833e..b31cd98e6e89 100644 --- a/dev-lua/lua-utf8/Manifest +++ b/dev-lua/lua-utf8/Manifest @@ -1 +1,2 @@ DIST lua-utf8-0.1.1.tar.gz 35475 BLAKE2B 99ffece901878fc966e0314886ca20255834c76b9266b1806acda7afb84d6a358c556b9a88c10497d2874d7902fac5905907ab25fefb4ba38544d46e3bae1471 SHA512 e0a8632b9391c7e7b35e371f4e95899ec58adb4988f1fe5a7101310f7c774c3a3e88073f156cf7799c57f69c0fc53aff4486beb1e7006bfaa96d86e248e38897 +DIST lua-utf8-0.1.3.tar.gz 41830 BLAKE2B 72982c7ec8d8837e391fa6bfb689c1e9f4a7746d0cbc058556f06027b4af00c936036f87baf58f45e1169fd3ea7e6d8174629d5a7279205622cf0710971ca29c SHA512 d0abe73fecbfeba36083c135d77962d953ad9e431721a2557669c912a2703e31c46f84f2ee9ee4ac966a5bcc88d4daef930f8d2d8e72106fa61010509c183e29 diff --git a/dev-lua/lua-utf8/lua-utf8-0.1.3.ebuild b/dev-lua/lua-utf8/lua-utf8-0.1.3.ebuild new file mode 100644 index 000000000000..ef773e7a9086 --- /dev/null +++ b/dev-lua/lua-utf8/lua-utf8-0.1.3.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs + +DESCRIPTION="A UTF-8 support module for Lua and LuaJIT" +HOMEPAGE="https://github.com/starwing/luautf8" +SRC_URI="https://github.com/starwing/luautf8/archive/${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/${PN//-/}-${PV}" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" +IUSE="luajit test" +RESTRICT="!test? ( test )" + +RDEPEND=" + luajit? ( dev-lang/luajit:2 ) + !luajit? ( >=dev-lang/lua-5.1:= ) +" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +src_compile() { + local compiler=( + "$(tc-getCC)" + "${CFLAGS}" + "-fPIC" + "${LDFLAGS}" + "-I/usr/include" + "-c lutf8lib.c" + "-o lutf8lib.o" + ) + einfo "${compiler[@]}" + ${compiler[@]} || die + + local linker=( + "$(tc-getCC)" + "-shared" + "${LDFLAGS}" + "-o lutf8lib.so" + "lutf8lib.o" + ) + einfo "${linker[@]}" + ${linker[@]} || die +} + +src_test() { + local mytests=( + "test.lua" + "test_compat.lua" + "test_pm.lua" + ) + + for mytest in ${mytests[@]}; do + LUA_CPATH="${S}/lutf8lib.so" $(usex luajit 'luajit' 'lua') ${mytest} || die + done +} + +src_install() { + exeinto "$($(tc-getPKG_CONFIG) --variable INSTALL_CMOD lua)" + newexe "lutf8lib.so" "lua-utf8.so" + + insinto "$($(tc-getPKG_CONFIG) --variable INSTALL_LMOD lua)" + doins parseucd.lua + + einstalldocs +} diff --git a/dev-lua/lua-utf8/metadata.xml b/dev-lua/lua-utf8/metadata.xml index efc3ff445600..e9b8d834be80 100644 --- a/dev-lua/lua-utf8/metadata.xml +++ b/dev-lua/lua-utf8/metadata.xml @@ -2,6 +2,10 @@ <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="person"> + <email>conikost@gentoo.org</email> + <name>Conrad Kostecki</name> + </maintainer> + <maintainer type="person"> <email>vpayno+gentoo@gmail.com</email> <name>Victor Payno</name> </maintainer> |