This commit is contained in:
Rmys
2018-03-27 19:07:51 +03:00
parent 984af8957d
commit 09f9b57cb9
22 changed files with 901 additions and 26 deletions
+22
View File
@@ -0,0 +1,22 @@
Index: lua-5.1.4/src/Makefile
===================================================================
--- lua-5.1.4.orig/src/Makefile
+++ lua-5.1.4/src/Makefile
@@ -53,7 +53,7 @@ $(LUA_A): $(CORE_O) $(LIB_O)
$(RANLIB) $@
$(LUA_SO): $(CORE_O) $(LIB_O)
- $(CC) -Wl,-soname=liblua.so.$(V) -shared -o $@ $(MYLDFLAGS) $? $(LIBS) $(LUA_O)
+ $(CC) -Wl,-soname=liblua.so.$(V) -shared -o $@ $(MYLDFLAGS) $? $(LUA_O) $(LIBS)
rm -f liblua.so
ln -fs $@ liblua.so
@@ -102,7 +102,7 @@ generic:
$(MAKE) all MYCFLAGS=
linux:
- $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
+ $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-ldl -lreadline -lhistory -lncurses"
macosx:
$(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-lreadline"
+47
View File
@@ -0,0 +1,47 @@
--- Makefile~ 2008-08-12 03:40:48.000000000 +0300
+++ Makefile 2009-01-02 17:16:41.000000000 +0200
@@ -9,16 +9,16 @@
# Where to install. The installation starts in the src and doc directories,
# so take care if INSTALL_TOP is not an absolute path.
-INSTALL_TOP= /usr/local
+INSTALL_TOP= /usr
INSTALL_BIN= $(INSTALL_TOP)/bin
INSTALL_INC= $(INSTALL_TOP)/include
INSTALL_LIB= $(INSTALL_TOP)/lib
-INSTALL_MAN= $(INSTALL_TOP)/man/man1
+INSTALL_MAN= $(INSTALL_TOP)/share/man/man1
#
# 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).
INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V
-INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V
+INSTALL_CMOD= $(INSTALL_TOP)/lib
# How to install. If your install program does not support "-p", then you
# may have to run ranlib on the installed liblua.a (do "make ranlib").
@@ -43,7 +43,7 @@
# What to install.
TO_BIN= lua luac
TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp
-TO_LIB= liblua.a
+TO_LIB= liblua.so.$V
TO_MAN= lua.1 luac.1
# Lua version and release.
--- etc/lua.pc~ 2008-08-08 15:46:11.000000000 +0300
+++ etc/lua.pc 2009-01-02 17:17:32.000000000 +0200
@@ -8,11 +8,11 @@
R= 5.1.4
# grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/'
-prefix= /usr/local
+prefix= /usr
INSTALL_BIN= ${prefix}/bin
INSTALL_INC= ${prefix}/include
INSTALL_LIB= ${prefix}/lib
-INSTALL_MAN= ${prefix}/man/man1
+INSTALL_MAN= ${prefix}/share/man/man1
INSTALL_LMOD= ${prefix}/share/lua/${V}
INSTALL_CMOD= ${prefix}/lib/lua/${V}
+57
View File
@@ -0,0 +1,57 @@
diff -ru lua-5.2.1/Makefile lua-5.2.1.new/Makefile
--- lua-5.2.1/Makefile 2012-05-17 16:05:54.000000000 +0200
+++ lua-5.2.1.new/Makefile 2012-09-12 22:39:07.162748096 +0200
@@ -52,7 +52,7 @@
all: $(PLAT)
$(PLATS) clean:
- cd src && $(MAKE) $@
+ cd src && $(MAKE) $@ V=$(V) R=$(R)
test: dummy
src/lua -v
diff -ru lua-5.2.1/src/luaconf.h lua-5.2.1.new/src/luaconf.h
--- lua-5.2.1/src/luaconf.h 2012-05-11 16:14:42.000000000 +0200
+++ lua-5.2.1.new/src/luaconf.h 2012-09-12 22:40:27.986622772 +0200
@@ -100,7 +100,7 @@
#else /* }{ */
#define LUA_VDIR LUA_VERSION_MAJOR "." LUA_VERSION_MINOR "/"
-#define LUA_ROOT "/usr/local/"
+#define LUA_ROOT "/usr/"
#define LUA_LDIR LUA_ROOT "share/lua/" LUA_VDIR
#define LUA_CDIR LUA_ROOT "lib/lua/" LUA_VDIR
#define LUA_PATH_DEFAULT \
diff -ru lua-5.2.1/src/Makefile lua-5.2.1.new/src/Makefile
--- lua-5.2.1/src/Makefile 2012-03-09 17:32:16.000000000 +0100
+++ lua-5.2.1.new/src/Makefile 2012-09-12 22:38:08.591386896 +0200
@@ -29,6 +29,7 @@
PLATS= aix ansi bsd freebsd generic linux 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
@@ -43,7 +44,7 @@
LUAC_O= luac.o
ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)
-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
+ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) $(LUA_SO)
ALL_A= $(LUA_A)
# Targets start here.
@@ -59,6 +60,12 @@
$(AR) $@ $(BASE_O)
$(RANLIB) $@
+$(LUA_SO): $(CORE_O) $(LIB_O)
+ $(CC) -shared -ldl -Wl,-soname,$(LUA_SO).$(V) -o $@.$(R) $? -lm $(MYLDFLAGS)
+ ln -sf $(LUA_SO).$(R) $(LUA_SO).$(V)
+ ln -sf $(LUA_SO).$(R) $(LUA_SO)
+
+
$(LUA_T): $(LUA_O) $(LUA_A)
$(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
+42
View File
@@ -0,0 +1,42 @@
--- ./src/Makefile.dynlib 2006-03-22 01:41:49.000000000 +0100
+++ ./src/Makefile 2006-08-17 10:49:36.000000000 +0200
@@ -22,6 +22,7 @@
PLATS= aix ansi bsd generic linux macosx mingw posix solaris
+LUA_SO= liblua.so.$(V)
LUA_A= liblua.a
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 \
@@ -36,7 +37,7 @@
LUAC_O= luac.o print.o
ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O)
-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
+ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) $(LUA_SO)
ALL_A= $(LUA_A)
default: $(PLAT)
@@ -51,6 +52,11 @@
$(AR) $@ $?
$(RANLIB) $@
+$(LUA_SO): $(CORE_O) $(LIB_O)
+ $(CC) -Wl,-soname=liblua.so.$(V) -shared -o $@ $(MYLDFLAGS) $? $(LIBS) $(LUA_O)
+ rm -f liblua.so
+ ln -fs $@ liblua.so
+
$(LUA_T): $(LUA_O) $(LUA_A)
$(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
--- ./Makefile.dynlib 2006-06-02 12:53:38.000000000 +0200
+++ ./Makefile 2006-08-17 10:47:54.000000000 +0200
@@ -52,7 +52,7 @@
all: $(PLAT)
$(PLATS) clean:
- cd src && $(MAKE) $@
+ cd src && $(MAKE) V=$(V) $@
test: dummy
src/lua test/hello.lua
@@ -0,0 +1,30 @@
#! /bin/sh /usr/share/dpatch/dpatch-run
## src_luaconf.h.dpatch by John V. Belmonte <jbelmonte@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Set Lua's default PATH and CPATH.
@DPATCH@
diff -urNad trunk~/src/luaconf.h trunk/src/luaconf.h
--- trunk~/src/luaconf.h 2006-02-10 12:44:06.000000000 -0500
+++ trunk/src/luaconf.h 2006-02-17 21:32:55.000000000 -0500
@@ -83,13 +83,17 @@
#else
#define LUA_ROOT "/usr/local/"
+#define LUA_ROOT2 "/usr/"
#define LUA_LDIR LUA_ROOT "share/lua/5.1/"
+#define LUA_LDIR2 LUA_ROOT2 "share/lua/5.1/"
#define LUA_CDIR LUA_ROOT "lib/lua/5.1/"
+#define LUA_CDIR2 LUA_ROOT2 "lib/lua/5.1/"
#define LUA_PATH_DEFAULT \
"./?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \
- LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua"
+ LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua;" \
+ LUA_LDIR2"?.lua;" LUA_LDIR2"?/init.lua"
#define LUA_CPATH_DEFAULT \
- "./?.so;" LUA_CDIR"?.so;" LUA_CDIR"loadall.so"
+ "./?.so;" LUA_CDIR"?.so;" LUA_CDIR2"?.so;" LUA_CDIR"loadall.so"
#endif
@@ -0,0 +1,20 @@
Index: lua-5.1.4/etc/lua.pc
===================================================================
--- lua-5.1.4.orig/etc/lua.pc
+++ lua-5.1.4/etc/lua.pc
@@ -18,14 +18,13 @@ INSTALL_CMOD= ${prefix}/lib/lua/${V}
# canonical vars
exec_prefix=${prefix}
-libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: Lua
Description: An Extensible Extension Language
Version: ${R}
Requires:
-Libs: -L${libdir} -llua -lm
+Libs: -llua -lm
Cflags: -I${includedir}
# (end of lua.pc)
@@ -0,0 +1,61 @@
Submitted By: Igor Živković <contact@igor-zivkovic.from.hr>
Date: 2013-06-19
Initial Package Version: 5.2.2
Upstream Status: Rejected
Origin: Arch Linux packages repository
Description: Adds the compilation of a shared library.
diff -Naur lua-5.3.0.orig/Makefile lua-5.3.0/Makefile
--- lua-5.3.0.orig/Makefile 2014-10-30 00:14:41.000000000 +0100
+++ lua-5.3.0/Makefile 2015-01-19 22:14:09.822290828 +0100
@@ -52,7 +52,7 @@
all: $(PLAT)
$(PLATS) clean:
- cd src && $(MAKE) $@
+ cd src && $(MAKE) $@ V=$(V) R=$(R)
test: dummy
src/lua -v
diff -Naur lua-5.3.0.orig/src/Makefile lua-5.3.0/src/Makefile
--- lua-5.3.0.orig/src/Makefile 2015-01-05 17:04:52.000000000 +0100
+++ lua-5.3.0/src/Makefile 2015-01-19 22:14:52.559378543 +0100
@@ -7,7 +7,7 @@
PLAT= none
CC= gcc -std=gnu99
-CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_2 $(SYSCFLAGS) $(MYCFLAGS)
+CFLAGS= -fPIC -O2 -Wall -Wextra -DLUA_COMPAT_5_2 $(SYSCFLAGS) $(MYCFLAGS)
LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
LIBS= -lm $(SYSLIBS) $(MYLIBS)
@@ -29,6 +29,7 @@
PLATS= aix bsd c89 freebsd generic linux 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
@@ -43,7 +44,7 @@
LUAC_O= luac.o
ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)
-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
+ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) $(LUA_SO)
ALL_A= $(LUA_A)
# Targets start here.
@@ -59,6 +60,12 @@
$(AR) $@ $(BASE_O)
$(RANLIB) $@
+$(LUA_SO): $(CORE_O) $(LIB_O)
+ $(CC) -shared -ldl -Wl,-soname,$(LUA_SO).$(V) -o $@.$(R) $? -lm $(MYLDFLAGS)
+ ln -sf $(LUA_SO).$(R) $(LUA_SO).$(V)
+ ln -sf $(LUA_SO).$(R) $(LUA_SO)
+
+
$(LUA_T): $(LUA_O) $(LUA_A)
$(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
+20
View File
@@ -0,0 +1,20 @@
V=5.2
R=5.2.4
prefix=/usr
INSTALL_BIN=${prefix}/bin
INSTALL_INC=${prefix}/include/lua5.2
INSTALL_LIB=${prefix}/lib
INSTALL_MAN=${prefix}/man/man1
INSTALL_LMOD=${prefix}/share/lua/${V}
INSTALL_CMOD=${prefix}/lib/lua/${V}
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include/lua5.2
Name: Lua
Description: An Extensible Extension Language
Version: ${R}
Requires:
Libs: -L${libdir} -llua5.2 -lm
Cflags: -I${includedir}
Binary file not shown.

After

Width:  |  Height:  |  Size: 529 B