diff mbox series

[[meta-swupdate] 4/7] lua: add lua-socket

Message ID 1531042617-6503-4-git-send-email-sbabic@denx.de
State Accepted
Headers show
Series [[meta-swupdate] 4/7] lua: add lua-socket | expand

Commit Message

Stefano Babic July 8, 2018, 9:36 a.m. UTC
LuaSocket is a Lua extension library to add network functionality
to LUA.

Signed-off-by: Stefano Babic <sbabic@denx.de>
---
 recipes-lua/luasocket/files/0001-fix-for-OE.patch | 29 ++++++++++++++++++
 recipes-lua/luasocket/luasocket_git.bb            | 36 +++++++++++++++++++++++
 2 files changed, 65 insertions(+)
 create mode 100644 recipes-lua/luasocket/files/0001-fix-for-OE.patch
 create mode 100644 recipes-lua/luasocket/luasocket_git.bb
diff mbox series

Patch

diff --git a/recipes-lua/luasocket/files/0001-fix-for-OE.patch b/recipes-lua/luasocket/files/0001-fix-for-OE.patch
new file mode 100644
index 0000000..051b503
--- /dev/null
+++ b/recipes-lua/luasocket/files/0001-fix-for-OE.patch
@@ -0,0 +1,29 @@ 
+From 2e6cbd39bb99c890bcbc513dcd643c239d34f7c6 Mon Sep 17 00:00:00 2001
+From: Kas User <kas@example.com>
+Date: Tue, 22 May 2018 19:20:04 +0200
+Subject: [PATCH] fix for OE
+
+Signed-off-by: Kas User <kas@example.com>
+---
+ makefile | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/makefile b/makefile
+index cc15b4e..632fb73 100644
+--- a/makefile
++++ b/makefile
+@@ -14,8 +14,10 @@ PLATS= macosx linux win32 mingw freebsd solaris
+ 
+ all: $(PLAT)
+ 
++LUAV = `pkg-config --modversion lua | cut -d'.' -f1,2`
++
+ $(PLATS) none install install-unix local clean:
+-	$(MAKE) -C src $@
++	$(MAKE) -C src $@ LUAV=${LUAV}
+ 
+ print:
+ 	$(MAKE) -C src $@
+-- 
+2.7.4
+
diff --git a/recipes-lua/luasocket/luasocket_git.bb b/recipes-lua/luasocket/luasocket_git.bb
new file mode 100644
index 0000000..ad8d5eb
--- /dev/null
+++ b/recipes-lua/luasocket/luasocket_git.bb
@@ -0,0 +1,36 @@ 
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=ab6706baf6d39a6b0fa2613a3b0831e7"
+
+DEPENDS = "lua"
+
+RDEPENDS_${PN} += "lua"
+
+SRC_URI = "git://github.com/diegonehab/luasocket;protocol=https \
+	file://0001-fix-for-OE.patch \
+"
+
+# Modify these as desired
+PV = "0.0+git${SRCPV}"
+SRCREV = "652959890943c34d7180cae372339b91e62f0d7b"
+
+S = "${WORKDIR}/git"
+
+FILES_${PN} = "${libdir} ${datadir}/lua" 
+
+EXTRA_OEMAKE = 'DESTDIR=${D} PREFIX=/usr CC="${CC}" LD="${CC}" MYLDFLAGS="${LDFLAGS}"'
+
+inherit pkgconfig
+
+do_configure () {
+}
+
+do_compile () {
+	# You will almost certainly need to add additional arguments here
+	oe_runmake
+}
+
+do_install () {
+	# This is a guess; additional arguments may be required
+	oe_runmake install
+}
+