From 261b4a580baccb349a327bcb7927a3bfe35c92b8 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Mon, 5 Aug 2024 19:31:24 +0200 Subject: [PATCH] main/lua-bit32: fix lua 5.4 build with gcc 14 --- main/lua-bit32/APKBUILD | 10 +++++++--- main/lua-bit32/gcc14.patch | 13 +++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 main/lua-bit32/gcc14.patch diff --git a/main/lua-bit32/APKBUILD b/main/lua-bit32/APKBUILD index 035cb722834..0e81413b625 100644 --- a/main/lua-bit32/APKBUILD +++ b/main/lua-bit32/APKBUILD @@ -1,13 +1,14 @@ # Maintainer: Natanael Copa pkgname=lua-bit32 pkgver=5.3.0 -pkgrel=5 +pkgrel=6 pkgdesc="A lua library providing bitwise operations" url="https://github.com/keplerproject/lua-compat-5.2" arch="all" options="!check" license="MIT" source="$pkgname-$pkgver.tar.gz::https://github.com/keplerproject/lua-compat-5.2/archive/bitlib-$pkgver.tar.gz + gcc14.patch Makefile " builddir="$srcdir/lua-compat-5.2-bitlib-$pkgver" @@ -44,5 +45,8 @@ _subpackage() { "$subpkgdir"/usr/lib/lua/$lver/bit32.so } -sha512sums="234807e201197bc27720864a328f5b63a9fe8bf88bf1fb64cd178532c0745a330b23455fcff0e50d365034f3e43af3c835de7f10a685275da66a7a1ca873e90a lua-bit32-5.3.0.tar.gz -077dd4b397a9e4eb04ac131ceeef148b5f0790970398d69823f1bad485dcb3ab57126fc7b99428c7ec8255dc6b4d4aeee5a88ddf6a7dd9a767886e2fb357265e Makefile" +sha512sums=" +234807e201197bc27720864a328f5b63a9fe8bf88bf1fb64cd178532c0745a330b23455fcff0e50d365034f3e43af3c835de7f10a685275da66a7a1ca873e90a lua-bit32-5.3.0.tar.gz +22c99492b35698d08ad5475e015c6d040c4c3ad23e3d67c686dc6642053f1d1cff502e4c1f5def06cbb51cc1cbc632b9b5547332c0e8cbacfdd5e567b9c1cc26 gcc14.patch +077dd4b397a9e4eb04ac131ceeef148b5f0790970398d69823f1bad485dcb3ab57126fc7b99428c7ec8255dc6b4d4aeee5a88ddf6a7dd9a767886e2fb357265e Makefile +" diff --git a/main/lua-bit32/gcc14.patch b/main/lua-bit32/gcc14.patch new file mode 100644 index 00000000000..5c0a512db19 --- /dev/null +++ b/main/lua-bit32/gcc14.patch @@ -0,0 +1,13 @@ +diff --git a/lbitlib.c b/lbitlib.c +index 24ceac6..fbbcc58 100644 +--- a/lbitlib.c ++++ b/lbitlib.c +@@ -15,7 +15,7 @@ + /********************************************************************/ + #if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM == 501 + #include "compat-5.2.c" +-#elif defined(LUA_VERSION_NUM) && LUA_VERSION_NUM == 503 ++#elif defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 503 + #define luaL_checkunsigned(L, n) ((lua_Unsigned)luaL_checkinteger((L), (n))) + #define lua_pushunsigned(L, n) (lua_pushinteger(L, (lua_Integer)(n))) + #endif