1 |
commit: b775a0d6d3e67c8dda78ae006fb733944d83f80e |
2 |
Author: Jory Pratt <anarchy <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Mar 20 19:06:17 2019 +0000 |
4 |
Commit: Jory Pratt <anarchy <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 20 19:12:38 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b775a0d6 |
7 |
|
8 |
dev-libs/nspr: Add support for ipv6 on musl |
9 |
|
10 |
Signed-off-by: Jory Pratt <anarchy <AT> gentoo.org> |
11 |
|
12 |
.../nspr/files/nspr-4.21-ipv6-musl-support.patch | 53 ++++++++++++++++++++++ |
13 |
dev-libs/nspr/nspr-4.21.ebuild | 4 +- |
14 |
2 files changed, 56 insertions(+), 1 deletion(-) |
15 |
|
16 |
diff --git a/dev-libs/nspr/files/nspr-4.21-ipv6-musl-support.patch b/dev-libs/nspr/files/nspr-4.21-ipv6-musl-support.patch |
17 |
new file mode 100644 |
18 |
index 00000000000..2c8ebd4ccbb |
19 |
--- /dev/null |
20 |
+++ b/dev-libs/nspr/files/nspr-4.21-ipv6-musl-support.patch |
21 |
@@ -0,0 +1,53 @@ |
22 |
+From 8c57451f44d7ceb37bfb4ae6e457fc70b1f58d0a Mon Sep 17 00:00:00 2001 |
23 |
+From: Moritz Kick <gentoo@××××××××××××.de> |
24 |
+Date: Wed, 20 Mar 2019 13:36:06 -0500 |
25 |
+Subject: [PATCH] Added IPv6 compatibility for musl libc |
26 |
+ |
27 |
+Signed-off-by: Moritz Kick <gentoo@××××××××××××.de> |
28 |
+Signed-off-by: Jory Pratt <anarchy@g.o> |
29 |
+--- |
30 |
+ pr/include/md/_linux.h | 13 +------------ |
31 |
+ 1 file changed, 1 insertion(+), 12 deletions(-) |
32 |
+ |
33 |
+diff --git a/pr/include/md/_linux.h b/pr/include/md/_linux.h |
34 |
+index 2370ab8..612184c 100644 |
35 |
+--- a/pr/include/md/_linux.h |
36 |
++++ b/pr/include/md/_linux.h |
37 |
+@@ -289,33 +289,22 @@ static inline PRInt32 _MD_ATOMIC_SET(PRInt32 *ptr, PRInt32 nv) |
38 |
+ #endif /* __arm__ */ |
39 |
+ |
40 |
+ #define USE_SETJMP |
41 |
+-#if (defined(__GLIBC__) && __GLIBC__ >= 2) || defined(ANDROID) |
42 |
+ #define _PR_POLL_AVAILABLE |
43 |
+-#endif |
44 |
+ #undef _PR_USE_POLL |
45 |
+ #define _PR_STAT_HAS_ONLY_ST_ATIME |
46 |
+ #if defined(__alpha) || defined(__ia64__) |
47 |
+ #define _PR_HAVE_LARGE_OFF_T |
48 |
+-#elif (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) \ |
49 |
+- || defined(ANDROID) |
50 |
+-#define _PR_HAVE_OFF64_T |
51 |
+ #else |
52 |
+-#define _PR_NO_LARGE_FILES |
53 |
++#define _PR_HAVE_OFF64_T |
54 |
+ #endif |
55 |
+-#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) \ |
56 |
+- || defined(ANDROID) |
57 |
+ #define _PR_INET6 |
58 |
+ #define _PR_HAVE_INET_NTOP |
59 |
+ #define _PR_HAVE_GETHOSTBYNAME2 |
60 |
+ #define _PR_HAVE_GETADDRINFO |
61 |
+ #define _PR_INET6_PROBE |
62 |
+-#endif |
63 |
+ #ifndef ANDROID |
64 |
+ #define _PR_HAVE_SYSV_SEMAPHORES |
65 |
+ #define PR_HAVE_SYSV_NAMED_SHARED_MEMORY |
66 |
+-#endif |
67 |
+-/* Android has gethostbyname_r but not gethostbyaddr_r or gethostbyname2_r. */ |
68 |
+-#if (__GLIBC__ >= 2) && defined(_PR_PTHREADS) |
69 |
+ #define _PR_HAVE_GETHOST_R |
70 |
+ #define _PR_HAVE_GETHOST_R_INT |
71 |
+ #endif |
72 |
+-- |
73 |
+2.21.0 |
74 |
+ |
75 |
|
76 |
diff --git a/dev-libs/nspr/nspr-4.21.ebuild b/dev-libs/nspr/nspr-4.21.ebuild |
77 |
index 809295b31a1..dd4c8f167bb 100644 |
78 |
--- a/dev-libs/nspr/nspr-4.21.ebuild |
79 |
+++ b/dev-libs/nspr/nspr-4.21.ebuild |
80 |
@@ -14,7 +14,7 @@ SRC_URI="https://archive.mozilla.org/pub/nspr/releases/v${PV}/src/${P}.tar.gz" |
81 |
LICENSE="|| ( MPL-2.0 GPL-2 LGPL-2.1 )" |
82 |
SLOT="0" |
83 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" |
84 |
-IUSE="debug" |
85 |
+IUSE="debug elibc_musl" |
86 |
|
87 |
MULTILIB_CHOST_TOOLS=( |
88 |
/usr/bin/nspr-config |
89 |
@@ -35,6 +35,8 @@ src_prepare() { |
90 |
|
91 |
default |
92 |
|
93 |
+ use elibc_musl && eapply "${FILESDIR}"/${PN}-4.21-ipv6-musl-support.patch |
94 |
+ |
95 |
# rename configure.in to configure.ac for new autotools compatibility |
96 |
if [[ -e "${S}"/nspr/configure.in ]] ; then |
97 |
einfo "Renaming configure.in to configure.ac" |