summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Martins <rafaelmartins@gentoo.org>2010-11-05 21:31:09 +0000
committerRafael Martins <rafaelmartins@gentoo.org>2010-11-05 21:31:09 +0000
commitc5c35e2b65ba0ca8bbf14c00c84727c9e6c411da (patch)
treea8bdcddb8a391672008bc6fbd2b4401d8faa6254 /dev-lua/luasocket/luasocket-2.0.2.ebuild
parentStable on amd64 (#342431) (diff)
downloadgentoo-2-c5c35e2b65ba0ca8bbf14c00c84727c9e6c411da.tar.gz
gentoo-2-c5c35e2b65ba0ca8bbf14c00c84727c9e6c411da.tar.bz2
gentoo-2-c5c35e2b65ba0ca8bbf14c00c84727c9e6c411da.zip
Moved from dev-libs to dev-lua.
(Portage version: 2.2.0_alpha3/cvs/Linux x86_64)
Diffstat (limited to 'dev-lua/luasocket/luasocket-2.0.2.ebuild')
-rw-r--r--dev-lua/luasocket/luasocket-2.0.2.ebuild49
1 files changed, 49 insertions, 0 deletions
diff --git a/dev-lua/luasocket/luasocket-2.0.2.ebuild b/dev-lua/luasocket/luasocket-2.0.2.ebuild
new file mode 100644
index 000000000000..e548b9581cd5
--- /dev/null
+++ b/dev-lua/luasocket/luasocket-2.0.2.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lua/luasocket/luasocket-2.0.2.ebuild,v 1.1 2010/11/05 21:31:09 rafaelmartins 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
+}