summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAric Belsito <lluixhi@gmail.com>2016-04-20 20:39:15 -0700
committerPatrice Clement <monsieurp@gentoo.org>2016-04-21 19:30:41 +0000
commit564c80c0619dcd4a207ac4e9f91606fa15139aa9 (patch)
tree995879f4769c9c9fb36977d41ba12e9c42e6570a /dev-lua/mpack/mpack-1.0.2.ebuild
parentdev-libs/msgpack: drop myself as maintainer, add vim (diff)
downloadgentoo-564c80c0619dcd4a207ac4e9f91606fa15139aa9.tar.gz
gentoo-564c80c0619dcd4a207ac4e9f91606fa15139aa9.tar.bz2
gentoo-564c80c0619dcd4a207ac4e9f91606fa15139aa9.zip
dev-lua/mpack: Add new ebuild.
Closes: https://github.com/gentoo/gentoo/pull/1318 Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
Diffstat (limited to 'dev-lua/mpack/mpack-1.0.2.ebuild')
-rw-r--r--dev-lua/mpack/mpack-1.0.2.ebuild36
1 files changed, 36 insertions, 0 deletions
diff --git a/dev-lua/mpack/mpack-1.0.2.ebuild b/dev-lua/mpack/mpack-1.0.2.ebuild
new file mode 100644
index 000000000000..7d6dea02c1e9
--- /dev/null
+++ b/dev-lua/mpack/mpack-1.0.2.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit toolchain-funcs
+
+DESCRIPTION="Lua bindings for libmpack"
+HOMEPAGE="https://github.com/tarruda/libmpack/"
+SRC_URI="https://github.com/tarruda/libmpack/archive/${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/libmpack-${PV}/binding/lua"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="luajit test"
+
+RDEPEND="!luajit? ( >=dev-lang/lua-5.1:= )
+ luajit? ( dev-lang/luajit:2= )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ test? ( dev-lua/busted )"
+
+src_compile() {
+ $(tc-getCC) ${CFLAGS} ${LDFLAGS} $($(tc-getPKG_CONFIG) --cflags $(usex luajit 'luajit' 'lua')) -fPIC -DPIC -shared lmpack.c -o mpack.so || die
+}
+
+src_test() {
+ busted -o gtest test.lua || die
+}
+
+src_install() {
+ exeinto "$($(tc-getPKG_CONFIG) --variable INSTALL_CMOD $(usex luajit 'luajit' 'lua'))"
+ doexe mpack.so
+}