diff options
| author | Liguros - Gitlab CI/CD [feature/flatten] <gitlab@liguros.net> | 2020-10-18 18:25:36 +0000 |
|---|---|---|
| committer | Liguros - Gitlab CI/CD [feature/flatten] <gitlab@liguros.net> | 2020-10-18 18:25:36 +0000 |
| commit | 7d1541e2aecde16b5c41a42c5861c6d408c75e2d (patch) | |
| tree | 8b3a724de20bde08ea51422823c22ed5489a02df /dev-lua/lua-bit32 | |
| parent | ba83239900bd7d4c487744e0d5f958e1fc4cbf35 (diff) | |
| download | baldeagleos-repo-7d1541e2aecde16b5c41a42c5861c6d408c75e2d.tar.gz baldeagleos-repo-7d1541e2aecde16b5c41a42c5861c6d408c75e2d.tar.xz baldeagleos-repo-7d1541e2aecde16b5c41a42c5861c6d408c75e2d.zip | |
Updating liguros repo
Diffstat (limited to 'dev-lua/lua-bit32')
| -rw-r--r-- | dev-lua/lua-bit32/Manifest | 2 | ||||
| -rw-r--r-- | dev-lua/lua-bit32/files/lua-bit32-5.3.5-fix-32bit-conversion.patch | 51 | ||||
| -rw-r--r-- | dev-lua/lua-bit32/lua-bit32-5.3.5-r2.ebuild (renamed from dev-lua/lua-bit32/lua-bit32-5.3.5-r1.ebuild) | 4 |
3 files changed, 2 insertions, 55 deletions
diff --git a/dev-lua/lua-bit32/Manifest b/dev-lua/lua-bit32/Manifest index e2a2c4db2bf9..ef9392daadfa 100644 --- a/dev-lua/lua-bit32/Manifest +++ b/dev-lua/lua-bit32/Manifest @@ -1 +1 @@ -DIST lua-compat53-0.9.tar.gz 53599 BLAKE2B 7d9efe0afb49c40a68b1d6c28f975080b3331e07d0aa788e0f1f77d5c360504a5cac9cca4e6074b2c64aa7ad8934df3fe2609ff8009db52b046b2f639b670213 SHA512 bec15b6e95cb5cc775785515eba1f094e453059a0ba1eefa433d328b823378b7f48d9c7a34080ad77478cffb2008bead93418f809793afa6021e6046562acc58 +DIST lua-compat53-0.10.tar.gz 53695 BLAKE2B e570aedb23b8ed7ca38c4316ffab25b93a0f9f6f0fae79af563ca8a81dd6453ac273e1f9e70674c484a2dec68749e7d53a1c1736a72616c210b8e38a31b3f191 SHA512 f7f39085f4f6b16095f41e635b4c5477b3dab5e42b5b65a9d522941a3807ea521d4a27a77293a3c9d0ecea78a1f6c2a2497394b2d220f4d7d65e23510563d46d 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 deleted file mode 100644 index 36c0ef16cec5..000000000000 --- a/dev-lua/lua-bit32/files/lua-bit32-5.3.5-fix-32bit-conversion.patch +++ /dev/null @@ -1,51 +0,0 @@ -From e245d3a18957e43ef902a59a72c8902e2e4435b9 Mon Sep 17 00:00:00 2001 -From: Philipp Janda <siffiejoe@gmx.net> -Date: Sat, 10 Oct 2020 16:43:46 +0200 -Subject: [PATCH] Fix bit32 conversion issues for Lua 5.1 on 32 bit - -The default unsigned conversion procedure from upstream using -`lua_Integer` as an intermediate value fails if `lua_Integer` has only -32 bits (as is the case on 32 bit Lua 5.1). This fix uses a `lua_Number` -(hopefully double) as intermediate value in those cases. ---- - lbitlib.c | 14 ++++++++++++-- - tests/test-bit32.lua | 1 + - 2 files changed, 13 insertions(+), 2 deletions(-) - -diff --git a/lbitlib.c b/lbitlib.c -index 4786c0d..db2652a 100644 ---- a/lbitlib.c -+++ b/lbitlib.c -@@ -19,8 +19,18 @@ - #if defined(LUA_COMPAT_BITLIB) /* { */ - - --#define pushunsigned(L,n) lua_pushinteger(L, (lua_Integer)(n)) --#define checkunsigned(L,i) ((lua_Unsigned)luaL_checkinteger(L,i)) -+#define pushunsigned(L,n) (sizeof(lua_Integer) > 4 ? lua_pushinteger(L, (lua_Integer)(n)) : lua_pushnumber(L, (lua_Number)(n))) -+static lua_Unsigned checkunsigned(lua_State *L, int i) { -+ if (sizeof(lua_Integer) > 4) -+ return (lua_Unsigned)luaL_checkinteger(L, i); -+ else { -+ lua_Number d = luaL_checknumber(L, i); -+ if (d < 0) -+ d = (d + 1) + (~(lua_Unsigned)0); -+ luaL_argcheck(L, d >= 0 && d <= (~(lua_Unsigned)0), i, "value out of range"); -+ return (lua_Unsigned)d; -+ } -+} - - - /* number of bits to consider in a number */ -diff --git a/tests/test-bit32.lua b/tests/test-bit32.lua -index cc91e52..a408b7d 100755 ---- a/tests/test-bit32.lua -+++ b/tests/test-bit32.lua -@@ -4,6 +4,7 @@ local bit32 = require("bit32") - - - assert(bit32.bnot(0) == 2^32-1) -+assert(bit32.bnot(-1) == 0) - assert(bit32.band(1, 3, 5) == 1) - assert(bit32.bor(1, 3, 5) == 7) - diff --git a/dev-lua/lua-bit32/lua-bit32-5.3.5-r1.ebuild b/dev-lua/lua-bit32/lua-bit32-5.3.5-r2.ebuild index 23fec675521b..9004734fa979 100644 --- a/dev-lua/lua-bit32/lua-bit32-5.3.5-r1.ebuild +++ b/dev-lua/lua-bit32/lua-bit32-5.3.5-r2.ebuild @@ -8,7 +8,7 @@ inherit toolchain-funcs # Weird upstream version descisions... # Result tarball may be reused for future lua-compat53 package LUA_COMPAT_PN="lua-compat-5.3" -LUA_COMPAT_PV="0.9" +LUA_COMPAT_PV="0.10" DESCRIPTION="Backported Lua bit manipulation library" HOMEPAGE="https://github.com/keplerproject/lua-compat-5.3" @@ -27,8 +27,6 @@ DEPEND="dev-lang/lua:0=" RDEPEND="${DEPEND}" BDEPEND="virtual/pkgconfig" -PATCHES=( "${FILESDIR}/${P}-fix-32bit-conversion.patch" ) - src_compile() { # TODO maybe sometime there will be luarocks eclass... compile="$(tc-getCC) ${CFLAGS} ${LDFLAGS} -fPIC -I/usr/include -c lbitlib.c -o lbitlib.o -DLUA_COMPAT_BITLIB -Ic-api" |
