From f16a8851f085c435ad283e977f3aba723ba7201f Mon Sep 17 00:00:00 2001 From: augiedoggie Date: Thu, 6 Jul 2023 11:00:26 -0600 Subject: [PATCH] lua: enable readline, misc cleanup (#8998) readline is enabled so the the lua REPL has proper support for line editing/arrow keys related to #8972 Also, remove some static library remnants and tweak the TEST command --- dev-lang/lua/lua-5.4.6.recipe | 9 +++++---- dev-lang/lua/patches/lua-5.4.6.patchset | 27 +++++++++++++++++++++++-- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/dev-lang/lua/lua-5.4.6.recipe b/dev-lang/lua/lua-5.4.6.recipe index ee359eeaf..7e48e74dd 100644 --- a/dev-lang/lua/lua-5.4.6.recipe +++ b/dev-lang/lua/lua-5.4.6.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="7d5ea1b9cb6aa0b59ca3dde1c6adcb57ef83a1ba8e5432c0ecd06bf439b3ad88" PATCHES="lua-$portVersion.patchset" @@ -36,6 +36,7 @@ PROVIDES=" " REQUIRES=" haiku$secondaryArchSuffix + lib:libreadline$secondaryArchSuffix " PROVIDES_devel=" @@ -48,6 +49,7 @@ REQUIRES_devel=" BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel + devel:libreadline$secondaryArchSuffix >= 8 " BUILD_PREREQUIRES=" cmd:gcc$secondaryArchSuffix @@ -70,7 +72,7 @@ INSTALL() make install INSTALL_TOP="$prefix" INSTALL_MAN="$manDir/man1" \ INSTALL_INC="$includeDir/lua$luaInc" INSTALL_LMOD="$dataDir/lua/$libVersion" \ INSTALL_LIB="$libDir" INSTALL_BIN="$binDir" TO_BIN="lua$libVersion luac$libVersion" \ - TO_LIB="liblua.a liblua.so.$libVersion" + TO_LIB="liblua.so.$libVersion" ln -s lua$libVersion $binDir/lua ln -s luac$libVersion $binDir/luac @@ -81,7 +83,6 @@ INSTALL() rm -r $dataDir #empty directory rm -r $prefix/lib/lua #empty directory - rm $libDir/liblua.a #static library mkdir -p $developLibDir/pkgconfig cat > $developLibDir/pkgconfig/lua.pc << EOF @@ -118,5 +119,5 @@ EOF TEST() { - src/lua$libVersion -v + make LUA_T="lua$libVersion" test } diff --git a/dev-lang/lua/patches/lua-5.4.6.patchset b/dev-lang/lua/patches/lua-5.4.6.patchset index f6e7d8c0b..04db755c5 100644 --- a/dev-lang/lua/patches/lua-5.4.6.patchset +++ b/dev-lang/lua/patches/lua-5.4.6.patchset @@ -1,4 +1,4 @@ -From 1b305c3b464b6e8d24fe76210866dd36f36d1429 Mon Sep 17 00:00:00 2001 +From cb7c92bdacd0d801b564741a1b456283e1bcd243 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,5 +105,28 @@ index 137103e..73951a0 100644 #if !defined(LUA_PATH_DEFAULT) -- -2.37.3 +2.39.2 + + +From 36473ed9d445326d7215198ceb970e1fb540b76c 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 + + +diff --git a/src/Makefile b/src/Makefile +index 9c5ff15..f2a74ab 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -121,7 +121,7 @@ FreeBSD NetBSD OpenBSD freebsd: + generic: $(ALL) + + haiku: +- $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_HAIKU -DLUA_USE_POSIX" LIBS= ++ $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_HAIKU -DLUA_USE_POSIX -DLUA_USE_READLINE" SYSLIBS="-lreadline" + + ios: + $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_IOS" +-- +2.39.2