diff --git a/dev-lang/lua/lua-5.4.7.recipe b/dev-lang/lua/lua-5.4.7.recipe index ac68033a4..76d23e509 100644 --- a/dev-lang/lua/lua-5.4.7.recipe +++ b/dev-lang/lua/lua-5.4.7.recipe @@ -7,7 +7,7 @@ collection, making it ideal for configuration, scripting, and rapid prototyping. HOMEPAGE="https://www.lua.org/" COPYRIGHT="1994-2023 Lua.org, PUC-Rio" LICENSE="MIT" -REVISION="1" +REVISION="2" SOURCE_URI="http://www.lua.org/ftp/lua-$portVersion.tar.gz" CHECKSUM_SHA256="9fbf5e28ef86c69858f6d3d34eccc32e911c1a28b4120ff3e84aaa70cfbf1e30" PATCHES="lua-$portVersion.patchset" @@ -58,14 +58,10 @@ BUILD_PREREQUIRES=" BUILD() { -if [ $effectiveTargetArchitecture = x86_gcc2 ]; then - GCC2_CFLAG="-DLUA_NOBUILTIN=1" -fi - make haiku MYCFLAGS="-DLUA_ROOT='\"`finddir B_SYSTEM_DIRECTORY`/\"' \ - -DLUA_LDIR='\"`finddir B_SYSTEM_DATA_DIRECTORY`/lua/$libVersion/\"' \ - -DLUA_EXEC_DIR='\"`finddir B_SYSTEM_BIN_DIRECTORY`/\"' \ - $GCC2_CFLAG" LUA_T="lua$libVersion" LUAC_T="luac$libVersion" \ + -DLUA_USER_ROOT='\"`finddir B_USER_NONPACKAGED_DIRECTORY`/\"' \ + -DLUA_LDIR='\"`finddir B_SYSTEM_DATA_DIRECTORY`/lua/$libVersion/\"'" \ + LUA_T="lua$libVersion" LUAC_T="luac$libVersion" \ LUA_SO="liblua.so.$libVersion" } diff --git a/dev-lang/lua/patches/lua-5.4.7.patchset b/dev-lang/lua/patches/lua-5.4.7.patchset index 5ee6d67e2..d550dc519 100644 --- a/dev-lang/lua/patches/lua-5.4.7.patchset +++ b/dev-lang/lua/patches/lua-5.4.7.patchset @@ -1,4 +1,4 @@ -From 8934e5642887ff0569f893784f0b8ec5582c75de Mon Sep 17 00:00:00 2001 +From d78db532c7986bcab6c66309e7b76c13b29e0fe0 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Mon, 5 May 2014 15:59:15 +0000 Subject: import patch from 5.2.1 @@ -105,10 +105,10 @@ index 33bb580..f473ee5 100644 #if !defined(LUA_PATH_DEFAULT) -- -2.45.1 +2.45.2 -From 0173eef78d4e0591d31912bfe92d1a9589a24cee Mon Sep 17 00:00:00 2001 +From d411ba59207c97fa338d2993a4dfa5bc37bc9eb2 Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Thu, 6 Jul 2023 10:28:47 -0600 Subject: enable readline support on Haiku @@ -128,85 +128,72 @@ index 9c5ff15..f2a74ab 100644 ios: $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_IOS" -- -2.45.1 +2.45.2 -From 1903b3b6648f4e17162f68db6fa9f73c34702d56 Mon Sep 17 00:00:00 2001 -From: Schrijvers Luc -Date: Fri, 28 Jun 2024 09:20:53 +0200 -Subject: also undef LUA_EXEC_DIR - - -diff --git a/src/luaconf.h b/src/luaconf.h -index f473ee5..cee5745 100644 ---- a/src/luaconf.h -+++ b/src/luaconf.h -@@ -189,7 +189,9 @@ - */ - #define LUA_PATH_SEP ";" - #define LUA_PATH_MARK "?" -+#ifndef LUA_EXEC_DIR - #define LUA_EXEC_DIR "!" -+#endif - - - /* --- -2.45.1 - - -From 6ea49f79297095931886489551b4c6275448f51b Mon Sep 17 00:00:00 2001 +From caef74cd47d1c56b879f560e528b66bab8d629cc Mon Sep 17 00:00:00 2001 From: Schrijvers Luc Date: Fri, 28 Jun 2024 11:31:45 +0200 Subject: Add non-packaged search path diff --git a/src/luaconf.h b/src/luaconf.h -index cee5745..45f18cb 100644 +index f473ee5..024aa7f 100644 --- a/src/luaconf.h +++ b/src/luaconf.h -@@ -243,12 +243,15 @@ +@@ -237,16 +237,27 @@ + #endif + #define LUA_CDIR LUA_ROOT "lib/lua/" LUA_VDIR "/" + ++#ifndef LUA_USER_ROOT ++#define LUA_USER_ROOT "/usr/local/" ++#endif ++#define LUA_USER_LDIR LUA_USER_ROOT "data/lua/" LUA_VDIR "/" ++#define LUA_USER_CDIR LUA_USER_ROOT "lib/lua/" LUA_VDIR "/" ++ + #if !defined(LUA_PATH_DEFAULT) #define LUA_PATH_DEFAULT \ ++ LUA_USER_LDIR"?.lua;" LUA_USER_LDIR"?/init.lua;" \ ++ LUA_USER_CDIR"?.lua;" LUA_USER_CDIR"?/init.lua;" \ LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \ LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua;" \ -- "./?.lua;" "./?/init.lua" -+ "./?.lua;" "./?/init.lua;" \ -+ "/boot/home/config/non-packaged/data/lua/5.4/?.lua;" \ -+ "/boot/home/config/non-packaged/lib/lua/5.4/?/init.lua" + "./?.lua;" "./?/init.lua" + #endif #if !defined(LUA_CPATH_DEFAULT) #define LUA_CPATH_DEFAULT \ - LUA_CDIR"?.so;" LUA_CDIR"loadall.so;" "./?.so" -+ LUA_CDIR"?.so;" LUA_CDIR"loadall.so;" "./?.so;" "/boot/home/config/non-packaged/lib/lua/5.4/?.so" ++ LUA_USER_CDIR"?.so;" LUA_USER_CDIR"loadall.so;" \ ++ LUA_CDIR"?.so;" LUA_CDIR"loadall.so;" \ ++ "./?.so" #endif #endif /* } */ -- -2.45.1 +2.45.2 -From 0f65521c9c71a9d91e021221872600bef86b6bfa Mon Sep 17 00:00:00 2001 +From 5c87aa17202a0c6ff9b4da0b182f9ad28dec5aa2 Mon Sep 17 00:00:00 2001 From: Schrijvers Luc -Date: Fri, 28 Jun 2024 11:51:22 +0200 -Subject: add non-packaged path for bin +Date: Fri, 5 Jul 2024 13:16:05 +0200 +Subject: Fix for gcc2 LUA_NOBUILTIN CFLAG doesn't seem to respect this on + runtime diff --git a/src/luaconf.h b/src/luaconf.h -index 45f18cb..992281e 100644 +index 024aa7f..9e24be9 100644 --- a/src/luaconf.h +++ b/src/luaconf.h -@@ -243,7 +243,9 @@ - #define LUA_PATH_DEFAULT \ - LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \ - LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua;" \ -+ LUA_EXEC_DIR"!;" "/boot/home/config/non-packaged/bin/?;" \ - "./?.lua;" "./?/init.lua;" \ -+ "/boot/home/config/non-packaged/bin/?;" \ - "/boot/home/config/non-packaged/data/lua/5.4/?.lua;" \ - "/boot/home/config/non-packaged/lib/lua/5.4/?/init.lua" +@@ -701,7 +701,7 @@ + */ + #if !defined(luai_likely) +-#if defined(__GNUC__) && !defined(LUA_NOBUILTIN) ++#if defined(__GNUC__) && ((__GNUC__) >= 3) && !defined(LUA_NOBUILTIN) + #define luai_likely(x) (__builtin_expect(((x) != 0), 1)) + #define luai_unlikely(x) (__builtin_expect(((x) != 0), 0)) + #else -- -2.45.1 +2.45.2