summaryrefslogtreecommitdiff
path: root/user/lua5.3/lua-5.3-make.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2022-02-20 21:08:54 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2022-05-01 17:05:53 -0500
commitaad9e708a3accbc4a94014098568459503bf6f24 (patch)
tree784c1b44beac27cbb9ba8c1c71e96e6a30a3ba18 /user/lua5.3/lua-5.3-make.patch
parenta9206eeeb178baef627c07767b85152aefb9d21c (diff)
downloadpackages-aad9e708a3accbc4a94014098568459503bf6f24.tar.gz
packages-aad9e708a3accbc4a94014098568459503bf6f24.tar.bz2
packages-aad9e708a3accbc4a94014098568459503bf6f24.tar.xz
packages-aad9e708a3accbc4a94014098568459503bf6f24.zip
system/lua5.3 (and rdeps): Move to user/
Diffstat (limited to 'user/lua5.3/lua-5.3-make.patch')
-rw-r--r--user/lua5.3/lua-5.3-make.patch74
1 files changed, 74 insertions, 0 deletions
diff --git a/user/lua5.3/lua-5.3-make.patch b/user/lua5.3/lua-5.3-make.patch
new file mode 100644
index 000000000..349218607
--- /dev/null
+++ b/user/lua5.3/lua-5.3-make.patch
@@ -0,0 +1,74 @@
+diff --git a/Makefile b/Makefile
+index 7fa91c8..c85ede2 100644
+--- a/Makefile
++++ b/Makefile
+@@ -112,3 +112,18 @@ pc:
+ .PHONY: all $(PLATS) clean test install local none dummy echo pecho lecho
+
+ # (end of Makefile)
++
++# Use libtool for binary installs, etc.
++
++export V
++export LIBTOOL = ../libtool --quiet --tag=CC
++# See libtool manual about how to set this
++
++alpine_clean:
++ cd src; $(MAKE) $@
++
++alpine_install:
++ mkdir -p $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB)
++ cd src; $(LIBTOOL) --mode=install $(INSTALL_EXEC) lua luac $(INSTALL_BIN)
++ cd src; $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
++ cd src; $(LIBTOOL) --mode=install $(INSTALL_DATA) liblua.la $(INSTALL_LIB)
+diff --git a/src/Makefile b/src/Makefile
+index 2e7a412..a72f342 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -59,10 +59,10 @@ $(LUA_A): $(BASE_O)
+ $(AR) $@ $(BASE_O)
+ $(RANLIB) $@
+
+-$(LUA_T): $(LUA_O) $(LUA_A)
++origin$(LUA_T): $(LUA_O) $(LUA_A)
+ $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
+
+-$(LUAC_T): $(LUAC_O) $(LUA_A)
++origin$(LUAC_T): $(LUAC_O) $(LUA_A)
+ $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
+
+ clean:
+@@ -194,4 +194,33 @@ lvm.o: lvm.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \
+ lzio.o: lzio.c lprefix.h lua.h luaconf.h llimits.h lmem.h lstate.h \
+ lobject.h ltm.h lzio.h
+
++
++export LIBTOOL = ../libtool --quiet --tag=CC
++export LIB_VERSION = 0:0:0
++
++# The following rules use libtool for compiling and linking in order to
++# provide shared library support.
++
++LIB_NAME = liblua.la
++LIB_OBJS = $(CORE_O:.o=.lo) $(LIB_O:.o=.lo)
++
++%.lo %.o: %.c
++ $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
++
++$(LIB_NAME): $(LIB_OBJS)
++ $(LIBTOOL) --mode=link $(CC) -version-info $(LIB_VERSION) -release $(V) \
++ -rpath $(RPATH) $(LDFLAGS) -o $(LIB_NAME) $(LIB_OBJS) $(LIB_LIBS)
++
++$(LUA_T): $(LUA_O:.o=.lo) $(LIB_NAME)
++ $(LIBTOOL) --mode=link $(CC) -export-dynamic $(LDFLAGS) -o $@ \
++ $(LUA_O:.o=.lo) $(LIB_NAME) $(LUA_LIBS)
++
++$(LUAC_T): $(LUAC_O:.o=.lo) $(LIB_NAME)
++ $(LIBTOOL) --mode=link $(CC) -static $(LDFLAGS) -o $@ $(LUAC_O:.o=.lo) \
++ $(LIB_NAME)
++
++alpine_clean:
++ $(LIBTOOL) --mode=clean $(RM) $(ALL_O:.o=.lo) $(LIB_NAME) lua luac
++
++alpine_all: $(LIB_NAME) $(LUA_T) $(LUAC_T)
+ # (end of Makefile)