summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJory Pratt <anarchy@gentoo.org>2021-10-17 08:19:50 -0500
committerJory Pratt <anarchy@gentoo.org>2021-10-17 08:19:50 -0500
commit7f8131d09169cc0fabd2739fd06fb49892418792 (patch)
tree2435805f05ea7bcad70774a60fd5919db5a49efd
parentdev-qt/qtnetwork: supported via ::gentoo (diff)
downloadanarchy-7f8131d09169cc0fabd2739fd06fb49892418792.tar.gz
anarchy-7f8131d09169cc0fabd2739fd06fb49892418792.tar.bz2
anarchy-7f8131d09169cc0fabd2739fd06fb49892418792.zip
misc cleanup
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/Manifest2
-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.53-fix-building-on-ppc.patch39
-rw-r--r--dev-libs/nss/files/nss-3.53-gentoo-fixups.patch290
-rw-r--r--dev-libs/nss/metadata.xml17
-rw-r--r--dev-libs/nss/nss-3.57.ebuild359
24 files changed, 0 insertions, 1231 deletions
diff --git a/dev-libs/jemalloc/Manifest b/dev-libs/jemalloc/Manifest
deleted file mode 100644
index 06a80d2..0000000
--- a/dev-libs/jemalloc/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-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
deleted file mode 100644
index 2e7fd0d..0000000
--- a/dev-libs/jemalloc/files/jemalloc-5.2.0-gentoo-fixups.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-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
deleted file mode 100644
index ecf6d5e..0000000
--- a/dev-libs/jemalloc/jemalloc-5.2.0.ebuild
+++ /dev/null
@@ -1,60 +0,0 @@
-# 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
deleted file mode 100644
index 08893bb..0000000
--- a/dev-libs/jemalloc/metadata.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?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
deleted file mode 100644
index 131b101..0000000
--- a/dev-libs/nspr/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-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
deleted file mode 100644
index 6ae04f4..0000000
--- a/dev-libs/nspr/files/nspr-4.10.6-solaris.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-* 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
deleted file mode 100644
index 2c8ebd4..0000000
--- a/dev-libs/nspr/files/nspr-4.21-ipv6-musl-support.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-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
deleted file mode 100644
index 087e427..0000000
--- a/dev-libs/nspr/files/nspr-4.23-prtime.patch
+++ /dev/null
@@ -1,26 +0,0 @@
---- 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
deleted file mode 100644
index 1afab1d..0000000
--- a/dev-libs/nspr/files/nspr-4.7.1-solaris.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-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
deleted file mode 100644
index 4045e90..0000000
--- a/dev-libs/nspr/files/nspr-4.8.4-darwin-install_name.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-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
deleted file mode 100644
index 5d37018..0000000
--- a/dev-libs/nspr/files/nspr-4.8.9-link-flags.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-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
deleted file mode 100644
index a22b0b9..0000000
--- a/dev-libs/nspr/files/nspr-4.9.5_nspr_config.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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
deleted file mode 100644
index d9b367e..0000000
--- a/dev-libs/nspr/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?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
deleted file mode 100644
index 0c02c60..0000000
--- a/dev-libs/nspr/nspr-4.25.ebuild
+++ /dev/null
@@ -1,122 +0,0 @@
-# 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 ~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
deleted file mode 100644
index 5a3fe75..0000000
--- a/dev-libs/nss-pem/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-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
deleted file mode 100644
index 013b4ad..0000000
--- a/dev-libs/nss-pem/metadata.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?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
deleted file mode 100644
index 8c40845..0000000
--- a/dev-libs/nss-pem/nss-pem-1.0.5.ebuild
+++ /dev/null
@@ -1,32 +0,0 @@
-# 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
deleted file mode 100644
index 3f1f003..0000000
--- a/dev-libs/nss/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST nss-3.57.tar.gz 81712830 BLAKE2B 998160fe16e13d1997f3d11a054148349b068214afb3c0cd3b9e82ce03999e46ca34b02907dc27e3f253653f6e57a9f1498e6c16f8665350c629f5c3c98ea0bc SHA512 7e312d7539a26f57b968548935a7715cfa895aa61da21d0542ae45b71cb16f63167728534cdfd15f8eca68c75753a0df3d05e87b4c5acaabbda63c736e552ea2
-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
deleted file mode 100644
index 14234e8..0000000
--- a/dev-libs/nss/files/nss-3.21-gentoo-fixup-warnings.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- 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
deleted file mode 100644
index 63cfadd..0000000
--- a/dev-libs/nss/files/nss-3.23-hppa-byte_order.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- 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.53-fix-building-on-ppc.patch b/dev-libs/nss/files/nss-3.53-fix-building-on-ppc.patch
deleted file mode 100644
index 962b9cb..0000000
--- a/dev-libs/nss/files/nss-3.53-fix-building-on-ppc.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-https://bugzilla.mozilla.org/show_bug.cgi?id=1642174
-
-From a7a862bab5e4aae4615ddae3cbe230345f92ed0d Mon Sep 17 00:00:00 2001
-From: Lauri Kasanen <cand@gmx.com>
-Date: Mon, 1 Jun 2020 12:11:45 +0300
-Subject: [PATCH v3] Bug 1642174 /usr/bin/ld: OBJS/Linux_SINGLE_SHLIB/sha512-p8.o:
- ABI version 2 is not compatible with ABI version 1 output
-
-Don't try to build the SHA-2 accelerated asm on old-ABI ppc.
-
-Currently make only, I don't have enough gyp-fu to do that side.
-However, the reporters of 1642174 and 1635625 both used make, not gyp.
-
-Signed-off-by: Lauri Kasanen <cand@gmx.com>
----
- lib/freebl/Makefile | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/lib/freebl/Makefile b/lib/freebl/Makefile
-index 5f7384429..e0461c7d3 100644
---- a/lib/freebl/Makefile
-+++ b/lib/freebl/Makefile
-@@ -267,9 +267,12 @@ ifeq ($(CPU_ARCH),arm)
- endif
- ifeq ($(CPU_ARCH),ppc)
- EXTRA_SRCS += gcm-ppc.c
-- ASFILES += sha512-p8.s
- ifdef USE_64
- DEFINES += -DNSS_NO_INIT_SUPPORT
-+ PPC_ABI := $(shell $(CC) -dM -E - < /dev/null | awk '$$2 == "_CALL_ELF" {print $$3}')
-+ ifeq ($(PPC_ABI),2)
-+ ASFILES += sha512-p8.s
-+ endif
- endif # USE_64
- endif # ppc
- endif # Linux
---
-2.19.1
-
diff --git a/dev-libs/nss/files/nss-3.53-gentoo-fixups.patch b/dev-libs/nss/files/nss-3.53-gentoo-fixups.patch
deleted file mode 100644
index 2d8bdb6..0000000
--- a/dev-libs/nss/files/nss-3.53-gentoo-fixups.patch
+++ /dev/null
@@ -1,290 +0,0 @@
-From 1b3c48499abb000d708abe5f05413c1f4155e086 Mon Sep 17 00:00:00 2001
-From: Jory Pratt <anarchy@gentoo.org>
-Date: Mon, 8 Jun 2020 12:22:29 -0500
-Subject: [PATCH] Add pkg-config and nss-config for Gentoo
-
----
- Makefile | 15 +----
- config/Makefile | 40 ++++++++++++
- config/nss-config.in | 145 +++++++++++++++++++++++++++++++++++++++++++
- config/nss.pc.in | 12 ++++
- manifest.mn | 2 +-
- 5 files changed, 200 insertions(+), 14 deletions(-)
- create mode 100644 config/Makefile
- create mode 100644 config/nss-config.in
- create mode 100644 config/nss.pc.in
-
-diff --git a/Makefile b/Makefile
-index eb4ed1a..f979d90 100644
---- a/Makefile
-+++ b/Makefile
-@@ -4,6 +4,8 @@
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-+default: nss_build_all
-+
- #######################################################################
- # (1) Include initial platform-independent assignments (MANDATORY). #
- #######################################################################
-@@ -48,12 +50,9 @@ include $(CORE_DEPTH)/coreconf/rules.mk
- #######################################################################
-
- nss_build_all:
-- $(MAKE) build_nspr
- $(MAKE) all
-- $(MAKE) latest
-
- nss_clean_all:
-- $(MAKE) clobber_nspr
- $(MAKE) clobber
-
- NSPR_CONFIG_STATUS = $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME)/config.status
-@@ -138,16 +137,6 @@ $(NSPR_CONFIG_STATUS): $(NSPR_CONFIGURE)
- --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
-
-diff --git a/config/Makefile b/config/Makefile
-new file mode 100644
-index 0000000..aaf1991
---- /dev/null
-+++ b/config/Makefile
-@@ -0,0 +1,40 @@
-+CORE_DEPTH = ..
-+DEPTH = ..
-+
-+include $(CORE_DEPTH)/coreconf/config.mk
-+
-+NSS_MAJOR_VERSION = $(shell grep -F "NSS_VMAJOR" ../lib/nss/nss.h | awk '{print $$3}')
-+NSS_MINOR_VERSION = $(shell grep -F "NSS_VMINOR" ../lib/nss/nss.h | awk '{print $$3}')
-+NSS_PATCH_VERSION = $(shell grep -F "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
-+
-diff --git a/config/nss-config.in b/config/nss-config.in
-new file mode 100644
-index 0000000..3a957b8
---- /dev/null
-+++ 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
-+
-diff --git a/config/nss.pc.in b/config/nss.pc.in
-new file mode 100644
-index 0000000..03f1e39
---- /dev/null
-+++ 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.25
-+Libs: -lssl3 -lsmime3 -lnss3 -lnssutil3
-+Cflags: -I${includedir}
-+
-diff --git a/manifest.mn b/manifest.mn
-index dada8ab..72dc9b3 100644
---- a/manifest.mn
-+++ b/manifest.mn
-@@ -10,7 +10,7 @@ IMPORTS = nspr20/v4.8 \
-
- RELEASE = nss
-
--DIRS = coreconf lib cmd cpputil gtests
-+DIRS = coreconf lib cmd cpputil config
-
- lib: coreconf
- cmd: lib
---
-2.26.2
-
diff --git a/dev-libs/nss/metadata.xml b/dev-libs/nss/metadata.xml
deleted file mode 100644
index c76b165..0000000
--- a/dev-libs/nss/metadata.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?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.57.ebuild b/dev-libs/nss/nss-3.57.ebuild
deleted file mode 100644
index c5e3dea..0000000
--- a/dev-libs/nss/nss-3.57.ebuild
+++ /dev/null
@@ -1,359 +0,0 @@
-# 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.28"
-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"
-# pkg-config called by nss-config -> virtual/pkgconfig in RDEPEND
-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}]
- virtual/pkgconfig
-"
-DEPEND="${RDEPEND}"
-
-RESTRICT="test"
-
-S="${WORKDIR}/${P}/${PN}"
-
-MULTILIB_CHOST_TOOLS=(
- /usr/bin/nss-config
-)
-
-PATCHES=(
- # Custom changes for gentoo
- "${FILESDIR}/${PN}-3.53-gentoo-fixups.patch"
- "${FILESDIR}/${PN}-3.21-gentoo-fixup-warnings.patch"
- "${FILESDIR}/${PN}-3.23-hppa-byte_order.patch"
- "${FILESDIR}/${PN}-3.53-fix-building-on-ppc.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
-
- 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 FREEBL_NO_DEPEND=1
- export FREEBL_LOWHASH=1
- export NSS_SEED_ONLY_DEV_URANDOM=1
- export USE_SYSTEM_ZLIB=1
- export ZLIB_LIBS=-lz
- export ASFLAGS=""
- # Fix build failure on arm64
- export NS_USE_GCC=1
- # Detect compiler type and set proper environment value
- if tc-is-gcc; then
- export CC_IS_GCC=1
- elif tc-is-clang; then
- export CC_IS_CLANG=1
- fi
-
- 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} OS_TEST="$(nssarch)"
- 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
-}