Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libdnet/
Date: Mon, 16 May 2022 19:57:08
Message-Id: 1652730997.de397177f198704042dbfe0499ad1b8813e553f8.sam@gentoo
1 commit: de397177f198704042dbfe0499ad1b8813e553f8
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Mon May 16 06:03:50 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Mon May 16 19:56:37 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de397177
7
8 dev-libs/libdnet: add 1.16.1
9
10 Closes: https://bugs.gentoo.org/612400
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 dev-libs/libdnet/Manifest | 1 +
14 dev-libs/libdnet/libdnet-1.16.1.ebuild | 79 ++++++++++++++++++++++++++++++++++
15 2 files changed, 80 insertions(+)
16
17 diff --git a/dev-libs/libdnet/Manifest b/dev-libs/libdnet/Manifest
18 index dad5f443f912..50391c5530cf 100644
19 --- a/dev-libs/libdnet/Manifest
20 +++ b/dev-libs/libdnet/Manifest
21 @@ -1 +1,2 @@
22 DIST libdnet-1.14.tar.gz 520833 BLAKE2B 97e241fc374fc9489e70d440db5e19199f4e653650af85e24af56bbbc0167db1c451349c43fcb630a26c61f8ca15c58f5c879e0d82654e275189ca3e140bb22a SHA512 ce8d95228f5175e4d9a8ff71bb99eb1ccc3ccd599a85dd07adbfd9842fc54066235d362c8060828fb3ba8129d0e1e8e071e93d60d69c6d03be310c80e61cea93
23 +DIST libdnet-1.16.1.tar.gz 666619 BLAKE2B 74472af1bc97c4771909e926eb9b27193c50d665036672fc89ff21159408daeef090e682c5e76e19f31d04e802fb73edf01d1aa057b543568f534d31f8db375b SHA512 9c6899b42502f3892463f1ec694934cc3b02831222fa15b5a899868229366ed4e9cc728ea2c70ec857ee9d676d763b1e390f6878a597a33f7d1cd5a7bd870586
24
25 diff --git a/dev-libs/libdnet/libdnet-1.16.1.ebuild b/dev-libs/libdnet/libdnet-1.16.1.ebuild
26 new file mode 100644
27 index 000000000000..112351021f1d
28 --- /dev/null
29 +++ b/dev-libs/libdnet/libdnet-1.16.1.ebuild
30 @@ -0,0 +1,79 @@
31 +# Copyright 1999-2022 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=8
35 +
36 +PYTHON_COMPAT=( python3_{8..10} )
37 +DISTUTILS_OPTIONAL=1
38 +inherit autotools distutils-r1
39 +
40 +DESCRIPTION="Simplified, portable interface to several low-level networking routines"
41 +HOMEPAGE="https://github.com/ofalk/libdnet"
42 +SRC_URI="https://github.com/ofalk/${PN}/archive/${P}.tar.gz"
43 +S="${WORKDIR}/${PN}-${P}"
44 +
45 +LICENSE="LGPL-2"
46 +SLOT="0"
47 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
48 +IUSE="python test"
49 +RESTRICT="!test? ( test )"
50 +
51 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
52 +
53 +DEPEND="dev-libs/libbsd
54 + python? ( ${PYTHON_DEPS} )"
55 +RDEPEND="${DEPEND}"
56 +BDEPEND="python? ( dev-python/cython[${PYTHON_USEDEP}] )
57 + test? ( dev-libs/check )"
58 +
59 +DOCS=( README.md THANKS )
60 +
61 +src_prepare() {
62 + default
63 +
64 + sed -i \
65 + -e 's/libcheck.a/libcheck.so/g' \
66 + configure.ac || die
67 + sed -i \
68 + -e 's|-L$libdir ||g' \
69 + dnet-config.in || die
70 + sed -i \
71 + -e '/^SUBDIRS/s|python||g' \
72 + Makefile.am || die
73 +
74 + # Stale e.g. pkg-config macros w/ bashisms
75 + rm aclocal.m4 {config,m4}/libtool.m4 || die
76 +
77 + AT_M4DIR="config" eautoreconf
78 +
79 + if use python; then
80 + cd python || die
81 + distutils-r1_src_prepare
82 + fi
83 +}
84 +
85 +src_configure() {
86 + econf \
87 + $(use_with python) \
88 + --with-check=$(usex test "${ESYSROOT}/usr")
89 +}
90 +
91 +src_compile() {
92 + default
93 + if use python; then
94 + cd python || die
95 + distutils-r1_src_compile
96 + fi
97 +}
98 +
99 +src_install() {
100 + default
101 +
102 + if use python; then
103 + cd python || die
104 + unset DOCS
105 + distutils-r1_src_install
106 + fi
107 +
108 + find "${ED}" -name '*.la' -delete || die
109 +}