summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJory Pratt <anarchy@gentoo.org>2020-04-14 09:11:26 -0500
committerJory Pratt <anarchy@gentoo.org>2020-04-14 09:11:26 -0500
commit14356bf652580ab0e5637a42d390b0b9a5887f0a (patch)
treefc85c5996f4c4486936371e386b72b21fc7a391d
parentmail-client/thunderbird: update libffi dep (diff)
downloadanarchy-14356bf652580ab0e5637a42d390b0b9a5887f0a.tar.gz
anarchy-14356bf652580ab0e5637a42d390b0b9a5887f0a.tar.bz2
anarchy-14356bf652580ab0e5637a42d390b0b9a5887f0a.zip
import dev-libs from ::mozilla
Signed-off-by: Jory Pratt <anarchy@gentoo.org>
-rw-r--r--dev-libs/jemalloc/Manifest1
-rw-r--r--dev-libs/jemalloc/files/jemalloc-5.2.0-gentoo-fixups.patch54
-rw-r--r--dev-libs/jemalloc/jemalloc-5.2.0.ebuild60
-rw-r--r--dev-libs/jemalloc/metadata.xml19
-rw-r--r--dev-libs/nspr/Manifest1
-rw-r--r--dev-libs/nspr/files/nspr-4.10.6-solaris.patch32
-rw-r--r--dev-libs/nspr/files/nspr-4.21-ipv6-musl-support.patch53
-rw-r--r--dev-libs/nspr/files/nspr-4.23-prtime.patch26
-rw-r--r--dev-libs/nspr/files/nspr-4.7.1-solaris.patch14
-rw-r--r--dev-libs/nspr/files/nspr-4.8.4-darwin-install_name.patch25
-rw-r--r--dev-libs/nspr/files/nspr-4.8.9-link-flags.patch28
-rw-r--r--dev-libs/nspr/files/nspr-4.9.5_nspr_config.patch11
-rw-r--r--dev-libs/nspr/metadata.xml8
-rw-r--r--dev-libs/nspr/nspr-4.25.ebuild122
-rw-r--r--dev-libs/nss-pem/Manifest1
-rw-r--r--dev-libs/nss-pem/metadata.xml11
-rw-r--r--dev-libs/nss-pem/nss-pem-1.0.5.ebuild32
-rw-r--r--dev-libs/nss/Manifest3
-rw-r--r--dev-libs/nss/files/nss-3.21-gentoo-fixup-warnings.patch10
-rw-r--r--dev-libs/nss/files/nss-3.23-hppa-byte_order.patch16
-rw-r--r--dev-libs/nss/files/nss-3.47-enable-pem.patch11
-rw-r--r--dev-libs/nss/files/nss-3.47-gentoo-fixups.patch242
-rw-r--r--dev-libs/nss/metadata.xml17
-rw-r--r--dev-libs/nss/nss-3.51.1.ebuild359
-rw-r--r--dev-libs/skalibs/Manifest3
-rw-r--r--dev-libs/skalibs/metadata.xml20
-rw-r--r--dev-libs/skalibs/skalibs-2.8.0.0.ebuild40
-rw-r--r--dev-qt/qtnetwork/Manifest4
-rw-r--r--dev-qt/qtnetwork/qtnetwork-5.14.2.ebuild (renamed from dev-qt/qtnetwork/qtnetwork-5.14.1.ebuild)6
29 files changed, 1162 insertions, 67 deletions
diff --git a/dev-libs/jemalloc/Manifest b/dev-libs/jemalloc/Manifest
new file mode 100644
index 0000000..06a80d2
--- /dev/null
+++ b/dev-libs/jemalloc/Manifest
@@ -0,0 +1 @@
+DIST jemalloc-5.2.0.tar.bz2 543892 BLAKE2B 042dd32452713d0524ae8aedbd3aa96a420037ae3ff0345bbf56a7839ae6ba9e0c700034fab9d5c7b6f4cbb43e2d8199b412901afce16c2785a816d439166e6d SHA512 e3be4d534770126caf10f2684aed9fe4ba1422dd47625fe50343cfb750f26eff869fcc7d1e30a96dd6c73f6614c4bbcd560fd24fc26b55ac731c43e60fd05234
diff --git a/dev-libs/jemalloc/files/jemalloc-5.2.0-gentoo-fixups.patch b/dev-libs/jemalloc/files/jemalloc-5.2.0-gentoo-fixups.patch
new file mode 100644
index 0000000..2e7fd0d
--- /dev/null
+++ b/dev-libs/jemalloc/files/jemalloc-5.2.0-gentoo-fixups.patch
@@ -0,0 +1,54 @@
+From 482a28e74f9b3c83bef6499842f1191c04ae80d9 Mon Sep 17 00:00:00 2001
+From: Jory Pratt <anarchy@gentoo.org>
+Date: Tue, 23 Apr 2019 10:04:19 -0500
+Subject: [PATCH] Don't override user cflags, disable html_doc from being
+ installed
+
+Signed-off-by: Jory Pratt <anarchy@gentoo.org>
+---
+ Makefile.in | 2 +-
+ configure.ac | 15 ---------------
+ 2 files changed, 1 insertion(+), 16 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 0777f6a..31767b6 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -511,7 +511,7 @@ install_doc_man:
+ $(INSTALL) -m 644 $$d $(MANDIR)/man3; \
+ done
+
+-install_doc: build_doc install_doc_html install_doc_man
++install_doc: build_doc install_doc_man
+
+ install: install_bin install_include install_lib install_doc
+
+diff --git a/configure.ac b/configure.ac
+index 96f76d3..f716ebd 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1108,21 +1108,6 @@ if test "x$enable_debug" = "x1" ; then
+ fi
+ AC_SUBST([enable_debug])
+
+-dnl Only optimize if not debugging.
+-if test "x$enable_debug" = "x0" ; then
+- if test "x$GCC" = "xyes" ; then
+- JE_CFLAGS_ADD([-O3])
+- JE_CXXFLAGS_ADD([-O3])
+- JE_CFLAGS_ADD([-funroll-loops])
+- elif test "x$je_cv_msvc" = "xyes" ; then
+- JE_CFLAGS_ADD([-O2])
+- JE_CXXFLAGS_ADD([-O2])
+- else
+- JE_CFLAGS_ADD([-O])
+- JE_CXXFLAGS_ADD([-O])
+- fi
+-fi
+-
+ dnl Enable statistics calculation by default.
+ AC_ARG_ENABLE([stats],
+ [AS_HELP_STRING([--disable-stats],
+--
+2.21.0
+
diff --git a/dev-libs/jemalloc/jemalloc-5.2.0.ebuild b/dev-libs/jemalloc/jemalloc-5.2.0.ebuild
new file mode 100644
index 0000000..ecf6d5e
--- /dev/null
+++ b/dev-libs/jemalloc/jemalloc-5.2.0.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools toolchain-funcs multilib-minimal
+
+DESCRIPTION="Jemalloc is a general-purpose scalable concurrent allocator"
+HOMEPAGE="http://jemalloc.net/ https://github.com/jemalloc/jemalloc"
+SRC_URI="https://github.com/jemalloc/jemalloc/releases/download/${PV}/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0/2"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
+IUSE="debug hardened lazy-lock static-libs stats xmalloc"
+HTML_DOCS=( doc/jemalloc.html )
+PATCHES=( "${FILESDIR}/${PN}-5.2.0-gentoo-fixups.patch" )
+
+MULTILIB_WRAPPED_HEADERS=( /usr/include/jemalloc/jemalloc.h )
+# autotools-utils.eclass auto-adds configure options when static-libs is in IUSE
+# but jemalloc doesn't implement them in its configure; need this here to
+# supress the warnings until automagic is removed from the eclass
+QA_CONFIGURE_OPTIONS="--enable-static --disable-static --enable-shared --disable-shared"
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local myconf=()
+
+ if use hardened ; then
+ myconf+=( --disable-syscall )
+ fi
+
+ ECONF_SOURCE="${S}" \
+ econf \
+ $(use_enable debug) \
+ $(use_enable lazy-lock) \
+ $(use_enable stats) \
+ $(use_enable xmalloc) \
+ "${myconf[@]}"
+}
+
+multilib_src_install() {
+ # Copy man file which the Makefile looks for
+ cp "${S}/doc/jemalloc.3" "${BUILD_DIR}/doc" || die
+ emake DESTDIR="${D}" install
+}
+
+multilib_src_install_all() {
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # fixup install_name, #437362
+ install_name_tool \
+ -id "${EPREFIX}"/usr/$(get_libdir)/libjemalloc.2.dylib \
+ "${ED}"/usr/$(get_libdir)/libjemalloc.2.dylib || die
+ fi
+ use static-libs || find "${ED}" -name '*.a' -delete
+}
diff --git a/dev-libs/jemalloc/metadata.xml b/dev-libs/jemalloc/metadata.xml
new file mode 100644
index 0000000..08893bb
--- /dev/null
+++ b/dev-libs/jemalloc/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>mozilla@gentoo.org</email>
+ <name>Gentoo Mozilla Team</name>
+ </maintainer>
+ <longdescription lang="en">
+ Jemalloc is a general-purpose scalable concurrent allocator
+ </longdescription>
+ <use>
+ <flag name="lazy-lock">Enable lazy locking (only lock when multi-threaded)</flag>
+ <flag name="stats">Enable statistics calculation/reporting</flag>
+ <flag name="xmalloc">Add support for xmalloc (abort-on-out-of-memory)</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">jemalloc/jemalloc</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-libs/nspr/Manifest b/dev-libs/nspr/Manifest
new file mode 100644
index 0000000..131b101
--- /dev/null
+++ b/dev-libs/nspr/Manifest
@@ -0,0 +1 @@
+DIST nspr-4.25.tar.gz 1079633 BLAKE2B 377e5ec0e60cca13f1ee988adb10870bbb6cb9e4eb61e4434152418d4f8d446741a192d7019298ec2669b8e190cacb6a1ca9c4b2838e9b14dd3590ed40facdd2 SHA512 b9aa576e0da37e8729088fe559d94030cf18f277c1f7a30104d3088a804913343ed884645c0adb62144da475e20934b359f897bf3ae9a6ebb5f9daf283d5a562
diff --git a/dev-libs/nspr/files/nspr-4.10.6-solaris.patch b/dev-libs/nspr/files/nspr-4.10.6-solaris.patch
new file mode 100644
index 0000000..6ae04f4
--- /dev/null
+++ b/dev-libs/nspr/files/nspr-4.10.6-solaris.patch
@@ -0,0 +1,32 @@
+* drop Solaris linker stuff
+
+--- a/configure.in
++++ b/configure.in
+@@ -1988,26 +1988,14 @@
+ CPU_ARCH=`uname -p`
+ MDCPUCFG_H=_solaris.cfg
+ PR_MD_CSRCS=solaris.c
+- LD=/usr/ccs/bin/ld
+ MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
+ RESOLVE_LINK_SYMBOLS=1
+- case "${OS_RELEASE}" in
+- 5.8|5.9)
+- ;;
+- *)
+- # It is safe to use the -Bdirect linker flag on Solaris 10 or later.
+- USE_B_DIRECT=1
+- ;;
+- esac
+ if test -n "$GNU_CC"; then
+ DSO_CFLAGS=-fPIC
+ if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then
+ GCC_USE_GNU_LD=1
+ fi
+- DSO_LDOPTS='-shared -Wl,-h,$(notdir $@),-z,combreloc,-z,defs,-z,ignore'
+- if test -n "$USE_B_DIRECT"; then
+- DSO_LDOPTS="$DSO_LDOPTS,-Bdirect"
+- fi
++ DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
+ else
+ DSO_CFLAGS=-KPIC
+ DSO_LDOPTS='-G -h $(notdir $@) -z combreloc -z defs -z ignore'
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 0000000..2c8ebd4
--- /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/files/nspr-4.23-prtime.patch b/dev-libs/nspr/files/nspr-4.23-prtime.patch
new file mode 100644
index 0000000..087e427
--- /dev/null
+++ b/dev-libs/nspr/files/nspr-4.23-prtime.patch
@@ -0,0 +1,26 @@
+--- a/pr/src/misc/prtime.c
++++ b/pr/src/misc/prtime.c
+@@ -1621,7 +1621,7 @@
+ case TT_EET: zone_offset = 2 * 60; break;
+ case TT_JST: zone_offset = 9 * 60; break;
+ default:
+- PR_ASSERT (0);
++ return PR_FAILURE;
+ break;
+ }
+ }
+@@ -1677,11 +1677,12 @@
+ struct tm localTime;
+ time_t secs;
+
+- PR_ASSERT(result->tm_month > -1 &&
++ if (!(result->tm_month > -1 &&
+ result->tm_mday > 0 &&
+ result->tm_hour > -1 &&
+ result->tm_min > -1 &&
+- result->tm_sec > -1);
++ result->tm_sec > -1))
++ return PR_FAILURE;
+
+ /*
+ * To obtain time_t from a tm structure representing the local
diff --git a/dev-libs/nspr/files/nspr-4.7.1-solaris.patch b/dev-libs/nspr/files/nspr-4.7.1-solaris.patch
new file mode 100644
index 0000000..1afab1d
--- /dev/null
+++ b/dev-libs/nspr/files/nspr-4.7.1-solaris.patch
@@ -0,0 +1,14 @@
+Same magic as haubi did for glib compilation, which works again here
+resolving a linker problem on Solaris with GNU ld. Bug #222625
+
+--- a/pr/src/Makefile.in
++++ b/pr/src/Makefile.in
+@@ -95,7 +95,7 @@
+ endif
+
+ ifdef USE_PTHREADS
+-OS_LIBS = -lpthread ${LIBRT} -lsocket -lnsl -ldl -lc
++OS_LIBS = -pthread ${LIBRT} -lsocket -lnsl -ldl -lc
+ else
+ ifdef LOCAL_THREADS_ONLY
+ OS_LIBS = -lsocket -lnsl -ldl -lc
diff --git a/dev-libs/nspr/files/nspr-4.8.4-darwin-install_name.patch b/dev-libs/nspr/files/nspr-4.8.4-darwin-install_name.patch
new file mode 100644
index 0000000..4045e90
--- /dev/null
+++ b/dev-libs/nspr/files/nspr-4.8.4-darwin-install_name.patch
@@ -0,0 +1,25 @@
+Don't use @executable_path, it messed up linking against nspr from e.g.
+nss.
+
+--- a/configure.in
++++ b/configure.in
+@@ -1007,7 +1007,7 @@
+ ;;
+ esac
+ DSO_CFLAGS=-fPIC
+- DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @executable_path/$@ -headerpad_max_install_names'
++ DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name $(libdir)/$@ -headerpad_max_install_names'
+ _OPTIMIZE_FLAGS=-O2
+ MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
+ STRIP="$STRIP -x -S"
+--- a/configure
++++ b/configure
+@@ -1007,7 +1007,7 @@
+ ;;
+ esac
+ DSO_CFLAGS=-fPIC
+- DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @executable_path/$@ -headerpad_max_install_names'
++ DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name $(libdir)/$@ -headerpad_max_install_names'
+ _OPTIMIZE_FLAGS=-O2
+ MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
+ STRIP="$STRIP -x -S"
diff --git a/dev-libs/nspr/files/nspr-4.8.9-link-flags.patch b/dev-libs/nspr/files/nspr-4.8.9-link-flags.patch
new file mode 100644
index 0000000..5d37018
--- /dev/null
+++ b/dev-libs/nspr/files/nspr-4.8.9-link-flags.patch
@@ -0,0 +1,28 @@
+Use CFLAGS when linking. Some flags can add functionality to generated
+code that requires extra libs to be linked in (eg. libgomp when using
+autoparallelization). Other flags are required when building and linking
+(eg. -flto).
+
+https://bugs.gentoo.org/365975
+
+--- a/config/autoconf.mk.in
++++ b/config/autoconf.mk.in
+@@ -81,6 +81,7 @@ OS_DLLFLAGS = @OS_DLLFLAGS@
+ DLLFLAGS = @DLLFLAGS@
+ EXEFLAGS = @EXEFLAGS@
+ OPTIMIZER = @OPTIMIZER@
++LD_CFLAGS = @CFLAGS@
+
+ PROFILE_GEN_CFLAGS = @PROFILE_GEN_CFLAGS@
+ PROFILE_GEN_LDFLAGS = @PROFILE_GEN_LDFLAGS@
+--- a/config/config.mk
++++ b/config/config.mk
+@@ -72,7 +72,7 @@ NOMD_CFLAGS = $(CC_ONLY_FLAGS) $(OPTIMIZER) $(NOMD_OS_CFLAGS)\
+ NOMD_CCFLAGS = $(CCC_ONLY_FLAGS) $(OPTIMIZER) $(NOMD_OS_CFLAGS)\
+ $(XP_DEFINE) $(DEFINES) $(INCLUDES) $(XCFLAGS)
+
+-LDFLAGS = $(OS_LDFLAGS)
++LDFLAGS = $(LD_CFLAGS) $(OS_LDFLAGS)
+
+ # Enable profile-guided optimization
+ ifdef MOZ_PROFILE_GENERATE
diff --git a/dev-libs/nspr/files/nspr-4.9.5_nspr_config.patch b/dev-libs/nspr/files/nspr-4.9.5_nspr_config.patch
new file mode 100644
index 0000000..a22b0b9
--- /dev/null
+++ b/dev-libs/nspr/files/nspr-4.9.5_nspr_config.patch
@@ -0,0 +1,11 @@
+--- a/config/nspr-config.in
++++ b/config/nspr-config.in
+@@ -126,7 +126,7 @@
+ fi
+
+ if test "$echo_libs" = "yes"; then
+- libdirs=-L$libdir
++ libdirs=""
+ if test -n "$lib_plds"; then
+ libdirs="$libdirs -lplds${major_version}"
+ fi
diff --git a/dev-libs/nspr/metadata.xml b/dev-libs/nspr/metadata.xml
new file mode 100644
index 0000000..d9b367e
--- /dev/null
+++ b/dev-libs/nspr/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>mozilla@gentoo.org</email>
+ <name>Gentoo Mozilla Team</name>
+</maintainer>
+</pkgmetadata>
diff --git a/dev-libs/nspr/nspr-4.25.ebuild b/dev-libs/nspr/nspr-4.25.ebuild
new file mode 100644
index 0000000..c238ea2
--- /dev/null
+++ b/dev-libs/nspr/nspr-4.25.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools toolchain-funcs multilib-minimal
+
+MIN_PV="$(ver_cut 2)"
+
+DESCRIPTION="Netscape Portable Runtime"
+HOMEPAGE="http://www.mozilla.org/projects/nspr/"
+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 ~riscv ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug elibc_musl"
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/nspr-config
+)
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.23-prtime.patch
+ "${FILESDIR}"/${PN}-4.7.1-solaris.patch
+ "${FILESDIR}"/${PN}-4.10.6-solaris.patch
+ "${FILESDIR}"/${PN}-4.8.4-darwin-install_name.patch
+ "${FILESDIR}"/${PN}-4.8.9-link-flags.patch
+ # We do not need to pass -L$libdir via nspr-config --libs
+ "${FILESDIR}"/${PN}-4.9.5_nspr_config.patch
+)
+
+src_prepare() {
+ cd "${S}"/nspr || die
+
+ 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"
+ mv "${S}"/nspr/configure.{in,ac} || die
+ else
+ elog "configure.in rename logic can be removed from ebuild."
+ fi
+
+ # We must run eautoconf to regenerate configure
+ eautoconf
+
+ # make sure it won't find Perl out of Prefix
+ sed -i -e "s/perl5//g" "${S}"/nspr/configure || die
+
+ # Respect LDFLAGS
+ sed -i -e 's/\$(MKSHLIB) \$(OBJS)/\$(MKSHLIB) \$(LDFLAGS) \$(OBJS)/g' \
+ "${S}"/nspr/config/rules.mk || die
+}
+
+multilib_src_configure() {
+ # We use the standard BUILD_xxx but nspr uses HOST_xxx
+ tc-export_build_env BUILD_CC
+ export HOST_CC=${BUILD_CC} HOST_CFLAGS=${BUILD_CFLAGS} HOST_LDFLAGS=${BUILD_LDFLAGS}
+ tc-export AR CC CXX RANLIB
+ [[ ${CBUILD} != ${CHOST} ]] \
+ && export CROSS_COMPILE=1 \
+ || unset CROSS_COMPILE
+
+ local myconf=(
+ --libdir="${EPREFIX}/usr/$(get_libdir)"
+ $(use_enable debug)
+ $(use_enable !debug optimize)
+ )
+
+ # The configure has some fancy --enable-{{n,x}32,64bit} switches
+ # that trigger some code conditional to platform & arch. This really
+ # matters for the few common arches (x86, ppc) but we pass a little
+ # more of them to be future-proof.
+
+ # use ABI first, this will work for most cases
+ case "${ABI}" in
+ alpha|arm|hppa|m68k|o32|ppc|s390|sh|sparc|x86) ;;
+ n32) myconf+=( --enable-n32 );;
+ x32) myconf+=( --enable-x32 );;
+ s390x|*64) myconf+=( --enable-64bit );;
+ default) # no abi actually set, fall back to old check
+ einfo "Running a short build test to determine 64bit'ness"
+ echo > "${T}"/test.c || die
+ ${CC} ${CFLAGS} ${CPPFLAGS} -c "${T}"/test.c -o "${T}"/test.o || die
+ case $(file "${T}"/test.o) in
+ *32-bit*x86-64*) myconf+=( --enable-x32 );;
+ *64-bit*|*ppc64*|*x86_64*) myconf+=( --enable-64bit );;
+ *32-bit*|*ppc*|*i386*) ;;
+ *) die "Failed to detect whether your arch is 64bits or 32bits, disable distcc if you're using it, please";;
+ esac ;;
+ *) ;;
+ esac
+
+ # Ancient autoconf needs help finding the right tools.
+ LC_ALL="C" ECONF_SOURCE="${S}/nspr" \
+ ac_cv_path_AR="${AR}" \
+ econf "${myconf[@]}"
+}
+
+multilib_src_install() {
+ # Their build system is royally confusing, as usual
+ MINOR_VERSION=${MIN_PV} # Used for .so version
+ emake DESTDIR="${D}" install
+
+ einfo "removing static libraries as upstream has requested!"
+ rm "${ED}"/usr/$(get_libdir)/*.a || die "failed to remove static libraries."
+
+ # install nspr-config
+ dobin config/nspr-config
+
+ # Remove stupid files in /usr/bin
+ rm "${ED}"/usr/bin/prerr.properties || die
+
+ # This is used only to generate prerr.c and prerr.h at build time.
+ # No other projects use it, and we don't want to depend on perl.
+ # Talked to upstream and they agreed w/punting.
+ rm "${ED}"/usr/bin/compile-et.pl || die
+}
diff --git a/dev-libs/nss-pem/Manifest b/dev-libs/nss-pem/Manifest
new file mode 100644
index 0000000..5a3fe75
--- /dev/null
+++ b/dev-libs/nss-pem/Manifest
@@ -0,0 +1 @@
+DIST nss-pem-1.0.5.tar.xz 36320 BLAKE2B c2294595d95a2de2bf6d9e68dc10955297fb6ef27c9e85dbabc7854b900942070f70a8e4c1abef618e7265daa75f5bd2a2fca3fe923973345f9c1b64a3da8ff5 SHA512 8dabebf114ac94441caf6d279f810de4124a3ffc05ae66777496b3e66f8b8148d535cb438a165d84f53111c468d595f3b16651cd7a990eeedca9d413aad65b2b
diff --git a/dev-libs/nss-pem/metadata.xml b/dev-libs/nss-pem/metadata.xml
new file mode 100644
index 0000000..013b4ad
--- /dev/null
+++ b/dev-libs/nss-pem/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>anarchy@gentoo.org</email>
+ <name>Jory A. Pratt</name>
+ </maintainer>
+<upstream>
+ <remote-id type="github">kdudka/nss-pem</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/dev-libs/nss-pem/nss-pem-1.0.5.ebuild b/dev-libs/nss-pem/nss-pem-1.0.5.ebuild
new file mode 100644
index 0000000..8c40845
--- /dev/null
+++ b/dev-libs/nss-pem/nss-pem-1.0.5.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CMAKE_ECLASS="cmake"
+
+inherit cmake-multilib
+
+DESCRIPTION="PEM file reader for Network Security Services (NSS)"
+HOMEPAGE="https://github.com/kdudka/nss-pem"
+SRC_URI="https://github.com/kdudka/${PN}/releases/download/${P}/${P}.tar.xz"
+
+LICENSE="MPL-1.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64"
+IUSE=""
+
+BDEPEND=" >=dev-libs/nss-3.50-r1 "
+RDEPEND="${BDEPEND}"
+
+DEPEND="!<=dev-libs/nss-3.50
+ ${RDEPEND}"
+
+S="${WORKDIR}/${P}/src"
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DLIB_INSTALL_DIR="$(get_libdir)"
+ )
+ cmake_src_configure
+}
diff --git a/dev-libs/nss/Manifest b/dev-libs/nss/Manifest
new file mode 100644
index 0000000..beda8d6
--- /dev/null
+++ b/dev-libs/nss/Manifest
@@ -0,0 +1,3 @@
+DIST nss-3.51.1.tar.gz 78310874 BLAKE2B c295b5fdf6e1d24cc79474f2c5a9e91fccf777212fbb072e8a64576ed1b060fea6ecbde1fa59bb07c998b9aa92bb7d450e722a8f34a72eaa35aef6cbd693420a SHA512 1878780886cc330489a14a60ee5cb67b174f3167d020db256eacdce079652ef8af65813914cd0fb5684457053fa27acc9bff72d0713fbea28795613ca45a6d46
+DIST nss-3.51.tar.gz 78305125 BLAKE2B 2c7b90d4cc9fe283bf81e21d0dceefff503e5a31f0053828b140b2b927ddab8c8881b23c7d4c003f3e2d0dcd22efbe699baee63443cab6e72d33a552fd430e3c SHA512 9c894b1ea41449b000750a7b3a89fcb43dfc3d0d4d6dcc0dc288bc73996f76f1ee1ede927a8aecae6d4a07f9f3d3e3a042c6a60cf06e27e0cdc004fce2e510fd
+DIST nss-cacert-class1-class3.patch 22950 BLAKE2B 9d5e60df5f161a3c27c41e5a9419440a54f888eda454e3cde5ebe626d4075b65cf9938b5144d0fb022377f4bd415bff5e5c67d104409860aa9391b3eb8872c68 SHA512 a5aa740bf110a3f0262e3f1ef2fc739ac2b44f042e220039d48aee8e97cd764d5c10718220364f4098aba955882bd02cadb5481512388971a8290312f88a7df0
diff --git a/dev-libs/nss/files/nss-3.21-gentoo-fixup-warnings.patch b/dev-libs/nss/files/nss-3.21-gentoo-fixup-warnings.patch
new file mode 100644
index 0000000..14234e8
--- /dev/null
+++ b/dev-libs/nss/files/nss-3.21-gentoo-fixup-warnings.patch
@@ -0,0 +1,10 @@
+--- nss/coreconf/Linux.mk
++++ nss/coreconf/Linux.mk
+@@ -130,6 +130,7 @@
+ OPTIMIZER += -gdwarf-2
+ endif
+ endif
++OPTIMIZER += -fno-strict-aliasing
+ endif
+
+ ifndef COMPILER_TAG
diff --git a/dev-libs/nss/files/nss-3.23-hppa-byte_order.patch b/dev-libs/nss/files/nss-3.23-hppa-byte_order.patch
new file mode 100644
index 0000000..63cfadd
--- /dev/null
+++ b/dev-libs/nss/files/nss-3.23-hppa-byte_order.patch
@@ -0,0 +1,16 @@
+--- nss/lib/dbm/include/mcom_db.h
++++ nss/lib/dbm/include/mcom_db.h
+@@ -110,11 +110,13 @@
+ #endif /* !BYTE_ORDER */
+ #endif /* __sun */
+
++#ifndef BYTE_ORDER
+ #if defined(__hpux) || defined(__hppa)
+ #define BYTE_ORDER BIG_ENDIAN
+ #define BIG_ENDIAN 4321
+ #define LITTLE_ENDIAN 1234 /* LSB first: i386, vax, all NT risc */
+ #endif
++#endif /* !BYTE_ORDER */
+
+ #if defined(AIXV3) || defined(AIX)
+ /* BYTE_ORDER, LITTLE_ENDIAN, BIG_ENDIAN are all defined here */
diff --git a/dev-libs/nss/files/nss-3.47-enable-pem.patch b/dev-libs/nss/files/nss-3.47-enable-pem.patch
new file mode 100644
index 0000000..47a01c3
--- /dev/null
+++ b/dev-libs/nss/files/nss-3.47-enable-pem.patch
@@ -0,0 +1,11 @@
+--- a/lib/ckfw/manifest.mn
++++ b/lib/ckfw/manifest.mn
+@@ -5,7 +5,7 @@
+
+ CORE_DEPTH = ../..
+
+-DIRS = builtins
++DIRS = builtins pem
+
+ PRIVATE_EXPORTS = \
+ ck.h \
diff --git a/dev-libs/nss/files/nss-3.47-gentoo-fixups.patch b/dev-libs/nss/files/nss-3.47-gentoo-fixups.patch
new file mode 100644
index 0000000..29b3a2a
--- /dev/null
+++ b/dev-libs/nss/files/nss-3.47-gentoo-fixups.patch
@@ -0,0 +1,242 @@
+--- a/config/Makefile
++++ b/config/Makefile
+@@ -0,0 +1,40 @@
++CORE_DEPTH = ..
++DEPTH = ..
++
++include $(CORE_DEPTH)/coreconf/config.mk
++
++NSS_MAJOR_VERSION = `grep "NSS_VMAJOR" ../lib/nss/nss.h | awk '{print $$3}'`
++NSS_MINOR_VERSION = `grep "NSS_VMINOR" ../lib/nss/nss.h | awk '{print $$3}'`
++NSS_PATCH_VERSION = `grep "NSS_VPATCH" ../lib/nss/nss.h | awk '{print $$3}'`
++PREFIX = /usr
++
++all: export libs
++
++export:
++ # Create the nss.pc file
++ mkdir -p $(DIST)/lib/pkgconfig
++ sed -e "s,@prefix@,$(PREFIX)," \
++ -e "s,@exec_prefix@,\$${prefix}," \
++ -e "s,@libdir@,\$${prefix}/lib64," \
++ -e "s,@includedir@,\$${prefix}/include/nss," \
++ -e "s,@NSS_MAJOR_VERSION@,$(NSS_MAJOR_VERSION),g" \
++ -e "s,@NSS_MINOR_VERSION@,$(NSS_MINOR_VERSION)," \
++ -e "s,@NSS_PATCH_VERSION@,$(NSS_PATCH_VERSION)," \
++ nss.pc.in > nss.pc
++ chmod 0644 nss.pc
++ ln -sf ../../../../config/nss.pc $(DIST)/lib/pkgconfig
++
++ # Create the nss-config script
++ mkdir -p $(DIST)/bin
++ sed -e "s,@prefix@,$(PREFIX)," \
++ -e "s,@NSS_MAJOR_VERSION@,$(NSS_MAJOR_VERSION)," \
++ -e "s,@NSS_MINOR_VERSION@,$(NSS_MINOR_VERSION)," \
++ -e "s,@NSS_PATCH_VERSION@,$(NSS_PATCH_VERSION)," \
++ nss-config.in > nss-config
++ chmod 0755 nss-config
++ ln -sf ../../../config/nss-config $(DIST)/bin
++
++libs:
++
++dummy: all export libs
++
+--- a/config/nss-config.in
++++ b/config/nss-config.in
+@@ -0,0 +1,145 @@
++#!/bin/sh
++
++prefix=@prefix@
++
++major_version=@NSS_MAJOR_VERSION@
++minor_version=@NSS_MINOR_VERSION@
++patch_version=@NSS_PATCH_VERSION@
++
++usage()
++{
++ cat <<EOF
++Usage: nss-config [OPTIONS] [LIBRARIES]
++Options:
++ [--prefix[=DIR]]
++ [--exec-prefix[=DIR]]
++ [--includedir[=DIR]]
++ [--libdir[=DIR]]
++ [--version]
++ [--libs]
++ [--cflags]
++Dynamic Libraries:
++ nss
++ ssl
++ smime
++ nssutil
++EOF
++ exit $1
++}
++
++if test $# -eq 0; then
++ usage 1 1>&2
++fi
++
++lib_ssl=yes
++lib_smime=yes
++lib_nss=yes
++lib_nssutil=yes
++
++while test $# -gt 0; do
++ case "$1" in
++ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
++ *) optarg= ;;
++ esac
++
++ case $1 in
++ --prefix=*)
++ prefix=$optarg
++ ;;
++ --prefix)
++ echo_prefix=yes
++ ;;
++ --exec-prefix=*)
++ exec_prefix=$optarg
++ ;;
++ --exec-prefix)
++ echo_exec_prefix=yes
++ ;;
++ --includedir=*)
++ includedir=$optarg
++ ;;
++ --includedir)
++ echo_includedir=yes
++ ;;
++ --libdir=*)
++ libdir=$optarg
++ ;;
++ --libdir)
++ echo_libdir=yes
++ ;;
++ --version)
++ echo ${major_version}.${minor_version}.${patch_version}
++ ;;
++ --cflags)
++ echo_cflags=yes
++ ;;
++ --libs)
++ echo_libs=yes
++ ;;
++ ssl)
++ lib_ssl=yes
++ ;;
++ smime)
++ lib_smime=yes
++ ;;
++ nss)
++ lib_nss=yes
++ ;;
++ nssutil)
++ lib_nssutil=yes
++ ;;
++ *)
++ usage 1 1>&2
++ ;;
++ esac
++ shift
++done
++
++# Set variables that may be dependent upon other variables
++if test -z "$exec_prefix"; then
++ exec_prefix=`pkg-config --variable=exec_prefix nss`
++fi
++if test -z "$includedir"; then
++ includedir=`pkg-config --variable=includedir nss`
++fi
++if test -z "$libdir"; then
++ libdir=`pkg-config --variable=libdir nss`
++fi
++
++if test "$echo_prefix" = "yes"; then
++ echo $prefix
++fi
++
++if test "$echo_exec_prefix" = "yes"; then
++ echo $exec_prefix
++fi
++
++if test "$echo_includedir" = "yes"; then
++ echo $includedir
++fi
++
++if test "$echo_libdir" = "yes"; then
++ echo $libdir
++fi
++
++if test "$echo_cflags" = "yes"; then
++ echo -I$includedir
++fi
++
++if test "$echo_libs" = "yes"; then
++ libdirs=""
++ if test -n "$lib_ssl"; then
++ libdirs="$libdirs -lssl${major_version}"
++ fi
++ if test -n "$lib_smime"; then
++ libdirs="$libdirs -lsmime${major_version}"
++ fi
++ if test -n "$lib_nss"; then
++ libdirs="$libdirs -lnss${major_version}"
++ fi
++ if test -n "$lib_nssutil"; then
++ libdirs="$libdirs -lnssutil${major_version}"
++ fi
++ echo $libdirs
++fi
++
+--- a/config/nss.pc.in
++++ b/config/nss.pc.in
+@@ -0,0 +1,12 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: NSS
++Description: Network Security Services
++Version: @NSS_MAJOR_VERSION@.@NSS_MINOR_VERSION@.@NSS_PATCH_VERSION@
++Requires: nspr >= 4.8
++Libs: -lssl3 -lsmime3 -lnss3 -lnssutil3
++Cflags: -I${includedir}
++
+--- a/Makefile
++++ b/Makefile
+@@ -47,7 +47,7 @@
+ # (7) Execute "local" rules. (OPTIONAL). #
+ #######################################################################
+
+-nss_build_all: build_nspr all latest
++nss_build_all: all latest
+
+ nss_clean_all: clobber_nspr clobber
+
+@@ -133,16 +133,6 @@
+ --prefix='$(NSS_GYP_PREFIX)'
+ endif
+
+-build_nspr: $(NSPR_CONFIG_STATUS)
+- $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME)
+- $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME)/pr/tests
+-
+-install_nspr: build_nspr
+- $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) install
+-
+-clobber_nspr: $(NSPR_CONFIG_STATUS)
+- $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) clobber
+-
+ build_docs:
+ $(MAKE) -C $(CORE_DEPTH)/doc
+
+--- a/manifest.mn
++++ b/manifest.mn
+@@ -10,4 +10,4 @@
+
+ RELEASE = nss
+
+-DIRS = coreconf lib cmd cpputil gtests
++DIRS = coreconf lib cmd cpputil config
diff --git a/dev-libs/nss/metadata.xml b/dev-libs/nss/metadata.xml
new file mode 100644
index 0000000..c76b165
--- /dev/null
+++ b/dev-libs/nss/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>mozilla@gentoo.org</email>
+ <name>Gentoo Mozilla Team</name>
+</maintainer>
+<use>
+ <flag name="cacert">
+ Include root/class3 certs from CAcert (http://www.cacert.org/)
+ </flag>
+ <flag name="utils">Install utilities included with the library</flag>
+</use>
+<upstream>
+ <remote-id type="cpe">cpe:/a:mozilla:nss</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/dev-libs/nss/nss-3.51.1.ebuild b/dev-libs/nss/nss-3.51.1.ebuild
new file mode 100644
index 0000000..b1c3b3f
--- /dev/null
+++ b/dev-libs/nss/nss-3.51.1.ebuild
@@ -0,0 +1,359 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit eutils flag-o-matic multilib toolchain-funcs multilib-minimal
+
+NSPR_VER="4.25"
+RTM_NAME="NSS_${PV//./_}_RTM"
+
+DESCRIPTION="Mozilla's Network Security Services library that implements PKI support"
+HOMEPAGE="http://www.mozilla.org/projects/security/pki/nss/"
+SRC_URI="https://archive.mozilla.org/pub/security/nss/releases/${RTM_NAME}/src/${P}.tar.gz
+ cacert? ( https://dev.gentoo.org/~axs/distfiles/${PN}-cacert-class1-class3.patch )"
+
+LICENSE="|| ( MPL-2.0 GPL-2 LGPL-2.1 )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="cacert utils"
+BDEPEND="
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
+"
+RDEPEND="
+ >=dev-libs/nspr-${NSPR_VER}[${MULTILIB_USEDEP}]
+ >=dev-db/sqlite-3.8.2[${MULTILIB_USEDEP}]
+ >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+"
+DEPEND="${RDEPEND}"
+
+RESTRICT="test"
+
+S="${WORKDIR}/${P}/${PN}"
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/nss-config
+)
+
+PATCHES=(
+ # Custom changes for gentoo
+ "${FILESDIR}/${PN}-3.47-gentoo-fixups.patch"
+ "${FILESDIR}/${PN}-3.21-gentoo-fixup-warnings.patch"
+ "${FILESDIR}/${PN}-3.23-hppa-byte_order.patch"
+)
+
+src_prepare() {
+ if use cacert ; then #521462
+ PATCHES+=(
+ "${DISTDIR}/${PN}-cacert-class1-class3.patch"
+ )
+ fi
+
+ default
+
+ pushd coreconf >/dev/null || die
+ # hack nspr paths
+ echo 'INCLUDES += -I$(DIST)/include/dbm' \
+ >> headers.mk || die "failed to append include"
+
+ # modify install path
+ sed -e '/CORE_DEPTH/s:SOURCE_PREFIX.*$:SOURCE_PREFIX = $(CORE_DEPTH)/dist:' \
+ -i source.mk || die
+
+ # Respect LDFLAGS
+ sed -i -e 's/\$(MKSHLIB) -o/\$(MKSHLIB) \$(LDFLAGS) -o/g' rules.mk
+ popd >/dev/null || die
+
+ # Fix pkgconfig file for Prefix
+ sed -i -e "/^PREFIX =/s:= /usr:= ${EPREFIX}/usr:" \
+ config/Makefile || die
+
+ # use host shlibsign if need be #436216
+ if tc-is-cross-compiler ; then
+ sed -i \
+ -e 's:"${2}"/shlibsign:shlibsign:' \
+ cmd/shlibsign/sign.sh || die
+ fi
+
+ # dirty hack
+ sed -i -e "/CRYPTOLIB/s:\$(SOFTOKEN_LIB_DIR):../freebl/\$(OBJDIR):" \
+ lib/ssl/config.mk || die
+ sed -i -e "/CRYPTOLIB/s:\$(SOFTOKEN_LIB_DIR):../../lib/freebl/\$(OBJDIR):" \
+ cmd/platlibs.mk || die
+
+ multilib_copy_sources
+
+ strip-flags
+}
+
+multilib_src_configure() {
+ # Ensure we stay multilib aware
+ sed -i -e "/@libdir@/ s:lib64:$(get_libdir):" config/Makefile || die
+}
+
+nssarch() {
+ # Most of the arches are the same as $ARCH
+ local t=${1:-${CHOST}}
+ case ${t} in
+ aarch64*)echo "aarch64";;
+ hppa*) echo "parisc";;
+ i?86*) echo "i686";;
+ x86_64*) echo "x86_64";;
+ *) tc-arch ${t};;
+ esac
+}
+
+nssbits() {
+ local cc cppflags="${1}CPPFLAGS" cflags="${1}CFLAGS"
+ if [[ ${1} == BUILD_ ]]; then
+ cc=$(tc-getBUILD_CC)
+ else
+ cc=$(tc-getCC)
+ fi
+ echo > "${T}"/test.c || die
+ ${cc} ${!cppflags} ${!cflags} -c "${T}"/test.c -o "${T}/${1}test.o" || die
+ case $(file "${T}/${1}test.o") in
+ *32-bit*x86-64*) echo USE_X32=1;;
+ *64-bit*|*ppc64*|*x86_64*) echo USE_64=1;;
+ *32-bit*|*ppc*|*i386*) ;;
+ *) die "Failed to detect whether ${cc} builds 64bits or 32bits, disable distcc if you're using it, please";;
+ esac
+}
+
+multilib_src_compile() {
+ # use ABI to determine bit'ness, or fallback if unset
+ local buildbits mybits
+ case "${ABI}" in
+ n32) mybits="USE_N32=1";;
+ x32) mybits="USE_X32=1";;
+ s390x|*64) mybits="USE_64=1";;
+ ${DEFAULT_ABI})
+ einfo "Running compilation test to determine bit'ness"
+ mybits=$(nssbits)
+ ;;
+ esac
+ # bitness of host may differ from target
+ if tc-is-cross-compiler; then
+ buildbits=$(nssbits BUILD_)
+ fi
+
+ local makeargs=(
+ CC="$(tc-getCC)"
+ CCC="$(tc-getCXX)"
+ AR="$(tc-getAR) rc \$@"
+ RANLIB="$(tc-getRANLIB)"
+ OPTIMIZER=
+ ${mybits}
+ )
+
+ # Take care of nspr settings #436216
+ local myCPPFLAGS="${CPPFLAGS} $($(tc-getPKG_CONFIG) nspr --cflags)"
+ unset NSPR_INCLUDE_DIR
+
+ # Do not let `uname` be used.
+ if use kernel_linux ; then
+ makeargs+=(
+ OS_TARGET=Linux
+ OS_RELEASE=2.6
+ OS_TEST="$(nssarch)"
+ )
+ fi
+
+ export NSS_ALLOW_SSLKEYLOGFILE=1
+ export NSS_ENABLE_WERROR=0 #567158
+ export BUILD_OPT=1
+ export NSS_USE_SYSTEM_SQLITE=1
+ export NSDISTMODE=copy
+ export NSS_ENABLE_ECC=1
+ export FREEBL_NO_DEPEND=1
+ export FREEBL_LOWHASH=1
+ export NSS_SEED_ONLY_DEV_URANDOM=1
+ export ASFLAGS=""
+
+ local d
+
+ # Build the host tools first.
+ LDFLAGS="${BUILD_LDFLAGS}" \
+ XCFLAGS="${BUILD_CFLAGS}" \
+ NSPR_LIB_DIR="${T}/fakedir" \
+ emake -j1 -C coreconf \
+ CC="$(tc-getBUILD_CC)" \
+ ${buildbits:-${mybits}}
+ makeargs+=( NSINSTALL="${PWD}/$(find -type f -name nsinstall)" )
+
+ # Then build the target tools.
+ for d in . lib/dbm ; do
+ CPPFLAGS="${myCPPFLAGS}" \
+ XCFLAGS="${CFLAGS} ${CPPFLAGS}" \
+ NSPR_LIB_DIR="${T}/fakedir" \
+ emake -j1 "${makeargs[@]}" -C ${d}
+ done
+}
+
+# Altering these 3 libraries breaks the CHK verification.
+# All of the following cause it to break:
+# - stripping
+# - prelink
+# - ELF signing
+# http://www.mozilla.org/projects/security/pki/nss/tech-notes/tn6.html
+# Either we have to NOT strip them, or we have to forcibly resign after
+# stripping.
+#local_libdir="$(get_libdir)"
+#export STRIP_MASK="
+# */${local_libdir}/libfreebl3.so*
+# */${local_libdir}/libnssdbm3.so*
+# */${local_libdir}/libsoftokn3.so*"
+
+export NSS_CHK_SIGN_LIBS="freebl3 nssdbm3 softokn3"
+
+generate_chk() {
+ local shlibsign="$1"
+ local libdir="$2"
+ einfo "Resigning core NSS libraries for FIPS validation"
+ shift 2
+ local i
+ for i in ${NSS_CHK_SIGN_LIBS} ; do
+ local libname=lib${i}.so
+ local chkname=lib${i}.chk
+ "${shlibsign}" \
+ -i "${libdir}"/${libname} \
+ -o "${libdir}"/${chkname}.tmp \
+ && mv -f \
+ "${libdir}"/${chkname}.tmp \
+ "${libdir}"/${chkname} \
+ || die "Failed to sign ${libname}"
+ done
+}
+
+cleanup_chk() {
+ local libdir="$1"
+ shift 1
+ local i
+ for i in ${NSS_CHK_SIGN_LIBS} ; do
+ local libfname="${libdir}/lib${i}.so"
+ # If the major version has changed, then we have old chk files.
+ [ ! -f "${libfname}" -a -f "${libfname}.chk" ] \
+ && rm -f "${libfname}.chk"
+ done
+}
+
+multilib_src_install() {
+ pushd dist >/dev/null || die
+
+ dodir /usr/$(get_libdir)
+ cp -L */lib/*$(get_libname) "${ED}"/usr/$(get_libdir) || die "copying shared libs failed"
+ local i
+ for i in crmf freebl nssb nssckfw ; do
+ cp -L */lib/lib${i}.a "${ED}"/usr/$(get_libdir) || die "copying libs failed"
+ done
+
+ # Install nss-config and pkgconfig file
+ dodir /usr/bin
+ cp -L */bin/nss-config "${ED}"/usr/bin || die
+ dodir /usr/$(get_libdir)/pkgconfig
+ cp -L */lib/pkgconfig/nss.pc "${ED}"/usr/$(get_libdir)/pkgconfig || die
+
+ # create an nss-softokn.pc from nss.pc for libfreebl and some private headers
+ # bug 517266
+ sed -e 's#Libs:#Libs: -lfreebl#' \
+ -e 's#Cflags:#Cflags: -I${includedir}/private#' \
+ */lib/pkgconfig/nss.pc >"${ED}"/usr/$(get_libdir)/pkgconfig/nss-softokn.pc \
+ || die "could not create nss-softokn.pc"
+
+ # all the include files
+ insinto /usr/include/nss
+ doins public/nss/*.{h,api}
+ insinto /usr/include/nss/private
+ doins private/nss/{blapi,alghmac,cmac}.h
+
+ popd >/dev/null || die
+
+ local f nssutils
+ # Always enabled because we need it for chk generation.
+ nssutils=( shlibsign )
+
+ if multilib_is_native_abi ; then
+ if use utils; then
+ # The tests we do not need to install.
+ #nssutils_test="bltest crmftest dbtest dertimetest
+ #fipstest remtest sdrtest"
+ # checkcert utils has been removed in nss-3.22:
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=1187545
+ # https://hg.mozilla.org/projects/nss/rev/df1729d37870
+ # certcgi has been removed in nss-3.36:
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=1426602
+ nssutils+=(
+ addbuiltin
+ atob
+ baddbdir
+ btoa
+ certutil
+ cmsutil
+ conflict
+ crlutil
+ derdump
+ digest
+ makepqg
+ mangle
+ modutil
+ multinit
+ nonspr10
+ ocspclnt
+ oidcalc
+ p7content
+ p7env
+ p7sign
+ p7verify
+ pk11mode
+ pk12util
+ pp
+ rsaperf
+ selfserv
+ signtool
+ signver
+ ssltap
+ strsclnt
+ symkeyutil
+ tstclnt
+ vfychain
+ vfyserv
+ )
+ # install man-pages for utils (bug #516810)
+ doman doc/nroff/*.1
+ fi
+ pushd dist/*/bin >/dev/null || die
+ for f in ${nssutils[@]}; do
+ dobin ${f}
+ done
+ popd >/dev/null || die
+ fi
+
+ # Prelink breaks the CHK files. We don't have any reliable way to run
+ # shlibsign after prelink.
+ dodir /etc/prelink.conf.d
+ printf -- "-b ${EPREFIX}/usr/$(get_libdir)/lib%s.so\n" ${NSS_CHK_SIGN_LIBS} \
+ > "${ED}"/etc/prelink.conf.d/nss.conf
+}
+
+pkg_postinst() {
+ multilib_pkg_postinst() {
+ # We must re-sign the libraries AFTER they are stripped.
+ local shlibsign="${EROOT}/usr/bin/shlibsign"
+ # See if we can execute it (cross-compiling & such). #436216
+ "${shlibsign}" -h >&/dev/null
+ if [[ $? -gt 1 ]] ; then
+ shlibsign="shlibsign"
+ fi
+ generate_chk "${shlibsign}" "${EROOT}"/usr/$(get_libdir)
+ }
+
+ multilib_foreach_abi multilib_pkg_postinst
+}
+
+pkg_postrm() {
+ multilib_pkg_postrm() {
+ cleanup_chk "${EROOT}"/usr/$(get_libdir)
+ }
+
+ multilib_foreach_abi multilib_pkg_postrm
+}
diff --git a/dev-libs/skalibs/Manifest b/dev-libs/skalibs/Manifest
deleted file mode 100644
index 8c8667e..0000000
--- a/dev-libs/skalibs/Manifest
+++ /dev/null
@@ -1,3 +0,0 @@
-DIST skalibs-2.8.0.0.tar.gz 226948 BLAKE2B 8e8f6dbdea39619da43808e9c7a308fc4e399c6962ebc062c46f41d8e7df341123f114977ad9c66d1c09935854dcb14895d9b1505e125ff7a3019a05e5b8641f SHA512 0d8d4a5a68a3f522312c69913a2e998a7cd8562fb99595ed6631531af590701f995b05c2d85defab3cd24d3480787a7456c8326e7bff00cd1a84ff06ca89b463
-EBUILD skalibs-2.8.0.0.ebuild 962 BLAKE2B b60d5dfb57bd6c28b913e0b2e53a8d0fdd045aa98e1c0d4571628a96898990b43f9ec5fe86e8ae6dd4d2d91f52e371b6f2b9f8f2238d525d8753d1047119be9a SHA512 f70d94a252b9dff8bb704c53d72f2b18039fa13682adbce5ced865f52c8e47621ac65928e7516f646997907f558246881bc582a695ac608d51bf3afc278fac10
-MISC metadata.xml 578 BLAKE2B d5f0ec32e0f6466121a5e91ddfd707a488517f4009fbb999e2ef04d5425dadfe16d4ff7792b64b65065a24b3723aa3076999ca2ce576bb7b134916e0a723b7e6 SHA512 837e8b1a0a2cc499f6431f3ea91a6b240c74d3e6087457d1282f1389f80a501446cd49d65de4233e1a58ce5ecc8191ddb7583d1a03486c35f77c7cd47eaf4890
diff --git a/dev-libs/skalibs/metadata.xml b/dev-libs/skalibs/metadata.xml
deleted file mode 100644
index 993ae05..0000000
--- a/dev-libs/skalibs/metadata.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>williamh@gentoo.org</email>
- <name>William Hubbs</name>
- </maintainer>
- <maintainer type="person">
- <email>aranea@aixah.de</email>
- <name>Luis Ressel</name>
- </maintainer>
- <maintainer type="person">
- <email>samuel@sholland.org</email>
- <name>Samuel Holland</name>
- </maintainer>
- <maintainer type="project">
- <email>proxy-maint@gentoo.org</email>
- <name>Proxy Maintainers</name>
- </maintainer>
-</pkgmetadata>
diff --git a/dev-libs/skalibs/skalibs-2.8.0.0.ebuild b/dev-libs/skalibs/skalibs-2.8.0.0.ebuild
deleted file mode 100644
index 99d5bbb..0000000
--- a/dev-libs/skalibs/skalibs-2.8.0.0.ebuild
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-DESCRIPTION="skarnet.org general-purpose libraries"
-HOMEPAGE="https://www.skarnet.org/software/skalibs/"
-SRC_URI="https://www.skarnet.org/software/${PN}/${P}.tar.gz"
-
-LICENSE="ISC"
-SLOT="0/$(ver_cut 1-2)"
-KEYWORDS="~amd64 ~arm ~x86"
-IUSE="doc ipv6 static-libs"
-
-DEPEND=""
-RDEPEND=""
-
-HTML_DOCS="doc/*"
-
-src_prepare() {
- default
-
- # Remove QA warning about LDFLAGS addition
- sed -i "s/tryldflag LDFLAGS_AUTO -Wl,--hash-style=both/:/" "${S}/configure" || die
-
- # configure overrides gentoo's -fstack-protector default
- sed -i "/^tryflag CFLAGS -fno-stack-protector$/d" "${S}/configure" || die
-}
-
-src_configure() {
- econf \
- --datadir=/etc \
- --dynlibdir=/$(get_libdir) \
- --libdir=/usr/$(get_libdir)/${PN} \
- --sysdepdir=/usr/$(get_libdir)/${PN} \
- --enable-clock \
- --enable-shared \
- $(use_enable static-libs static) \
- $(use_enable ipv6)
-}
diff --git a/dev-qt/qtnetwork/Manifest b/dev-qt/qtnetwork/Manifest
index 3efcb28..ca6bbf1 100644
--- a/dev-qt/qtnetwork/Manifest
+++ b/dev-qt/qtnetwork/Manifest
@@ -1,7 +1,7 @@
AUX qtnetwork-5.12.1-libressl.patch 5321 BLAKE2B 834d182de3726f049e0e0f75ef170c221846a832bd2440ed07583ad654299f68a8b0ca7058be9cd54b78c210ebe8634c990b7843c7b2035b8c43f86cd8868854 SHA512 f4fe01f5e163fa4277fd6bf74683fa5e9710565ba266383d37045fa5cf0330aaf7fe6541d1ae82426cbf692e4c6690607c9e7478499a3b46f586965d0fb8abce
AUX qtnetwork-5.12.4-libressl.patch 662 BLAKE2B 202a778ec852387c961be0ddacc7bf9bad6a467f89e544f57db829d834884f19a3fe68e2cc1c17b9b9f4c39c11e3d4c82004e1cad7bcb5990cccb13e39da97cb SHA512 948ebc1ea9c20103dc963b19953ccfdcad5e3bb4d1f8d71f82c7c3c9b59ad27db2c145943a4d4af6d4691ea96e3ccd647b0afb6fdb1f01f95b4179a7eed493d0
DIST qtbase-everywhere-src-5.13.2.tar.xz 48735704 BLAKE2B 50b8d69212602427b76dce6efefb9195e91e4bf5a09b732e564b66a4e27cfaf193fd860139b2c4cc774b0b1132af1426b79e381fb42eafd506239096bd87837e SHA512 b00ad017cc95876698615fd6e41c6ade366146c1f7057e1925bc1b72918f091aa39aa6bf0ea450fc6cd4d8f9810b228770d981dcb6cbe8ad30abb2c42804a204
-DIST qtbase-everywhere-src-5.14.1.tar.xz 49828188 BLAKE2B d5641df96a90ec4f3f85e47444c151b2090161330df9684703883865ddc84bed507295b67953c0a8cad9c104a10727ac9fb26d7f3ec4bf2052294c843f108491 SHA512 964777323d0e3f9d355218c3493bb3b61d2750d9cb5ba71fce72cae3cd362acce88e39360f1fac0011f1b74d529a23621a7281191c622cc034ce78a77afa296b
+DIST qtbase-everywhere-src-5.14.2.tar.xz 49865752 BLAKE2B ed8eb18dfc79e9983248655eb62e8305ef8b79f96c7880c88533250fef8f0d187cf576082d41df08314711b4c007b94686486abd77bf9bc201336caa02ced300 SHA512 8c83e06d58b56e9f288e83d6c3dd4ad6cc9f1eb1a32c7b44fb912fda34ed7255766fd9fa60cd740ee001df7d6172f25df05f1f95e986c3e793fbcd9bf4f18de9
EBUILD qtnetwork-5.13.2.ebuild 1472 BLAKE2B 837d2aa8f060f959e5d60107d67224e0074ce57bd45164f3b6585939b9778eab4aca3a4e745452cdfa9ab09a0b30db16e6b6201d1321f1d26674ae48fde38f33 SHA512 983963c94fe7a65a8fe7cd87b1bae59fcf2b3b0933758721ed4763b8fb9f375542ad7732066daf05a4d3f67c5c321383dc34c4da2369de55df615519abb8e878
-EBUILD qtnetwork-5.14.1.ebuild 1474 BLAKE2B 5e534bdd395be788fd819084786c57fc13aa842f37c0a49ec7a55538bfd49af846dae2bd1fa6b5b1a91b0131df50f894c61755e837cde00513408f412f0a4d03 SHA512 4a62f814cb66108ea612f565e40dadd6b9f7b6b2e80b6f6f3609f6fe97ebac384ef8db56ee632b3c238618e51c608ef4d23de72f5357bcd07531694a2424b8f2
+EBUILD qtnetwork-5.14.2.ebuild 1563 BLAKE2B 516f135f5431c3b0d3db17b3adef9e7e35b6699daa1374dde3c2104ca09c17a34f42fc3535766d487011deb5c4a18bfe2671edf737a86034d982b33797f51974 SHA512 683fd3a03da7dc80b777c4ffe5eae09186e818e4a889cae954e1d1fbdc09b8bef7d6f9aaaf3646fb95a2a0e2892e62f4ac2af1da24dac7486cde6aaa7ef335de
MISC metadata.xml 876 BLAKE2B cd547dff93432d3d0c4baba6790166ab951035e3c7b9d66fb9717349626f7ac72ef38daf7c648de40bf73ad59f5f7ad8c85894d73e2c37b24832371bed868656 SHA512 6a38a068dd89a9a1bb470938bf4b2427553356fed8f1a638596e21261363544b8fb770ca2ec9e619aedb4e4ea260b60966924b5b8beb8295804c99cb8d916f5f
diff --git a/dev-qt/qtnetwork/qtnetwork-5.14.1.ebuild b/dev-qt/qtnetwork/qtnetwork-5.14.2.ebuild
index 31d151f..1d3f86b 100644
--- a/dev-qt/qtnetwork/qtnetwork-5.14.1.ebuild
+++ b/dev-qt/qtnetwork/qtnetwork-5.14.2.ebuild
@@ -11,12 +11,13 @@ if [[ ${QT5_BUILD_TYPE} == release ]]; then
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
fi
-IUSE="bindist connman libproxy libressl networkmanager sctp +ssl"
+IUSE="bindist connman gssapi libproxy libressl networkmanager sctp +ssl"
DEPEND="
- ~dev-qt/qtcore-${PV}
+ ~dev-qt/qtcore-${PV}:5=
sys-libs/zlib:=
connman? ( ~dev-qt/qtdbus-${PV} )
+ gssapi? ( virtual/krb5 )
libproxy? ( net-libs/libproxy )
networkmanager? ( ~dev-qt/qtdbus-${PV} )
sctp? ( kernel_linux? ( net-misc/lksctp-tools ) )
@@ -59,6 +60,7 @@ pkg_setup() {
src_configure() {
local myconf=(
$(usex connman -dbus-linked '')
+ $(usex gssapi -feature-gssapi -no-feature-gssapi)
$(qt_use libproxy)
$(usex networkmanager -dbus-linked '')
$(qt_use sctp)