summaryrefslogtreecommitdiff
path: root/dev-libs/libdnet
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2025-03-22 00:31:30 +0000
committerV3n3RiX <venerix@koprulu.sector>2025-03-22 00:31:30 +0000
commit6fe1dafaa446d9bc41dea28a43551fffa73f6b87 (patch)
treec6ef70a96add765cc1bfc88ac4d1ece5595cc9bf /dev-libs/libdnet
parentae832415103492f73a8351ed7a91cb596392d779 (diff)
gentoo auto-resync : 22:03:2025 - 00:31:29
Diffstat (limited to 'dev-libs/libdnet')
-rw-r--r--dev-libs/libdnet/Manifest2
-rw-r--r--dev-libs/libdnet/files/libdnet-1.18.0-fix-incompatible-function-pointer.patch110
-rw-r--r--dev-libs/libdnet/libdnet-1.18.0-r2.ebuild102
3 files changed, 214 insertions, 0 deletions
diff --git a/dev-libs/libdnet/Manifest b/dev-libs/libdnet/Manifest
index e4959137d5d8..4d40b0560e4d 100644
--- a/dev-libs/libdnet/Manifest
+++ b/dev-libs/libdnet/Manifest
@@ -1,3 +1,4 @@
+AUX libdnet-1.18.0-fix-incompatible-function-pointer.patch 4151 BLAKE2B 8da8a817ca8cacece72e42be69c9a3053bf58436700fd3664d0eb3ccd370c501272433700fdf23324dcd641a0b1d1c9929fe4b6eac5535660759790a600e8d86 SHA512 64c208929e843c53180b78c6aa645730e6b4f62a6a88863358585a3db00929bc32aca26d3610940decd3cb1720b78de2ab8dc7e19056aef8dc7530bba3c14cd7
DIST libdnet-1.16.2.tar.gz 675191 BLAKE2B 04e4533dbe45700decec4755c7db608d0ca68be05431bf44e6984b2c6a4aec55888fc0f0159916c8ac4a60ec5f743047d2a0a541786cd13fda61739bd7eef0fb SHA512 4b1902553a57eeb56952968e15be032de92d8106dc6e0ebf8e10470605c9c2ed69cb015f4057a5c119d01509c6795fc0dcda85a311d14124dddefdeb6223f848
DIST libdnet-1.16.4.tar.gz 684358 BLAKE2B 40be891c9004288329aaee0c79a29ebf0f095dfaaca4da98fd5ecfd759e22b8d10dc6b906200db1ac5b0a8cfbbea8fbe509da393e60cddeb5f875ad179cdc67a SHA512 6c5556e365047afcc5da3f76b1c99aa70723c076a7cf75c03d96a661a583dfa6d0ab605076e68efffe5ddca2d69875e4bc4938e0874b8aa24915fcfbfe3f3ff9
DIST libdnet-1.17.0.tar.gz 684645 BLAKE2B b208cb41201145411b1949531cb1ab27b4edc6026b8ca703c24231fdb021f46bfe922eb1da11090c271f439339f5384c93168fad3130ed2f89b3d2eca5c7f89f SHA512 b207b2f61e3759a2b17827eabf37b0eb68cb9fa27418f99ee4efd754b01dfe8504dff465664b14054d54df334195d43963d142c7104dc603b2b8b1491590d2a7
@@ -6,5 +7,6 @@ EBUILD libdnet-1.16.2.ebuild 1481 BLAKE2B 1ac09575eb9aeda48a21448da8f055680592a0
EBUILD libdnet-1.16.4.ebuild 1807 BLAKE2B de224a2d54cfb0bbab260ed33c0314ba36384b7136e90f4d0a0188e2612ec1a22bc4532ad408a0b3951d6f050640c2a220dcc5aa736af485befd29bf22ce3579 SHA512 414ca259de14c4015e9956a1939eb221281ce8219cc2679cc0e4649a0f10161e21578b4e95eeccd98934245a6a3fddd5763b5f80429d97aa032ff46cf914193c
EBUILD libdnet-1.17.0.ebuild 1819 BLAKE2B c15f3e9babb10b52d74fb119bf8589efffb8fc4a9173649c22b22bb4ad408b0b236ff289b2c0f063bf2662d1118a38750f11eacca3373841b63ee4543df68b55 SHA512 60dab0c6e3a41281a88e989bb1ff536039d3838104e8c5ed063bff984edbb3dba146c5a325cdf4e5e3e6c69ded4d6dcd9ac48c006781059973cfed4109bd6b6a
EBUILD libdnet-1.18.0-r1.ebuild 1868 BLAKE2B 4f8e7856ff1bac545d1edd2807449c4d68b94c3c6c357c20d42d8ad581e13b8d0735cc8530cb26b38c37e89242d0005c4a0940942cd8df4a57a0e2a58690a74c SHA512 907829dccc306024b2cb957b44709d652a43bf9e3354467e259e42d8b6f42d86a59dcaad03c4f20c830f5a645bf7989b96560e97ad8c2598cbafbaa39bbc88df
+EBUILD libdnet-1.18.0-r2.ebuild 1956 BLAKE2B af70c76bd7dd0978bef35f6b7ca2720ce147114e2876fddb9fb322c83ba1938c7ec1ba4ad05230935e28f83a66ddb39b5555d57b2bc251cc34a048d6d0980984 SHA512 f655c6f75bb5900e5296dd946f342552a894885424571c0060c37ae46bfdebc1c4b5bb3347eddc1e7ae1aaa5988fc78178a827af2fa169bac82095762126eb5b
EBUILD libdnet-1.18.0.ebuild 1813 BLAKE2B 567ae04e44cc5158d283f36da9e6ca8d81c9ddae712e9207d645fdbdebe8f758c73d1c5a5cd7417ab00a61d3283a4966e490026624a43af8996f1f6373c89ea4 SHA512 f5cb02392062a3c03e89887903c0539a30246ff9894b452f40d38b49c501b2ba03c27211f3472bc4cceabfe8d6312952153200cf93a34fe892af8bd1a009982d
MISC metadata.xml 413 BLAKE2B 91e8ea8dfe7585b6bcce394bc63e466cd7094b8b12ecb4f6b03303b37575387250f81c85a3be03cf8b36cbe10ef724794c86afec5decb5f042d0cde5db2bfdc6 SHA512 af7f752fa0811cb6e57b2398a86f5c57bbc0af1e3392ff3c26af27568ae3ed5232f765558f5e3b01cb6a6e3debfe2b0b893fc2c3598776d94eb6318744ca6fce
diff --git a/dev-libs/libdnet/files/libdnet-1.18.0-fix-incompatible-function-pointer.patch b/dev-libs/libdnet/files/libdnet-1.18.0-fix-incompatible-function-pointer.patch
new file mode 100644
index 000000000000..054bb9853ce9
--- /dev/null
+++ b/dev-libs/libdnet/files/libdnet-1.18.0-fix-incompatible-function-pointer.patch
@@ -0,0 +1,110 @@
+https://github.com/ofalk/libdnet/pull/104
+
+From de57a2349172148496386e284db91abe6406b02a Mon Sep 17 00:00:00 2001
+From: "Z. Liu" <zhixu.liu@gmail.com>
+Date: Wed, 19 Feb 2025 11:37:37 +0800
+Subject: [PATCH] python/dnet.pyx: fix incompatible-function-pointer-types for
+ modern compiler
+
+which is error now, see https://bugs.gentoo.org/933360,
+clang 19 (maybe earlier) has the same problem too
+
+Signed-off-by: Z. Liu <zhixu.liu@gmail.com>
+
+diff --git a/python/dnet.pyx b/python/dnet.pyx
+index 4e3604f..04db2c6 100644
+--- a/python/dnet.pyx
++++ b/python/dnet.pyx
+@@ -661,7 +661,7 @@ cdef extern from *:
+ addr_t arp_ha
+ ctypedef struct arp_t:
+ int __xxx
+- ctypedef int (*arp_handler)(arp_entry *entry, void *arg) except -1
++ ctypedef int (*arp_handler)(const arp_entry *entry, void *arg) except -1
+
+ arp_t *arp_open()
+ int arp_add(arp_t *arp, arp_entry *entry)
+@@ -687,7 +687,7 @@ ARP_OP_REPLY = 2 # /* response giving hardware address */
+ ARP_OP_REVREQUEST = 3 # /* request to resolve pa given ha */
+ ARP_OP_REVREPLY = 4 # /* response giving protocol address */
+
+-cdef int __arp_callback(arp_entry *entry, void *arg) except -1:
++cdef int __arp_callback(const arp_entry *entry, void *arg) except -1:
+ f, a = <object>arg
+ pa, ha = addr(), addr()
+ (<addr>pa)._addr = entry.arp_pa
+@@ -911,7 +911,7 @@ cdef extern from *:
+ addr_t intf_alias_addrs[8] # XXX
+ ctypedef struct intf_t:
+ int __xxx
+- ctypedef int (*intf_handler)(intf_entry *entry, void *arg) except -1
++ ctypedef int (*intf_handler)(const intf_entry *entry, void *arg) except -1
+
+ intf_t *intf_open()
+ int intf_get(intf_t *intf, intf_entry *entry)
+@@ -933,7 +933,7 @@ INTF_FLAG_NOARP = 0x08 # /* disable ARP */
+ INTF_FLAG_BROADCAST = 0x10 # /* supports broadcast (r/o) */
+ INTF_FLAG_MULTICAST = 0x20 # /* supports multicast (r/o) */
+
+-cdef object ifent_to_dict(intf_entry *entry):
++cdef object ifent_to_dict(const intf_entry *entry):
+ d = {}
+ d['name'] = entry.intf_name
+ d['type'] = entry.intf_type
+@@ -970,7 +970,7 @@ cdef dict_to_ifent(object d, intf_entry *entry):
+ for i from 0 <= i < entry.intf_alias_num:
+ entry.intf_alias_addrs[i] = (<addr>d['alias_addrs'][i])._addr
+
+-cdef int __intf_callback(intf_entry *entry, void *arg) except -1:
++cdef int __intf_callback(const intf_entry *entry, void *arg) except -1:
+ f, a = <object>arg
+ ret = f(ifent_to_dict(entry), a)
+ if not ret:
+@@ -1077,7 +1077,7 @@ cdef extern from *:
+ addr_t route_gw
+ ctypedef struct route_t:
+ int __xxx
+- ctypedef int (*route_handler)(route_entry *entry, void *arg) except -1
++ ctypedef int (*route_handler)(const route_entry *entry, void *arg) except -1
+
+ route_t *route_open()
+ int route_add(route_t *route, route_entry *entry)
+@@ -1086,7 +1086,7 @@ cdef extern from *:
+ int route_loop(route_t *route, route_handler callback, void *arg)
+ route_t *route_close(route_t *route)
+
+-cdef int __route_callback(route_entry *entry, void *arg) except -1:
++cdef int __route_callback(const route_entry *entry, void *arg) except -1:
+ f, a = <object>arg
+ dst, gw = addr(), addr()
+ (<addr>dst)._addr = entry.route_dst
+@@ -1183,7 +1183,7 @@ cdef extern from *:
+
+ ctypedef struct fw_t:
+ int __xxx
+- ctypedef int (*fw_handler)(fw_rule *rule, void *arg) except -1
++ ctypedef int (*fw_handler)(const fw_rule *rule, void *arg) except -1
+
+ fw_t *fw_open()
+ int fw_add(fw_t *f, fw_rule *rule)
+@@ -1197,7 +1197,7 @@ FW_OP_BLOCK = 2
+ FW_DIR_IN = 1
+ FW_DIR_OUT = 2
+
+-cdef object rule_to_dict(fw_rule *rule):
++cdef object rule_to_dict(const fw_rule *rule):
+ d = {}
+ d['device'] = rule.fw_device
+ d['op'] = rule.fw_op
+@@ -1235,7 +1235,7 @@ cdef dict_to_rule(object d, fw_rule *rule):
+ rule.fw_dport[0] = d['dport'][0]
+ rule.fw_dport[1] = d['dport'][1]
+
+-cdef int __fw_callback(fw_rule *rule, void *arg) except -1:
++cdef int __fw_callback(const fw_rule *rule, void *arg) except -1:
+ f, a = <object>arg
+ ret = f(rule_to_dict(rule), a)
+ if not ret:
+--
+2.45.2
+
diff --git a/dev-libs/libdnet/libdnet-1.18.0-r2.ebuild b/dev-libs/libdnet/libdnet-1.18.0-r2.ebuild
new file mode 100644
index 000000000000..d85041804c8a
--- /dev/null
+++ b/dev-libs/libdnet/libdnet-1.18.0-r2.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+DISTUTILS_EXT=1
+DISTUTILS_OPTIONAL=1
+DISTUTILS_USE_PEP517=setuptools
+
+inherit autotools distutils-r1
+
+DESCRIPTION="Simplified, portable interface to several low-level networking routines"
+HOMEPAGE="https://github.com/ofalk/libdnet"
+SRC_URI="https://github.com/ofalk/${PN}/archive/${P}.tar.gz"
+S="${WORKDIR}/${PN}-${P}"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+IUSE="python test"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+DEPEND="
+ dev-libs/libbsd
+ python? ( ${PYTHON_DEPS} )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+ python? (
+ ${DISTUTILS_DEPS}
+ dev-python/cython[${PYTHON_USEDEP}]
+ )
+ test? ( dev-libs/check )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.18.0-fix-incompatible-function-pointer.patch"
+)
+
+DOCS=( README.md THANKS )
+
+src_prepare() {
+ default
+
+ sed -i \
+ -e 's/libcheck.a/libcheck.so/g' \
+ configure.ac || die
+ sed -i \
+ -e "s/lib\/libcheck/$(get_libdir)\/libcheck/g" \
+ configure.ac || die
+ sed -i \
+ -e 's|-L$libdir ||g' \
+ dnet-config.in || die
+ sed -i \
+ -e '/^SUBDIRS/s|python||g' \
+ Makefile.am || die
+
+ # Stale e.g. pkg-config macros w/ bashisms
+ rm aclocal.m4 {config,m4}/libtool.m4 || die
+
+ AT_M4DIR="config" eautoreconf
+
+ if use python; then
+ cd python || die
+ distutils-r1_src_prepare
+ fi
+}
+
+src_configure() {
+ econf \
+ $(use_with python) \
+ $(use_enable test check)
+}
+
+src_compile() {
+ default
+
+ if use python; then
+ cd python || die
+ distutils-r1_src_compile
+ fi
+}
+
+src_test() {
+ # https://bugs.gentoo.org/778797#c4
+ # check_ip needs privileges and check_fw can't work on Linux
+ emake check XFAIL_TESTS="check_fw check_ip"
+}
+
+src_install() {
+ default
+
+ if use python; then
+ cd python || die
+ unset DOCS
+ distutils-r1_src_install
+ fi
+
+ find "${ED}" -name '*.la' -delete || die
+}