1 |
commit: 48d2a28710ae40877fd3e178ead1fb1bb0baa62c |
2 |
Author: Aric Belsito <lluixhi <AT> gmail <DOT> com> |
3 |
AuthorDate: Thu Mar 9 04:15:13 2017 +0000 |
4 |
Commit: Aric Belsito <lluixhi <AT> gmail <DOT> com> |
5 |
CommitDate: Thu Mar 9 04:15:13 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=48d2a287 |
7 |
|
8 |
dev-libs/libnl: add 3.3.0_rc1 |
9 |
|
10 |
Use a modified version of the linux-headers-4.4 patch on their |
11 |
internally-shipped linux-headers, because otherwise we get fun symbol |
12 |
redefinition errors depending on what musl/linux-headers version we're using. |
13 |
|
14 |
Close #32 |
15 |
|
16 |
dev-libs/libnl/Manifest | 4 + |
17 |
dev-libs/libnl/files/libnl-3.3.0_rc1-musl.patch | 103 ++++++++++++++++++++++ |
18 |
dev-libs/libnl/libnl-3.3.0_rc1.ebuild | 108 ++++++++++++++++++++++++ |
19 |
dev-libs/libnl/metadata.xml | 15 ++++ |
20 |
4 files changed, 230 insertions(+) |
21 |
|
22 |
diff --git a/dev-libs/libnl/Manifest b/dev-libs/libnl/Manifest |
23 |
new file mode 100644 |
24 |
index 0000000..895e9b6 |
25 |
--- /dev/null |
26 |
+++ b/dev-libs/libnl/Manifest |
27 |
@@ -0,0 +1,4 @@ |
28 |
+AUX libnl-3.3.0_rc1-musl.patch 3539 SHA256 8e0a4d1da3ddc8cfbe81b5d9440458b6bbebce101aeaaff4085c2ba857d208de SHA512 a31ec4b76d2fc472072f2d770cb3f5819a6477230a97603a476ce175c0c94d25e74eff8dc0ce2e6baa96f0e450b82db508a152f418bdd72919cbd5521d5f82fd WHIRLPOOL 6678b618dea03c1dc51c506e3f81ec770c5ab1ee1fd3931e7b52fa2e217a6cdccdf465f4ee979ecba2c4dee55e132057e55e065eaabd1c576b219d8bc0ef8305 |
29 |
+DIST libnl-3.3.0-rc1.tar.gz 933271 SHA256 426f69373191760174cb40cb1f9a811248a56f8962fe66cf22156a71685fd110 SHA512 8084a54efac0256f6badd438fb79512cc53ee5f6635c4f301d1f7b3cfdf326387176949ac368903109dda02f55589ed09cb8f3218ebac973457c6f2740951488 WHIRLPOOL b8db1d4f589d32f0da830dc934765c67087665ac58366265fc2f5d649178c161cfc41e2faf139859c9547c5b20f28bfff5875db9c51cbfe93df3ecc01c3d7f3e |
30 |
+EBUILD libnl-3.3.0_rc1.ebuild 2519 SHA256 be1f7386c1add9df900a97726b94a27d2b646fdca9fb3f3615a9e1055304d92f SHA512 7a53ceea365a4e4fc4ee5c079be1fe7afda32b091a6f4f6949ff5c5be6a84902a5e8d07a37b2b761591698c002cb851a0f5b0fe76b2f9e0b36c09294ef93dbb5 WHIRLPOOL 4bbecddb5f6514edce41334c43bcd543acb6fd382561396fd80931a7ca981579eac3069fbd6674128be15b81cb06dc826e9459bcc641b8397bdb026d81ccbae0 |
31 |
+MISC metadata.xml 584 SHA256 b4a1c62be473810a9e60ab6c043c14ea56dd7ffbdfc47639a30e84b4c31119e9 SHA512 0e8731a9aafb77b313583babfb2786c4fcbe655f3fcebe93fee90b2ea4c7f03a6ed559a253cb63f5f3a5eb9fd841babcbb5c85c4c93e51a670abe605e9d22a9c WHIRLPOOL 841629b52e45cd949bde7aae4ce9a62d274f69a124ba90cc33d75191a0b7cf11f7b0fa6c8af996af476e4164562cdc6d92d33ea93c9d1405da64844dace77ec1 |
32 |
|
33 |
diff --git a/dev-libs/libnl/files/libnl-3.3.0_rc1-musl.patch b/dev-libs/libnl/files/libnl-3.3.0_rc1-musl.patch |
34 |
new file mode 100644 |
35 |
index 0000000..e62653a |
36 |
--- /dev/null |
37 |
+++ b/dev-libs/libnl/files/libnl-3.3.0_rc1-musl.patch |
38 |
@@ -0,0 +1,103 @@ |
39 |
+diff -Naur libnl-3.3.0_rc1.orig/include/linux-private/linux/if_ether.h libnl-3.3.0_rc1/include/linux-private/linux/if_ether.h |
40 |
+--- libnl-3.3.0_rc1.orig/include/linux-private/linux/if_ether.h 2017-03-08 19:56:31.824516933 -0800 |
41 |
++++ libnl-3.3.0_rc1/include/linux-private/linux/if_ether.h 2017-03-08 20:07:01.938237767 -0800 |
42 |
+@@ -22,6 +22,7 @@ |
43 |
+ #define _LINUX_IF_ETHER_H |
44 |
+ |
45 |
+ #include <linux/types.h> |
46 |
++#include <linux/libc-compat.h> |
47 |
+ |
48 |
+ /* |
49 |
+ * IEEE 802.3 Ethernet magic constants. The frame sizes omit the preamble |
50 |
+@@ -117,10 +118,12 @@ |
51 |
+ * This is an Ethernet frame header. |
52 |
+ */ |
53 |
+ |
54 |
++#if __UAPI_DEF_ETHHDR |
55 |
+ struct ethhdr { |
56 |
+ unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ |
57 |
+ unsigned char h_source[ETH_ALEN]; /* source ether addr */ |
58 |
+ __be16 h_proto; /* packet type ID field */ |
59 |
+ } __attribute__((packed)); |
60 |
++#endif |
61 |
+ |
62 |
+ #endif /* _LINUX_IF_ETHER_H */ |
63 |
+diff -Naur libnl-3.3.0_rc1.orig/include/linux-private/linux/libc-compat.h libnl-3.3.0_rc1/include/linux-private/linux/libc-compat.h |
64 |
+--- libnl-3.3.0_rc1.orig/include/linux-private/linux/libc-compat.h 2017-03-08 19:56:31.823516923 -0800 |
65 |
++++ libnl-3.3.0_rc1/include/linux-private/linux/libc-compat.h 2017-03-08 20:12:30.376843489 -0800 |
66 |
+@@ -48,10 +48,18 @@ |
67 |
+ #ifndef _LIBC_COMPAT_H |
68 |
+ #define _LIBC_COMPAT_H |
69 |
+ |
70 |
+-/* We have included glibc headers... */ |
71 |
+-#if defined(__GLIBC__) |
72 |
++/* We're used from userspace... */ |
73 |
++#if !defined(__KERNEL__) |
74 |
+ |
75 |
+-/* Coordinate with glibc netinet/in.h header. */ |
76 |
++/* Coordinate with libc netinet/if_ether.h */ |
77 |
++#ifdef _NETINET_IF_ETHER_H /* musl */ |
78 |
++#define __UAPI_DEF_ETHHDR 0 |
79 |
++#else |
80 |
++/* glibc uses __NETINET_IF_ETHER_H, and uses the uapi header. */ |
81 |
++#define __UAPI_DEF_ETHHDR 1 |
82 |
++#endif |
83 |
++ |
84 |
++/* Coordinate with libc netinet/in.h header. */ |
85 |
+ #if defined(_NETINET_IN_H) |
86 |
+ |
87 |
+ /* GLIBC headers included first so don't define anything |
88 |
+@@ -64,15 +72,7 @@ |
89 |
+ #define __UAPI_DEF_IN_CLASS 0 |
90 |
+ |
91 |
+ #define __UAPI_DEF_IN6_ADDR 0 |
92 |
+-/* The exception is the in6_addr macros which must be defined |
93 |
+- * if the glibc code didn't define them. This guard matches |
94 |
+- * the guard in glibc/inet/netinet/in.h which defines the |
95 |
+- * additional in6_addr macros e.g. s6_addr16, and s6_addr32. */ |
96 |
+-#if defined(__USE_MISC) || defined (__USE_GNU) |
97 |
+ #define __UAPI_DEF_IN6_ADDR_ALT 0 |
98 |
+-#else |
99 |
+-#define __UAPI_DEF_IN6_ADDR_ALT 1 |
100 |
+-#endif |
101 |
+ #define __UAPI_DEF_SOCKADDR_IN6 0 |
102 |
+ #define __UAPI_DEF_IPV6_MREQ 0 |
103 |
+ #define __UAPI_DEF_IPPROTO_V6 0 |
104 |
+@@ -83,7 +83,7 @@ |
105 |
+ #else |
106 |
+ |
107 |
+ /* Linux headers included first, and we must define everything |
108 |
+- * we need. The expectation is that glibc will check the |
109 |
++ * we need. The expectation is that libc will check the |
110 |
+ * __UAPI_DEF_* defines and adjust appropriately. */ |
111 |
+ #define __UAPI_DEF_IN_ADDR 1 |
112 |
+ #define __UAPI_DEF_IN_IPPROTO 1 |
113 |
+@@ -93,7 +93,7 @@ |
114 |
+ #define __UAPI_DEF_IN_CLASS 1 |
115 |
+ |
116 |
+ #define __UAPI_DEF_IN6_ADDR 1 |
117 |
+-/* We unconditionally define the in6_addr macros and glibc must |
118 |
++/* We unconditionally define the in6_addr macros and libc must |
119 |
+ * coordinate. */ |
120 |
+ #define __UAPI_DEF_IN6_ADDR_ALT 1 |
121 |
+ #define __UAPI_DEF_SOCKADDR_IN6 1 |
122 |
+@@ -115,7 +115,10 @@ |
123 |
+ /* If we did not see any headers from any supported C libraries, |
124 |
+ * or we are being included in the kernel, then define everything |
125 |
+ * that we need. */ |
126 |
+-#else /* !defined(__GLIBC__) */ |
127 |
++#else /* defined(__KERNEL__) */ |
128 |
++ |
129 |
++/* Definitions for if/ether.h */ |
130 |
++#define __UAPI_DEF_ETHHDR 1 |
131 |
+ |
132 |
+ /* Definitions for in.h */ |
133 |
+ #define __UAPI_DEF_IN_ADDR 1 |
134 |
+@@ -138,6 +141,6 @@ |
135 |
+ /* Definitions for xattr.h */ |
136 |
+ #define __UAPI_DEF_XATTR 1 |
137 |
+ |
138 |
+-#endif /* __GLIBC__ */ |
139 |
++#endif /* defined(__KERNEL__) */ |
140 |
+ |
141 |
+ #endif /* _LIBC_COMPAT_H */ |
142 |
|
143 |
diff --git a/dev-libs/libnl/libnl-3.3.0_rc1.ebuild b/dev-libs/libnl/libnl-3.3.0_rc1.ebuild |
144 |
new file mode 100644 |
145 |
index 0000000..9667b46 |
146 |
--- /dev/null |
147 |
+++ b/dev-libs/libnl/libnl-3.3.0_rc1.ebuild |
148 |
@@ -0,0 +1,108 @@ |
149 |
+# Copyright 1999-2017 Gentoo Foundation |
150 |
+# Distributed under the terms of the GNU General Public License v2 |
151 |
+ |
152 |
+EAPI=6 |
153 |
+PYTHON_COMPAT=( python2_7 python3_{4,5} ) |
154 |
+DISTUTILS_OPTIONAL=1 |
155 |
+inherit distutils-r1 eutils libtool multilib multilib-minimal |
156 |
+ |
157 |
+LIBNL_P=${P/_/-} |
158 |
+LIBNL_DIR=${PV/_/} |
159 |
+LIBNL_DIR=${LIBNL_DIR//./_} |
160 |
+ |
161 |
+DESCRIPTION="Libraries providing APIs to netlink protocol based Linux kernel interfaces" |
162 |
+HOMEPAGE="http://www.infradead.org/~tgr/libnl/ https://github.com/thom311/libnl" |
163 |
+SRC_URI=" |
164 |
+ https://github.com/thom311/${PN}/releases/download/${PN}${LIBNL_DIR}/${P/_rc/-rc}.tar.gz |
165 |
+" |
166 |
+LICENSE="LGPL-2.1 utils? ( GPL-2 )" |
167 |
+SLOT="3" |
168 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux" |
169 |
+IUSE="static-libs python utils" |
170 |
+ |
171 |
+RDEPEND=" |
172 |
+ python? ( ${PYTHON_DEPS} ) |
173 |
+ abi_x86_32? ( |
174 |
+ !<=app-emulation/emul-linux-x86-baselibs-20140508-r5 |
175 |
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] |
176 |
+ ) |
177 |
+" |
178 |
+DEPEND=" |
179 |
+ ${RDEPEND} |
180 |
+ python? ( dev-lang/swig ) |
181 |
+ sys-devel/bison |
182 |
+ sys-devel/flex |
183 |
+" |
184 |
+REQUIRED_USE=" |
185 |
+ python? ( ${PYTHON_REQUIRED_USE} ) |
186 |
+" |
187 |
+DOCS=( |
188 |
+ ChangeLog |
189 |
+) |
190 |
+ |
191 |
+PATCHES=( "${FILESDIR}"/${P}-musl.patch ) |
192 |
+ |
193 |
+S=${WORKDIR}/${LIBNL_P} |
194 |
+ |
195 |
+MULTILIB_WRAPPED_HEADERS=( |
196 |
+ # we do not install CLI stuff for non-native |
197 |
+ /usr/include/libnl3/netlink/cli/addr.h |
198 |
+ /usr/include/libnl3/netlink/cli/class.h |
199 |
+ /usr/include/libnl3/netlink/cli/cls.h |
200 |
+ /usr/include/libnl3/netlink/cli/ct.h |
201 |
+ /usr/include/libnl3/netlink/cli/exp.h |
202 |
+ /usr/include/libnl3/netlink/cli/link.h |
203 |
+ /usr/include/libnl3/netlink/cli/neigh.h |
204 |
+ /usr/include/libnl3/netlink/cli/qdisc.h |
205 |
+ /usr/include/libnl3/netlink/cli/route.h |
206 |
+ /usr/include/libnl3/netlink/cli/rule.h |
207 |
+ /usr/include/libnl3/netlink/cli/tc.h |
208 |
+ /usr/include/libnl3/netlink/cli/utils.h |
209 |
+) |
210 |
+ |
211 |
+src_prepare() { |
212 |
+ default |
213 |
+ |
214 |
+ elibtoolize |
215 |
+ |
216 |
+ if use python; then |
217 |
+ cd "${S}"/python || die |
218 |
+ distutils-r1_src_prepare |
219 |
+ fi |
220 |
+ |
221 |
+ # out-of-source build broken |
222 |
+ # https://github.com/thom311/libnl/pull/58 |
223 |
+ multilib_copy_sources |
224 |
+} |
225 |
+ |
226 |
+multilib_src_configure() { |
227 |
+ econf \ |
228 |
+ --disable-silent-rules \ |
229 |
+ $(use_enable static-libs static) \ |
230 |
+ $(multilib_native_use_enable utils cli) |
231 |
+} |
232 |
+ |
233 |
+multilib_src_compile() { |
234 |
+ default |
235 |
+ |
236 |
+ if multilib_is_native_abi && use python; then |
237 |
+ cd python || die |
238 |
+ distutils-r1_src_compile |
239 |
+ fi |
240 |
+} |
241 |
+ |
242 |
+multilib_src_install() { |
243 |
+ emake DESTDIR="${D}" install |
244 |
+ |
245 |
+ if multilib_is_native_abi && use python; then |
246 |
+ # Unset DOCS= since distutils-r1.eclass interferes |
247 |
+ local DOCS=() |
248 |
+ cd python || die |
249 |
+ distutils-r1_src_install |
250 |
+ fi |
251 |
+} |
252 |
+ |
253 |
+multilib_src_install_all() { |
254 |
+ einstalldocs |
255 |
+ prune_libtool_files --modules |
256 |
+} |
257 |
|
258 |
diff --git a/dev-libs/libnl/metadata.xml b/dev-libs/libnl/metadata.xml |
259 |
new file mode 100644 |
260 |
index 0000000..ec36f8d |
261 |
--- /dev/null |
262 |
+++ b/dev-libs/libnl/metadata.xml |
263 |
@@ -0,0 +1,15 @@ |
264 |
+<?xml version="1.0" encoding="UTF-8"?> |
265 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
266 |
+<pkgmetadata> |
267 |
+ <maintainer type="project"> |
268 |
+ <email>netmon@g.o</email> |
269 |
+ <name>Gentoo network monitoring and analysis project</name> |
270 |
+ </maintainer> |
271 |
+ <use> |
272 |
+ <flag name="python">Install experimental <pkg>dev-lang/python</pkg> bindings</flag> |
273 |
+ <flag name="utils">Install command line interface utils</flag> |
274 |
+ </use> |
275 |
+ <upstream> |
276 |
+ <remote-id type="github">thom311/libnl</remote-id> |
277 |
+ </upstream> |
278 |
+</pkgmetadata> |