diff options
author | Alexey Shvetsov <alexxy@gentoo.org> | 2024-09-23 15:18:41 +0300 |
---|---|---|
committer | Alexey Shvetsov <alexxy@gentoo.org> | 2024-09-23 15:18:41 +0300 |
commit | 4bedcae011d1ff81060df409f66ceffb1e441a3d (patch) | |
tree | 9808ddfead77a06d48856252351b9cefd3d847d6 | |
parent | dev-tex/BibTool: add 2.68, drop 2.67 (diff) | |
download | alexxy-4bedcae011d1ff81060df409f66ceffb1e441a3d.tar.gz alexxy-4bedcae011d1ff81060df409f66ceffb1e441a3d.tar.bz2 alexxy-4bedcae011d1ff81060df409f66ceffb1e441a3d.zip |
net-libs/opendht: new package, add 3.1.7, 9999
Signed-off-by: Alexey Shvetsov <alexxy@gentoo.org>
-rw-r--r-- | net-libs/opendht/Manifest | 1 | ||||
-rw-r--r-- | net-libs/opendht/files/argon2_system.patch | 53 | ||||
-rw-r--r-- | net-libs/opendht/metadata.xml | 23 | ||||
-rw-r--r-- | net-libs/opendht/opendht-3.1.7.ebuild | 70 | ||||
-rw-r--r-- | net-libs/opendht/opendht-9999.ebuild | 70 |
5 files changed, 217 insertions, 0 deletions
diff --git a/net-libs/opendht/Manifest b/net-libs/opendht/Manifest new file mode 100644 index 0000000..a246c3b --- /dev/null +++ b/net-libs/opendht/Manifest @@ -0,0 +1 @@ +DIST opendht-3.1.7.tar.gz 483941 BLAKE2B d857fd80bd4b3f5922fafe8c1e3614af3ea8d9ab9998d6d1affee3e9621221e244560d5436b3ee2fcfd2c925a12fb128f6ee9f63ce965a4e3ccba8a64f40a2d0 SHA512 c89e8276520f94daa31a5c07e6725ba6b8f3daa2fa118914f61394b879b63dce2e0ab462e35af31d40ebd15d1feb119236b4a791dff683486ed7ccd1d0589756 diff --git a/net-libs/opendht/files/argon2_system.patch b/net-libs/opendht/files/argon2_system.patch new file mode 100644 index 0000000..6fe5363 --- /dev/null +++ b/net-libs/opendht/files/argon2_system.patch @@ -0,0 +1,53 @@ +Description: Use Gentoo's argon2 library +Bug: https://github.com/savoirfairelinux/opendht/issues/83 +Author: Alexandre Viau <aviau@debian.org> +Last-Update: 2016-06-27 +--- ./CMakeLists.txt 2017-02-21 14:31:08.651579119 +0300 ++++ ./CMakeLists.txt 2017-02-21 14:42:10.475425173 +0300 +@@ -62,10 +62,4 @@ + src/securedht.cpp + src/dhtrunner.cpp +- src/argon2/argon2.c +- src/argon2/core.c +- src/argon2/blake2/blake2b.c +- src/argon2/thread.c +- src/argon2/encoding.c +- src/argon2/ref.c + src/indexation/pht.cpp + src/log.cpp +@@ -123,5 +117,5 @@ + target_link_libraries(opendht-static -flto -fuse-linker-plugin) + endif () +- target_link_libraries(opendht-static gnutls nettle) ++ target_link_libraries(opendht-static gnutls nettle argon2) + install (TARGETS opendht-static DESTINATION ${CMAKE_INSTALL_LIBDIR} EXPORT opendht) + endif () +@@ -138,5 +132,5 @@ + target_link_libraries(opendht -flto -fuse-linker-plugin) + endif () +- target_link_libraries(opendht gnutls nettle) ++ target_link_libraries(opendht gnutls nettle argon2) + install (TARGETS opendht DESTINATION ${CMAKE_INSTALL_LIBDIR} EXPORT opendht) + endif () + --- ./src/crypto.cpp 2017-02-21 14:31:07.969600917 +0300 ++++ ./src/crypto.cpp 2017-02-21 14:47:02.711084414 +0300 +@@ -28,5 +28,5 @@ + #include <nettle/aes.h> + +-#include "argon2/argon2.h" ++#include "argon2.h" + } + +--- ./tools/CMakeLists.txt 2017-02-21 14:31:08.632579726 +0300 ++++ ./tools/CMakeLists.txt 2017-02-21 14:49:29.956687421 +0300 +@@ -4,7 +4,7 @@ + add_executable (dhtchat dhtchat.cpp tools_common.h) + +-target_link_libraries (dhtnode LINK_PUBLIC gnutls readline) +-target_link_libraries (dhtscanner LINK_PUBLIC gnutls readline) +-target_link_libraries (dhtchat LINK_PUBLIC gnutls readline) ++target_link_libraries (dhtnode LINK_PUBLIC gnutls readline argon2) ++target_link_libraries (dhtscanner LINK_PUBLIC gnutls readline argon2) ++target_link_libraries (dhtchat LINK_PUBLIC gnutls readline argon2) + + if (OPENDHT_SHARED) diff --git a/net-libs/opendht/metadata.xml b/net-libs/opendht/metadata.xml new file mode 100644 index 0000000..443ffda --- /dev/null +++ b/net-libs/opendht/metadata.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>mva@gentoo.org</email> + <description>Also, you can find me on IRC (Libera.Chat) as mva, or in Telegram as @mva_name</description> + <name>Vadim A. Misbakh-Soloviov</name> + </maintainer> + <use> + <flag name="python">Install Python bindings. Requires <pkg>dev-python/cython</pkg>.</flag> + <flag name="tools">Install extra opendht tools (dhtchat, dhtnode and dhtscanner).</flag> + <flag name="dht-index">Build DHT indexation feature</flag> + <flag name="http-client">Build embedded http(s) client (conflicts with "proxy" options)</flag> + <flag name="proxy-client">Enable DHT proxy client, use Restinio and jsoncpp</flag> + <flag name="proxy-server">Enable DHT proxy server, use Restinio and jsoncpp</flag> + <flag name="proxy-server-identity">Allow clients to use the node identity</flag> + <flag name="proxy-openssl">Build DHT proxy with OpenSSL</flag> + <flag name="push-notifications">Enable push notifications support</flag> + </use> + <upstream> + <remote-id type="github">savoirfairelinux/opendht</remote-id> + </upstream> +</pkgmetadata> diff --git a/net-libs/opendht/opendht-3.1.7.ebuild b/net-libs/opendht/opendht-3.1.7.ebuild new file mode 100644 index 0000000..d73d7fd --- /dev/null +++ b/net-libs/opendht/opendht-3.1.7.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..13} ) + +inherit cmake python-r1 + +DESCRIPTION="A lightweight C++11 Distributed Hash Table implementation" +HOMEPAGE="https://github.com/savoirfairelinux/opendht" + +if [[ "${PV}" == 9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/savoirfairelinux/${PN}" +else + SRC_URI="https://github.com/savoirfairelinux/opendht/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="GPL-3" + +SLOT="0" + +IUSE="doc dht-index http-client proxy-client proxy-server proxy-server-identity proxy-openssl push-notifications python static-libs tools" + +DEPEND=" + dev-libs/msgpack + net-libs/gnutls + python? ( dev-python/cython[${PYTHON_USEDEP}] ) + tools? ( sys-libs/readline:0 ) + proxy-openssl? ( dev-libs/openssl:= ) + doc? ( app-text/doxygen ) +" +RDEPEND=" + ${DEPEND} + ${PYTHON_DEPS} +" + +REQUIRED_USE="http-client? ( !proxy-server !proxy-client ) ${PYTHON_REQUIRED_USE}" + +src_configure() { + local mycmakeargs=( + -DOPENDHT_PYTHON=$(usex python) + -DOPENDHT_STATIC=$(usex static-libs) + -DOPENDHT_TOOLS=$(usex tools) + -DOPENDHT_SHARED=ON + -DOPENDHT_LOG=ON + -DOPENDHT_SYSTEMD=ON + -DOPENDHT_HTTP=$(usex http-client) + -DOPENDHT_INDEX=$(usex dht-index) + -DOPENDHT_PEER_DISCOVERY=ON + -DOPENDHT_PROXY_SERVER=$(usex proxy-server) + -DOPENDHT_PROXY_SERVER_IDENTITY=$(usex proxy-server-identity) + -DOPENDHT_PROXY_CLIENT=$(usex proxy-client) + -DOPENDHT_PROXY_OPENSSL=$(usex proxy-openssl) + -DOPENDHT_PUSH_NOTIFICATIONS=$(usex push-notifications) + -DOPENDHT_SANITIZE=OFF + -DOPENDHT_TESTS=OFF + -DOPENDHT_TESTS_NETWORK=OFF + -DOPENDHT_C=ON + -DOPENDHT_DOCUMENTATION=$(usex doc) + ) + cmake_src_configure +} + +src_install() { + cmake_src_install + einstalldocs +} diff --git a/net-libs/opendht/opendht-9999.ebuild b/net-libs/opendht/opendht-9999.ebuild new file mode 100644 index 0000000..d73d7fd --- /dev/null +++ b/net-libs/opendht/opendht-9999.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..13} ) + +inherit cmake python-r1 + +DESCRIPTION="A lightweight C++11 Distributed Hash Table implementation" +HOMEPAGE="https://github.com/savoirfairelinux/opendht" + +if [[ "${PV}" == 9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/savoirfairelinux/${PN}" +else + SRC_URI="https://github.com/savoirfairelinux/opendht/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="GPL-3" + +SLOT="0" + +IUSE="doc dht-index http-client proxy-client proxy-server proxy-server-identity proxy-openssl push-notifications python static-libs tools" + +DEPEND=" + dev-libs/msgpack + net-libs/gnutls + python? ( dev-python/cython[${PYTHON_USEDEP}] ) + tools? ( sys-libs/readline:0 ) + proxy-openssl? ( dev-libs/openssl:= ) + doc? ( app-text/doxygen ) +" +RDEPEND=" + ${DEPEND} + ${PYTHON_DEPS} +" + +REQUIRED_USE="http-client? ( !proxy-server !proxy-client ) ${PYTHON_REQUIRED_USE}" + +src_configure() { + local mycmakeargs=( + -DOPENDHT_PYTHON=$(usex python) + -DOPENDHT_STATIC=$(usex static-libs) + -DOPENDHT_TOOLS=$(usex tools) + -DOPENDHT_SHARED=ON + -DOPENDHT_LOG=ON + -DOPENDHT_SYSTEMD=ON + -DOPENDHT_HTTP=$(usex http-client) + -DOPENDHT_INDEX=$(usex dht-index) + -DOPENDHT_PEER_DISCOVERY=ON + -DOPENDHT_PROXY_SERVER=$(usex proxy-server) + -DOPENDHT_PROXY_SERVER_IDENTITY=$(usex proxy-server-identity) + -DOPENDHT_PROXY_CLIENT=$(usex proxy-client) + -DOPENDHT_PROXY_OPENSSL=$(usex proxy-openssl) + -DOPENDHT_PUSH_NOTIFICATIONS=$(usex push-notifications) + -DOPENDHT_SANITIZE=OFF + -DOPENDHT_TESTS=OFF + -DOPENDHT_TESTS_NETWORK=OFF + -DOPENDHT_C=ON + -DOPENDHT_DOCUMENTATION=$(usex doc) + ) + cmake_src_configure +} + +src_install() { + cmake_src_install + einstalldocs +} |