<pre style='margin:0'>
Haren S (harens) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/6fc7473672d8bdcb06b6726cb224b860b204757d">https://github.com/macports/macports-ports/commit/6fc7473672d8bdcb06b6726cb224b860b204757d</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 6fc7473672d8bdcb06b6726cb224b860b204757d
</span>Author: harens <12570877+harens@users.noreply.github.com>
AuthorDate: Sat Jan 7 19:51:05 2023 +0000
<span style='display:block; white-space:pre;color:#404040;'> lua: fix linux build
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Changes on Linux:
</span><span style='display:block; white-space:pre;color:#404040;'> - Produce .so dynamic library file
</span><span style='display:block; white-space:pre;color:#404040;'> - Fix linking issues by compiling with -fPIC and -ltermcap
</span>---
lang/lua/Portfile | 8 ++++-
lang/lua/files/patch-Makefile-51.diff | 9 ++++--
lang/lua/files/patch-Makefile-52.diff | 9 ++++--
lang/lua/files/patch-Makefile.diff | 21 +++++++++----
lang/lua/files/patch-src-Makefile-51.diff | 43 +++++++++++++++++++-------
lang/lua/files/patch-src-Makefile-52.diff | 51 ++++++++++++++++++++++++-------
lang/lua/files/patch-src-Makefile.diff | 46 ++++++++++++++++++++--------
7 files changed, 141 insertions(+), 46 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/lua/Portfile b/lang/lua/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 29e5f0c12ef..3cadda5fdbc 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/lua/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/lua/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -8,7 +8,7 @@ version 5.3.6
</span> revision 0
categories lang
license MIT
<span style='display:block; white-space:pre;background:#ffe0e0;'>-platforms darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+platforms darwin linux
</span> maintainers nomaintainer
description powerful, lightweight programming language
long_description Lua is a powerful, light-weight programming language designed for \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -62,6 +62,11 @@ set branch [join [lrange [split ${version} .] 0 1] .]
</span> depends_lib port:readline
build.target macosx
<span style='display:block; white-space:pre;background:#e0ffe0;'>+platform linux {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # With lua 5.4, replace with linux-readline
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ build.target linux
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> test.run yes
test.env DYLD_LIBRARY_PATH=./lib
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -76,6 +81,7 @@ post-extract {
</span> }
post-patch {
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|@PLATFORM@|${os.platform}|g" ${worksrcpath}/Makefile ${worksrcpath}/src/Makefile
</span> reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/lua.pc ${worksrcpath}/Makefile ${worksrcpath}/src/Makefile ${worksrcpath}/src/luaconf.h
reinplace "s|@VERSION@|${version}|g" ${worksrcpath}/lua.pc ${worksrcpath}/src/Makefile
reinplace "s|@BRANCH@|${branch}|g" ${worksrcpath}/lua.pc ${worksrcpath}/Makefile ${worksrcpath}/src/Makefile
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/lua/files/patch-Makefile-51.diff b/lang/lua/files/patch-Makefile-51.diff
</span><span style='display:block; white-space:pre;color:#808080;'>index 0cad90b695c..f1bf2208819 100755
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/lua/files/patch-Makefile-51.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/lua/files/patch-Makefile-51.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -16,12 +16,17 @@
</span> #
# You probably want to make INSTALL_LMOD and INSTALL_CMOD consistent with
# LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h (and also with etc/lua.pc).
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -43,7 +43,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -43,7 +43,12 @@
</span> # What to install.
TO_BIN= lua luac
TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp
-TO_LIB= liblua.a
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+TO_LIB= liblua-@BRANCH@.a liblua-@BRANCH@.dylib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++TO_LIB= liblua-@BRANCH@.a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ifeq (@PLATFORM@,linux)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ TO_LIB+= liblua-@BRANCH@.so
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ TO_LIB+= liblua-@BRANCH@.dylib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++endif
</span> TO_MAN= lua.1 luac.1
# Lua version and release.
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/lua/files/patch-Makefile-52.diff b/lang/lua/files/patch-Makefile-52.diff
</span><span style='display:block; white-space:pre;color:#808080;'>index 4cee2fb1140..ca7a89a5838 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/lua/files/patch-Makefile-52.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/lua/files/patch-Makefile-52.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -16,12 +16,17 @@
</span> INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V
INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -41,7 +41,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -41,7 +41,12 @@
</span> # What to install.
TO_BIN= lua luac
TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp
-TO_LIB= liblua.a
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+TO_LIB= liblua-@BRANCH@.a liblua-@BRANCH@.dylib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++TO_LIB= liblua-@BRANCH@.a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ifeq (@PLATFORM@,linux)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ TO_LIB+= liblua-@BRANCH@.so
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ TO_LIB+= liblua-@BRANCH@.dylib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++endif
</span> TO_MAN= lua.1 luac.1
# Lua version and release.
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/lua/files/patch-Makefile.diff b/lang/lua/files/patch-Makefile.diff
</span><span style='display:block; white-space:pre;color:#808080;'>index adc361cfd4f..a756798ed1d 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/lua/files/patch-Makefile.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/lua/files/patch-Makefile.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -14,21 +14,30 @@
</span> INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V
INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -41,7 +41,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -41,7 +41,12 @@
</span> # What to install.
TO_BIN= lua luac
TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp
<span style='display:block; white-space:pre;background:#ffe0e0;'>--TO_LIB= liblua.a
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+TO_LIB= liblua.a liblua.dylib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ TO_LIB= liblua.a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ifeq (@PLATFORM@,linux)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ TO_LIB+= liblua.so
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ TO_LIB+= liblua.dylib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++endif
</span> TO_MAN= lua.1 luac.1
# Lua version and release.
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -63,6 +63,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -63,6 +63,13 @@
</span> cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+ cd $(INSTALL_LIB) && ln -s liblua.dylib liblua.@VERSION@.dylib
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ cd $(INSTALL_LIB) && ln -s liblua.dylib liblua.@BRANCH@.dylib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ifeq (@PLATFORM@,linux)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ cd $(INSTALL_LIB) && ln -s liblua.so liblua-@VERSION@.so
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ cd $(INSTALL_LIB) && ln -s liblua.so liblua-@BRANCH@.so
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ cd $(INSTALL_LIB) && ln -s liblua.dylib liblua.@VERSION@.dylib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ cd $(INSTALL_LIB) && ln -s liblua.dylib liblua.@BRANCH@.dylib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ endif
</span>
uninstall:
cd src && cd $(INSTALL_BIN) && $(RM) $(TO_BIN)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/lua/files/patch-src-Makefile-51.diff b/lang/lua/files/patch-src-Makefile-51.diff
</span><span style='display:block; white-space:pre;color:#808080;'>index 7ddc8940a64..d9ca5406ace 100755
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/lua/files/patch-src-Makefile-51.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/lua/files/patch-src-Makefile-51.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,27 +1,41 @@
</span> --- src/Makefile.orig 2014-04-02 16:52:31.000000000 +0200
+++ src/Makefile 2014-04-02 16:50:47.000000000 +0200
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -22,7 +22,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -8,7 +8,10 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ PLAT= none
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CC= gcc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-CFLAGS= -O2 -Wall $(MYCFLAGS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++CFLAGS= -O2 -Wall -Wextra $(SYSCFLAGS) $(MYCFLAGS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ifeq (@PLATFORM@,linux)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ CFLAGS+= -fPIC
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ AR= ar rcu
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ RANLIB= ranlib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ RM= rm -f
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -22,7 +25,9 @@
</span>
PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
-LUA_A= liblua.a
+LUA_A= liblua-@BRANCH@.a
+LUA_DYLIB= liblua-@BRANCH@.dylib
<span style='display:block; white-space:pre;background:#e0ffe0;'>++LUA_SO= liblua-@BRANCH@.so
</span> CORE_O= lapi.o lcode.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
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -36,8 +37,8 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- LUAC_O= luac.o print.o
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -38,6 +43,11 @@
</span> ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O)
<span style='display:block; white-space:pre;background:#ffe0e0;'>--ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--ALL_A= $(LUA_A)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ALL_T= $(LUA_A) $(LUA_DYLIB) $(LUA_T) $(LUAC_T)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ALL_A= $(LUA_A) $(LUA_DYLIB)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ALL_A= $(LUA_A)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ifeq (@PLATFORM@,linux)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ALL_T+= $(LUA_SO)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ALL_T= $(LUA_DYLIB) $(LUA_A) $(LUA_T) $(LUAC_T)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++endif
</span>
default: $(PLAT)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -48,9 +49,15 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -48,9 +58,18 @@
</span> a: $(ALL_A)
$(LUA_A): $(CORE_O) $(LIB_O)
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -33,12 +47,19 @@
</span> + @echo "Building dynamic library (dylib)"
+ $(CC) -o $@ $(MYLDFLAGS) -dynamiclib -install_name @PREFIX@/lib/lua-@BRANCH@/liblua-@BRANCH@.dylib \
+ -compatibility_version @BRANCH@ -current_version @VERSION@ $^
<span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++$(LUA_SO): $(CORE_O) $(LIB_O)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ $(CC) -shared -ldl -Wl,-soname,$(LUA_SO) -o $@ $? -lm $(MYLDFLAGS)
</span> +
$(LUA_T): $(LUA_O) $(LUA_A)
$(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -99,7 +106,7 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -96,10 +115,10 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ $(MAKE) all MYCFLAGS=
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ linux:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ $(MAKE) all MYCFLAGS="-DLUA_USE_LINUX" MYLIBS="-Wl,-E -ldl -lreadline -ltermcap"
</span>
macosx:
- $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-lreadline"
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/lua/files/patch-src-Makefile-52.diff b/lang/lua/files/patch-src-Makefile-52.diff
</span><span style='display:block; white-space:pre;color:#808080;'>index 24faafa5198..e7c39990d64 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/lua/files/patch-src-Makefile-52.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/lua/files/patch-src-Makefile-52.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,27 +1,43 @@
</span> --- src/Makefile.orig
+++ src/Makefile
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -28,7 +28,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -7,7 +7,10 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ PLAT= none
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CC= gcc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-CFLAGS= -O2 -Wall -DLUA_COMPAT_ALL $(SYSCFLAGS) $(MYCFLAGS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_ALL $(SYSCFLAGS) $(MYCFLAGS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ifeq (@PLATFORM@,linux)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ CFLAGS+= -fPIC
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ LIBS= -lm $(SYSLIBS) $(MYLIBS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -28,7 +31,9 @@
</span>
PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
-LUA_A= liblua.a
+LUA_A= liblua-@BRANCH@.a
+LUA_DYLIB= liblua-@BRANCH@.dylib
<span style='display:block; white-space:pre;background:#e0ffe0;'>++LUA_SO= liblua-@BRANCH@.so
</span> 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
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -43,8 +44,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -43,8 +45,13 @@
</span> LUAC_O= luac.o
ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)
<span style='display:block; white-space:pre;background:#ffe0e0;'>--ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--ALL_A= $(LUA_A)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ALL_T= $(LUA_DYLIB) $(LUA_A) $(LUA_T) $(LUAC_T)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ALL_A= $(LUA_DYLIB) $(LUA_A)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ALL_A= $(LUA_A)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ifeq (@PLATFORM@,linux)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ALL_T+= $(LUA_SO)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ALL_T= $(LUA_DYLIB) $(LUA_A) $(LUA_T) $(LUAC_T)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++endif
</span>
# Targets start here.
default: $(PLAT)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -56,14 +57,20 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -56,14 +66,31 @@
</span> a: $(ALL_A)
$(LUA_A): $(BASE_O)
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -33,19 +49,32 @@
</span> + @echo "Building dynamic library (dylib)"
+ $(CC) -o $@ $(MYLDFLAGS) -dynamiclib -install_name @PREFIX@/lib/lua-@BRANCH@/liblua-@BRANCH@.dylib \
+ -compatibility_version @BRANCH@ -current_version @VERSION@ $^
<span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++$(LUA_SO): $(CORE_O) $(LIB_O)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ $(CC) -shared -ldl -Wl,-soname,$(LUA_SO) -o $@ $? -lm $(MYLDFLAGS)
</span> +
$(LUA_T): $(LUA_O) $(LUA_A)
- $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+ $(CC) -o $@ -L. $(MYLDFLAGS) $(MYCFLAGS) $(LIBS) -llua-@BRANCH@ lua.c
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ifeq (@PLATFORM@,linux)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ $(CC) -o $@ -L. $(MYLDFLAGS) $(MYCFLAGS) $(LIBS) -llua-@BRANCH@ lua.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> $(LUAC_T): $(LUAC_O) $(LUA_A)
- $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
<span style='display:block; white-space:pre;background:#e0ffe0;'>++ifeq (@PLATFORM@,linux)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++else
</span> + $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_DYLIB) $(LIBS)
<span style='display:block; white-space:pre;background:#e0ffe0;'>++endif
</span>
clean:
$(RM) $(ALL_T) $(ALL_O)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -106,7 +113,7 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -105,7 +131,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ linux:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline -ltermcap"
</span>
macosx:
- $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX" SYSLIBS="-lreadline" CC=cc
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/lua/files/patch-src-Makefile.diff b/lang/lua/files/patch-src-Makefile.diff
</span><span style='display:block; white-space:pre;color:#808080;'>index 85d505d90b5..565fc4eecd7 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/lua/files/patch-src-Makefile.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/lua/files/patch-src-Makefile.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,34 +1,41 @@
</span> --- src/Makefile.orig
+++ src/Makefile
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -7,7 +7,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -7,7 +7,10 @@
</span> PLAT= none
CC= gcc -std=gnu99
-CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_2 $(SYSCFLAGS) $(MYCFLAGS)
+CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_1 -DLUA_COMPAT_5_2 $(SYSCFLAGS) $(MYCFLAGS)
<span style='display:block; white-space:pre;background:#e0ffe0;'>++ifeq (@PLATFORM@,linux)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ CFLAGS+= -fPIC
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++endif
</span> LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
LIBS= -lm $(SYSLIBS) $(MYLIBS)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -29,6 +29,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -29,6 +32,8 @@
</span> PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris
LUA_A= liblua.a
+LUA_DYLIB= liblua.dylib
<span style='display:block; white-space:pre;background:#e0ffe0;'>++LUA_SO= liblua.so
</span> 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
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -43,8 +44,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -43,8 +48,13 @@
</span> LUAC_O= luac.o
ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)
<span style='display:block; white-space:pre;background:#ffe0e0;'>--ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--ALL_A= $(LUA_A)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ALL_T= $(LUA_DYLIB) $(LUA_A) $(LUA_T) $(LUAC_T)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ALL_A= $(LUA_DYLIB) $(LUA_A)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ALL_A= $(LUA_A)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ifeq (@PLATFORM@,linux)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ALL_T+= $(LUA_SO)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ALL_T= $(LUA_DYLIB) $(LUA_A) $(LUA_T) $(LUAC_T)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++endif
</span>
# Targets start here.
default: $(PLAT)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -56,14 +57,20 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -56,14 +65,31 @@
</span> a: $(ALL_A)
$(LUA_A): $(BASE_O)
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -40,19 +47,32 @@
</span> + @echo "Building dynamic library (dylib)"
+ $(CC) -o $@ $(MYLDFLAGS) -dynamiclib -install_name @PREFIX@/lib/liblua.dylib \
+ -compatibility_version @BRANCH@ -current_version @VERSION@ $^
<span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++$(LUA_SO): $(CORE_O) $(LIB_O)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ $(CC) -shared -ldl -Wl,-soname,$(LUA_SO) -o $@ $? -lm $(MYLDFLAGS)
</span> +
$(LUA_T): $(LUA_O) $(LUA_A)
- $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+ $(CC) -o $@ -L. $(SYSCFLAGS) $(MYLDFLAGS) $(MYCFLAGS) $(LIBS) -llua lua.c
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ifeq (@PLATFORM@,linux)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ $(CC) -o $@ -L. $(SYSCFLAGS) $(MYLDFLAGS) $(MYCFLAGS) $(LIBS) -llua lua.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> $(LUAC_T): $(LUAC_O) $(LUA_A)
- $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+ $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_DYLIB) $(LIBS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ifeq (@PLATFORM@,linux)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_DYLIB) $(LIBS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ endif
</span>
clean:
$(RM) $(ALL_T) $(ALL_O)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -110,7 +117,7 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -108,7 +134,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ linux:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline -ltermcap"
</span>
macosx:
- $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX" SYSLIBS="-lreadline"
</pre><pre style='margin:0'>
</pre>