summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2009-09-28 10:54:29 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2009-09-28 10:54:29 +0000
commit39a33748e768467a3fde264762c862bc5d7772f0 (patch)
treedf90de3ed54e41a0f917c05638e873ce03cc1874 /dev-libs/luasocket
parentpitivi bump (diff)
downloadgentoo-2-39a33748e768467a3fde264762c862bc5d7772f0.tar.gz
gentoo-2-39a33748e768467a3fde264762c862bc5d7772f0.tar.bz2
gentoo-2-39a33748e768467a3fde264762c862bc5d7772f0.zip
Initial import of luasocket (needed for ekeyd); thanks to Pierre Guinoiseau in bug #239540 for the basic ebuild.
(Portage version: 2.2_rc42/cvs/Linux x86_64)
Diffstat (limited to 'dev-libs/luasocket')
-rw-r--r--dev-libs/luasocket/ChangeLog12
-rw-r--r--dev-libs/luasocket/files/luasocket-2.0.2-unixsocket.patch25
-rw-r--r--dev-libs/luasocket/luasocket-2.0.2.ebuild49
-rw-r--r--dev-libs/luasocket/metadata.xml13
4 files changed, 99 insertions, 0 deletions
diff --git a/dev-libs/luasocket/ChangeLog b/dev-libs/luasocket/ChangeLog
new file mode 100644
index 000000000000..d031395c4d89
--- /dev/null
+++ b/dev-libs/luasocket/ChangeLog
@@ -0,0 +1,12 @@
+# ChangeLog for dev-libs/luasocket
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/luasocket/ChangeLog,v 1.1 2009/09/28 10:54:29 flameeyes Exp $
+
+*luasocket-2.0.2 (28 Sep 2009)
+
+ 28 Sep 2009; Diego E. Pettenò <flameeyes@gentoo.org>
+ +luasocket-2.0.2.ebuild, +files/luasocket-2.0.2-unixsocket.patch,
+ +metadata.xml:
+ Initial import of luasocket (needed for ekeyd); thanks to Pierre
+ Guinoiseau in bug #239540 for the basic ebuild.
+
diff --git a/dev-libs/luasocket/files/luasocket-2.0.2-unixsocket.patch b/dev-libs/luasocket/files/luasocket-2.0.2-unixsocket.patch
new file mode 100644
index 000000000000..15f4fe01496c
--- /dev/null
+++ b/dev-libs/luasocket/files/luasocket-2.0.2-unixsocket.patch
@@ -0,0 +1,25 @@
+Index: luasocket-2.0.2/makefile
+===================================================================
+--- luasocket-2.0.2.orig/makefile
++++ luasocket-2.0.2/makefile
+@@ -45,6 +47,7 @@ install: all
+ #cd src; $(INSTALL_DATA) $(TO_MIME_SHARE) $(INSTALL_MIME_SHARE)
+ cd src; mkdir -p $(INSTALL_MIME_LIB)
+ cd src; $(INSTALL_EXEC) $(MIME_SO) $(INSTALL_MIME_LIB)/core.$(EXT)
++ cd src; $(INSTALL_EXEC) $(UNIX_SO) $(INSTALL_SOCKET_LIB)/unix.$(EXT)
+
+ #------
+ # End of makefile
+Index: luasocket-2.0.2/src/makefile
+===================================================================
+--- luasocket-2.0.2.orig/src/makefile
++++ luasocket-2.0.2/src/makefile
+@@ -47,7 +47,7 @@ UNIX_OBJS:=\
+ usocket.o \
+ unix.o
+
+-all: $(SOCKET_SO) $(MIME_SO)
++all: $(SOCKET_SO) $(MIME_SO) $(UNIX_SO)
+
+ $(SOCKET_SO): $(SOCKET_OBJS)
+ $(LD) $(LDFLAGS) -o $@ $(SOCKET_OBJS)
diff --git a/dev-libs/luasocket/luasocket-2.0.2.ebuild b/dev-libs/luasocket/luasocket-2.0.2.ebuild
new file mode 100644
index 000000000000..2da3e5ef6a31
--- /dev/null
+++ b/dev-libs/luasocket/luasocket-2.0.2.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/luasocket/luasocket-2.0.2.ebuild,v 1.1 2009/09/28 10:54:29 flameeyes Exp $
+
+EAPI=2
+
+inherit multilib toolchain-funcs flag-o-matic eutils
+
+DESCRIPTION="Networking support library for the Lua language."
+HOMEPAGE="http://www.tecgraf.puc-rio.br/~diego/professional/luasocket/"
+SRC_URI="http://luaforge.net/frs/download.php/2664/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+
+RDEPEND=">=dev-lang/lua-5.1[deprecated]"
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig"
+
+src_prepare() {
+ # Unix socket support is needed by app-crypt/ekeyd, but upstream
+ # does not seem to enable it by default.
+ epatch "${FILESDIR}"/${P}-unixsocket.patch
+}
+
+src_compile() {
+ # We append flags here to avoid editing the config file
+ use debug && append-flags -DLUASOCKET_DEBUG
+ append-flags -fPIC
+
+ emake \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ CC="$(tc-getCC)" \
+ LD="$(tc-getCC) -shared" \
+ || die
+}
+
+src_install() {
+ emake install \
+ INSTALL_TOP_SHARE="${D}/$(pkg-config --variable INSTALL_LMOD lua)" \
+ INSTALL_TOP_LIB="${D}/$(pkg-config --variable INSTALL_CMOD lua | sed -e "s:lib/:$(get_libdir)/:")" \
+ || die
+
+ dodoc NEW README || die
+ dohtml doc/* || die
+}
diff --git a/dev-libs/luasocket/metadata.xml b/dev-libs/luasocket/metadata.xml
new file mode 100644
index 000000000000..051ccf425cda
--- /dev/null
+++ b/dev-libs/luasocket/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>no-herd</herd>
+ <maintainer>
+ <email>flameeyes@gentoo.org</email>
+ <description>
+ I need this for app-crypt/ekeyd, if you care about this for LUA,
+ or for any other reason, you're free to pick it up; please just
+ leave the unix socket support in, thanks!
+ </description>
+ </maintainer>
+</pkgmetadata>