summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJory Pratt <anarchy@gentoo.org>2019-03-20 14:06:17 -0500
committerJory Pratt <anarchy@gentoo.org>2019-03-20 14:12:38 -0500
commitb775a0d6d3e67c8dda78ae006fb733944d83f80e (patch)
tree220269b229fb1965bd7efc50a7fcd4e786956d73 /dev-libs/nspr
parentdev-lang/spidermonkey: mark s390 stable (diff)
downloadgentoo-b775a0d6d3e67c8dda78ae006fb733944d83f80e.tar.gz
gentoo-b775a0d6d3e67c8dda78ae006fb733944d83f80e.tar.bz2
gentoo-b775a0d6d3e67c8dda78ae006fb733944d83f80e.zip
dev-libs/nspr: Add support for ipv6 on musl
Signed-off-by: Jory Pratt <anarchy@gentoo.org>
Diffstat (limited to 'dev-libs/nspr')
-rw-r--r--dev-libs/nspr/files/nspr-4.21-ipv6-musl-support.patch53
-rw-r--r--dev-libs/nspr/nspr-4.21.ebuild4
2 files changed, 56 insertions, 1 deletions
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
new file mode 100644
index 000000000000..2c8ebd4ccbb2
--- /dev/null
+++ b/dev-libs/nspr/files/nspr-4.21-ipv6-musl-support.patch
@@ -0,0 +1,53 @@
+From 8c57451f44d7ceb37bfb4ae6e457fc70b1f58d0a Mon Sep 17 00:00:00 2001
+From: Moritz Kick <gentoo@blackphoenix.de>
+Date: Wed, 20 Mar 2019 13:36:06 -0500
+Subject: [PATCH] Added IPv6 compatibility for musl libc
+
+Signed-off-by: Moritz Kick <gentoo@blackphoenix.de>
+Signed-off-by: Jory Pratt <anarchy@gentoo.org>
+---
+ pr/include/md/_linux.h | 13 +------------
+ 1 file changed, 1 insertion(+), 12 deletions(-)
+
+diff --git a/pr/include/md/_linux.h b/pr/include/md/_linux.h
+index 2370ab8..612184c 100644
+--- a/pr/include/md/_linux.h
++++ b/pr/include/md/_linux.h
+@@ -289,33 +289,22 @@ static inline PRInt32 _MD_ATOMIC_SET(PRInt32 *ptr, PRInt32 nv)
+ #endif /* __arm__ */
+
+ #define USE_SETJMP
+-#if (defined(__GLIBC__) && __GLIBC__ >= 2) || defined(ANDROID)
+ #define _PR_POLL_AVAILABLE
+-#endif
+ #undef _PR_USE_POLL
+ #define _PR_STAT_HAS_ONLY_ST_ATIME
+ #if defined(__alpha) || defined(__ia64__)
+ #define _PR_HAVE_LARGE_OFF_T
+-#elif (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) \
+- || defined(ANDROID)
+-#define _PR_HAVE_OFF64_T
+ #else
+-#define _PR_NO_LARGE_FILES
++#define _PR_HAVE_OFF64_T
+ #endif
+-#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) \
+- || defined(ANDROID)
+ #define _PR_INET6
+ #define _PR_HAVE_INET_NTOP
+ #define _PR_HAVE_GETHOSTBYNAME2
+ #define _PR_HAVE_GETADDRINFO
+ #define _PR_INET6_PROBE
+-#endif
+ #ifndef ANDROID
+ #define _PR_HAVE_SYSV_SEMAPHORES
+ #define PR_HAVE_SYSV_NAMED_SHARED_MEMORY
+-#endif
+-/* Android has gethostbyname_r but not gethostbyaddr_r or gethostbyname2_r. */
+-#if (__GLIBC__ >= 2) && defined(_PR_PTHREADS)
+ #define _PR_HAVE_GETHOST_R
+ #define _PR_HAVE_GETHOST_R_INT
+ #endif
+--
+2.21.0
+
diff --git a/dev-libs/nspr/nspr-4.21.ebuild b/dev-libs/nspr/nspr-4.21.ebuild
index 809295b31a11..dd4c8f167bb7 100644
--- a/dev-libs/nspr/nspr-4.21.ebuild
+++ b/dev-libs/nspr/nspr-4.21.ebuild
@@ -14,7 +14,7 @@ SRC_URI="https://archive.mozilla.org/pub/nspr/releases/v${PV}/src/${P}.tar.gz"
LICENSE="|| ( MPL-2.0 GPL-2 LGPL-2.1 )"
SLOT="0"
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"
-IUSE="debug"
+IUSE="debug elibc_musl"
MULTILIB_CHOST_TOOLS=(
/usr/bin/nspr-config
@@ -35,6 +35,8 @@ src_prepare() {
default
+ use elibc_musl && eapply "${FILESDIR}"/${PN}-4.21-ipv6-musl-support.patch
+
# rename configure.in to configure.ac for new autotools compatibility
if [[ -e "${S}"/nspr/configure.in ]] ; then
einfo "Renaming configure.in to configure.ac"