packages/lang/lua5.4/patches-host/001-include-version-number....

66 lines
1.9 KiB
Diff
Raw Normal View History

From 96576b44a1b368bd6590eb0778ae45cc9ccede3f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
Date: Fri, 21 Jun 2019 14:08:38 +0200
Subject: [PATCH] include version number
Including it allows multiple lua versions to coexist.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,7 @@ PLAT= guess
# LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h.
INSTALL_TOP= /usr/local
INSTALL_BIN= $(INSTALL_TOP)/bin
-INSTALL_INC= $(INSTALL_TOP)/include
+INSTALL_INC= $(INSTALL_TOP)/include/lua$V
INSTALL_LIB= $(INSTALL_TOP)/lib
INSTALL_MAN= $(INSTALL_TOP)/man/man1
INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V
@@ -39,10 +39,10 @@ RM= rm -f
PLATS= guess aix bsd c89 freebsd generic ios linux linux-readline macosx mingw posix solaris
# What to install.
-TO_BIN= lua luac
+TO_BIN= lua$V luac$V
TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp
-TO_LIB= liblua.a
-TO_MAN= lua.1 luac.1
+TO_LIB= liblua$V.a
+TO_MAN= lua$V.1 luac$V.1
# Lua version and release.
V= 5.4
lua: lua5.4 update to 5.4.7 1ab3208a1fceb12fca8f24ba57d6e13c5bff15e3 'lua.h' back to redundancy in version definitions 21ff8de33a5aca9c3c907592b894e4b9ab036d3e Bug: Tricky _PROMPT may trigger undefined behavior 7eb1ed21b7057ab5f1b921f8271eddcf13659737 More permissive use of 'errno' 2db966fcbf757775c842bc66449d7e697826aa1d Bug: luaL_traceback may need more than 5 stack slots ae9a0cbbb446499e759acae47664d1d136d7ba90 Bug: overlapping assignments d5212c13b081ed62d8e1ae436779e79c79edf564 More disciplined use of 'errno' e0efebdbe4e4053c6fb78588c546f1dc23aa964a Detail in the manual e84f7bf19852c35ad0a1e9a1654a7b99a211e17c Details dfbde4c7d540f81f2cc539741a2c1f4c00f91c10 Bug: Active-lines for stripped vararg functions de794a6527058e75b674118b35f39dcbb13e88b1 Towards release 5.4.7 8b83417de982d068bd92e0428a42ca0cdd909789 Avoids a warning when lua_Number is 'float' e288c5a91883793d14ed9e9d93464f6ee0b08915 Bug: Yielding in a hook stops in the wrong instruction 5853c37a83ec66ccb45094f9aeac23dfdbcde671 Bug: Buffer overflow in string concatenation 842a83f09caa2ebd4bc03e0076420148ac07c808 Panic functions should not raise errors 7923dbbf72da303ca1cca17efd24725668992f15 Bug: Recursion in 'getobjname' can stack overflow 81e4fce5303fdb274bc5572fb168dd766fb8208e Simpler test in 'luaH_getint' 6baee9ef9d5657ab582c8a4b9f885ec58ed502d0 Removed test for "corrupted binary dump" edd8589f478e784bb8d1a8e9a3bb2bb3ca51738c Avoid casts from unsigned long to floating-point 07a9eab23ac073362f231ddc7215688cf221ff45 Cannot use 'getshrstr' before setting 'shrlen' 9363a8b9901a5643c9da061ea8dda8a86cdc7ef1 Documentation for "LUA_NOENV" 5ab6a5756b3c50c99f1388885e9a48a7da8cbe2d Bug: Wrong line number for function calls 9b4f39ab14fb2e55345c3d23537d129dac23b091 More disciplined use of 'getstr' and 'tsslen' f4211a5ea4e235ccfa8b8dfa46031c23e9e839e2 More control over encoding of test files 1b3f507f620d996ffb69da7476a19251acfb89ca Bug: Call hook may be called twice when count hook yields 6b51133a988587f34ee9581d799ea9913581afd3 Thread stacks resized in the atomic phase cbae01620278f9b568805db16a96d0631ced473d Details ea39042e13645f63713425c05cc9ee4cfdcf0a40 Removed redundancy in definitions of version/release 05ec55f16b389a4377adab84efe374437da8dbd2 Avoid inclusion loop in 'ltm.h' f623b969325be736297bc1dff48e763c08778243 Bug: read overflow in 'l_strcmp' 9be74ccc214eb6f4d9d0b9496fd973542c7377d9 Several functions turned 'static' 09f3c2372f5dbeaec9f50614a26c1b5761726a88 Option '-l' discards version sufix from file name c197885cb00b85251c35cffdc4057efaee2d7a88 Small improvements in tests 934e77a286aeb97ca02badf56956ccc78217e9d0 Details Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2025-04-11 09:01:20 +08:00
@@ -52,7 +52,7 @@ R= $V.7
all: $(PLAT)
$(PLATS) help test clean:
- @cd src && $(MAKE) $@
+ @cd src && $(MAKE) $@ V=$V
install: dummy
cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD)
--- a/src/Makefile
+++ b/src/Makefile
@@ -32,15 +32,15 @@ CMCFLAGS=
PLATS= guess aix bsd c89 freebsd generic ios linux linux-readline macosx mingw posix solaris
-LUA_A= liblua.a
+LUA_A= liblua$V.a
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)
-LUA_T= lua
+LUA_T= lua$V
LUA_O= lua.o
-LUAC_T= luac
+LUAC_T= luac$V
LUAC_O= luac.o
ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)