commit:     51c357668de88f2966d7e80ae554f5e12c5a9dd0
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Sun Feb 23 03:44:18 2020 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Sun Feb 23 03:44:18 2020 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=51c35766

sys-cluster/KVTree: new package

Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 sys-cluster/KVTree/KVTree-1.0.2.ebuild | 68 ++++++++++++++++++++++++++++++++++
 sys-cluster/KVTree/KVTree-9999.ebuild  | 68 ++++++++++++++++++++++++++++++++++
 sys-cluster/KVTree/Manifest            |  1 +
 sys-cluster/KVTree/metadata.xml        | 18 +++++++++
 4 files changed, 155 insertions(+)

diff --git a/sys-cluster/KVTree/KVTree-1.0.2.ebuild 
b/sys-cluster/KVTree/KVTree-1.0.2.ebuild
new file mode 100644
index 0000000..0be4f18
--- /dev/null
+++ b/sys-cluster/KVTree/KVTree-1.0.2.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit cmake-utils
+
+case "${PV}" in
+9999)
+       SRC_URI=""
+       EGIT_REPO_URI="https://github.com/ECP-VeloC/${PN}.git";
+       inherit git-r3
+       KEYWORDS=""
+       ;;
+*)
+       SRC_URI="https://github.com/ECP-VeloC/${PN}/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+       KEYWORDS="~amd64"
+       ;;
+esac
+
+DESCRIPTION="KVTree provides a fully extensible C data structure modeled after 
Perl hashes."
+HOMEPAGE="https://github.com/ECP-VeloC/KVTree";
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="fcntl +flock mpi test"
+
+REQUIRED_USE="
+               ?? ( fcntl flock )
+"
+RESTRICT="test? ( userpriv ) !test? ( test )"
+
+RDEPEND="
+       mpi? ( virtual/mpi )
+       sys-libs/zlib
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+       >=dev-util/cmake-2.8
+       app-admin/chrpath
+"
+
+src_prepare() {
+       #do not build static library
+       sed -i '/kvtree-static/d' src/CMakeLists.txt || die
+       #do not install README.md automatically
+       sed -i '/FILES README.md DESTINATION/d' CMakeLists.txt || die
+       default
+       cmake-utils_src_prepare
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DMPI="$(usex mpi ON OFF)"
+               -DKVTREE_FILE_LOCK="$(usex flock FLOCK $(usex fcntl FCNTL 
NONE))"
+       )
+
+       cmake-utils_src_configure
+}
+
+src_install() {
+       chrpath -d "${BUILD_DIR}/src/kvtree_print_file" || die
+       cmake-utils_src_install
+       chrpath -d "${ED}/usr/$(get_libdir)/libkvtree.so" || die
+       dodoc doc/rst/*.rst
+       docinto "${DOCSDIR}/users"
+       dodoc -r doc/rst/users/.
+}

diff --git a/sys-cluster/KVTree/KVTree-9999.ebuild 
b/sys-cluster/KVTree/KVTree-9999.ebuild
new file mode 100644
index 0000000..0be4f18
--- /dev/null
+++ b/sys-cluster/KVTree/KVTree-9999.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit cmake-utils
+
+case "${PV}" in
+9999)
+       SRC_URI=""
+       EGIT_REPO_URI="https://github.com/ECP-VeloC/${PN}.git";
+       inherit git-r3
+       KEYWORDS=""
+       ;;
+*)
+       SRC_URI="https://github.com/ECP-VeloC/${PN}/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+       KEYWORDS="~amd64"
+       ;;
+esac
+
+DESCRIPTION="KVTree provides a fully extensible C data structure modeled after 
Perl hashes."
+HOMEPAGE="https://github.com/ECP-VeloC/KVTree";
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="fcntl +flock mpi test"
+
+REQUIRED_USE="
+               ?? ( fcntl flock )
+"
+RESTRICT="test? ( userpriv ) !test? ( test )"
+
+RDEPEND="
+       mpi? ( virtual/mpi )
+       sys-libs/zlib
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+       >=dev-util/cmake-2.8
+       app-admin/chrpath
+"
+
+src_prepare() {
+       #do not build static library
+       sed -i '/kvtree-static/d' src/CMakeLists.txt || die
+       #do not install README.md automatically
+       sed -i '/FILES README.md DESTINATION/d' CMakeLists.txt || die
+       default
+       cmake-utils_src_prepare
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DMPI="$(usex mpi ON OFF)"
+               -DKVTREE_FILE_LOCK="$(usex flock FLOCK $(usex fcntl FCNTL 
NONE))"
+       )
+
+       cmake-utils_src_configure
+}
+
+src_install() {
+       chrpath -d "${BUILD_DIR}/src/kvtree_print_file" || die
+       cmake-utils_src_install
+       chrpath -d "${ED}/usr/$(get_libdir)/libkvtree.so" || die
+       dodoc doc/rst/*.rst
+       docinto "${DOCSDIR}/users"
+       dodoc -r doc/rst/users/.
+}

diff --git a/sys-cluster/KVTree/Manifest b/sys-cluster/KVTree/Manifest
new file mode 100644
index 0000000..0c53638
--- /dev/null
+++ b/sys-cluster/KVTree/Manifest
@@ -0,0 +1 @@
+DIST KVTree-1.0.2.tar.gz 46868 BLAKE2B 
6c443eba3a861f1ecb0a04c0fa63d8fec32ed856de2d6324e011fc6a20ffb9d5eb85354bb0f6faa5e63462ced46e6a6b1af198b53219f96a865ec5eb26c9e832
 SHA512 
d3586ae8e5084ea4ce3293f1432127c0466e09ab32ba044df1ea793a13e424b2453dac71e38c7cea928601fcce1a16f2f1474e2785c523110ef091d7296a869f

diff --git a/sys-cluster/KVTree/metadata.xml b/sys-cluster/KVTree/metadata.xml
new file mode 100644
index 0000000..f4359c5
--- /dev/null
+++ b/sys-cluster/KVTree/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+  <maintainer type="person">
+    <email>[email protected]</email>
+    <name>Alessandro Barbieri</name>
+  </maintainer>
+  <upstream>
+    <remote-id type="github">ECP-VeloC/KVTree</remote-id>
+  </upstream>
+  <use>
+    <flag name="fcntl">Set the type of file locking to fcntl.</flag>
+    <flag name="flock">Set the type of file locking to flock.</flag>
+  </use>
+  <longdescription lang="en">Each KVTree object contains a list of key/value 
pairs. Each key is a string, each value is another kvtree object. This is a 
nested data structures, similar to a python dict or perl hash. The library 
provides functions to serialize a kvtree object to / from a file. It also 
optionally provides MPI send / recv functions to transfer an object from one 
process to another.
+In addition to getter and setter utilities, this library provides 
serialization (for persisting an KVTree to a file) and optional MPI 
functionality. 
+  </longdescription>
+</pkgmetadata>

Reply via email to