Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/musl:master commit in: dev-libs/libnl/
Date: Wed, 10 Feb 2021 20:09:27
Message-Id: 1612987737.fbc13ee1afe4af33bcaede7361f9efc6bd35f793.sam@gentoo
1 commit: fbc13ee1afe4af33bcaede7361f9efc6bd35f793
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 10 20:08:57 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 10 20:08:57 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=fbc13ee1
7
8 dev-libs/libnl: bump to 3.5.0
9
10 We may be able to drop this from ::musl.
11
12 Package-Manager: Portage-3.0.14, Repoman-3.0.2
13 Signed-off-by: Sam James <sam <AT> gentoo.org>
14
15 dev-libs/libnl/Manifest | 1 +
16 dev-libs/libnl/libnl-3.5.0.ebuild | 98 +++++++++++++++++++++++++++++++++++++++
17 2 files changed, 99 insertions(+)
18
19 diff --git a/dev-libs/libnl/Manifest b/dev-libs/libnl/Manifest
20 index 47e0bcd..677386b 100644
21 --- a/dev-libs/libnl/Manifest
22 +++ b/dev-libs/libnl/Manifest
23 @@ -1 +1,2 @@
24 DIST libnl-3.4.0.tar.gz 933443 BLAKE2B 735da9f800277c48a5deceb78084f510f56f7017b1184e91b2bb45ba61a2e95355e7a3f5d0a74bdaf7ae003393a6c7556d5b201d0d0052dfc66042aa9e137986 SHA512 6336e5c55c79ff2638de9c812cc1842871769236bad7f65c547dec35fafd91988b257fceab144a0cc133c4b29f61172f6552c53aa9fc723bdc783079c2b1851e
25 +DIST libnl-3.5.0.tar.gz 967835 BLAKE2B cf21c1ffa89799b91bf4bddb8833d5af5c62eb1c53a078ee55a2888bd8439e1ae6db8886c9c4f937297962faac6873b4cf5211ee3d1e5354d96b5dc545a6fc2d SHA512 9c94c09bac34297493b3ea482713d7c0865d2839b5042e5c7d1ed008e2402ab63df35a18e272f40b2cce27d0c31dc733fe7e4b2d376e7ca847a2b0d5e90de50c
26
27 diff --git a/dev-libs/libnl/libnl-3.5.0.ebuild b/dev-libs/libnl/libnl-3.5.0.ebuild
28 new file mode 100644
29 index 0000000..07f21ae
30 --- /dev/null
31 +++ b/dev-libs/libnl/libnl-3.5.0.ebuild
32 @@ -0,0 +1,98 @@
33 +# Copyright 1999-2021 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +PYTHON_COMPAT=( python3_{7,8,9} )
39 +DISTUTILS_OPTIONAL=1
40 +inherit distutils-r1 libtool multilib-minimal
41 +
42 +LIBNL_P=${P/_/-}
43 +LIBNL_DIR=${PV/_/}
44 +LIBNL_DIR=${LIBNL_DIR//./_}
45 +
46 +DESCRIPTION="Libraries providing APIs to netlink protocol based Linux kernel interfaces"
47 +HOMEPAGE="http://www.infradead.org/~tgr/libnl/ https://github.com/thom311/libnl"
48 +SRC_URI="https://github.com/thom311/${PN}/releases/download/${PN}${LIBNL_DIR}/${P/_rc/-rc}.tar.gz"
49 +S="${WORKDIR}/${LIBNL_P}"
50 +
51 +LICENSE="LGPL-2.1 utils? ( GPL-2 )"
52 +SLOT="3"
53 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
54 +IUSE="+debug static-libs python +threads utils"
55 +
56 +RDEPEND="python? ( ${PYTHON_DEPS} )"
57 +DEPEND="${RDEPEND}"
58 +BDEPEND="
59 + ${RDEPEND}
60 + python? ( dev-lang/swig )
61 + sys-devel/bison
62 + sys-devel/flex
63 +"
64 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
65 +
66 +DOCS=( ChangeLog )
67 +
68 +MULTILIB_WRAPPED_HEADERS=(
69 + # we do not install CLI stuff for non-native
70 + /usr/include/libnl3/netlink/cli/addr.h
71 + /usr/include/libnl3/netlink/cli/class.h
72 + /usr/include/libnl3/netlink/cli/cls.h
73 + /usr/include/libnl3/netlink/cli/ct.h
74 + /usr/include/libnl3/netlink/cli/exp.h
75 + /usr/include/libnl3/netlink/cli/link.h
76 + /usr/include/libnl3/netlink/cli/neigh.h
77 + /usr/include/libnl3/netlink/cli/qdisc.h
78 + /usr/include/libnl3/netlink/cli/route.h
79 + /usr/include/libnl3/netlink/cli/rule.h
80 + /usr/include/libnl3/netlink/cli/tc.h
81 + /usr/include/libnl3/netlink/cli/utils.h
82 +)
83 +
84 +src_prepare() {
85 + default
86 +
87 + elibtoolize
88 +
89 + if use python; then
90 + cd "${S}"/python || die
91 + distutils-r1_src_prepare
92 + fi
93 +
94 + # out-of-source build broken
95 + # https://github.com/thom311/libnl/pull/58
96 + multilib_copy_sources
97 +}
98 +
99 +multilib_src_configure() {
100 + econf \
101 + $(multilib_native_use_enable utils cli) \
102 + $(use_enable debug) \
103 + $(use_enable static-libs static) \
104 + $(use_enable threads)
105 +}
106 +
107 +multilib_src_compile() {
108 + default
109 +
110 + if multilib_is_native_abi && use python; then
111 + cd python || die
112 + distutils-r1_src_compile
113 + fi
114 +}
115 +
116 +multilib_src_install() {
117 + emake DESTDIR="${D}" install
118 +
119 + if multilib_is_native_abi && use python; then
120 + # Unset DOCS= since distutils-r1.eclass interferes
121 + local DOCS=()
122 + cd python || die
123 + distutils-r1_src_install
124 + fi
125 +}
126 +
127 +multilib_src_install_all() {
128 + einstalldocs
129 + find "${ED}" -name '*.la' -delete || die
130 +}