summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConrad Kostecki <conikost@gentoo.org>2020-11-30 22:17:15 +0100
committerConrad Kostecki <conikost@gentoo.org>2020-11-30 22:19:13 +0100
commit1bf5ae81e2859a4bee5820a04dfca5223b96b70a (patch)
tree2c6d3955e61ce33c290e916d6e2c596922f4b18b /dev-lua/lanes
parentdev-lua/lanes: bump to version 3.13.0 (diff)
downloadgentoo-1bf5ae81e2859a4bee5820a04dfca5223b96b70a.tar.gz
gentoo-1bf5ae81e2859a4bee5820a04dfca5223b96b70a.tar.bz2
gentoo-1bf5ae81e2859a4bee5820a04dfca5223b96b70a.zip
dev-lua/lanes: migrate to lua eclass
Closes: https://bugs.gentoo.org/752606 Package-Manager: Portage-3.0.9, Repoman-3.0.2 Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'dev-lua/lanes')
-rw-r--r--dev-lua/lanes/lanes-3.13.0-r100.ebuild87
-rw-r--r--dev-lua/lanes/metadata.xml4
2 files changed, 91 insertions, 0 deletions
diff --git a/dev-lua/lanes/lanes-3.13.0-r100.ebuild b/dev-lua/lanes/lanes-3.13.0-r100.ebuild
new file mode 100644
index 000000000000..3c7d429b112e
--- /dev/null
+++ b/dev-lua/lanes/lanes-3.13.0-r100.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+LUA_COMPAT=( lua5-{1..3} luajit )
+
+inherit lua toolchain-funcs
+
+DESCRIPTION="Lightweight, native, lazy evaluating multithreading library"
+HOMEPAGE="https://github.com/LuaLanes/lanes"
+SRC_URI="https://github.com/LuaLanes/lanes/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+IUSE="test"
+REQUIRED_USE="${LUA_REQUIRED_USE}"
+RESTRICT="!test? ( test )"
+
+RDEPEND="${LUA_DEPS}"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ virtual/pkgconfig
+ test? ( ${RDEPEND} )
+"
+
+HTML_DOCS=( "docs/." )
+
+PATCHES=( "${FILESDIR}/${PN}-3.13.0-makefile.patch" )
+
+src_prepare() {
+ default
+
+ lua_copy_sources
+}
+
+lua_src_compile() {
+ pushd "${BUILD_DIR}" || die
+
+ local myemakeargs=(
+ "CC=$(tc-getCC)"
+ "LUA=${ELUA}"
+ "LUA_FLAGS=$(lua_get_CFLAGS)"
+ "LUA_LIBS="
+ "OPT_FLAGS=${CFLAGS}"
+ )
+
+ emake "${myemakeargs[@]}"
+
+ popd
+}
+
+src_compile() {
+ lua_foreach_impl lua_src_compile
+}
+
+lua_src_test() {
+ pushd "${BUILD_DIR}" || die
+
+ emake LUA="${ELUA}" test
+
+ popd
+}
+
+src_test() {
+ lua_foreach_impl lua_src_test
+}
+
+lua_src_install() {
+ pushd "${BUILD_DIR}" || die
+
+ local myemakeargs=(
+ "LUA_LIBDIR=${ED}/$(lua_get_cmod_dir)"
+ "LUA_SHAREDIR=${ED}/$(lua_get_lmod_dir)"
+ )
+
+ emake "${myemakeargs[@]}" install
+
+ popd
+}
+
+src_install() {
+ lua_foreach_impl lua_src_install
+
+ einstalldocs
+}
diff --git a/dev-lua/lanes/metadata.xml b/dev-lua/lanes/metadata.xml
index 5d8223a9b7be..b2c291b1b2b1 100644
--- a/dev-lua/lanes/metadata.xml
+++ b/dev-lua/lanes/metadata.xml
@@ -5,6 +5,10 @@
<email>williamh@gentoo.org</email>
<name>William Hubbs</name>
</maintainer>
+ <maintainer type="person">
+ <email>conikost@gentoo.org</email>
+ <name>Conrad Kostecki</name>
+ </maintainer>
<upstream>
<remote-id type="github">LuaLanes/lanes</remote-id>
</upstream>