public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-lua/binaryheap/
@ 2024-12-11  2:13 Sam James
  0 siblings, 0 replies; only message in thread
From: Sam James @ 2024-12-11  2:13 UTC (permalink / raw
  To: gentoo-commits

commit:     ff748764eca8a5f7e1570eb33ef0b84958f682b5
Author:     Nicolas PARLANT <nicolas.parlant <AT> parhuet <DOT> fr>
AuthorDate: Tue Dec 10 15:25:47 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Dec 11 02:09:28 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff748764

dev-lua/binaryheap: new package, add 0.4

dep for dev-lua/lua-http

Signed-off-by: Nicolas PARLANT <nicolas.parlant <AT> parhuet.fr>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lua/binaryheap/Manifest              |  1 +
 dev-lua/binaryheap/binaryheap-0.4.ebuild | 65 ++++++++++++++++++++++++++++++++
 dev-lua/binaryheap/metadata.xml          | 15 ++++++++
 3 files changed, 81 insertions(+)

diff --git a/dev-lua/binaryheap/Manifest b/dev-lua/binaryheap/Manifest
new file mode 100644
index 000000000000..251f87d005f3
--- /dev/null
+++ b/dev-lua/binaryheap/Manifest
@@ -0,0 +1 @@
+DIST binaryheap.lua-version_0v4.tar.gz 13556 BLAKE2B 92b7d7a54b5f1e1988a865842e80600852df0d03e566ca0075f59c521462632bc54dedcf0e67db71f1d6f29c2c932afc44fab4604eb0c386039c9528021276f1 SHA512 2d26108af024f6de5873d9ad2a10dc2fec5b603770c5ff3b3b36289c73261ad6952ed790caad6886bd313a41f9bd42a8257585dd653508d7f1bcd5d1236d2e12

diff --git a/dev-lua/binaryheap/binaryheap-0.4.ebuild b/dev-lua/binaryheap/binaryheap-0.4.ebuild
new file mode 100644
index 000000000000..8ac436b21d4d
--- /dev/null
+++ b/dev-lua/binaryheap/binaryheap-0.4.ebuild
@@ -0,0 +1,65 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua5-{1..4} luajit )
+
+inherit lua
+
+MY_PN="${PN}.lua"
+MY_PV="version_$(ver_rs 1 v)"
+MY_P="${MY_PN}-${MY_PV}"
+
+DESCRIPTION="Binary heap implementation in pure Lua"
+HOMEPAGE="http://tieske.github.io/binaryheap.lua"
+HOMEPAGE+=" https://github.com/Tieske/binaryheap.lua"
+SRC_URI="https://github.com/Tieske/${MY_PN}/archive/${MY_PV}.tar.gz -> ${MY_P}.tar.gz"
+
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="test"
+
+REQUIRED_USE="${LUA_REQUIRED_USE}"
+RESTRICT="!test? ( test )"
+
+DEPEND="${LUA_DEPS}"
+RDEPEND="${DEPEND}"
+BDEPEND="
+	test? (
+		dev-lua/busted[${LUA_USEDEP}]
+		dev-lua/luacov[${LUA_USEDEP}]
+	)
+"
+
+src_prepare() {
+	default
+	lua_copy_sources
+}
+
+lua_src_test() {
+	if [[ ${ELUA} == "lua5.3" ]]; then
+		# this test failed only with 5.3
+		rm "${BUILD_DIR}"/spec/dijkstras_algorithm_spec.lua || die
+	fi
+	busted --lua="${ELUA}" --output="plainTerminal" "${BUILD_DIR}"/spec || die "Tests fail with ${ELUA}"
+}
+
+src_test() {
+	lua_foreach_impl lua_src_test
+}
+
+lua_src_install() {
+	insinto $(lua_get_lmod_dir)
+	doins src/${PN}.lua
+}
+
+src_install() {
+	lua_foreach_impl lua_src_install
+	local HTML_DOCS=( docs )
+	dodoc -r "examples"
+	einstalldocs
+}

diff --git a/dev-lua/binaryheap/metadata.xml b/dev-lua/binaryheap/metadata.xml
new file mode 100644
index 000000000000..dbf1929352e9
--- /dev/null
+++ b/dev-lua/binaryheap/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<email>nicolas.parlant@parhuet.fr</email>
+		<name>Nicolas PARLANT</name>
+	</maintainer>
+	<maintainer type="project" proxied="proxy">
+		<email>proxy-maint@gentoo.org</email>
+		<name>Proxy Maintainers</name>
+	</maintainer>
+	<upstream>
+		<remote-id type="github">Tieske/binaryheap.lua</remote-id>
+	</upstream>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-12-11  2:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-11  2:13 [gentoo-commits] repo/gentoo:master commit in: dev-lua/binaryheap/ Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox