Pārlūkot izejas kodu

lua: add lua-socket

LuaSocket is a Lua extension library to add network functionality
to LUA.

Signed-off-by: Stefano Babic <sbabic@denx.de>
Stefano Babic 7 gadi atpakaļ
vecāks
revīzija
ed85dc930f

+ 29 - 0
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
+

+ 36 - 0
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
+}
+