1 |
commit: 9189264db54c0f6a85adfcf5c055d5d5752fda82 |
2 |
Author: Bernardo Meurer <bernardo <AT> standard <DOT> ai> |
3 |
AuthorDate: Thu Sep 5 08:15:50 2019 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 5 18:45:03 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9189264d |
7 |
|
8 |
dev-libs/libluv: new package (1.30.1_p0) |
9 |
|
10 |
Bare libuv bindings for lua |
11 |
|
12 |
Closes: https://bugs.gentoo.org/691878 |
13 |
Package-Manager: Portage-2.3.75, Repoman-2.3.17 |
14 |
Signed-off-by: Bernardo Meurer <bernardo <AT> standard.ai> |
15 |
Closes: https://github.com/gentoo/gentoo/pull/12864 |
16 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
17 |
|
18 |
dev-lua/luv/Manifest | 2 ++ |
19 |
dev-lua/luv/luv-1.30.1_p0.ebuild | 62 ++++++++++++++++++++++++++++++++++++++++ |
20 |
dev-lua/luv/metadata.xml | 21 ++++++++++++++ |
21 |
3 files changed, 85 insertions(+) |
22 |
|
23 |
diff --git a/dev-lua/luv/Manifest b/dev-lua/luv/Manifest |
24 |
new file mode 100644 |
25 |
index 00000000000..0b154193b78 |
26 |
--- /dev/null |
27 |
+++ b/dev-lua/luv/Manifest |
28 |
@@ -0,0 +1,2 @@ |
29 |
+DIST luv-1.30.1_p0.tar.gz 88560 BLAKE2B 9eb32f4e13921899a80dfba143508d26ef0bee3ce0186b62b31ee9da508aa434ac01dcdbd5654f03fd18798791b71e310739e2d9a879f03bf6c48475cc6e0b46 SHA512 c7f613e72d5e5e93035597fcb6a3868d60e61811d4858ced1c2087f31ed0720c11fe436af51d6626c0d77ed448989520b220d6a150b49f6ec0fe557472dd66c7 |
30 |
+DIST luv-lua-compat-1.30.1_p0.zip 62515 BLAKE2B 173dbe43a1f1f4e440c1e40b0a0b22b4ca580568e754a44fbcf57370a53340ebe247de18ae8e98e68cf0f85ae2fa6ec41d5acfb9a433e4bdc717a1e80a2480b6 SHA512 7e66b059aecdb4de630fd305fdcc439cccac94b44101c8b74d61f0f40a1e01e8e68c811a96bddcf5bb0ae09f369d9524f0ec9b009e31d89aef2a1115becba056 |
31 |
|
32 |
diff --git a/dev-lua/luv/luv-1.30.1_p0.ebuild b/dev-lua/luv/luv-1.30.1_p0.ebuild |
33 |
new file mode 100644 |
34 |
index 00000000000..50c64f2bb52 |
35 |
--- /dev/null |
36 |
+++ b/dev-lua/luv/luv-1.30.1_p0.ebuild |
37 |
@@ -0,0 +1,62 @@ |
38 |
+# Copyright 2019 Gentoo Authors |
39 |
+# Distributed under the terms of the GNU General Public License v2 |
40 |
+ |
41 |
+EAPI=7 |
42 |
+ |
43 |
+inherit cmake-utils unpacker |
44 |
+ |
45 |
+MY_PV="${PV/_p/-}" |
46 |
+MY_P="${PN}-${MY_PV}" |
47 |
+ |
48 |
+DESCRIPTION="Bare libuv bindings for lua" |
49 |
+HOMEPAGE="https://github.com/luvit/luv" |
50 |
+# XXX: Remember to check this hash between bumps! |
51 |
+# https://github.com/luvit/luv/tree/master/deps |
52 |
+LUA_COMPAT_HASH="daebe77a2f498817713df37f0bb316db1d82222f" |
53 |
+SRC_URI=" |
54 |
+ https://github.com/luvit/${PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz |
55 |
+ https://github.com/keplerproject/lua-compat-5.3/archive/${LUA_COMPAT_HASH}.zip -> ${PN}-lua-compat-${PV}.zip |
56 |
+" |
57 |
+ |
58 |
+LICENSE="Apache-2.0" |
59 |
+SLOT="0" |
60 |
+KEYWORDS="~amd64 ~x86" |
61 |
+IUSE="luajit test" |
62 |
+ |
63 |
+BDEPEND=" |
64 |
+ virtual/pkgconfig |
65 |
+ test? ( |
66 |
+ luajit? ( dev-lang/luajit:2 ) |
67 |
+ !luajit? ( dev-lang/lua:0 ) |
68 |
+ ) |
69 |
+" |
70 |
+DEPEND="dev-libs/libuv:=" |
71 |
+RDEPEND="${DEPEND}" |
72 |
+ |
73 |
+S="${WORKDIR}/${MY_P}" |
74 |
+ |
75 |
+src_prepare() { |
76 |
+ # Fix libdir |
77 |
+ # Match '/lib/' and '/lib"' without capturing / or ", replacing with libdir |
78 |
+ sed -i -r "s/\/lib(\"|\/)/\/$(get_libdir)\1/g" CMakeLists.txt || die "Failed to sed CMakeLists.txt" |
79 |
+ cmake-utils_src_prepare |
80 |
+} |
81 |
+ |
82 |
+src_configure() { |
83 |
+ lua_compat_dir="${WORKDIR}/lua-compat-5.3-${LUA_COMPAT_HASH}" |
84 |
+ local mycmakeargs=( |
85 |
+ -DBUILD_MODULE=OFF |
86 |
+ -DLUA_BUILD_TYPE=System |
87 |
+ -DLUA_COMPAT53_DIR="${lua_compat_dir}" |
88 |
+ -DWITH_LUA_ENGINE=$(usex luajit LuaJIT Lua) |
89 |
+ -DWITH_SHARED_LIBUV=ON |
90 |
+ ) |
91 |
+ cmake-utils_src_configure |
92 |
+} |
93 |
+ |
94 |
+src_test() { |
95 |
+ local elua="$(usex luajit luajit lua)" |
96 |
+ # We need to copy the library back so that the tests see it |
97 |
+ cp "${BUILD_DIR}/libluv.so" "./luv.so" || die "Failed to copy library for tests" |
98 |
+ ${elua} "tests/run.lua" || die "Tests failed" |
99 |
+} |
100 |
|
101 |
diff --git a/dev-lua/luv/metadata.xml b/dev-lua/luv/metadata.xml |
102 |
new file mode 100644 |
103 |
index 00000000000..b860177b333 |
104 |
--- /dev/null |
105 |
+++ b/dev-lua/luv/metadata.xml |
106 |
@@ -0,0 +1,21 @@ |
107 |
+<?xml version="1.0" encoding="UTF-8"?> |
108 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
109 |
+<pkgmetadata> |
110 |
+ <maintainer type="person"> |
111 |
+ <email>bernardo@××××××××.ai</email> |
112 |
+ <name>Bernardo Meurer</name> |
113 |
+ </maintainer> |
114 |
+ <maintainer type="project"> |
115 |
+ <email>proxy-maint@g.o</email> |
116 |
+ <name>Gentoo Proxy Maintainers Project</name> |
117 |
+ </maintainer> |
118 |
+ <longdescription lang="en"> |
119 |
+ libuv bindings for luajit and lua 5.1/ 5.2/ 5.3. |
120 |
+ |
121 |
+ This library makes libuv available to lua scripts. It was made for the |
122 |
+ luvit project but should usable from nearly any lua project. |
123 |
+ </longdescription> |
124 |
+ <upstream> |
125 |
+ <remote-id type="github">luvit/luv</remote-id> |
126 |
+ </upstream> |
127 |
+</pkgmetadata> |