1 |
commit: a01ac96b8f18c783c97ab7a25b9c5914f1250077 |
2 |
Author: Marek Szuba <marecki <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Dec 22 14:24:25 2020 +0000 |
4 |
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Dec 22 15:08:04 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a01ac96b |
7 |
|
8 |
dev-lua/luv: go back to single-impl mode |
9 |
|
10 |
The only revdep currently in the tree, app-editors/neovim, actually links |
11 |
against luv instead of loading it as a module. Between that and upstream |
12 |
not actually supporting multi-impl installations, why bother. |
13 |
|
14 |
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org> |
15 |
|
16 |
...32.0.0-r101.ebuild => luv-1.32.0.0-r102.ebuild} | 51 +++++----------------- |
17 |
1 file changed, 10 insertions(+), 41 deletions(-) |
18 |
|
19 |
diff --git a/dev-lua/luv/luv-1.32.0.0-r101.ebuild b/dev-lua/luv/luv-1.32.0.0-r102.ebuild |
20 |
similarity index 56% |
21 |
rename from dev-lua/luv/luv-1.32.0.0-r101.ebuild |
22 |
rename to dev-lua/luv/luv-1.32.0.0-r102.ebuild |
23 |
index f45e0eee282..7b4e0feb5b7 100644 |
24 |
--- a/dev-lua/luv/luv-1.32.0.0-r101.ebuild |
25 |
+++ b/dev-lua/luv/luv-1.32.0.0-r102.ebuild |
26 |
@@ -5,7 +5,7 @@ EAPI=7 |
27 |
|
28 |
LUA_COMPAT=( lua5-{1..4} luajit ) |
29 |
|
30 |
-inherit cmake lua unpacker |
31 |
+inherit cmake lua-single unpacker |
32 |
|
33 |
# e.g. MY_PV = a.b.c-d |
34 |
MY_PV="$(ver_rs 3 -)" |
35 |
@@ -46,11 +46,16 @@ src_prepare() { |
36 |
cmake_src_prepare |
37 |
} |
38 |
|
39 |
-lua_src_configure() { |
40 |
+# This could in theory be multi-impl (and we have an ebuild in git history, |
41 |
+# 1.32.0.0-r101, which implements it) - the only revdep currently in the tree, |
42 |
+# app-editors/neovim, actually links against luv instead of trying to load it |
43 |
+# as a module. We could probably implement some sort of a hack for this |
44 |
+# - but given how messy it would be, don't bother unless someone actually requests |
45 |
+# luv multi-impl support. |
46 |
+src_configure() { |
47 |
lua_compat_dir="${WORKDIR}/lua-compat-5.3-${LUA_COMPAT_PV}" |
48 |
|
49 |
local mycmakeargs=( |
50 |
- -DINSTALL_LIB_DIR="$(lua_get_cmod_dir)" |
51 |
-DBUILD_MODULE=OFF |
52 |
-DLUA_BUILD_TYPE=System |
53 |
-DLUA_COMPAT53_DIR="${lua_compat_dir}" |
54 |
@@ -70,44 +75,8 @@ lua_src_configure() { |
55 |
cmake_src_configure |
56 |
} |
57 |
|
58 |
-lua_src_test() { |
59 |
- # We need to copy the implementation-specific library back so that the tests see it |
60 |
- rm -f ./luv.so |
61 |
+src_test() { |
62 |
+ # We need to copy the library back so that the tests see it |
63 |
ln -s "${BUILD_DIR}/libluv.so" "./luv.so" || die "Failed to symlink library for tests" |
64 |
${ELUA} "tests/run.lua" || die "Tests failed" |
65 |
} |
66 |
- |
67 |
-lua_src_install() { |
68 |
- cmake_src_install |
69 |
- mkdir -p "${ED}"/usr/$(get_libdir)/pkgconfig && \ |
70 |
- mv "${ED}$(lua_get_cmod_dir)"/pkgconfig/libluv.pc \ |
71 |
- "${ED}"/usr/$(get_libdir)/pkgconfig/libluv-${ELUA}.pc || \ |
72 |
- die "Failed make pkgconfig file for ${ELUA} implementation-specific" |
73 |
- rmdir "${ED}$(lua_get_cmod_dir)"/pkgconfig || die |
74 |
-} |
75 |
- |
76 |
-src_configure() { |
77 |
- lua_foreach_impl lua_src_configure |
78 |
-} |
79 |
- |
80 |
-src_compile() { |
81 |
- lua_foreach_impl cmake_src_compile |
82 |
-} |
83 |
- |
84 |
-src_test() { |
85 |
- lua_foreach_impl lua_src_test |
86 |
-} |
87 |
- |
88 |
-src_install() { |
89 |
- lua_foreach_impl lua_src_install |
90 |
-} |
91 |
- |
92 |
-pkg_postinst() { |
93 |
- ewarn "Please note that in order to properly support multiple Lua implementations," |
94 |
- ewarn "this ebuild of ${PN} installs its library files into implementation-specific" |
95 |
- ewarn "module directories, as well as multiple .pc files named after implementations" |
96 |
- ewarn "(e.g. 'libluv-lua5.3.pc'). Since upstream by default only supports a single" |
97 |
- ewarn "Lua implementation at a time and thus only provides a single, unversioned" |
98 |
- ewarn ".pc file, projects depending on ${PN} might require changes in order to" |
99 |
- ewarn "support the multi-implementation approach." |
100 |
-} |