[oe-commits] Petr Štetiar : lua-socket: add new recipe

git version control git at git.openembedded.org
Sat Nov 27 12:55:43 UTC 2010


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 07eec54bc3600388f71c7002d088175bd1149987
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=07eec54bc3600388f71c7002d088175bd1149987

Author: Petr Štetiar <ynezz at true.cz>
Date:   Sat Nov 20 23:58:40 2010 +0100

lua-socket: add new recipe

Signed-off-by: Petr Štetiar <ynezz at true.cz>

---

 .../lua-socket-2.0.2/lua-socket_2.0.2-make.patch   |   46 ++++++++++++++++++++
 recipes/lua/lua-socket_2.0.2.bb                    |   33 ++++++++++++++
 2 files changed, 79 insertions(+), 0 deletions(-)

diff --git a/recipes/lua/lua-socket-2.0.2/lua-socket_2.0.2-make.patch b/recipes/lua/lua-socket-2.0.2/lua-socket_2.0.2-make.patch
new file mode 100644
index 0000000..d7a553f
--- /dev/null
+++ b/recipes/lua/lua-socket-2.0.2/lua-socket_2.0.2-make.patch
@@ -0,0 +1,46 @@
+Index: luasocket-2.0.2/config
+===================================================================
+--- luasocket-2.0.2.orig/config	2007-10-15 06:21:05.000000000 +0200
++++ luasocket-2.0.2/config	2010-11-20 23:36:34.000000000 +0100
+@@ -49,11 +49,10 @@
+ #------
+ # Compiler and linker settings
+ # for Linux
+-CC=gcc
+-DEF=-DLUASOCKET_DEBUG 
+-CFLAGS= $(LUAINC) $(DEF) -pedantic -Wall -O2 -fpic
+-LDFLAGS=-O -shared -fpic
+-LD=gcc 
++#DEF=-DLUASOCKET_DEBUG
++#CFLAGS= $(LUAINC) $(DEF) -pedantic -Wall -O2 -fpic
++#LDFLAGS=$(LDFLAGS) `pkg-config --cflags --libs lua51`
++#LD=$(CC)
+ 
+ #------
+ # End of makefile configuration
+Index: luasocket-2.0.2/src/makefile
+===================================================================
+--- luasocket-2.0.2.orig/src/makefile	2007-10-15 06:21:05.000000000 +0200
++++ luasocket-2.0.2/src/makefile	2010-11-20 23:38:57.000000000 +0100
+@@ -47,16 +47,18 @@
+ 	usocket.o \
+ 	unix.o
+ 
++FLAGS = -shared $(MYFLAGS) `pkg-config --libs --cflags lua5.1`
++
+ all: $(SOCKET_SO) $(MIME_SO) 
+ 
+ $(SOCKET_SO): $(SOCKET_OBJS)
+-	$(LD) $(LDFLAGS) -o $@ $(SOCKET_OBJS)
++	$(CC) $(FLAGS) -o $@ $(SOCKET_OBJS)
+ 
+ $(MIME_SO): $(MIME_OBJS)
+-	$(LD) $(LDFLAGS) -o $@ $(MIME_OBJS)
++	$(CC) $(FLAGS) -o $@ $(MIME_OBJS)
+ 
+ $(UNIX_SO): $(UNIX_OBJS)
+-	$(LD) $(LDFLAGS) -o $@ $(UNIX_OBJS)
++	$(CC) $(FLAGS) -o $@ $(UNIX_OBJS)
+ 
+ #------
+ # List of dependencies
diff --git a/recipes/lua/lua-socket_2.0.2.bb b/recipes/lua/lua-socket_2.0.2.bb
new file mode 100644
index 0000000..9f12533
--- /dev/null
+++ b/recipes/lua/lua-socket_2.0.2.bb
@@ -0,0 +1,33 @@
+DESCRIPTION = "LuaSocket is the most comprehensive networking support library for the Lua language."
+LICENSE = "MIT"
+HOMEPAGE = "http://luaforge.net/projects/luasocket"
+
+RDEPENDS_${PN} += "lua5.1"
+
+PR = "r0"
+S = "${WORKDIR}/luasocket-${PV}"
+
+SRC_URI = "http://luaforge.net/frs/download.php/2664/luasocket-${PV}.tar.gz \
+           file://lua-socket_${PV}-make.patch"
+
+LUA_LIB_DIR =  "${libdir}/lua/5.1"
+LUA_SHARE_DIR = "${datadir}/lua/5.1"
+
+FILES_${PN}-dbg = "${LUA_LIB_DIR}/mime/.debug/core.so \
+                   ${LUA_LIB_DIR}/socket/.debug/core.so"
+
+FILES_${PN} = "${LUA_LIB_DIR}/mime/core.so \
+               ${LUA_LIB_DIR}/socket/core.so \
+               ${LUA_SHARE_DIR}/*.lua \
+               ${LUA_SHARE_DIR}/socket/*.lua"
+
+EXTRA_OEMAKE = "MYFLAGS='${CFLAGS} ${LDFLAGS}'"
+
+do_install() {
+        oe_runmake install INSTALL_TOP_SHARE=${D}${LUA_SHARE_DIR} INSTALL_TOP_LIB=${D}${LUA_LIB_DIR}
+        install -d ${D}/${docdir}/${PN}-${PV}
+        install -m 0644 doc/*.html ${D}/${docdir}/${PN}-${PV}
+}
+
+SRC_URI[md5sum] = "41445b138deb7bcfe97bff957503da8e"
+SRC_URI[sha256sum] = "4fd9c775cfd98841299851e29b30176caf289370fea1ff1e00bb67c2d6842ca6"





More information about the Openembedded-commits mailing list