diff options
-rw-r--r-- | dev-lua/mpack/Manifest | 1 | ||||
-rw-r--r-- | dev-lua/mpack/metadata.xml | 16 | ||||
-rw-r--r-- | dev-lua/mpack/mpack-1.0.2.ebuild | 36 |
3 files changed, 53 insertions, 0 deletions
diff --git a/dev-lua/mpack/Manifest b/dev-lua/mpack/Manifest new file mode 100644 index 000000000000..c63f696443d0 --- /dev/null +++ b/dev-lua/mpack/Manifest @@ -0,0 +1 @@ +DIST mpack-1.0.2.tar.gz 44671 SHA256 9c570b2aab81b0c56d97cbd8fc483dc431b69510fd9becb4a1845291563e8bc9 SHA512 307ae26799e59224dd624d1f5473c86d5cf975155c58b7ccfd17be98321afb0f7235d06a7a2c50112d4630b3cc7c185c9b307007be5cdbd792819ec2991fa3d2 WHIRLPOOL b5461701898d3e8ab72c92f8d75c4b098986821a3cba281e82a15e495ee4ac2a9efddbd61c542dc3f3cb0cb45f18362652b102dfa8bae690d6c8f4b1b3261911 diff --git a/dev-lua/mpack/metadata.xml b/dev-lua/mpack/metadata.xml new file mode 100644 index 000000000000..fcf43ddbe1de --- /dev/null +++ b/dev-lua/mpack/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person" > + <email>lluixhi@gmail.com</email> + <name>Aric Belsito</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <use> + <flag name="luajit">Use <pkg>dev-lang/luajit</pkg> instead of + <pkg>dev-lang/lua</pkg></flag> + </use> +</pkgmetadata> 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 +} |