1 |
commit: 6fddd537e7d3ed35e05710098924bb62287c6004 |
2 |
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Nov 28 15:54:26 2020 +0000 |
4 |
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Nov 28 16:16:38 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6fddd537 |
7 |
|
8 |
dev-lua/luasystem: migrate to lua eclass |
9 |
|
10 |
Closes: https://bugs.gentoo.org/752939 |
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/luasystem/luasystem-0.2.1_p0-r100.ebuild | 84 ++++++++++++++++++++++++ |
15 |
dev-lua/luasystem/metadata.xml | 6 +- |
16 |
profiles/package.mask | 1 + |
17 |
3 files changed, 90 insertions(+), 1 deletion(-) |
18 |
|
19 |
diff --git a/dev-lua/luasystem/luasystem-0.2.1_p0-r100.ebuild b/dev-lua/luasystem/luasystem-0.2.1_p0-r100.ebuild |
20 |
new file mode 100644 |
21 |
index 00000000000..8e797c2009a |
22 |
--- /dev/null |
23 |
+++ b/dev-lua/luasystem/luasystem-0.2.1_p0-r100.ebuild |
24 |
@@ -0,0 +1,84 @@ |
25 |
+# Copyright 1999-2020 Gentoo Authors |
26 |
+# Distributed under the terms of the GNU General Public License v2 |
27 |
+ |
28 |
+EAPI=7 |
29 |
+ |
30 |
+LUA_COMPAT=( lua5-{1..3} luajit ) |
31 |
+MY_PV="${PV/_p/-}" |
32 |
+ |
33 |
+inherit lua toolchain-funcs |
34 |
+ |
35 |
+DESCRIPTION="Platform independent system calls for Lua" |
36 |
+HOMEPAGE="https://github.com/o-lim/luasystem/" |
37 |
+SRC_URI="https://github.com/o-lim/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" |
38 |
+S="${WORKDIR}/${PN}-${MY_PV}" |
39 |
+ |
40 |
+LICENSE="MIT" |
41 |
+SLOT="0" |
42 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" |
43 |
+IUSE="test" |
44 |
+RESTRICT="!test? ( test )" |
45 |
+ |
46 |
+RDEPEND="${LUA_DEPS}" |
47 |
+DEPEND="${RDEPEND}" |
48 |
+BDEPEND=" |
49 |
+ virtual/pkgconfig |
50 |
+ test? ( |
51 |
+ >=dev-lua/busted-2.0.0-r100 |
52 |
+ ${RDEPEND} |
53 |
+ ) |
54 |
+" |
55 |
+ |
56 |
+PATCHES=( "${FILESDIR}"/${P}-fix-makefile.patch ) |
57 |
+ |
58 |
+lua_src_test() { |
59 |
+ busted --lua=${ELUA} || die |
60 |
+} |
61 |
+ |
62 |
+src_test() { |
63 |
+ lua_foreach_impl lua_src_test |
64 |
+} |
65 |
+ |
66 |
+lua_src_compile() { |
67 |
+ # Clean project, to compile it for every lua slot |
68 |
+ emake clean |
69 |
+ |
70 |
+ local myemakeargs=( |
71 |
+ "CC=$(tc-getCC)" |
72 |
+ "LD=$(tc-getCC)" |
73 |
+ "LUAINC_linux=$(lua_get_include_dir)" |
74 |
+ "MYCFLAGS=${CFLAGS}" |
75 |
+ "MYLDFLAGS=${LDFLAGS}" |
76 |
+ ) |
77 |
+ |
78 |
+ emake "${myemakeargs[@]}" linux |
79 |
+ |
80 |
+ # Copy module to match the choosen LUA implementation |
81 |
+ cp "src/core.so" "src/core-${ELUA}.so" || die |
82 |
+} |
83 |
+ |
84 |
+src_compile() { |
85 |
+ lua_foreach_impl lua_src_compile |
86 |
+} |
87 |
+ |
88 |
+lua_src_install () { |
89 |
+ # Use correct module for the choosen LUA implementation |
90 |
+ cp "src/core-${ELUA}.so" "src/core.so" || die |
91 |
+ |
92 |
+ local emakeargs=( |
93 |
+ "INSTALL_TOP_CDIR=${ED}/$(lua_get_cmod_dir)" |
94 |
+ "INSTALL_TOP_LDIR=${ED}/$(lua_get_lmod_dir)" |
95 |
+ "LUA_INC=${ED}/$(lua_get_include_dir)" |
96 |
+ ) |
97 |
+ |
98 |
+ emake "${emakeargs[@]}" install |
99 |
+ |
100 |
+ insinto $(lua_get_lmod_dir)/system |
101 |
+ doins system/init.lua |
102 |
+} |
103 |
+ |
104 |
+src_install() { |
105 |
+ lua_foreach_impl lua_src_install |
106 |
+ |
107 |
+ einstalldocs |
108 |
+} |
109 |
|
110 |
diff --git a/dev-lua/luasystem/metadata.xml b/dev-lua/luasystem/metadata.xml |
111 |
index 009738e31d6..e98cabab81d 100644 |
112 |
--- a/dev-lua/luasystem/metadata.xml |
113 |
+++ b/dev-lua/luasystem/metadata.xml |
114 |
@@ -5,7 +5,11 @@ |
115 |
<email>williamh@g.o</email> |
116 |
<name>William Hubbs</name> |
117 |
</maintainer> |
118 |
- <longdescription lang="en"> |
119 |
+ <maintainer type="person"> |
120 |
+ <email>conikost@g.o</email> |
121 |
+ <name>Conrad Kostecki</name> |
122 |
+ </maintainer> |
123 |
+ <longdescription> |
124 |
luasystem is a platform independent system call library for Lua. |
125 |
Supports Lua >= 5.1 and luajit >= 2.0.0. |
126 |
</longdescription> |
127 |
|
128 |
diff --git a/profiles/package.mask b/profiles/package.mask |
129 |
index 7adb1093bf3..71d18cdfa40 100644 |
130 |
--- a/profiles/package.mask |
131 |
+++ b/profiles/package.mask |
132 |
@@ -510,6 +510,7 @@ dev-lua/luacrypto |
133 |
>=dev-lua/luafilesystem-1.8.0-r100 |
134 |
>=dev-lua/luasec-0.9-r100 |
135 |
>=dev-lua/luasocket-3.0_rc1_p20200328-r100 |
136 |
+>=dev-lua/luasystem-0.2.1_p0-r100 |
137 |
>=dev-lua/lutok-0.4-r10 |
138 |
>=dev-lua/luv-1.32.0.0-r100 |
139 |
>=dev-lua/mediator_lua-1.1.2_p0-r100 |