mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
lua, bump lua5.4, make it default (#8875)
This commit is contained in:
@@ -5,17 +5,16 @@ Lua is dynamically typed, runs by interpreting bytecode for a register-based \
|
||||
virtual machine, and has automatic memory management with incremental garbage \
|
||||
collection, making it ideal for configuration, scripting, and rapid prototyping."
|
||||
HOMEPAGE="https://www.lua.org/"
|
||||
COPYRIGHT="1994-2020 Lua.org, PUC-Rio"
|
||||
COPYRIGHT="1994-2023 Lua.org, PUC-Rio"
|
||||
LICENSE="MIT"
|
||||
REVISION="3"
|
||||
REVISION="1"
|
||||
SOURCE_URI="http://www.lua.org/ftp/lua-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="164c7849653b80ae67bec4b7473b884bf5cc8d2dca05653475ec2ed27b9ebf61"
|
||||
SOURCE_DIR="lua-$portVersion"
|
||||
PATCHES="lua54-$portVersion.patchset"
|
||||
CHECKSUM_SHA256="7d5ea1b9cb6aa0b59ca3dde1c6adcb57ef83a1ba8e5432c0ecd06bf439b3ad88"
|
||||
PATCHES="lua-$portVersion.patchset"
|
||||
if [ $effectiveTargetArchitecture = x86_gcc2 ]; then
|
||||
PATCHES+="
|
||||
lua54-$portVersion.gcc2.patchset
|
||||
"
|
||||
lua-$portVersion.gcc2.patchset
|
||||
"
|
||||
fi
|
||||
|
||||
ARCHITECTURES="all"
|
||||
@@ -23,15 +22,16 @@ SECONDARY_ARCHITECTURES="x86_gcc2 x86"
|
||||
|
||||
libVersion="${portVersion%.*}"
|
||||
libVersionCompat="$libVersion compat >= $libVersion"
|
||||
portVersionCompat="$portVersion compat >= $libVersion"
|
||||
luaInc="`echo ${libVersion} | tr -d '.'`"
|
||||
luaVer="`echo $portVersion | cut -d~ -f1`"
|
||||
|
||||
PROVIDES="
|
||||
lua5.4$secondaryArchSuffix = $portVersion compat >= 5.4
|
||||
# cmd:lua$secondaryArchSuffix = $portVersion compat >= 5.4
|
||||
cmd:lua$libVersion$secondaryArchSuffix = $portVersion compat >= 5.4
|
||||
# cmd:luac$secondaryArchSuffix = $portVersion compat >= 5.4
|
||||
cmd:luac$libVersion$secondaryArchSuffix = $portVersion compat >= 5.4
|
||||
lua$secondaryArchSuffix = $portVersionCompat
|
||||
cmd:lua$secondaryArchSuffix = $portVersionCompat
|
||||
cmd:lua$libVersion$secondaryArchSuffix = $portVersionCompat
|
||||
cmd:luac$secondaryArchSuffix = $portVersionCompat
|
||||
cmd:luac$libVersion$secondaryArchSuffix = $portVersionCompat
|
||||
lib:liblua$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
@@ -39,16 +39,11 @@ REQUIRES="
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
lua5.4${secondaryArchSuffix}_devel = $portVersion compat >= 5.4
|
||||
lua${secondaryArchSuffix}_devel = $portVersionCompat
|
||||
devel:liblua$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
lua5.4$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
CONFLICTS_devel="
|
||||
lua${secondaryArchSuffix}_devel
|
||||
lua5.1${secondaryArchSuffix}_devel
|
||||
lua5.2${secondaryArchSuffix}_devel
|
||||
lua$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
@@ -77,13 +72,10 @@ INSTALL()
|
||||
INSTALL_LIB="$libDir" INSTALL_BIN="$binDir" TO_BIN="lua$libVersion luac$libVersion" \
|
||||
TO_LIB="liblua.a liblua.so.$libVersion"
|
||||
|
||||
# ln -s lua$libVersion $binDir/lua
|
||||
# ln -s luac$libVersion $binDir/luac
|
||||
ln -s lua$libVersion $binDir/lua
|
||||
ln -s luac$libVersion $binDir/luac
|
||||
ln -s liblua.so.$libVersion $libDir/liblua.so
|
||||
|
||||
mv $manDir/man1/lua.1 $manDir/man1/lua$luaInc.1
|
||||
mv $manDir/man1/luac.1 $manDir/man1/luac$luaInc.1
|
||||
|
||||
mkdir -p $docDir
|
||||
cp doc/{*.html,logo.gif,lua.css,manual.css,osi-certified-72x60.png} $docDir
|
||||
|
||||
@@ -117,7 +109,11 @@ EOF
|
||||
ln -s $developLibDir/pkgconfig/lua.pc $developLibDir/pkgconfig/lua$libVersion.pc
|
||||
|
||||
prepareInstalledDevelLib liblua
|
||||
packageEntries devel $developDir
|
||||
|
||||
packageEntries devel $developDir \
|
||||
$docDir
|
||||
|
||||
rm -rf $documentationDir/packages #empty directory
|
||||
}
|
||||
|
||||
TEST()
|
||||
@@ -8,9 +8,10 @@ HOMEPAGE="https://www.lua.org/"
|
||||
COPYRIGHT="1994-2016 Roberto Ierusalimschy, Waldemar Celes, Luiz Henrique de \
|
||||
Figueiredo"
|
||||
LICENSE="MIT"
|
||||
REVISION="3"
|
||||
REVISION="4"
|
||||
SOURCE_URI="https://www.lua.org/ftp/lua-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="fc5fd69bb8736323f026672b1b7235da613d7177e72558893a0bdcd320466d60"
|
||||
SOURCE_DIR="lua-$portVersion"
|
||||
PATCHES="lua-$portVersion.patchset"
|
||||
if [ $effectiveTargetArchitecture = x86_gcc2 ]; then
|
||||
PATCHES+="
|
||||
@@ -22,10 +23,8 @@ ARCHITECTURES="all"
|
||||
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
|
||||
|
||||
PROVIDES="
|
||||
lua$secondaryArchSuffix = $portVersion compat >= 5.3
|
||||
cmd:lua$secondaryArchSuffix = $portVersion compat >= 5.3
|
||||
lua5.3$secondaryArchSuffix = $portVersion compat >= 5.3
|
||||
cmd:lua5.3$secondaryArchSuffix = $portVersion compat >= 5.3
|
||||
cmd:luac$secondaryArchSuffix = $portVersion compat >= 5.3
|
||||
cmd:luac5.3$secondaryArchSuffix = $portVersion compat >= 5.3
|
||||
lib:liblua$secondaryArchSuffix = $portVersion compat >= 5.3
|
||||
"
|
||||
@@ -34,11 +33,16 @@ REQUIRES="
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
lua${secondaryArchSuffix}_devel = $portVersion compat >= 5.3
|
||||
lua5.3${secondaryArchSuffix}_devel = $portVersion compat >= 5.3
|
||||
devel:liblua$secondaryArchSuffix = $portVersion compat >= 5.3
|
||||
"
|
||||
REQUIRES_devel="
|
||||
lua$secondaryArchSuffix == $portVersion base
|
||||
lua5.3$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
CONFLICTS_devel="
|
||||
lua${secondaryArchSuffix}_devel
|
||||
lua5.1${secondaryArchSuffix}_devel
|
||||
lua5.2${secondaryArchSuffix}_devel
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
@@ -62,10 +66,11 @@ INSTALL()
|
||||
INSTALL_LIB="$libDir" INSTALL_BIN="$binDir" TO_BIN="lua5.3 luac5.3" \
|
||||
TO_LIB="liblua.a liblua.so.5.3"
|
||||
|
||||
ln -s lua5.3 $binDir/lua
|
||||
ln -s luac5.3 $binDir/luac
|
||||
ln -s liblua.so.5.3 $libDir/liblua.so
|
||||
|
||||
mv $manDir/man1/lua.1 $manDir/man1/lua53.1
|
||||
mv $manDir/man1/luac.1 $manDir/man1/luac53.1
|
||||
|
||||
mkdir -p $docDir
|
||||
cp doc/{*.html,logo.gif,lua.css,manual.css,osi-certified-72x60.png} $docDir
|
||||
|
||||
@@ -99,5 +104,9 @@ EOF
|
||||
ln -s $developLibDir/pkgconfig/lua.pc $developLibDir/pkgconfig/lua5.3.pc
|
||||
|
||||
prepareInstalledDevelLib liblua
|
||||
packageEntries devel $developDir
|
||||
|
||||
packageEntries devel $developDir \
|
||||
$docDir
|
||||
|
||||
rm -rf $documentationDir/packages #empty directory
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
From ca5ede929cd286ccc31742468787ed2f43927548 Mon Sep 17 00:00:00 2001
|
||||
From 89bf937ba28d80d81198b4d07bec977e41b01f40 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Tue, 11 Aug 2015 17:13:15 +0000
|
||||
Subject: gcc2 patch
|
||||
|
||||
|
||||
diff --git a/src/Makefile b/src/Makefile
|
||||
index 113ccf3..23eba9d 100644
|
||||
index 9c5ff15..b5968c5 100644
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -6,8 +6,8 @@
|
||||
@@ -14,11 +14,11 @@ index 113ccf3..23eba9d 100644
|
||||
|
||||
-CC= gcc -std=gnu99
|
||||
-CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_3 $(SYSCFLAGS) $(MYCFLAGS)
|
||||
+CC= gcc
|
||||
+CC= gcc -std=gnu89
|
||||
+CFLAGS= -O2 -Wall -DLUA_COMPAT_5_3 $(SYSCFLAGS) $(MYCFLAGS)
|
||||
LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
|
||||
LIBS= -lm $(SYSLIBS) $(MYLIBS)
|
||||
|
||||
--
|
||||
2.30.2
|
||||
2.37.3
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
From 0bc7efaa7e1e79f5753116d881b4ea30b1cc0fd0 Mon Sep 17 00:00:00 2001
|
||||
From 1b305c3b464b6e8d24fe76210866dd36f36d1429 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Mon, 5 May 2014 15:59:15 +0000
|
||||
Subject: import patch from 5.2.1
|
||||
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index fef1af4..b1a567e 100644
|
||||
index 8efa2eb..ff139c0 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -36,12 +36,12 @@ RM= rm -f
|
||||
# == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE =======
|
||||
|
||||
# Convenience platforms targets.
|
||||
-PLATS= guess aix bsd c89 freebsd generic linux linux-readline macosx mingw posix solaris
|
||||
+PLATS= guess aix bsd c89 freebsd generic haiku linux linux-readline macosx mingw posix solaris
|
||||
-PLATS= guess aix bsd c89 freebsd generic ios linux linux-readline macosx mingw posix solaris
|
||||
+PLATS= guess aix bsd c89 freebsd generic ios haiku linux linux-readline macosx mingw posix solaris
|
||||
|
||||
# What to install.
|
||||
TO_BIN= lua luac
|
||||
@@ -23,7 +23,7 @@ index fef1af4..b1a567e 100644
|
||||
TO_MAN= lua.1 luac.1
|
||||
|
||||
# Lua version and release.
|
||||
@@ -52,7 +52,7 @@ R= $V.4
|
||||
@@ -52,7 +52,7 @@ R= $V.6
|
||||
all: $(PLAT)
|
||||
|
||||
$(PLATS) help test clean:
|
||||
@@ -33,22 +33,19 @@ index fef1af4..b1a567e 100644
|
||||
install: dummy
|
||||
cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD)
|
||||
diff --git a/src/Makefile b/src/Makefile
|
||||
index 1907381..113ccf3 100644
|
||||
index b771196..9c5ff15 100644
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -30,9 +30,10 @@ CMCFLAGS=
|
||||
@@ -30,7 +30,7 @@ CMCFLAGS=
|
||||
|
||||
# == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE =======
|
||||
|
||||
-PLATS= guess aix bsd c89 freebsd generic linux linux-readline macosx mingw posix solaris
|
||||
+PLATS= guess aix bsd c89 freebsd generic haiku linux linux-readline macosx mingw posix solaris
|
||||
-PLATS= guess aix bsd c89 freebsd generic ios linux linux-readline macosx mingw posix solaris
|
||||
+PLATS= guess aix bsd c89 freebsd generic ios haiku linux linux-readline macosx mingw posix solaris
|
||||
|
||||
LUA_A= liblua.a
|
||||
+LUA_SO= liblua.so
|
||||
CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o
|
||||
LIB_O= lauxlib.o lbaselib.o lcorolib.o ldblib.o liolib.o lmathlib.o loadlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o linit.o
|
||||
BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS)
|
||||
@@ -44,7 +45,7 @@ LUAC_T= luac
|
||||
@@ -44,7 +44,7 @@ LUAC_T= luac
|
||||
LUAC_O= luac.o
|
||||
|
||||
ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)
|
||||
@@ -57,7 +54,7 @@ index 1907381..113ccf3 100644
|
||||
ALL_A= $(LUA_A)
|
||||
|
||||
# Targets start here.
|
||||
@@ -66,6 +67,9 @@ $(LUA_T): $(LUA_O) $(LUA_A)
|
||||
@@ -66,6 +66,9 @@ $(LUA_T): $(LUA_O) $(LUA_A)
|
||||
$(LUAC_T): $(LUAC_O) $(LUA_A)
|
||||
$(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
|
||||
|
||||
@@ -67,22 +64,22 @@ index 1907381..113ccf3 100644
|
||||
test:
|
||||
./$(LUA_T) -v
|
||||
|
||||
@@ -117,6 +121,9 @@ FreeBSD NetBSD OpenBSD freebsd:
|
||||
@@ -117,6 +120,9 @@ FreeBSD NetBSD OpenBSD freebsd:
|
||||
|
||||
generic: $(ALL)
|
||||
|
||||
+haiku:
|
||||
+ $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_HAIKU -DLUA_USE_POSIX" LIBS=
|
||||
+
|
||||
Linux linux: linux-noreadline
|
||||
ios:
|
||||
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_IOS"
|
||||
|
||||
linux-noreadline:
|
||||
diff --git a/src/luaconf.h b/src/luaconf.h
|
||||
index d42d14b..c388109 100644
|
||||
index 137103e..73951a0 100644
|
||||
--- a/src/luaconf.h
|
||||
+++ b/src/luaconf.h
|
||||
@@ -69,6 +69,12 @@
|
||||
#define LUA_USE_DLOPEN /* MacOS does not need -ldl */
|
||||
@@ -75,6 +75,12 @@
|
||||
#define LUA_USE_DLOPEN
|
||||
#endif
|
||||
|
||||
+#if defined(LUA_USE_HAIKU)
|
||||
@@ -94,7 +91,7 @@ index d42d14b..c388109 100644
|
||||
|
||||
/*
|
||||
@@ LUAI_IS32INT is true iff 'int' has (at least) 32 bits.
|
||||
@@ -217,8 +223,12 @@
|
||||
@@ -223,8 +229,12 @@
|
||||
|
||||
#else /* }{ */
|
||||
|
||||
@@ -108,5 +105,5 @@ index d42d14b..c388109 100644
|
||||
|
||||
#if !defined(LUA_PATH_DEFAULT)
|
||||
--
|
||||
2.30.2
|
||||
2.37.3
|
||||
|
||||
Reference in New Issue
Block a user