Gentoo Archives: gentoo-commits

From: Conrad Kostecki <conikost@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: profiles/, dev-lua/lua-utf8/
Date: Sat, 28 Nov 2020 23:59:57
Message-Id: 1606607956.6d510f813a21e6f327ab7e1e160ef35696aeec80.conikost@gentoo
1 commit: 6d510f813a21e6f327ab7e1e160ef35696aeec80
2 Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
3 AuthorDate: Sat Nov 28 23:56:02 2020 +0000
4 Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
5 CommitDate: Sat Nov 28 23:59:16 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6d510f81
7
8 dev-lua/lua-utf8: migrate to lua eclass
9
10 Closes: https://bugs.gentoo.org/752627
11 Package-Manager: Portage-3.0.9, Repoman-3.0.2
12 Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>
13
14 dev-lua/lua-utf8/lua-utf8-0.1.3-r100.ebuild | 82 +++++++++++++++++++++++++++++
15 profiles/package.mask | 1 +
16 2 files changed, 83 insertions(+)
17
18 diff --git a/dev-lua/lua-utf8/lua-utf8-0.1.3-r100.ebuild b/dev-lua/lua-utf8/lua-utf8-0.1.3-r100.ebuild
19 new file mode 100644
20 index 00000000000..48e0614d06d
21 --- /dev/null
22 +++ b/dev-lua/lua-utf8/lua-utf8-0.1.3-r100.ebuild
23 @@ -0,0 +1,82 @@
24 +# Copyright 2020 Gentoo Authors
25 +# Distributed under the terms of the GNU General Public License v2
26 +
27 +EAPI=7
28 +
29 +LUA_COMPAT=( lua5-{1..3} luajit )
30 +
31 +inherit lua toolchain-funcs
32 +
33 +DESCRIPTION="A UTF-8 support module for Lua and LuaJIT"
34 +HOMEPAGE="https://github.com/starwing/luautf8"
35 +SRC_URI="https://github.com/starwing/luautf8/archive/${PV}.tar.gz -> ${P}.tar.gz"
36 +S="${WORKDIR}/${PN//-/}-${PV}"
37 +
38 +LICENSE="MIT"
39 +SLOT="0"
40 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
41 +IUSE="test"
42 +REQUIRED_USE="${LUA_REQUIRED_USE}"
43 +RESTRICT="!test? ( test )"
44 +
45 +RDEPEND="${LUA_DEPS}"
46 +DEPEND="${RDEPEND}"
47 +BDEPEND="virtual/pkgconfig"
48 +
49 +lua_src_compile() {
50 + local compiler=(
51 + "$(tc-getCC)"
52 + "${CFLAGS}"
53 + "-fPIC"
54 + "${LDFLAGS}"
55 + "$(lua_get_CFLAGS)"
56 + "-c lutf8lib.c"
57 + "-o lutf8lib-${ELUA}.o"
58 + )
59 + einfo "${compiler[@]}"
60 + ${compiler[@]} || die
61 +
62 + local linker=(
63 + "$(tc-getCC)"
64 + "-shared"
65 + "${LDFLAGS}"
66 + "-o lutf8lib-${ELUA}.so"
67 + "lutf8lib-${ELUA}.o"
68 + )
69 + einfo "${linker[@]}"
70 + ${linker[@]} || die
71 +}
72 +
73 +src_compile() {
74 + lua_foreach_impl lua_src_compile
75 +}
76 +
77 +lua_src_test() {
78 + local mytests=(
79 + "test.lua"
80 + "test_compat.lua"
81 + "test_pm.lua"
82 + )
83 +
84 + for mytest in ${mytests[@]}; do
85 + LUA_CPATH="${S}/lutf8lib-${ELUA}.so" ${ELUA} ${mytest} || die
86 + done
87 +}
88 +
89 +src_test() {
90 + lua_foreach_impl lua_src_test
91 +}
92 +
93 +lua_src_install() {
94 + exeinto "$(lua_get_cmod_dir)"
95 + newexe "lutf8lib-${ELUA}.so" "lua-utf8.so"
96 +
97 + insinto "$(lua_get_lmod_dir)"
98 + doins parseucd.lua
99 +}
100 +
101 +src_install() {
102 + lua_foreach_impl lua_src_install
103 +
104 + einstalldocs
105 +}
106
107 diff --git a/profiles/package.mask b/profiles/package.mask
108 index a884e70e9e5..ccb058f6cd7 100644
109 --- a/profiles/package.mask
110 +++ b/profiles/package.mask
111 @@ -513,6 +513,7 @@ dev-lua/luacrypto
112 >=dev-lua/ldoc-1.4.6-r100
113 >=dev-lua/lpeg-1.0.2-r100
114 >=dev-lua/lua-bit32-5.3.5-r100
115 +>=dev-lua/lua-utf8-0.1.3-r100
116 >=dev-lua/lua-zlib-1.2-r100
117 >=dev-lua/LuaBitOp-1.0.2-r100
118 >=dev-lua/luadbi-0.7.2-r100