summaryrefslogtreecommitdiff
path: root/dev-lua/binaryheap
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-12-12 02:01:24 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-12-12 02:01:24 +0000
commit39c32f4d5dca9f6293fccb69e9d50baf494c8de4 (patch)
treeec772fdf23a7279a60e9063b01c2dc909741a197 /dev-lua/binaryheap
parent494ca58c9f5243dd4b56557aa8c41bce76e95ec3 (diff)
gentoo auto-resync : 12:12:2024 - 02:01:23
Diffstat (limited to 'dev-lua/binaryheap')
-rw-r--r--dev-lua/binaryheap/Manifest3
-rw-r--r--dev-lua/binaryheap/binaryheap-0.4.ebuild65
-rw-r--r--dev-lua/binaryheap/metadata.xml15
3 files changed, 83 insertions, 0 deletions
diff --git a/dev-lua/binaryheap/Manifest b/dev-lua/binaryheap/Manifest
new file mode 100644
index 000000000000..30eab57e558c
--- /dev/null
+++ b/dev-lua/binaryheap/Manifest
@@ -0,0 +1,3 @@
+DIST binaryheap.lua-version_0v4.tar.gz 13556 BLAKE2B 92b7d7a54b5f1e1988a865842e80600852df0d03e566ca0075f59c521462632bc54dedcf0e67db71f1d6f29c2c932afc44fab4604eb0c386039c9528021276f1 SHA512 2d26108af024f6de5873d9ad2a10dc2fec5b603770c5ff3b3b36289c73261ad6952ed790caad6886bd313a41f9bd42a8257585dd653508d7f1bcd5d1236d2e12
+EBUILD binaryheap-0.4.ebuild 1283 BLAKE2B 72f5aa33073326503cbcb03a859383c8f2d3a61a0fc5b8d3886b99410571b5e24de01ce04e466b0a9dd4b38a5feba7de940486f72f80f4f73d2ccedbc6b79277 SHA512 a800b0d0303147aa2a63ffc41d21186fa65fffbefd7e7f4f879b96656e8f5bb8ae13686f895cee7a792bddb13f1f9acb5ae9160ae58d2e77cb08f81f32e66678
+MISC metadata.xml 477 BLAKE2B eabd8184ac86f607c12cd84207c159e023e111ee17822b879bcc188ccf7fab68e1ed814e1c0eb38df937f72e44b7384001e4e6315fb4ed4dce59da2600e38643 SHA512 b8c88167ccc03fd804001ae09948095a96fc1820ac47760a8244c0eda6a9b277465ae75242f9a8859d8a54f612486e31d228666105dfbc6e005feb626d9e2e2c
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>