summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernardo Meurer <bernardo@standard.ai>2019-09-05 01:15:50 -0700
committerJoonas Niilola <juippis@gentoo.org>2019-09-05 21:45:03 +0300
commit9189264db54c0f6a85adfcf5c055d5d5752fda82 (patch)
treea22824c40cfa6fa5987cec8daee26490dd2a4fd3
parentnet-im/slack-bin: version bump to 4.0.2 (diff)
downloadgentoo-9189264db54c0f6a85adfcf5c055d5d5752fda82.tar.gz
gentoo-9189264db54c0f6a85adfcf5c055d5d5752fda82.tar.bz2
gentoo-9189264db54c0f6a85adfcf5c055d5d5752fda82.zip
dev-libs/libluv: new package (1.30.1_p0)
Bare libuv bindings for lua Closes: https://bugs.gentoo.org/691878 Package-Manager: Portage-2.3.75, Repoman-2.3.17 Signed-off-by: Bernardo Meurer <bernardo@standard.ai> Closes: https://github.com/gentoo/gentoo/pull/12864 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
-rw-r--r--dev-lua/luv/Manifest2
-rw-r--r--dev-lua/luv/luv-1.30.1_p0.ebuild62
-rw-r--r--dev-lua/luv/metadata.xml21
3 files changed, 85 insertions, 0 deletions
diff --git a/dev-lua/luv/Manifest b/dev-lua/luv/Manifest
new file mode 100644
index 000000000000..0b154193b78b
--- /dev/null
+++ b/dev-lua/luv/Manifest
@@ -0,0 +1,2 @@
+DIST luv-1.30.1_p0.tar.gz 88560 BLAKE2B 9eb32f4e13921899a80dfba143508d26ef0bee3ce0186b62b31ee9da508aa434ac01dcdbd5654f03fd18798791b71e310739e2d9a879f03bf6c48475cc6e0b46 SHA512 c7f613e72d5e5e93035597fcb6a3868d60e61811d4858ced1c2087f31ed0720c11fe436af51d6626c0d77ed448989520b220d6a150b49f6ec0fe557472dd66c7
+DIST luv-lua-compat-1.30.1_p0.zip 62515 BLAKE2B 173dbe43a1f1f4e440c1e40b0a0b22b4ca580568e754a44fbcf57370a53340ebe247de18ae8e98e68cf0f85ae2fa6ec41d5acfb9a433e4bdc717a1e80a2480b6 SHA512 7e66b059aecdb4de630fd305fdcc439cccac94b44101c8b74d61f0f40a1e01e8e68c811a96bddcf5bb0ae09f369d9524f0ec9b009e31d89aef2a1115becba056
diff --git a/dev-lua/luv/luv-1.30.1_p0.ebuild b/dev-lua/luv/luv-1.30.1_p0.ebuild
new file mode 100644
index 000000000000..50c64f2bb52f
--- /dev/null
+++ b/dev-lua/luv/luv-1.30.1_p0.ebuild
@@ -0,0 +1,62 @@
+# Copyright 2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake-utils unpacker
+
+MY_PV="${PV/_p/-}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="Bare libuv bindings for lua"
+HOMEPAGE="https://github.com/luvit/luv"
+# XXX: Remember to check this hash between bumps!
+# https://github.com/luvit/luv/tree/master/deps
+LUA_COMPAT_HASH="daebe77a2f498817713df37f0bb316db1d82222f"
+SRC_URI="
+ https://github.com/luvit/${PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz
+ https://github.com/keplerproject/lua-compat-5.3/archive/${LUA_COMPAT_HASH}.zip -> ${PN}-lua-compat-${PV}.zip
+"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="luajit test"
+
+BDEPEND="
+ virtual/pkgconfig
+ test? (
+ luajit? ( dev-lang/luajit:2 )
+ !luajit? ( dev-lang/lua:0 )
+ )
+"
+DEPEND="dev-libs/libuv:="
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ # Fix libdir
+ # Match '/lib/' and '/lib"' without capturing / or ", replacing with libdir
+ sed -i -r "s/\/lib(\"|\/)/\/$(get_libdir)\1/g" CMakeLists.txt || die "Failed to sed CMakeLists.txt"
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ lua_compat_dir="${WORKDIR}/lua-compat-5.3-${LUA_COMPAT_HASH}"
+ local mycmakeargs=(
+ -DBUILD_MODULE=OFF
+ -DLUA_BUILD_TYPE=System
+ -DLUA_COMPAT53_DIR="${lua_compat_dir}"
+ -DWITH_LUA_ENGINE=$(usex luajit LuaJIT Lua)
+ -DWITH_SHARED_LIBUV=ON
+ )
+ cmake-utils_src_configure
+}
+
+src_test() {
+ local elua="$(usex luajit luajit lua)"
+ # We need to copy the library back so that the tests see it
+ cp "${BUILD_DIR}/libluv.so" "./luv.so" || die "Failed to copy library for tests"
+ ${elua} "tests/run.lua" || die "Tests failed"
+}
diff --git a/dev-lua/luv/metadata.xml b/dev-lua/luv/metadata.xml
new file mode 100644
index 000000000000..b860177b3335
--- /dev/null
+++ b/dev-lua/luv/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>bernardo@standard.ai</email>
+ <name>Bernardo Meurer</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Gentoo Proxy Maintainers Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ libuv bindings for luajit and lua 5.1/ 5.2/ 5.3.
+
+ This library makes libuv available to lua scripts. It was made for the
+ luvit project but should usable from nearly any lua project.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">luvit/luv</remote-id>
+ </upstream>
+</pkgmetadata>