1 |
commit: a5cbbcf9a92c406ef01c730d6ad90a822e30515c |
2 |
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Oct 18 13:12:49 2020 +0000 |
4 |
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Oct 18 13:12:49 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a5cbbcf9 |
7 |
|
8 |
dev-lua/lua-bit32: drop old version |
9 |
|
10 |
Package-Manager: Portage-3.0.8, Repoman-3.0.1 |
11 |
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org> |
12 |
|
13 |
dev-lua/lua-bit32/Manifest | 1 - |
14 |
.../lua-bit32-5.3.5-fix-32bit-conversion.patch | 51 ---------------------- |
15 |
dev-lua/lua-bit32/lua-bit32-5.3.5-r1.ebuild | 51 ---------------------- |
16 |
3 files changed, 103 deletions(-) |
17 |
|
18 |
diff --git a/dev-lua/lua-bit32/Manifest b/dev-lua/lua-bit32/Manifest |
19 |
index ff46965f4b2..ef9392daadf 100644 |
20 |
--- a/dev-lua/lua-bit32/Manifest |
21 |
+++ b/dev-lua/lua-bit32/Manifest |
22 |
@@ -1,2 +1 @@ |
23 |
DIST lua-compat53-0.10.tar.gz 53695 BLAKE2B e570aedb23b8ed7ca38c4316ffab25b93a0f9f6f0fae79af563ca8a81dd6453ac273e1f9e70674c484a2dec68749e7d53a1c1736a72616c210b8e38a31b3f191 SHA512 f7f39085f4f6b16095f41e635b4c5477b3dab5e42b5b65a9d522941a3807ea521d4a27a77293a3c9d0ecea78a1f6c2a2497394b2d220f4d7d65e23510563d46d |
24 |
-DIST lua-compat53-0.9.tar.gz 53599 BLAKE2B 7d9efe0afb49c40a68b1d6c28f975080b3331e07d0aa788e0f1f77d5c360504a5cac9cca4e6074b2c64aa7ad8934df3fe2609ff8009db52b046b2f639b670213 SHA512 bec15b6e95cb5cc775785515eba1f094e453059a0ba1eefa433d328b823378b7f48d9c7a34080ad77478cffb2008bead93418f809793afa6021e6046562acc58 |
25 |
|
26 |
diff --git a/dev-lua/lua-bit32/files/lua-bit32-5.3.5-fix-32bit-conversion.patch b/dev-lua/lua-bit32/files/lua-bit32-5.3.5-fix-32bit-conversion.patch |
27 |
deleted file mode 100644 |
28 |
index 36c0ef16cec..00000000000 |
29 |
--- a/dev-lua/lua-bit32/files/lua-bit32-5.3.5-fix-32bit-conversion.patch |
30 |
+++ /dev/null |
31 |
@@ -1,51 +0,0 @@ |
32 |
-From e245d3a18957e43ef902a59a72c8902e2e4435b9 Mon Sep 17 00:00:00 2001 |
33 |
-From: Philipp Janda <siffiejoe@×××.net> |
34 |
-Date: Sat, 10 Oct 2020 16:43:46 +0200 |
35 |
-Subject: [PATCH] Fix bit32 conversion issues for Lua 5.1 on 32 bit |
36 |
- |
37 |
-The default unsigned conversion procedure from upstream using |
38 |
-`lua_Integer` as an intermediate value fails if `lua_Integer` has only |
39 |
-32 bits (as is the case on 32 bit Lua 5.1). This fix uses a `lua_Number` |
40 |
-(hopefully double) as intermediate value in those cases. |
41 |
---- |
42 |
- lbitlib.c | 14 ++++++++++++-- |
43 |
- tests/test-bit32.lua | 1 + |
44 |
- 2 files changed, 13 insertions(+), 2 deletions(-) |
45 |
- |
46 |
-diff --git a/lbitlib.c b/lbitlib.c |
47 |
-index 4786c0d..db2652a 100644 |
48 |
---- a/lbitlib.c |
49 |
-+++ b/lbitlib.c |
50 |
-@@ -19,8 +19,18 @@ |
51 |
- #if defined(LUA_COMPAT_BITLIB) /* { */ |
52 |
- |
53 |
- |
54 |
--#define pushunsigned(L,n) lua_pushinteger(L, (lua_Integer)(n)) |
55 |
--#define checkunsigned(L,i) ((lua_Unsigned)luaL_checkinteger(L,i)) |
56 |
-+#define pushunsigned(L,n) (sizeof(lua_Integer) > 4 ? lua_pushinteger(L, (lua_Integer)(n)) : lua_pushnumber(L, (lua_Number)(n))) |
57 |
-+static lua_Unsigned checkunsigned(lua_State *L, int i) { |
58 |
-+ if (sizeof(lua_Integer) > 4) |
59 |
-+ return (lua_Unsigned)luaL_checkinteger(L, i); |
60 |
-+ else { |
61 |
-+ lua_Number d = luaL_checknumber(L, i); |
62 |
-+ if (d < 0) |
63 |
-+ d = (d + 1) + (~(lua_Unsigned)0); |
64 |
-+ luaL_argcheck(L, d >= 0 && d <= (~(lua_Unsigned)0), i, "value out of range"); |
65 |
-+ return (lua_Unsigned)d; |
66 |
-+ } |
67 |
-+} |
68 |
- |
69 |
- |
70 |
- /* number of bits to consider in a number */ |
71 |
-diff --git a/tests/test-bit32.lua b/tests/test-bit32.lua |
72 |
-index cc91e52..a408b7d 100755 |
73 |
---- a/tests/test-bit32.lua |
74 |
-+++ b/tests/test-bit32.lua |
75 |
-@@ -4,6 +4,7 @@ local bit32 = require("bit32") |
76 |
- |
77 |
- |
78 |
- assert(bit32.bnot(0) == 2^32-1) |
79 |
-+assert(bit32.bnot(-1) == 0) |
80 |
- assert(bit32.band(1, 3, 5) == 1) |
81 |
- assert(bit32.bor(1, 3, 5) == 7) |
82 |
- |
83 |
|
84 |
diff --git a/dev-lua/lua-bit32/lua-bit32-5.3.5-r1.ebuild b/dev-lua/lua-bit32/lua-bit32-5.3.5-r1.ebuild |
85 |
deleted file mode 100644 |
86 |
index 23fec675521..00000000000 |
87 |
--- a/dev-lua/lua-bit32/lua-bit32-5.3.5-r1.ebuild |
88 |
+++ /dev/null |
89 |
@@ -1,51 +0,0 @@ |
90 |
-# Copyright 2020 Gentoo Authors |
91 |
-# Distributed under the terms of the GNU General Public License v2 |
92 |
- |
93 |
-EAPI=7 |
94 |
- |
95 |
-inherit toolchain-funcs |
96 |
- |
97 |
-# Weird upstream version descisions... |
98 |
-# Result tarball may be reused for future lua-compat53 package |
99 |
-LUA_COMPAT_PN="lua-compat-5.3" |
100 |
-LUA_COMPAT_PV="0.9" |
101 |
- |
102 |
-DESCRIPTION="Backported Lua bit manipulation library" |
103 |
-HOMEPAGE="https://github.com/keplerproject/lua-compat-5.3" |
104 |
-SRC_URI="https://github.com/keplerproject/${LUA_COMPAT_PN}/archive/v${LUA_COMPAT_PV}.tar.gz -> lua-compat53-${LUA_COMPAT_PV}.tar.gz" |
105 |
- |
106 |
-S="${WORKDIR}/${LUA_COMPAT_PN}-${LUA_COMPAT_PV}" |
107 |
- |
108 |
-LICENSE="MIT" |
109 |
-SLOT="0" |
110 |
-KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux" |
111 |
-IUSE="test" |
112 |
- |
113 |
-RESTRICT="!test? ( test )" |
114 |
- |
115 |
-DEPEND="dev-lang/lua:0=" |
116 |
-RDEPEND="${DEPEND}" |
117 |
-BDEPEND="virtual/pkgconfig" |
118 |
- |
119 |
-PATCHES=( "${FILESDIR}/${P}-fix-32bit-conversion.patch" ) |
120 |
- |
121 |
-src_compile() { |
122 |
- # TODO maybe sometime there will be luarocks eclass... |
123 |
- compile="$(tc-getCC) ${CFLAGS} ${LDFLAGS} -fPIC -I/usr/include -c lbitlib.c -o lbitlib.o -DLUA_COMPAT_BITLIB -Ic-api" |
124 |
- einfo "${compile}" |
125 |
- eval "${compile}" || die |
126 |
- |
127 |
- link="$(tc-getCC) -shared ${LDFLAGS} -o bit32.so lbitlib.o" |
128 |
- einfo "${link}" |
129 |
- eval "${link}" || die |
130 |
-} |
131 |
- |
132 |
-src_test() { |
133 |
- LUA_CPATH=./?.so lua tests/test-bit32.lua || die |
134 |
-} |
135 |
- |
136 |
-src_install() { |
137 |
- exeinto $($(tc-getPKG_CONFIG) --variable INSTALL_CMOD lua) |
138 |
- doexe bit32.so |
139 |
- dodoc README.md |
140 |
-} |