diff options
author | Denis OSTERLAND <denis.osterland@diehl.com> | 2017-09-15 09:07:52 +0000 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2017-10-01 11:11:39 +0200 |
commit | f9c77733a107416cba8e028759187a3e20147568 (patch) | |
tree | ec2c762c0afd451d3912f148d5d4fcd9184144d6 /patches/lua-5.3.4 | |
parent | 37429eb0cfb797b3b323f606e7bd7b99c43deece (diff) | |
download | ptxdist-f9c77733a107416cba8e028759187a3e20147568.tar.gz ptxdist-f9c77733a107416cba8e028759187a3e20147568.tar.xz |
lua: version bump 5.1.4 -> 5.3.4
Instead of write own build rules with autoconf tools,
only adapt projects make files to work in ptxdist environment.
Signed-off-by: Denis Osterland <Denis.Osterland@diehl.com>
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'patches/lua-5.3.4')
-rw-r--r-- | patches/lua-5.3.4/0001-Cross-compile-in-ptxdist-envirionment.patch | 105 | ||||
-rw-r--r-- | patches/lua-5.3.4/0002-Install-pkgconfig-file.patch | 61 | ||||
-rw-r--r-- | patches/lua-5.3.4/series | 5 |
3 files changed, 171 insertions, 0 deletions
diff --git a/patches/lua-5.3.4/0001-Cross-compile-in-ptxdist-envirionment.patch b/patches/lua-5.3.4/0001-Cross-compile-in-ptxdist-envirionment.patch new file mode 100644 index 000000000..52883f337 --- /dev/null +++ b/patches/lua-5.3.4/0001-Cross-compile-in-ptxdist-envirionment.patch @@ -0,0 +1,105 @@ +From: Denis Osterland <Denis.Osterland@diehl.com> +Date: Wed, 28 Jun 2017 15:52:42 +0200 +Subject: [PATCH] Cross-compile in ptxdist envirionment. + +Signed-off-by: Denis Osterland <Denis.Osterland@diehl.com> +--- + Makefile | 9 ++++++--- + src/Makefile | 18 ++++++++++-------- + 2 files changed, 16 insertions(+), 11 deletions(-) + +diff --git a/Makefile b/Makefile +index 119110d2f010..2b2968449fb5 100644 +--- a/Makefile ++++ b/Makefile +@@ -4,13 +4,13 @@ + # == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT ======================= + + # Your platform. See PLATS for possible values. +-PLAT= none ++PLAT= linux + + # Where to install. The installation starts in the src and doc directories, + # so take care if INSTALL_TOP is not an absolute path. See the local target. + # You may want to make INSTALL_LMOD and INSTALL_CMOD consistent with + # LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h. +-INSTALL_TOP= /usr/local ++INSTALL_TOP= $(DESTDIR)/usr + INSTALL_BIN= $(INSTALL_TOP)/bin + INSTALL_INC= $(INSTALL_TOP)/include + INSTALL_LIB= $(INSTALL_TOP)/lib +@@ -52,7 +52,7 @@ R= $V.4 + all: $(PLAT) + + $(PLATS) clean: +- cd src && $(MAKE) $@ ++ cd src && $(MAKE) $@ R=$R + + test: dummy + src/lua -v +@@ -62,6 +62,9 @@ install: dummy + cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN) + cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC) + cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB) ++ cd src && $(INSTALL_EXEC) liblua.so.$R $(INSTALL_LIB) ++ ln -s liblua.so.$R $(INSTALL_LIB)/liblua.so.$V ++ ln -s liblua.so.$V $(INSTALL_LIB)/liblua.so + cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN) + + uninstall: +diff --git a/src/Makefile b/src/Makefile +index d71c75c87322..ef1760d65225 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -4,15 +4,13 @@ + # == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT ======================= + + # Your platform. See PLATS for possible values. +-PLAT= none ++PLAT= linux + +-CC= gcc -std=gnu99 +-CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_2 $(SYSCFLAGS) $(MYCFLAGS) ++CFLAGS= -std=gnu99 -fPIC -O2 -Wall -Wextra -DLUA_COMPAT_5_2 $(SYSCFLAGS) $(MYCFLAGS) + LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS) + LIBS= -lm $(SYSLIBS) $(MYLIBS) + +-AR= ar rcu +-RANLIB= ranlib ++ARFLAGS= rcu + RM= rm -f + + SYSCFLAGS= +@@ -29,6 +27,7 @@ MYOBJS= + PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris + + LUA_A= liblua.a ++LUA_SO= liblua.so.$R + 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,8 +42,8 @@ LUAC_T= luac + LUAC_O= luac.o + + ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O) +-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) +-ALL_A= $(LUA_A) ++ALL_T= $(LUA_A) $(LUA_SO) $(LUA_T) $(LUAC_T) ++ALL_A= $(LUA_A) $(LUA_SO) + + # Targets start here. + default: $(PLAT) +@@ -56,9 +55,12 @@ o: $(ALL_O) + a: $(ALL_A) + + $(LUA_A): $(BASE_O) +- $(AR) $@ $(BASE_O) ++ $(AR) $(ARFLAGS) $@ $(BASE_O) + $(RANLIB) $@ + ++$(LUA_SO): $(BASE_O) ++ $(CC) -shared -o $@ $(BASE_O) $(filter-out %readline, $(LIBS)) ++ + $(LUA_T): $(LUA_O) $(LUA_A) + $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) + diff --git a/patches/lua-5.3.4/0002-Install-pkgconfig-file.patch b/patches/lua-5.3.4/0002-Install-pkgconfig-file.patch new file mode 100644 index 000000000..5717178af --- /dev/null +++ b/patches/lua-5.3.4/0002-Install-pkgconfig-file.patch @@ -0,0 +1,61 @@ +From: Denis Osterland <Denis.Osterland@diehl.com> +Date: Thu, 29 Jun 2017 14:54:04 +0200 +Subject: [PATCH] Install pkgconfig file. + +Signed-off-by: Denis Osterland <Denis.Osterland@diehl.com> +--- + Makefile | 8 ++++++-- + lua.pc.in | 12 ++++++++++++ + 2 files changed, 18 insertions(+), 2 deletions(-) + create mode 100644 lua.pc.in + +diff --git a/Makefile b/Makefile +index 2b2968449fb5..0ecd0198169f 100644 +--- a/Makefile ++++ b/Makefile +@@ -57,14 +57,15 @@ $(PLATS) clean: + test: dummy + src/lua -v + +-install: dummy +- cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD) ++install: dummy lua.pc ++ cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB)/pkgconfig $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD) + cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN) + cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC) + cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB) + cd src && $(INSTALL_EXEC) liblua.so.$R $(INSTALL_LIB) + ln -s liblua.so.$R $(INSTALL_LIB)/liblua.so.$V + ln -s liblua.so.$V $(INSTALL_LIB)/liblua.so ++ $(INSTALL_DATA) lua.pc $(INSTALL_LIB)/pkgconfig + cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN) + + uninstall: +@@ -111,6 +112,9 @@ pc: + @echo "libdir=$(INSTALL_LIB)" + @echo "includedir=$(INSTALL_INC)" + ++lua.pc: lua.pc.in ++ sed -e "s/@VERSION@/$R/g" $< > $@ ++ + # list targets that do not create files (but not all makes understand .PHONY) + .PHONY: all $(PLATS) clean test install local none dummy echo pecho lecho + +diff --git a/lua.pc.in b/lua.pc.in +new file mode 100644 +index 000000000000..637b4e6b4c14 +--- /dev/null ++++ b/lua.pc.in +@@ -0,0 +1,12 @@ ++prefix=${pcfiledir}/../.. ++libdir=${prefix}/lib ++includedir=${prefix}/include ++ ++Name: Lua ++Description: Lua language engine ++Version: @VERSION@ ++Requires: ++Libs: -L${libdir} -llua ++Libs.private: -lm -ldl ++Cflags: -I${includedir} ++ diff --git a/patches/lua-5.3.4/series b/patches/lua-5.3.4/series new file mode 100644 index 000000000..8d0a79399 --- /dev/null +++ b/patches/lua-5.3.4/series @@ -0,0 +1,5 @@ +# generated by git-ptx-patches +#tag:base --start-number 1 +0001-Cross-compile-in-ptxdist-envirionment.patch +0002-Install-pkgconfig-file.patch +# 8ceb231bd1d7daff066aa045e761a5d8 - git-ptx-patches magic |