summaryrefslogtreecommitdiff
path: root/net-misc/dibbler
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-06-14 15:13:45 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-06-14 15:13:45 +0100
commitb9e8f3cc44aed3b6da71c7510c6287bf7bbbc66b (patch)
tree4b47f3026f10252cff69e7a4346215a4da4f0f1c /net-misc/dibbler
parent3d952d0bfe7b386699eb32d1431deb0c538f044d (diff)
gentoo auto-resync : 14:06:2023 - 15:13:45
Diffstat (limited to 'net-misc/dibbler')
-rw-r--r--net-misc/dibbler/Manifest2
-rw-r--r--net-misc/dibbler/dibbler-1.0.1-r4.ebuild66
-rw-r--r--net-misc/dibbler/files/dibbler-1.0.1-clang-16-musl-fix.patch74
3 files changed, 142 insertions, 0 deletions
diff --git a/net-misc/dibbler/Manifest b/net-misc/dibbler/Manifest
index 7c9dbe6a91aa..96a4a6ac62fc 100644
--- a/net-misc/dibbler/Manifest
+++ b/net-misc/dibbler/Manifest
@@ -1,3 +1,4 @@
+AUX dibbler-1.0.1-clang-16-musl-fix.patch 2128 BLAKE2B 5abada5175488056f1fddddffa5c7146708cd9fc62a778135a3a278d128db468656055ad8221ea7e48092919806a55b4431b1df5bbc8d13ee566e8af1bb13ff6 SHA512 af130d17ff014484bcc59b7fe08f38652f249d0dc4eb04d9c0bc25db9b91bb19550d4c5a949b655ccc615e9e2110cfe0d09087926b12652d2a25f4b89b274636
AUX dibbler-1.0.1-fno-common.patch 562 BLAKE2B c6219983aa421c20aecb345d12000eb6130bb0a785f8d9283c58220f5a330086137a5351111016b797cc79e37c5bf81cf0b435f6e7f48bce03bf657e82651b72 SHA512 2386188ca1760f47bea0727bc25c4c9b30086dc8948a7547d36df8b4c7f40b871241ec51b30b3e516b1642baa530ba2ce61222a85d95a4bcb45edf159482e512
AUX dibbler-1.0.1-gnu-ism.patch 2164 BLAKE2B fcc92e4f66aebfefeba339a24b91a6a6d7f65e487e3660c288cb23a0188acae6d9f04f73ee565ca700626c53a94f726ad6febb4390cf2e349a59999d8969cebb SHA512 0638be70e2e1cd72db0bcc7419b7731b5a4d1b38e2b42b8d7e6bd04dc41189787664e86cc255d033d6a1a834d1e46f16bc8f924eea7cd02aed5a29697e32a9f6
AUX dibbler-client 354 BLAKE2B c2d9359fdc169513c5c208591b048a9d5f93443e21a95c78d296f6e68bd5a7f3caa79bb8d70bec766e2a15f874e9fdb52bc231a8ae460d3f2ffb9e92f34ff9e1 SHA512 2ef18db1cd172f40291573a6f34209d6841f39f90b14a0731abf54cae6fbf90850d1cbeb3d6d985f0f9957c5a4228c794fc9b8d69c716bf0df7ee857b510de66
@@ -6,4 +7,5 @@ AUX dibbler-relay 348 BLAKE2B c9a8d1f2b130e00e9d0f4ad517fc5256ec1d09cde6b66c8641
AUX dibbler-server 354 BLAKE2B 08b1177bbe9f3f1f1be809dd9f3617368257072e22ad6fe1e1a671429a2e488ac47d2902defd34b60b0adf9b6aaf0db119c8edb4c4ce8d510df8e0f0a8b260dd SHA512 3d2f1df6263e3373988d5ba75479a7bed16c3a363809fdde582afeebab0cda746c91d02f8a9535e15ed1095c098f4ab3721322092bc692e0403f8c46f16adcd5
DIST dibbler-1.0.1.tar.gz 4375118 BLAKE2B 1418a20ecf96f0793b25165d2790bb12aec0dc9ffbdf248f996f736e375f466a5853f698bc3da753dae57db4493a662cc8962e5d1fb6d9dd7c0c9d893128773e SHA512 2369d4a3ca50a1c60bd5a47bf4168d4c113e2fdcb1ae4d937a3bf226c057142f2e81f6c46bf4e1dfa9ca0d2e92f7f857572a4bfb0d0dd721c35efe762e6c3ea0
EBUILD dibbler-1.0.1-r3.ebuild 1496 BLAKE2B 124983839c7e8d03d2dbfb2d2918a6a3a199103d023eab28f390ae642b03c7ba221997947f9854b502e3998e09fbe8709623e295fa83d7655f013e1d4bafaf28 SHA512 d63eac62060c52868894a978220ead74436e533a49d4ec439f137dbba40e637fab7efb065233ea303cba6d2f21d5d842f6bc336c8525d2dd740d7dfb4a913f60
+EBUILD dibbler-1.0.1-r4.ebuild 1542 BLAKE2B 8ac1dd3da5433d15c63d7492776298dd1549036db5248e8816f3cbf45f051fe3c25aadfa1c975a9dd1fc5035dc4f4e113bfad83b2edc6b6fa1293269ec52096f SHA512 44d362fd1d99a4c5bbd6b11a95a91fb9c79a79678261001a141586eff9d31b21194d11a7c7738891ce16ed2c977c2ab27403e709227a11bea20f1be5f5f9b273
MISC metadata.xml 351 BLAKE2B 51aff11f362c4c0e745e34dbae88fcda3e9659536002bed0f2b4fd0cc6f41850be26c953a42192622e9a92876f1a0f2ec9859eadbbf8e580357bb370d81d3e12 SHA512 8f50b3f2c45a785458bc463af6e904de6649a3d4b4635dc63dddcbb37e8d792a4bc6dfc71fa8115aa62ad1521af692b1c57c4638429fc204f98c9423bf2f9eba
diff --git a/net-misc/dibbler/dibbler-1.0.1-r4.ebuild b/net-misc/dibbler/dibbler-1.0.1-r4.ebuild
new file mode 100644
index 000000000000..b6fa854d515d
--- /dev/null
+++ b/net-misc/dibbler/dibbler-1.0.1-r4.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit flag-o-matic readme.gentoo-r1 systemd
+
+DESCRIPTION="Portable DHCPv6 implementation (server, client and relay)"
+HOMEPAGE="http://klub.com.pl/dhcpv6/"
+SRC_URI="http://klub.com.pl/dhcpv6/dibbler/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~hppa ~mips ~x86"
+IUSE="doc resolvconf"
+
+RDEPEND="resolvconf? ( virtual/resolvconf )"
+DEPEND="${RDEPEND}
+ doc? ( dev-texlive/texlive-latexextra )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-fno-common.patch
+ "${FILESDIR}"/${P}-gnu-ism.patch
+ "${FILESDIR}"/${P}-clang-16-musl-fix.patch
+)
+
+DOC_CONTENTS="Make sure that you modify client.conf, server.conf and/or relay.conf
+to suit your needs. They are stored in /etc/dibbler"
+
+src_configure() {
+ # ODR violations, bug #861611
+ filter-lto
+
+ # Uses removed 'register' keyword
+ append-cxxflags -std=c++14
+
+ econf $(use_enable resolvconf)
+}
+
+src_compile() {
+ default
+ # devel documentation is broken and users should consult the online version
+ # http://klub.com.pl/dhcpv6/doxygen/
+ use doc && emake -C doc/ user
+}
+
+src_install() {
+ default
+ readme.gentoo_create_doc
+
+ dosbin dibbler-{client,relay,server}
+ doman doc/man/*.8
+
+ insinto /etc/dibbler
+ doins doc/examples/*.conf
+ keepdir /var/lib/dibbler
+
+ dodoc AUTHORS CHANGELOG RELNOTES TODO
+ use doc && dodoc doc/dibbler-user.pdf
+
+ doinitd "${FILESDIR}"/dibbler-{client,relay,server}
+ systemd_dounit "${FILESDIR}"/dibbler-client.service
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+}
diff --git a/net-misc/dibbler/files/dibbler-1.0.1-clang-16-musl-fix.patch b/net-misc/dibbler/files/dibbler-1.0.1-clang-16-musl-fix.patch
new file mode 100644
index 000000000000..99fdc342b229
--- /dev/null
+++ b/net-misc/dibbler/files/dibbler-1.0.1-clang-16-musl-fix.patch
@@ -0,0 +1,74 @@
+From: Brahmajit Das <brahmajit.xyz@gmail.com>
+Date: Wed, 31 May 2023 06:27:08 +0000
+Subject: [PATCH] Fix build with clang 16
+
+Especially on musl libc.
+
+On musl libc with clang-16, the function pthread_kill can't be found, as its
+only available if the FTM is enabled. Hence defining _GNU_SOURCE makes thie
+function available.
+
+Other than that this patch also renames the variable lock, to fix the following
+error: ./Port-linux/dibbler-client.cpp:48:27: error: reference to 'lock' is
+ambiguous. I'm exactly not sure what the errors are, but I'm guessing it's
+related to CPP namespaces. Not sure either why its not reproducable under glibc
+llvm.
+
+Bug: https://bugs.gentoo.org/897944
+Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
+--- a/Port-linux/dibbler-client.cpp
++++ b/Port-linux/dibbler-client.cpp
+@@ -26,7 +26,7 @@ using namespace std;
+
+ #define IF_RECONNECTED_DETECTED -1
+
+-extern pthread_mutex_t lock;
++extern pthread_mutex_t plock;
+
+ TDHCPClient* ptr = 0;
+
+@@ -44,8 +44,8 @@ void signal_handler(int n) {
+ #ifdef MOD_CLNT_CONFIRM
+ void signal_handler_of_linkstate_change(int n) {
+ Log(Notice) << "Network switch off event detected. initiating CONFIRM." << LogEnd;
+- pthread_mutex_lock(&lock);
+- pthread_mutex_unlock(&lock);
++ pthread_mutex_lock(&plock);
++ pthread_mutex_unlock(&plock);
+ }
+ #endif
+
+--- a/Port-linux/lowlevel-linux-link-state.c
++++ b/Port-linux/lowlevel-linux-link-state.c
+@@ -10,6 +10,7 @@
+ #ifdef MOD_CLNT_CONFIRM
+
+ #define __USE_UNIX98
++#define _GNU_SOURCE
+
+ #include <stdio.h>
+ #include <signal.h>
+@@ -34,7 +35,7 @@ volatile int * notifier = 0;
+ int isDone = 0;
+ pthread_t parent_id;
+ pthread_t ntid;
+-pthread_mutex_t lock;
++pthread_mutex_t plock;
+
+ struct state {
+ int id;
+@@ -86,9 +87,9 @@ void link_state_changed(int ifindex)
+ {
+ if (changed_links->cnt<16)
+ changed_links->ifindex[changed_links->cnt++] = ifindex;
+- pthread_mutex_lock(&lock);
++ pthread_mutex_lock(&plock);
+ *notifier = 1; /* notify that change has occured */
+- pthread_mutex_unlock(&lock);
++ pthread_mutex_unlock(&plock);
+ pthread_kill(parent_id,SIGUSR1);
+ } else
+ {
+--
+2.40.1
+