1 |
commit: 6ff78d6a6538763f7a940f069385f0df73b66b85 |
2 |
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Oct 6 10:45:24 2021 +0000 |
4 |
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Oct 6 10:49:39 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6ff78d6a |
7 |
|
8 |
dev-lua/mpack: bump to version 1.0.9 |
9 |
|
10 |
Package-Manager: Portage-3.0.26, Repoman-3.0.3 |
11 |
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org> |
12 |
|
13 |
dev-lua/mpack/Manifest | 1 + |
14 |
dev-lua/mpack/mpack-1.0.9.ebuild | 113 +++++++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 114 insertions(+) |
16 |
|
17 |
diff --git a/dev-lua/mpack/Manifest b/dev-lua/mpack/Manifest |
18 |
index e07fd5b835f..fc341f3a2e8 100644 |
19 |
--- a/dev-lua/mpack/Manifest |
20 |
+++ b/dev-lua/mpack/Manifest |
21 |
@@ -1 +1,2 @@ |
22 |
DIST mpack-1.0.8.tar.gz 15616 BLAKE2B 06593296d1d36459127bf35eaeb37c894a0c0c6ccff0969cd0a82bee1920a715801db26f0ba0bc54a56399d07efc262666ee4ce79878288a5c0221fd27febea1 SHA512 6d21cc6bbdee583a1d808742991459e4b1796f347b2f4eaa747b576f5bb1ca989123339120e43246bac859c20e6f46ac57116ce9f135157256fecbd8cf817f75 |
23 |
+DIST mpack-1.0.9.tar.gz 16087 BLAKE2B 062f0deaa9ea359486933b5736591ea3ee78886e31259b721d88ef44762403185b881d076ca35fe6e8c16ab756d36698fec1ca893ab3667635e388456a8ad417 SHA512 c663a6cb29c1ae3f88baf25d36b076c35b35b96a16f9df472f8063009dc70886071cc27bf9224aceb86afb5c590ac072fd484435f40ecc4961eabfb5df08f395 |
24 |
|
25 |
diff --git a/dev-lua/mpack/mpack-1.0.9.ebuild b/dev-lua/mpack/mpack-1.0.9.ebuild |
26 |
new file mode 100644 |
27 |
index 00000000000..e31c8d100fa |
28 |
--- /dev/null |
29 |
+++ b/dev-lua/mpack/mpack-1.0.9.ebuild |
30 |
@@ -0,0 +1,113 @@ |
31 |
+# Copyright 1999-2021 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=7 |
35 |
+ |
36 |
+LUA_COMPAT=( lua5-{1..4} luajit ) |
37 |
+ |
38 |
+inherit lua toolchain-funcs |
39 |
+ |
40 |
+MY_PN="lib${PN}-lua" |
41 |
+ |
42 |
+DESCRIPTION="Lua bindings for libmpack" |
43 |
+HOMEPAGE="https://github.com/libmpack/libmpack-lua/" |
44 |
+SRC_URI="https://github.com/${MY_PN/-lua/}/${MY_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
45 |
+S="${WORKDIR}/${MY_PN}-${PV}" |
46 |
+ |
47 |
+LICENSE="MIT" |
48 |
+SLOT="0" |
49 |
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x64-macos" |
50 |
+IUSE="test" |
51 |
+REQUIRED_USE="${LUA_REQUIRED_USE}" |
52 |
+RESTRICT="!test? ( test )" |
53 |
+ |
54 |
+RDEPEND=" |
55 |
+ dev-libs/libmpack |
56 |
+ ${LUA_DEPS} |
57 |
+" |
58 |
+DEPEND="${RDEPEND}" |
59 |
+BDEPEND=" |
60 |
+ virtual/pkgconfig |
61 |
+ test? ( |
62 |
+ dev-lua/busted[${LUA_USEDEP}] |
63 |
+ dev-lua/lua_cliargs[${LUA_USEDEP}] |
64 |
+ ${RDEPEND} |
65 |
+ ) |
66 |
+" |
67 |
+ |
68 |
+src_prepare() { |
69 |
+ default |
70 |
+ |
71 |
+ lua_copy_sources |
72 |
+} |
73 |
+ |
74 |
+lua_src_compile() { |
75 |
+ pushd "${BUILD_DIR}" || die |
76 |
+ |
77 |
+ local myemakeargs=( |
78 |
+ "CC=$(tc-getCC)" |
79 |
+ "LUA_INCLUDE=$(lua_get_CFLAGS)" |
80 |
+ "LUA_LIB=" |
81 |
+ "USE_SYSTEM_MPACK=yes" |
82 |
+ "USE_SYSTEM_LUA=yes" |
83 |
+ ) |
84 |
+ |
85 |
+ emake "${myemakeargs[@]}" |
86 |
+ |
87 |
+ popd |
88 |
+} |
89 |
+ |
90 |
+src_compile() { |
91 |
+ lua_foreach_impl lua_src_compile |
92 |
+} |
93 |
+ |
94 |
+lua_src_test() { |
95 |
+ pushd "${BUILD_DIR}" || die |
96 |
+ |
97 |
+ # "[ FAILED ] test.lua @ 279: mpack should not leak memory" |
98 |
+ # It doesn't seem upstream actually support LuaJIT so were this up to me |
99 |
+ # I would drop it from LUA_COMPAT, unfortunately there are packages in the |
100 |
+ # tree which currently expect it to be supported. |
101 |
+ if [[ ${ELUA} == "luajit" ]]; then |
102 |
+ ewarn "Not running tests under ${ELUA} because they are known to fail" |
103 |
+ return |
104 |
+ fi |
105 |
+ |
106 |
+ busted --lua="${ELUA}" test.lua || die |
107 |
+ |
108 |
+ popd |
109 |
+} |
110 |
+ |
111 |
+src_test() { |
112 |
+ lua_foreach_impl lua_src_test |
113 |
+} |
114 |
+ |
115 |
+lua_src_install() { |
116 |
+ pushd "${BUILD_DIR}" || die |
117 |
+ |
118 |
+ local installdir="$(lua_get_cmod_dir)" |
119 |
+ local myemakeargs=( |
120 |
+ "DESTDIR=${ED}" |
121 |
+ "LUA_CMOD_INSTALLDIR=${installdir#$EPREFIX}" |
122 |
+ "USE_SYSTEM_MPACK=yes" |
123 |
+ "USE_SYSTEM_LUA=yes" |
124 |
+ ) |
125 |
+ |
126 |
+ emake "${myemakeargs[@]}" install |
127 |
+ |
128 |
+ popd |
129 |
+ |
130 |
+ if [[ ${CHOST} == *-darwin* ]] ; then |
131 |
+ local luav=$(lua_get_version) |
132 |
+ # we only want the major version (e.g. 5.1) |
133 |
+ local luamv=${luav:0:3} |
134 |
+ local file="lua/${luamv}/mpack.so" |
135 |
+ install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${file}" "${ED}/usr/$(get_libdir)/${file}" || die "Failed to adjust install_name" |
136 |
+ fi |
137 |
+} |
138 |
+ |
139 |
+src_install() { |
140 |
+ lua_foreach_impl lua_src_install |
141 |
+ |
142 |
+ einstalldocs |
143 |
+} |