Gentoo Archives: gentoo-commits

From: Jory Pratt <anarchy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/mozilla:master commit in: dev-libs/nspr/, dev-libs/nspr/files/
Date: Tue, 05 Jun 2018 13:22:33
Message-Id: 1528204906.1ce2f1f8712573d6d594c0cb75e4cbf7ad9cd359.anarchy@gentoo
1 commit: 1ce2f1f8712573d6d594c0cb75e4cbf7ad9cd359
2 Author: Jory A. Pratt <anarchy <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jun 5 13:21:46 2018 +0000
4 Commit: Jory Pratt <anarchy <AT> gentoo <DOT> org>
5 CommitDate: Tue Jun 5 13:21:46 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/mozilla.git/commit/?id=1ce2f1f8
7
8 dev-libs/nspr: add support for ipv6 on musl, thanks Moritz Kick
9 <gentoo <AT> blackphoenix.de>
10
11 dev-libs/nspr/files/nspr-4.19-musl-ipv6.patch | 52 +++++++++++++++++++++++++++
12 dev-libs/nspr/nspr-4.19.ebuild | 2 ++
13 2 files changed, 54 insertions(+)
14
15 diff --git a/dev-libs/nspr/files/nspr-4.19-musl-ipv6.patch b/dev-libs/nspr/files/nspr-4.19-musl-ipv6.patch
16 new file mode 100644
17 index 0000000..912b28c
18 --- /dev/null
19 +++ b/dev-libs/nspr/files/nspr-4.19-musl-ipv6.patch
20 @@ -0,0 +1,52 @@
21 +>From 15d0c4e59e8342d23c070c20097ac8c9b8e15e6c Mon Sep 17 00:00:00 2001
22 +From: Moritz Kick <gentoo@××××××××××××.de>
23 +Date: Fri, 1 Jun 2018 00:04:30 +0200
24 +Subject: [PATCH] Added IPv6 compatibility for musl libc
25 +
26 +Signed-off-by: Moritz Kick <gentoo@××××××××××××.de>
27 +---
28 + pr/include/md/_linux.h | 13 +------------
29 + 1 file changed, 1 insertion(+), 12 deletions(-)
30 +
31 +diff --git a/pr/include/md/_linux.h b/pr/include/md/_linux.h
32 +index b4b298b..e2ef68e 100644
33 +--- a/pr/include/md/_linux.h
34 ++++ b/pr/include/md/_linux.h
35 +@@ -285,33 +285,22 @@ static inline PRInt32 _MD_ATOMIC_SET(PRInt32 *ptr, PRInt32 nv)
36 + #endif /* __arm__ */
37 +
38 + #define USE_SETJMP
39 +-#if (defined(__GLIBC__) && __GLIBC__ >= 2) || defined(ANDROID)
40 + #define _PR_POLL_AVAILABLE
41 +-#endif
42 + #undef _PR_USE_POLL
43 + #define _PR_STAT_HAS_ONLY_ST_ATIME
44 + #if defined(__alpha) || defined(__ia64__)
45 + #define _PR_HAVE_LARGE_OFF_T
46 +-#elif (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) \
47 +- || defined(ANDROID)
48 +-#define _PR_HAVE_OFF64_T
49 + #else
50 +-#define _PR_NO_LARGE_FILES
51 ++#define _PR_HAVE_OFF64_T
52 + #endif
53 +-#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) \
54 +- || defined(ANDROID)
55 + #define _PR_INET6
56 + #define _PR_HAVE_INET_NTOP
57 + #define _PR_HAVE_GETHOSTBYNAME2
58 + #define _PR_HAVE_GETADDRINFO
59 + #define _PR_INET6_PROBE
60 +-#endif
61 + #ifndef ANDROID
62 + #define _PR_HAVE_SYSV_SEMAPHORES
63 + #define PR_HAVE_SYSV_NAMED_SHARED_MEMORY
64 +-#endif
65 +-/* Android has gethostbyname_r but not gethostbyaddr_r or gethostbyname2_r. */
66 +-#if (__GLIBC__ >= 2) && defined(_PR_PTHREADS)
67 + #define _PR_HAVE_GETHOST_R
68 + #define _PR_HAVE_GETHOST_R_INT
69 + #endif
70 +--
71 +2.16.4
72 +
73
74 diff --git a/dev-libs/nspr/nspr-4.19.ebuild b/dev-libs/nspr/nspr-4.19.ebuild
75 index 44af9aa..01daa7c 100644
76 --- a/dev-libs/nspr/nspr-4.19.ebuild
77 +++ b/dev-libs/nspr/nspr-4.19.ebuild
78 @@ -35,6 +35,8 @@ src_prepare() {
79
80 default
81
82 + use elibc_musl && epatch "${FILESDIR}"/${PN}-4.19-musl-ipv6.patch
83 +
84 # rename configure.in to configure.ac for new autotools compatibility
85 if [[ -e "${S}"/nspr/configure.in ]] ; then
86 einfo "Renaming configure.in to configure.ac"