001-include-version-number.patch 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. From 96576b44a1b368bd6590eb0778ae45cc9ccede3f Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <[email protected]>
  3. Date: Fri, 21 Jun 2019 14:08:38 +0200
  4. Subject: [PATCH] include version number
  5. Including it allows multiple lua versions to coexist.
  6. Signed-off-by: Rafał Miłecki <[email protected]>
  7. ---
  8. diff --git a/Makefile b/Makefile
  9. --- a/Makefile
  10. +++ b/Makefile
  11. @@ -12,7 +12,7 @@ PLAT= none
  12. # LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h.
  13. INSTALL_TOP= /usr/local
  14. INSTALL_BIN= $(INSTALL_TOP)/bin
  15. -INSTALL_INC= $(INSTALL_TOP)/include
  16. +INSTALL_INC= $(INSTALL_TOP)/include/lua$V
  17. INSTALL_LIB= $(INSTALL_TOP)/lib
  18. INSTALL_MAN= $(INSTALL_TOP)/man/man1
  19. INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V
  20. @@ -39,10 +39,10 @@ RM= rm -f
  21. PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris
  22. # What to install.
  23. -TO_BIN= lua luac
  24. +TO_BIN= lua$V luac$V
  25. TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp
  26. -TO_LIB= liblua.a
  27. -TO_MAN= lua.1 luac.1
  28. +TO_LIB= liblua$V.a
  29. +TO_MAN= lua$V.1 luac$V.1
  30. # Lua version and release.
  31. V= 5.3
  32. diff --git a/doc/lua.1 b/doc/lua5.3.1
  33. rename from doc/lua.1
  34. rename to doc/lua5.3.1
  35. diff --git a/doc/luac.1 b/doc/luac5.3.1
  36. rename from doc/luac.1
  37. rename to doc/luac5.3.1
  38. diff --git a/src/Makefile b/src/Makefile
  39. --- a/src/Makefile
  40. +++ b/src/Makefile
  41. @@ -28,7 +28,7 @@ MYOBJS=
  42. PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris
  43. -LUA_A= liblua.a
  44. +LUA_A= liblua$V.a
  45. CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o \
  46. lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o \
  47. ltm.o lundump.o lvm.o lzio.o
  48. @@ -36,10 +36,10 @@ LIB_O= lauxlib.o lbaselib.o lbitlib.o lc
  49. lmathlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o loadlib.o linit.o
  50. BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS)
  51. -LUA_T= lua
  52. +LUA_T= lua$V
  53. LUA_O= lua.o
  54. -LUAC_T= luac
  55. +LUAC_T= luac$V
  56. LUAC_O= luac.o
  57. ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)