diff options
author | 2017-11-02 13:39:08 +0700 | |
---|---|---|
committer | 2017-11-02 13:39:08 +0700 | |
commit | 7d2d2c2b9a37599f0259f579ac1d97bfc93f12e1 (patch) | |
tree | 95cafc4cd5329b2f7dcedc34d836541e342ff49e | |
parent | lua.eclass: add lua5.3-related integers definition to c{,xx}flags (diff) | |
download | lua-7d2d2c2b9a37599f0259f579ac1d97bfc93f12e1.tar.gz lua-7d2d2c2b9a37599f0259f579ac1d97bfc93f12e1.tar.bz2 lua-7d2d2c2b9a37599f0259f579ac1d97bfc93f12e1.zip |
mpack: ported from the tree (fixed build and installation)
-rw-r--r-- | dev-lua/mpack/Manifest | 1 | ||||
-rw-r--r-- | dev-lua/mpack/metadata.xml | 19 | ||||
-rw-r--r-- | dev-lua/mpack/mpack-1.0.4.ebuild | 72 |
3 files changed, 92 insertions, 0 deletions
diff --git a/dev-lua/mpack/Manifest b/dev-lua/mpack/Manifest new file mode 100644 index 0000000..f5e1bec --- /dev/null +++ b/dev-lua/mpack/Manifest @@ -0,0 +1 @@ +DIST mpack-1.0.4.tar.gz 46382 SHA256 0a5d69f3966b31d14faddbd81db53b543fb092c711250ecb0aa5e22d060aa080 SHA512 8e40a562faf8b62137dec0733cbb9006fa7054e5a47bdd128fb4dfd676fac4e4385a23c3d908a4ce2edd65d673db25916695fa74bc08c5316b0c80e571a7442c WHIRLPOOL bd538133a3b5f3723ad8c2c2193821971c0a0d7f4959265309c694db3b0cded7e350fde58b3fe90fd57564e7c9de9ca9f0efc495faec3af12ebba463dffd3e3f diff --git a/dev-lua/mpack/metadata.xml b/dev-lua/mpack/metadata.xml new file mode 100644 index 0000000..3fbadc7 --- /dev/null +++ b/dev-lua/mpack/metadata.xml @@ -0,0 +1,19 @@ +<?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> + <upstream> + <remote-id type="github">tarruda/libmpack</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-lua/mpack/mpack-1.0.4.ebuild b/dev-lua/mpack/mpack-1.0.4.ebuild new file mode 100644 index 0000000..a9b7d1b --- /dev/null +++ b/dev-lua/mpack/mpack-1.0.4.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +GITHUB_A="tarruda" +GITHUB_PN="libmpack" + +inherit lua + +DESCRIPTION="Lua bindings for libmpack" +HOMEPAGE="https://github.com/tarruda/libmpack/" + +#S="${WORKDIR}/all/libmpack-${PV}/binding/lua" +LUA_S="libmpack-${PV}/binding/lua" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~arm ~arm64" +IUSE="luajit test" + +RDEPEND=" + || ( + virtual/lua[luajit=] + !luajit? ( + || ( + ( virtual/lua dev-lang/lua:5.1 ) + >=dev-lang/lua-5.1:0 + ) + ) + luajit? ( + || ( + virtual/lua[luajit] + >=dev-lang/luajit-2 + ) + ) + ) +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig + test? ( dev-lua/busted ) +" + +each_lua_prepare() { + sed \ + -e '/^LUA_/d' \ + -i Makefile + if lua_is_jit; then + sed \ + -e '1i#define luaL_reg luaL_Reg' \ + -i "${S}/lmpack.c" + fi +} + +each_lua_compile() { + local myemakeargs=( + USE_SYSTEM_LUA=yes +# LUA_INCLUDE="$(lua_get_incdir)" +# LUA_LIB="" + # ^ lua modules shouldn't ever link against liblua + ) + lua_default +} + +each_lua_test() { + ${LUA} ${EROOT}/usr/bin/busted -o gtest test.lua || die +} + +each_lua_install() { + dolua "${PN}.so" +} |