summaryrefslogtreecommitdiff
path: root/opt/nss
diff options
context:
space:
mode:
authorrawnix ports <ports@rawnix.org>2026-09-26 18:19:05 +0000
committerrawnix ports <ports@rawnix.org>2026-09-26 18:19:05 +0000
commitc82e88dd00d1b0b7fcfb4e5628d99611388cef6f (patch)
tree56d864b5a5c6c145edd96178ae219a8f90e191a6 /opt/nss
downloadports-c82e88dd00d1b0b7fcfb4e5628d99611388cef6f.tar.gz
sync 2026-09-26 18:19 UTC
1672 files changed, 151396 insertions(+)
Diffstat (limited to 'opt/nss')
-rw-r--r--opt/nss/.footprint136
-rw-r--r--opt/nss/.signature11
-rw-r--r--opt/nss/MAKEPKG101
-rw-r--r--opt/nss/nss-3.54-standalone-2.patch267
-rw-r--r--opt/nss/nss-config.in142
-rw-r--r--opt/nss/nss-softokn.pc.in11
-rw-r--r--opt/nss/nss-util.pc.in11
-rw-r--r--opt/nss/nss.pc.in11
8 files changed, 690 insertions, 0 deletions
diff --git a/opt/nss/.footprint b/opt/nss/.footprint
new file mode 100644
index 0000000..1a29817
--- /dev/null
+++ b/opt/nss/.footprint
@@ -0,0 +1,136 @@
+drwxr-xr-x root/root usr/
+drwxr-xr-x root/root usr/bin/
+-rwxr-xr-x root/root usr/bin/certutil
+-rwxr-xr-x root/root usr/bin/cmsutil
+-rwxr-xr-x root/root usr/bin/crlutil
+-rwxr-xr-x root/root usr/bin/modutil
+-rwxr-xr-x root/root usr/bin/nss-config
+-rwxr-xr-x root/root usr/bin/pk12util
+-rwxr-xr-x root/root usr/bin/shlibsign
+-rwxr-xr-x root/root usr/bin/signtool
+-rwxr-xr-x root/root usr/bin/signver
+-rwxr-xr-x root/root usr/bin/ssltap
+drwxr-xr-x root/root usr/include/
+drwxr-xr-x root/root usr/include/nss/
+-rw-r--r-- root/root usr/include/nss/base64.h
+-rw-r--r-- root/root usr/include/nss/blapit.h
+-rw-r--r-- root/root usr/include/nss/cert.h
+-rw-r--r-- root/root usr/include/nss/certdb.h
+-rw-r--r-- root/root usr/include/nss/certt.h
+-rw-r--r-- root/root usr/include/nss/ciferfam.h
+-rw-r--r-- root/root usr/include/nss/cms.h
+-rw-r--r-- root/root usr/include/nss/cmsreclist.h
+-rw-r--r-- root/root usr/include/nss/cmst.h
+-rw-r--r-- root/root usr/include/nss/cryptohi.h
+-rw-r--r-- root/root usr/include/nss/cryptoht.h
+-rw-r--r-- root/root usr/include/nss/eccutil.h
+-rw-r--r-- root/root usr/include/nss/ecl-exp.h
+-rw-r--r-- root/root usr/include/nss/hasht.h
+-rw-r--r-- root/root usr/include/nss/jar-ds.h
+-rw-r--r-- root/root usr/include/nss/jar.h
+-rw-r--r-- root/root usr/include/nss/jarfile.h
+-rw-r--r-- root/root usr/include/nss/key.h
+-rw-r--r-- root/root usr/include/nss/keyhi.h
+-rw-r--r-- root/root usr/include/nss/keyt.h
+-rw-r--r-- root/root usr/include/nss/keythi.h
+-rw-r--r-- root/root usr/include/nss/kyber.h
+-rw-r--r-- root/root usr/include/nss/lowkeyi.h
+-rw-r--r-- root/root usr/include/nss/lowkeyti.h
+-rw-r--r-- root/root usr/include/nss/ml_dsat.h
+-rw-r--r-- root/root usr/include/nss/nss.h
+-rw-r--r-- root/root usr/include/nss/nssb64.h
+-rw-r--r-- root/root usr/include/nss/nssb64t.h
+-rw-r--r-- root/root usr/include/nss/nssbase.h
+-rw-r--r-- root/root usr/include/nss/nssbaset.h
+-rw-r--r-- root/root usr/include/nss/nssckbi.h
+-rw-r--r-- root/root usr/include/nss/nssckepv.h
+-rw-r--r-- root/root usr/include/nss/nssckft.h
+-rw-r--r-- root/root usr/include/nss/nssckfw.h
+-rw-r--r-- root/root usr/include/nss/nssckfwc.h
+-rw-r--r-- root/root usr/include/nss/nssckfwt.h
+-rw-r--r-- root/root usr/include/nss/nssckg.h
+-rw-r--r-- root/root usr/include/nss/nssckmdt.h
+-rw-r--r-- root/root usr/include/nss/nssckt.h
+-rw-r--r-- root/root usr/include/nss/nsshash.h
+-rw-r--r-- root/root usr/include/nss/nssilckt.h
+-rw-r--r-- root/root usr/include/nss/nssilock.h
+-rw-r--r-- root/root usr/include/nss/nsslocks.h
+-rw-r--r-- root/root usr/include/nss/nsslowhash.h
+-rw-r--r-- root/root usr/include/nss/nssrwlk.h
+-rw-r--r-- root/root usr/include/nss/nssrwlkt.h
+-rw-r--r-- root/root usr/include/nss/nssutil.h
+-rw-r--r-- root/root usr/include/nss/ocsp.h
+-rw-r--r-- root/root usr/include/nss/ocspt.h
+-rw-r--r-- root/root usr/include/nss/p12.h
+-rw-r--r-- root/root usr/include/nss/p12plcy.h
+-rw-r--r-- root/root usr/include/nss/p12t.h
+-rw-r--r-- root/root usr/include/nss/pk11func.h
+-rw-r--r-- root/root usr/include/nss/pk11hpke.h
+-rw-r--r-- root/root usr/include/nss/pk11pqg.h
+-rw-r--r-- root/root usr/include/nss/pk11priv.h
+-rw-r--r-- root/root usr/include/nss/pk11pub.h
+-rw-r--r-- root/root usr/include/nss/pk11sdr.h
+-rw-r--r-- root/root usr/include/nss/pkcs11.h
+-rw-r--r-- root/root usr/include/nss/pkcs11f.h
+-rw-r--r-- root/root usr/include/nss/pkcs11n.h
+-rw-r--r-- root/root usr/include/nss/pkcs11p.h
+-rw-r--r-- root/root usr/include/nss/pkcs11t.h
+-rw-r--r-- root/root usr/include/nss/pkcs11u.h
+-rw-r--r-- root/root usr/include/nss/pkcs11uri.h
+-rw-r--r-- root/root usr/include/nss/pkcs12.h
+-rw-r--r-- root/root usr/include/nss/pkcs12t.h
+-rw-r--r-- root/root usr/include/nss/pkcs1sig.h
+-rw-r--r-- root/root usr/include/nss/pkcs7t.h
+-rw-r--r-- root/root usr/include/nss/portreg.h
+-rw-r--r-- root/root usr/include/nss/preenc.h
+-rw-r--r-- root/root usr/include/nss/secasn1.h
+-rw-r--r-- root/root usr/include/nss/secasn1t.h
+-rw-r--r-- root/root usr/include/nss/seccomon.h
+-rw-r--r-- root/root usr/include/nss/secder.h
+-rw-r--r-- root/root usr/include/nss/secdert.h
+-rw-r--r-- root/root usr/include/nss/secdig.h
+-rw-r--r-- root/root usr/include/nss/secdigt.h
+-rw-r--r-- root/root usr/include/nss/secerr.h
+-rw-r--r-- root/root usr/include/nss/sechash.h
+-rw-r--r-- root/root usr/include/nss/secitem.h
+-rw-r--r-- root/root usr/include/nss/secmime.h
+-rw-r--r-- root/root usr/include/nss/secmod.h
+-rw-r--r-- root/root usr/include/nss/secmodt.h
+-rw-r--r-- root/root usr/include/nss/secoid.h
+-rw-r--r-- root/root usr/include/nss/secoidt.h
+-rw-r--r-- root/root usr/include/nss/secpkcs5.h
+-rw-r--r-- root/root usr/include/nss/secpkcs7.h
+-rw-r--r-- root/root usr/include/nss/secport.h
+-rw-r--r-- root/root usr/include/nss/shsign.h
+-rw-r--r-- root/root usr/include/nss/smime.h
+-rw-r--r-- root/root usr/include/nss/ssl.h
+-rw-r--r-- root/root usr/include/nss/sslerr.h
+-rw-r--r-- root/root usr/include/nss/sslexp.h
+-rw-r--r-- root/root usr/include/nss/sslproto.h
+-rw-r--r-- root/root usr/include/nss/sslt.h
+-rw-r--r-- root/root usr/include/nss/utilmodt.h
+-rw-r--r-- root/root usr/include/nss/utilpars.h
+-rw-r--r-- root/root usr/include/nss/utilparst.h
+-rw-r--r-- root/root usr/include/nss/utilrename.h
+drwxr-xr-x root/root usr/include/nss/private/
+-rw-r--r-- root/root usr/include/nss/private/alghmac.h
+-rw-r--r-- root/root usr/include/nss/private/blapi.h
+drwxr-xr-x root/root usr/lib/
+-rw-r--r-- root/root usr/lib/libfreebl3.chk
+-rwxr-xr-x root/root usr/lib/libfreebl3.so
+-rw-r--r-- root/root usr/lib/libfreeblpriv3.chk
+-rwxr-xr-x root/root usr/lib/libfreeblpriv3.so
+-rwxr-xr-x root/root usr/lib/libnss3.so
+-rwxr-xr-x root/root usr/lib/libnssckbi.so
+-rw-r--r-- root/root usr/lib/libnssdbm3.chk
+-rwxr-xr-x root/root usr/lib/libnssdbm3.so
+-rwxr-xr-x root/root usr/lib/libnsssysinit.so
+-rwxr-xr-x root/root usr/lib/libnssutil3.so
+-rwxr-xr-x root/root usr/lib/libsmime3.so
+-rw-r--r-- root/root usr/lib/libsoftokn3.chk
+-rwxr-xr-x root/root usr/lib/libsoftokn3.so
+-rwxr-xr-x root/root usr/lib/libssl3.so
+drwxr-xr-x root/root usr/lib/pkgconfig/
+-rw-r--r-- root/root usr/lib/pkgconfig/nss-softokn.pc
+-rw-r--r-- root/root usr/lib/pkgconfig/nss-util.pc
+-rw-r--r-- root/root usr/lib/pkgconfig/nss.pc
diff --git a/opt/nss/.signature b/opt/nss/.signature
new file mode 100644
index 0000000..c2b093a
--- /dev/null
+++ b/opt/nss/.signature
@@ -0,0 +1,11 @@
+RWTZ9IduCSQ/mPGoz69Fl2drwLKetZX9QWYnl9Q/SvRRuqgkXkL4dLakwR9Gdg/KxdM3uLkyVEs42gxXCLVD4J4Q05uj7dGi8AY=
+
+SHA256 (MAKEPKG) = 6875bf16e523c5126c858817ab452605fb12d033f8856ede75661980aeff7daf
+SHA256 (.footprint) = 5fda8fe1a2b48b38740824c0eef20572b31114fb748274281ab4c122e974ae5c
+SHA256 (nss-3.130.tar.gz) = afab9f82c78bfa3e7e8b4a61ac31922675c58203f67ff385a2714df7fe9bd5c5
+SHA256 (nss-3.54-standalone-2.patch) = 607a29650c767f9451eaec1e35a48a3c8c9ce6a7099234417eb521a44653a371
+SHA256 (nss-config.in) = 08dbc1202186308e86125b5c5e7e2d0e1bd1bd5ed65eab011b9af210f656aff5
+SHA256 (nss.pc.in) = 135fbde6866e422b7a436e18d5b8e0defbb67dde6b8e1dc9e84de14b5c645626
+SHA256 (nss-softokn.pc.in) = 9fe71aa579b7743d1abf5e1a6c74324ce5f9c6113240729a7341e572c3682034
+SHA256 (nss-util.pc.in) = a8b264050fd3b372c58e3eec81b2dc3b369567d0a5f4d085830cd77220e2ac2a
+SHA256 (nss#3.130-1.pkg.tar.gz) = 3e8321b5557f371338c9147d71f1826350d8b550cba3439efce09e360a786d54
diff --git a/opt/nss/MAKEPKG b/opt/nss/MAKEPKG
new file mode 100644
index 0000000..f3f44d8
--- /dev/null
+++ b/opt/nss/MAKEPKG
@@ -0,0 +1,101 @@
+#!/bin/mkpkg
+# description: Mozilla Network Security Services
+# url: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS
+
+name=nss
+version=3.130
+release=1
+_version_tag=3_130
+depends=(nspr sqlite zlib)
+source=(https://ftp.mozilla.org/pub/security/nss/releases/NSS_${_version_tag}_RTM/src/$name-$version.tar.gz
+ nss-3.54-standalone-2.patch
+ nss-config.in nss.pc.in nss-softokn.pc.in nss-util.pc.in)
+
+patch() {
+ cd $name-$version
+ patch -p1 -i $SRC/nss-3.54-standalone-2.patch
+}
+
+sha256sums=(
+ "afab9f82c78bfa3e7e8b4a61ac31922675c58203f67ff385a2714df7fe9bd5c5"
+ "607a29650c767f9451eaec1e35a48a3c8c9ce6a7099234417eb521a44653a371"
+ "08dbc1202186308e86125b5c5e7e2d0e1bd1bd5ed65eab011b9af210f656aff5"
+ "135fbde6866e422b7a436e18d5b8e0defbb67dde6b8e1dc9e84de14b5c645626"
+ "9fe71aa579b7743d1abf5e1a6c74324ce5f9c6113240729a7341e572c3682034"
+ "a8b264050fd3b372c58e3eec81b2dc3b369567d0a5f4d085830cd77220e2ac2a"
+)
+
+build() {
+ cd $name-$version
+
+ export CC=clang
+ export CXX=clang++
+ export CC_IS_CLANG=1
+ export BUILD_OPT=1
+ export USE_64=1
+ export NSS_USE_SYSTEM_SQLITE=1
+ export USE_SYSTEM_ZLIB=1
+ export ZLIB_LIBS=-lz
+ export NSPR_INCLUDE_DIR=/usr/include/nspr
+ export NSPR_LIB_DIR=/usr/lib
+ export NSS_DISABLE_LIBPKIX=1
+ export NSS_DISABLE_GTESTS=1
+ export NSS_ENABLE_WERROR=0
+
+ make -j$(nproc) -C nss nss_build_all
+
+ _distdir=dist/$(ls dist | grep OBJ)
+
+ # bins
+ install -d $PKG/usr/bin
+ for _bin in certutil cmsutil crlutil modutil pk12util shlibsign \
+ signtool signver ssltap; do
+ install -m 755 $_distdir/bin/$_bin $PKG/usr/bin/
+ done
+
+ # libs
+ install -d $PKG/usr/lib
+ install -m 755 $_distdir/lib/*.so $PKG/usr/lib/
+ # install -m 644 $_distdir/lib/libcrmf.a $PKG/usr/lib/
+ for _chk in $_distdir/lib/*.chk; do
+ [ -e "$_chk" ] && install -m 644 "$_chk" $PKG/usr/lib/
+ done
+
+ # headers
+ install -d $PKG/usr/include/nss/private
+ install -m 644 dist/public/nss/*.h $PKG/usr/include/nss/
+ install -m 644 dist/private/nss/blapi.h $PKG/usr/include/nss/private/
+ install -m 644 dist/private/nss/alghmac.h $PKG/usr/include/nss/private/
+
+ # nss-config script
+ install -m 755 $SRC/nss-config.in $PKG/usr/bin/nss-config
+ sed -i "s/@VERSION@/$version/" $PKG/usr/bin/nss-config
+
+ # pkg-config files
+ install -d $PKG/usr/lib/pkgconfig
+
+ NSS_LIBS=$($PKG/usr/bin/nss-config --libs)
+ NSS_CFLAGS=$($PKG/usr/bin/nss-config --cflags)
+ NSPR_VERSION=$(pkg-config --modversion nspr)
+
+ for _mod in nss nss-util nss-softokn; do
+ sed -e "s,%libdir%,/usr/lib," \
+ -e "s,%prefix%,/usr," \
+ -e "s,%exec_prefix%,/usr," \
+ -e "s,%includedir%,/usr/include/nss," \
+ -e "s,%NSS_VERSION%,$version," \
+ -e "s,%NSPR_VERSION%,$NSPR_VERSION," \
+ -e "s,%FULL_NSS_LIBS%,$NSS_LIBS," \
+ -e "s,%FULL_NSS_CFLAGS%,$NSS_CFLAGS," \
+ $SRC/$_mod.pc.in > $PKG/usr/lib/pkgconfig/$_mod.pc
+ done
+
+ rm -f $PKG/usr/lib/libnssckbi-testlib.so
+}
+
+signify() {
+ untrusted comment: public key
+ RWTZ9IduCSQ/mL8337TEUinPwT92xFEUpD92hkS7IxcOnzTt9QdpohT3
+}
+
+# vim: filetype=sh
diff --git a/opt/nss/nss-3.54-standalone-2.patch b/opt/nss/nss-3.54-standalone-2.patch
new file mode 100644
index 0000000..d1db816
--- /dev/null
+++ b/opt/nss/nss-3.54-standalone-2.patch
@@ -0,0 +1,267 @@
+Submitted By: Xi Ruoyao <xry111_AT_mengyan1223_DOT_wang>
+Date: 2020-05-31
+Initial Package Version: 3.12.4
+Upstream Status: Not applicable
+Origin: Self, rediffed for nss-3.53.
+Description: Adds auto-generated nss.pc and nss-config script, and
+ allows building without nspr in the source tree.
+ For 3.40.1, Requires: updated to nspr >= 4.20.
+ For 3.46.1, Requires: updated to nspr >= 4.21.
+ For 3.48, Requires: updated to nspr >= 4.24.
+ For 3.51.1, Requires: updated to nspr >= 4.25.
+ For 3.54, Requires: updated to nspr >= 4.26.
+
+diff -Nuar nss-3.53.orig/nss/config/Makefile nss-3.53/nss/config/Makefile
+--- nss-3.53.orig/nss/config/Makefile 1970-01-01 08:00:00.000000000 +0800
++++ nss-3.53/nss/config/Makefile 2020-05-31 13:48:14.423566855 +0800
+@@ -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}/lib," \
++ -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 ../../../../nss/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 ../../../nss/config/nss-config $(DIST)/bin
++
++libs:
++
++dummy: all export libs
++
+diff -Nuar nss-3.53.orig/nss/config/nss-config.in nss-3.53/nss/config/nss-config.in
+--- nss-3.53.orig/nss/config/nss-config.in 1970-01-01 08:00:00.000000000 +0800
++++ nss-3.53/nss/config/nss-config.in 2020-05-31 13:48:14.424566860 +0800
+@@ -0,0 +1,153 @@
++#!/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
++ nssutil
++ smime
++ ssl
++ softokn
++EOF
++ exit $1
++}
++
++if test $# -eq 0; then
++ usage 1 1>&2
++fi
++
++lib_nss=yes
++lib_nssutil=yes
++lib_smime=yes
++lib_ssl=yes
++lib_softokn=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
++ ;;
++ nss)
++ lib_nss=yes
++ ;;
++ nssutil)
++ lib_nssutil=yes
++ ;;
++ smime)
++ lib_smime=yes
++ ;;
++ ssl)
++ lib_ssl=yes
++ ;;
++ softokn)
++ lib_softokn=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="-L$libdir"
++ if test -n "$lib_nss"; then
++ libdirs="$libdirs -lnss${major_version}"
++ fi
++ if test -n "$lib_nssutil"; then
++ libdirs="$libdirs -lnssutil${major_version}"
++ fi
++ if test -n "$lib_smime"; then
++ libdirs="$libdirs -lsmime${major_version}"
++ fi
++ if test -n "$lib_ssl"; then
++ libdirs="$libdirs -lssl${major_version}"
++ fi
++ if test -n "$lib_softokn"; then
++ libdirs="$libdirs -lsoftokn${major_version}"
++ fi
++ echo $libdirs
++fi
++
+diff -Nuar nss-3.53.orig/nss/config/nss.pc.in nss-3.53/nss/config/nss.pc.in
+--- nss-3.53.orig/nss/config/nss.pc.in 1970-01-01 08:00:00.000000000 +0800
++++ nss-3.53/nss/config/nss.pc.in 2020-05-31 13:48:14.424566860 +0800
+@@ -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.26
++Libs: -L@libdir@ -lnss@NSS_MAJOR_VERSION@ -lnssutil@NSS_MAJOR_VERSION@ -lsmime@NSS_MAJOR_VERSION@ -lssl@NSS_MAJOR_VERSION@ -lsoftokn@NSS_MAJOR_VERSION@
++Cflags: -I${includedir}
++
+diff -Nuar nss-3.53.orig/nss/Makefile nss-3.53/nss/Makefile
+--- nss-3.53.orig/nss/Makefile 2020-05-30 04:34:42.000000000 +0800
++++ nss-3.53/nss/Makefile 2020-05-31 13:48:51.500733022 +0800
+@@ -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,10 @@
+ #######################################################################
+
+ 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
+diff -Nuar nss-3.53.orig/nss/manifest.mn nss-3.53/nss/manifest.mn
+--- nss-3.53.orig/nss/manifest.mn 2020-05-30 04:34:42.000000000 +0800
++++ nss-3.53/nss/manifest.mn 2020-05-31 13:48:30.652640413 +0800
+@@ -10,7 +10,7 @@
+
+ RELEASE = nss
+
+-DIRS = coreconf lib cmd cpputil gtests
++DIRS = coreconf lib cmd cpputil gtests config
+
+ lib: coreconf
+ cmd: lib
diff --git a/opt/nss/nss-config.in b/opt/nss/nss-config.in
new file mode 100644
index 0000000..1a5aec4
--- /dev/null
+++ b/opt/nss/nss-config.in
@@ -0,0 +1,142 @@
+#!/bin/sh
+
+prefix=/usr
+version=@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
+ nssutil
+ ssl
+ smime
+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 $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=${prefix}
+fi
+if test -z "$includedir"; then
+ includedir=${prefix}/include/nss
+fi
+if test -z "$libdir"; then
+ libdir=${exec_prefix}/lib
+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="-L$libdir"
+ if test -n "$lib_ssl"; then
+ libdirs="$libdirs -lssl3"
+ fi
+ if test -n "$lib_smime"; then
+ libdirs="$libdirs -lsmime3"
+ fi
+ if test -n "$lib_nss"; then
+ libdirs="$libdirs -lnss3"
+ fi
+ if test -n "$lib_nssutil"; then
+ libdirs="$libdirs -lnssutil3"
+ fi
+ echo $libdirs
+fi
+
diff --git a/opt/nss/nss-softokn.pc.in b/opt/nss/nss-softokn.pc.in
new file mode 100644
index 0000000..34357cc
--- /dev/null
+++ b/opt/nss/nss-softokn.pc.in
@@ -0,0 +1,11 @@
+prefix=%prefix%
+exec_prefix=%exec_prefix%
+libdir=%libdir%
+includedir=%includedir%
+
+Name: NSS-SOFTOKN
+Description: Network Security Services Softoken PKCS #11 Module
+Version: %NSS_VERSION%
+Requires: nspr >= %NSPR_VERSION%, nss-util >= %NSS_VERSION%
+Libs: -lfreebl3 -lnssdbm3 -lsoftokn3
+Cflags: -I${includedir}/private
diff --git a/opt/nss/nss-util.pc.in b/opt/nss/nss-util.pc.in
new file mode 100644
index 0000000..7ed9914
--- /dev/null
+++ b/opt/nss/nss-util.pc.in
@@ -0,0 +1,11 @@
+prefix=%prefix%
+exec_prefix=%exec_prefix%
+libdir=%libdir%
+includedir=%includedir%
+
+Name: NSS-UTIL
+Description: Network Security Services Utility Library
+Version: %NSS_VERSION%
+Requires: nspr >= %NSPR_VERSION%
+Libs: -L${libdir} -lnssutil3
+Cflags: -I${includedir}
diff --git a/opt/nss/nss.pc.in b/opt/nss/nss.pc.in
new file mode 100644
index 0000000..d57f807
--- /dev/null
+++ b/opt/nss/nss.pc.in
@@ -0,0 +1,11 @@
+prefix=%prefix%
+exec_prefix=%exec_prefix%
+libdir=%libdir%
+includedir=%includedir%
+
+Name: NSS
+Description: Network Security Services
+Version: %NSS_VERSION%
+Requires: nspr >= %NSPR_VERSION%
+Libs: %FULL_NSS_LIBS%
+Cflags: %FULL_NSS_CFLAGS%