Merge commit '931df15b06fdb32d1416e5780b2059e3f98ee531' into cros_sdk

Updated portage-stable to CrOS version 14056.0.0

BUG=b/192265868
TEST=local BE run
RELEASE_NOTE=Updated ChromeOS base to ChromeOS version 14056.0.0.

Signed-off-by: Robert Kolchmeyer <rkolchmeyer@google.com>
Change-Id: I0a58dd22a7843c7f1e8f70fd5c87168b6e68b744
diff --git a/PRESUBMIT.cfg b/PRESUBMIT.cfg
index 43d092e..8bdbe9e 100644
--- a/PRESUBMIT.cfg
+++ b/PRESUBMIT.cfg
@@ -5,6 +5,9 @@
 # Make sure Manifest files are valid.
 manifest_check: true
 
+# Make sure RELEASE_NOTE field is present.
+release_note_field_check: true
+
 stray_whitespace_check: false
 long_line_check: false
 cros_license_check: false
diff --git a/app-forensics/aide/Manifest b/app-forensics/aide/Manifest
new file mode 100644
index 0000000..3123f6d
--- /dev/null
+++ b/app-forensics/aide/Manifest
@@ -0,0 +1 @@
+DIST aide-0.16.2_p20200614.tar.gz 144202 BLAKE2B a2533eaf0dd6caa82718eaa89878ddc101f64767788eeac3a250ceb584a2c5958ef8a5481b89eeb720e21af07da8f3576fb46d8ee9966fd2361354a35a7eaa6e SHA512 f5f83b8401465471043c60aeb6314f7bcab24c9f962f6ce550445bec8d866a5c8c00eba9e9f157f1223cde58631de139533c7de64fb3c861a5d8e7b5e367e106
diff --git a/app-forensics/aide/aide-0.16.2_p20200614.ebuild b/app-forensics/aide/aide-0.16.2_p20200614.ebuild
new file mode 100644
index 0000000..415621c
--- /dev/null
+++ b/app-forensics/aide/aide-0.16.2_p20200614.ebuild
@@ -0,0 +1,142 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools readme.gentoo-r1
+
+DESCRIPTION="AIDE (Advanced Intrusion Detection Environment) is a file integrity checker"
+HOMEPAGE="https://aide.github.io/ https://github.com/aide/aide"
+
+COMMIT="7949feff20501724a43929ee7894b005812ffb4f" # 20200614
+SRC_URI="https://github.com/aide/aide/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="*"
+IUSE="acl audit curl e2fs mhash postgres prelink selinux xattr zlib"
+
+REQUIRED_USE="
+	postgres? ( !mhash )
+	"
+
+COMMON_DEPEND="
+	dev-libs/libpcre
+	acl? ( virtual/acl )
+	audit? ( sys-process/audit )
+	curl? ( net-misc/curl )
+	e2fs? ( sys-fs/e2fsprogs )
+	!mhash? (
+		dev-libs/libgcrypt:0=
+		dev-libs/libgpg-error
+	)
+	mhash? ( app-crypt/mhash )
+	postgres? ( dev-db/postgresql:= )
+	prelink? ( dev-libs/elfutils )
+	selinux? ( sys-libs/libselinux )
+	xattr? ( sys-apps/attr )
+	zlib? ( sys-libs/zlib )"
+
+RDEPEND="
+	${COMMON_DEPEND}
+	selinux? ( sec-policy/selinux-aide )"
+
+DEPEND="${COMMON_DEPEND}"
+
+BDEPEND="
+	sys-devel/bison
+	sys-devel/flex
+	virtual/pkgconfig
+	prelink? ( sys-devel/prelink )"
+
+HTML_DOCS=( doc/manual.html )
+
+DISABLE_AUTOFORMATTING=1
+DOC_CONTENTS="
+Example configuration file was installed at '${EPREFIX}/etc/aide/aide.conf'.
+Please edit it to meet your needs. Refer to aide.conf(5) manual page
+for more information.
+
+A helper script, aideinit, was installed and can be used to make AIDE
+management easier. Please run 'aideinit --help' for more information."
+
+PATCHES=(
+	"${FILESDIR}/aide-0.16-fix-LIBS-LDFLAGS-mixing.patch"
+	"${FILESDIR}/aide-0.16-fix-acl-configure-option.patch"
+
+	# Remove not available gcrypt algorithm 7 DB_HAVAL
+	# See: https://sourceforge.net/p/aide/bugs/105/
+	"${FILESDIR}/${P}_define_hash_use_gcrypt.patch"
+)
+
+S="${WORKDIR}/${PN}-${COMMIT}"
+
+pkg_setup() {
+	if use postgres; then
+		ewarn "\nWARNING!"
+		ewarn "You need to choose one of the postgres versions before building"
+		ewarn "\nPlease select a target postgres version/slot using:\n"
+		ewarn "    ~# eselect postgresql list"
+		ewarn "    ~# eselect postgresql set <version>\n"
+	fi
+}
+
+src_prepare() {
+	default
+	sed -i -e 's| -Werror||g' configure.ac || die
+	echo "m4_define([AIDE_VERSION], [${PV}])" > version.m4 || die
+	eautoreconf
+}
+
+src_configure() {
+	local myeconfargs=(
+		--sysconfdir="${EPREFIX}/etc/${PN}"
+		--with-confighmactype="sha512"		# Override default weak MD5 hash.
+		--with-dbhmackey="sha512"			# Override default weak MD5 hash.
+		# Disable broken l10n support: https://sourceforge.net/p/aide/bugs/98/
+		# This doesn't affect anything because there are no localizations yet.
+		--without-locale
+		--disable-static
+		$(use_with zlib)
+		$(use_with curl)
+		$(use_with acl posix-acl)
+		$(use_with selinux)
+		$(use_with prelink prelink "${EPREFIX}/usr/sbin/prelink")
+		$(use_with xattr)
+		$(use_with e2fs e2fsattrs)
+		$(use_with mhash mhash)
+		$(use_with !mhash gcrypt)
+		$(use_with postgres psql)
+		$(use_with audit)
+	)
+
+	econf "${myeconfargs[@]}"
+}
+
+src_install() {
+	default
+	readme.gentoo_create_doc
+
+	insinto /etc/${PN}
+	insopts -m0600
+	newins "${FILESDIR}"/aide.conf-r1 aide.conf
+
+	dosbin "${FILESDIR}"/aideinit
+	dodoc -r contrib/ "${FILESDIR}"/aide.cron
+
+	keepdir /var/{lib,log}/${PN}
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+
+	if use postgres; then
+		elog "\nDue to a bad assumption by aide, you must issue the following"
+		elog "command after the database initialization (aide --init ...):"
+		elog '\n    ~# psql -c "update pg_index set indisunique=false from pg_class \\ '
+		elog "          where pg_class.relname='TABLE_pkey' and \ "
+		elog '          pg_class.oid=pg_index.indexrelid" -h HOSTNAME -p PORT DBASE USER'
+		elog "\nwhere TABLE, HOSTNAME, PORT, DBASE, and USER are the same as"
+		elog "in your aide.conf.\n"
+	fi
+}
diff --git a/app-forensics/aide/files/aide-0.16-add-missing-include.patch b/app-forensics/aide/files/aide-0.16-add-missing-include.patch
new file mode 100644
index 0000000..75f0403
--- /dev/null
+++ b/app-forensics/aide/files/aide-0.16-add-missing-include.patch
@@ -0,0 +1,24 @@
+commit 1cbb888d55388d6bb88141c946bd6993b3e9872f
+Author: Ilya Tumaykin <itumaykin@gmail.com>
+Date:   Tue May 23 17:24:29 2017 +0300
+
+db: add missing include
+
+url_fclose() function used in this file is defined in fopen.h.
+See https://sourceforge.net/p/aide/bugs/99/
+
+diff --git a/src/db.c b/src/db.c
+index dd133d4..858240d 100644
+--- a/src/db.c
++++ b/src/db.c
+@@ -28,6 +28,10 @@
+ #include "db_disk.h"
+ #include "md.h"
+
++#ifdef WITH_CURL
++#include "fopen.h"
++#endif
++
+ #ifdef WITH_PSQL
+ #include "db_sql.h"
+ #endif
diff --git a/app-forensics/aide/files/aide-0.16-fix-LIBS-LDFLAGS-mixing.patch b/app-forensics/aide/files/aide-0.16-fix-LIBS-LDFLAGS-mixing.patch
new file mode 100644
index 0000000..453abe5
--- /dev/null
+++ b/app-forensics/aide/files/aide-0.16-fix-LIBS-LDFLAGS-mixing.patch
@@ -0,0 +1,23 @@
+commit 6da37687ba7cf259ac19cae2e1c16115b6848143
+Author: Ilya Tumaykin <itumaykin@gmail.com>
+Date:   Thu May 25 13:34:55 2017 +0300
+
+build: fix incorrect LIBS/LDFLAGS mixing
+
+Otherwise build with LDFLAGS='-Wl,--as-needed' and curl support fails.
+See https://bugs.gentoo.org/show_bug.cgi?id=271326
+and https://sourceforge.net/p/aide/bugs/96/
+
+diff --git a/configure.ac b/configure.ac
+index 3598ebe..0c5cb0c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -713,7 +713,7 @@ if test x$with_curl = xyes; then
+   AC_CHECK_HEADERS(curl/curl.h,,
+  	[AC_MSG_ERROR([You don't have curl properly installed. Install it or try --without-curl.])])
+   CFLAGS="$CFLAGS $CURL_CFLAGS"
+-  LDFLAGS="$LDFLAGS $CURL_LIBS"
++  LIBS="$LIBS $CURL_LIBS"
+   AC_CHECK_LIB(curl,curl_easy_init,havecurl=yes,
+  	[AC_MSG_ERROR([You don't have curl properly installed. Install it or try --without-curl.])]
+ )
diff --git a/app-forensics/aide/files/aide-0.16-fix-acl-configure-option.patch b/app-forensics/aide/files/aide-0.16-fix-acl-configure-option.patch
new file mode 100644
index 0000000..a989e37
--- /dev/null
+++ b/app-forensics/aide/files/aide-0.16-fix-acl-configure-option.patch
@@ -0,0 +1,23 @@
+commit 3d9746bccbb50809e4c3de90ab5145a17af39aeb
+Author: Ilya Tumaykin <itumaykin@gmail.com>
+Date:   Thu May 25 14:38:02 2017 +0300
+
+build: respect user choice for posix-acl configure option
+
+Otherwise acl support is enabled automagically, which is bad.
+See https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Automagic_dependencies
+and https://sourceforge.net/p/aide/bugs/97/
+
+diff --git a/configure.ac b/configure.ac
+index 3598ebe..c45bbee 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -450,7 +450,7 @@ AC_MSG_CHECKING(for posix-acl-support)
+ AC_ARG_WITH([posix-acl],
+ 	[AC_HELP_STRING([--with-posix-acl],
+ 		[use POSIX ACLs (no checking)])],
+-	[],
++	[with_posix_acl_support="$withval"],
+ 	[with_posix_acl_support=no]
+ )
+
diff --git a/app-forensics/aide/files/aide-0.16-support-attr-2.4.48.patch b/app-forensics/aide/files/aide-0.16-support-attr-2.4.48.patch
new file mode 100644
index 0000000..8acb6e5
--- /dev/null
+++ b/app-forensics/aide/files/aide-0.16-support-attr-2.4.48.patch
@@ -0,0 +1,28 @@
+Fix build against attr >= 2.4.48
+
+Drop obsolete attr/xattr.h include as did attr upstream in attr-2.4.48.
+See http://git.savannah.nongnu.org/cgit/attr.git/commit/?id=7921157890d07858d092f4003ca4c6bae9fd2c38
+
+ENOATTR definition was moved to attr/attributes.h, thus include it.
+attr < 2.4.48 keeps ENOATTR definition in attr/xattr.h, so define it
+manually if necessary in order to preserve backwards compatibility.
+
+Bug: https://bugs.gentoo.org/648966
+Upstream-bug: https://sourceforge.net/p/aide/patches/23/
+
+diff --git a/include/db_config.h b/include/db_config.h
+index e92fe1c..7e5ff0d 100644
+--- a/include/db_config.h
++++ b/include/db_config.h
+@@ -62,7 +62,10 @@ typedef struct acl_type {
+
+ #ifdef WITH_XATTR /* Do generic user Xattrs. */
+ #include <sys/xattr.h>
+-#include <attr/xattr.h>
++#include <attr/attributes.h>
++#ifndef ENOATTR
++# define ENOATTR ENODATA
++#endif
+ #endif
+
+ typedef struct xattr_node 
diff --git a/app-forensics/aide/files/aide-0.16.2_p20200614_define_hash_use_gcrypt.patch b/app-forensics/aide/files/aide-0.16.2_p20200614_define_hash_use_gcrypt.patch
new file mode 100644
index 0000000..e643a00
--- /dev/null
+++ b/app-forensics/aide/files/aide-0.16.2_p20200614_define_hash_use_gcrypt.patch
@@ -0,0 +1,37 @@
+diff -Nur aide-0.16/include/md.h aide-0.16.new/include/md.h
+--- aide-0.16/include/md.h	2016-07-25 22:56:55.000000000 +0200
++++ aide-0.16.new/include/md.h	2018-11-21 14:07:01.347479021 +0100
+@@ -48,7 +48,7 @@
+ #define HASH_GCRYPT_COUNT GCRY_MD_CRC32
+ #ifndef WITH_MHASH
+ #define HASH_USE_GCRYPT (DB_MD5|DB_SHA1|DB_RMD160|DB_TIGER|DB_CRC32|\
+-                         DB_HAVAL|DB_CRC32|DB_SHA256|DB_SHA512)
++                         DB_CRC32B|DB_SHA256|DB_SHA512)
+ #endif
+ #endif
+ 
+diff -Nur aide-0.16/src/md.c aide-0.16.new/src/md.c
+--- aide-0.16/src/md.c	2016-07-25 22:56:55.000000000 +0200
++++ aide-0.16.new/src/md.c	2018-11-21 14:06:05.602295496 +0100
+@@ -55,10 +55,12 @@
+     r=DB_TIGER;
+     break;
+   }
++/* until libgcrypt-1.8.4 not implemented yet, see doc/gcrypt.info-1
+   case GCRY_MD_HAVAL: {
+     r=DB_HAVAL;
+     break;
+   }
++*/
+   case GCRY_MD_SHA256: {
+     r=DB_SHA256;
+     break;
+@@ -219,7 +221,7 @@
+ 			if(gcry_md_enable(md->mdh,i)==GPG_ERR_NO_ERROR){
+ 				md->calc_attr|=h;
+ 			} else {
+-				error(0,"gcry_md_enable %i failed",i);
++				error(0,"gcry_md_enable %i failed, see /usr/include/gcrypt.h enum gcry_md_algos",i);
+ 				md->todo_attr&=~h;
+ 			}
+ 		}
diff --git a/app-forensics/aide/files/aide.conf b/app-forensics/aide/files/aide.conf
new file mode 100644
index 0000000..cef1813
--- /dev/null
+++ b/app-forensics/aide/files/aide.conf
@@ -0,0 +1,115 @@
+# AIDE conf
+
+database=file:/var/lib/aide/aide.db
+database_out=file:/var/lib/aide/aide.db.new
+
+# Change this to "no" or remove it to not gzip output
+# (only useful on systems with few CPU cycles to spare)
+gzip_dbout=yes
+
+# Here are all the things we can check - these are the default rules 
+#
+#p:      permissions
+#i:      inode
+#n:      number of links
+#u:      user
+#g:      group
+#s:      size
+#b:      block count
+#m:      mtime
+#a:      atime
+#c:      ctime
+#S:      check for growing size
+#md5:    md5 checksum
+#sha1:   sha1 checksum
+#rmd160: rmd160 checksum
+#tiger:  tiger checksum
+#R:      p+i+n+u+g+s+m+c+md5
+#L:      p+i+n+u+g
+#E:      Empty group
+#>:      Growing logfile p+u+g+i+n+S
+#haval:         haval checksum
+#gost:          gost checksum
+#crc32:         crc32 checksum
+
+# Defines formerly set here have been moved to /etc/default/aide.
+
+# Custom rules
+Binlib = p+i+n+u+g+s+b+m+c+md5+sha1
+ConfFiles = p+i+n+u+g+s+b+m+c+md5+sha1
+Logs = p+i+n+u+g+S
+Devices = p+i+n+u+g+s+b+c+md5+sha1
+Databases = p+n+u+g
+StaticDir = p+i+n+u+g
+ManPages = p+i+n+u+g+s+b+m+c+md5+sha1
+
+# Next decide what directories/files you want in the database
+
+# Kernel, system map, etc.
+=/boot$ Binlib
+# Binaries
+/bin Binlib
+/sbin Binlib
+/usr/bin Binlib
+/usr/sbin Binlib
+/usr/local/bin Binlib
+/usr/local/sbin Binlib
+#/usr/games Binlib
+# Libraries
+/lib Binlib
+/usr/lib Binlib
+/usr/local/lib Binlib
+# Log files
+=/var/log$ StaticDir
+#!/var/log/ksymoops
+/var/log/aide/aide.log(.[0-9])?(.gz)? Databases
+/var/log/aide/error.log(.[0-9])?(.gz)? Databases
+#/var/log/setuid.changes(.[0-9])?(.gz)? Databases
+!/var/log/aide
+/var/log Logs
+# Devices
+!/dev/pts
+# If you get spurious warnings about being unable to mmap() /dev/cpu/mtrr,
+# you may uncomment this to get rid of them. They're harmless but sometimes
+# annoying.
+#!/dev/cpu/mtrr
+#!/dev/xconsole
+/dev Devices
+# Other miscellaneous files
+/var/run$ StaticDir
+!/var/run
+# Test only the directory when dealing with /proc
+/proc$ StaticDir
+!/proc
+
+# You can look through these examples to get further ideas
+
+# MD5 sum files - especially useful with debsums -g
+#/var/lib/dpkg/info/([^\.]+).md5sums u+g+s+m+md5+sha1
+
+# Check crontabs
+#/var/spool/anacron/cron.daily Databases
+#/var/spool/anacron/cron.monthly Databases
+#/var/spool/anacron/cron.weekly Databases
+#/var/spool/cron Databases
+#/var/spool/cron/crontabs Databases
+
+# manpages can be trojaned, especially depending on *roff implementation
+#/usr/man ManPages
+#/usr/share/man ManPages
+#/usr/local/man ManPages
+
+# docs
+#/usr/doc ManPages
+#/usr/share/doc ManPages
+
+# check users' home directories
+#/home Binlib
+
+# check sources for modifications
+#/usr/src L
+#/usr/local/src L
+
+# Check headers for same
+#/usr/include L
+#/usr/local/include L
diff --git a/app-forensics/aide/files/aide.conf-r1 b/app-forensics/aide/files/aide.conf-r1
new file mode 100644
index 0000000..87df5e1
--- /dev/null
+++ b/app-forensics/aide/files/aide.conf-r1
@@ -0,0 +1,133 @@
+# Example configuration file for AIDE
+# See more: man 5 aide.conf
+
+database=file:/var/lib/aide/aide.db
+database_out=file:/var/lib/aide/aide.db.new
+
+# Change this to "no" or remove it to not gzip output
+# (only useful on systems with few CPU cycles to spare)
+gzip_dbout=yes
+
+# Default: 5
+#verbose=5
+
+report_url=file:/var/log/aide/aide.log
+report_url=stdout
+#report_url=stderr
+
+# Here are all the things we can check - these are the default rules 
+#
+# p:   permissions
+# ftype: file type
+# i:   inode
+# l:   link name
+# n:   number of links
+# u:   user
+# g:   group
+# s:   size
+# b:   block count
+# m:   mtime (modification time)
+# a:   atime (access time)
+# c:   ctime (change time)
+# S:   check for growing size
+# I:   ignore changed filename
+# ANF: allow new files
+# ARF: allow removed files
+# md5: md5 checksum
+# sha1: sha1 checksum
+# sha256: sha256 checksum
+# sha512: sha512 checksum
+# rmd160: rmd160 checksum
+# tiger: tiger checksum
+# crc32:    crc32 checksum
+# R:   p+ftype+i+l+n+u+g+s+m+c+md5+X
+# L:   p+ftype+i+l+n+u+g+X
+# E:   Empty group
+# X:   acl+selinux+xattrs+e2fsattrs (if groups are explicitly enabled)
+# >:   Growing file p+ftype+l+u+g+i+n+S+X
+
+# Defines formerly set here have been moved to /etc/default/aide.
+
+# Custom rules
+Binlib = p+i+n+u+g+s+b+m+c+md5+sha256+rmd160
+ConfFiles = p+i+n+u+g+s+b+m+c+md5+sha256+rmd160
+Logs = p+i+n+u+g+S
+Devices = p+i+n+u+g+s+b+c+md5+sha256+rmd160
+Databases = p+n+u+g
+StaticDir = p+i+n+u+g
+ManPages = p+i+n+u+g+s+b+m+c+md5+sha256+rmd160
+
+# Next decide what directories/files you want in the database
+
+# Kernel, system map, etc.
+=/boot$ Binlib
+# Configs
+/etc ConfFiles
+!/etc/mtab
+# Binaries
+/bin Binlib
+/sbin Binlib
+/usr/bin Binlib
+/usr/sbin Binlib
+/usr/libexec Binlib
+/usr/local/bin Binlib
+/usr/local/sbin Binlib
+#/usr/games Binlib
+# Libraries
+/lib(64)? Binlib
+/usr/lib(64)? Binlib
+/usr/local/lib(64)? Binlib
+# Log files
+=/var/log$ StaticDir
+#!/var/log/ksymoops
+/var/log/aide/aide.log(.[0-9])?(.gz)? Databases
+/var/log/aide/error.log(.[0-9])?(.gz)? Databases
+#/var/log/setuid.changes(.[0-9])?(.gz)? Databases
+!/var/log/aide
+/var/log Logs
+# Devices
+!/dev/pts
+# If you get spurious warnings about being unable to mmap() /dev/cpu/mtrr,
+# you may uncomment this to get rid of them. They're harmless but sometimes
+# annoying.
+#!/dev/cpu/mtrr
+#!/dev/xconsole
+/dev Devices
+# Other miscellaneous files
+/var/run$ StaticDir
+!/var/run
+# Test only the directory when dealing with /proc
+/proc$ StaticDir
+!/proc
+
+# You can look through these examples to get further ideas
+
+# MD5 sum files - especially useful with debsums -g
+#/var/lib/dpkg/info/([^\.]+).md5sums u+g+s+m+md5+sha1
+
+# Check crontabs
+#/var/spool/anacron/cron.daily Databases
+#/var/spool/anacron/cron.monthly Databases
+#/var/spool/anacron/cron.weekly Databases
+#/var/spool/cron Databases
+#/var/spool/cron/crontabs Databases
+
+# manpages can be trojaned, especially depending on *roff implementation
+#/usr/man ManPages
+#/usr/share/man ManPages
+#/usr/local/man ManPages
+
+# docs
+#/usr/doc ManPages
+#/usr/share/doc ManPages
+
+# check users' home directories
+#/home Binlib
+
+# check sources for modifications
+#/usr/src L
+#/usr/local/src L
+
+# Check headers for same
+#/usr/include L
+#/usr/local/include L
diff --git a/app-forensics/aide/files/aide.cron b/app-forensics/aide/files/aide.cron
new file mode 100644
index 0000000..c28b78f
--- /dev/null
+++ b/app-forensics/aide/files/aide.cron
@@ -0,0 +1,192 @@
+#!/bin/bash
+# Modified: Benjamin Smee
+# Date: Fri Sep 10 11:35:41 BST 2004
+
+# This is the email address reports get mailed to
+MAILTO=root@localhost
+
+# Set this to suppress mailings when there's nothing to report
+QUIETREPORTS=1
+
+# This parameter defines which aide command to run from the cron script.
+# Sensible values are "update" and "check".
+# Default is "check", ensuring backwards compatibility.
+# Since "update" does not take any longer, it is recommended to use "update",
+# so that a new database is created every day. The new database needs to be
+# manually copied over the current one, though.
+COMMAND=update
+
+# This parameter defines how many lines to return per e-mail. Output longer
+# than this value will be truncated in the e-mail sent out.
+LINES=1000
+
+# This parameter gives a grep regular expression. If given, all output lines
+# that _don't_ match the regexp are listed first in the script's output. This
+# allows to easily remove noise from the aide report.
+NOISE="(/var/cache/|/var/lib/|/var/tmp)"
+PATH="/bin:/usr/bin:/sbin:/usr/sbin"
+LOGDIR="/var/log/aide"
+LOGFILE="aide.log"
+CONFFILE="/etc/aide/aide.conf"
+ERRORLOG="aide_error.log"
+MAILLOG="aide_mail.log"
+ERRORTMP=`tempfile --directory "/tmp" --prefix "$ERRORLOG"`
+
+[ -f /usr/bin/aide ] || exit 0
+
+DATABASE=`grep "^database=file:/" $CONFFILE | head -n 1 | cut --delimiter=: --fields=2`
+FQDN=`hostname -f`
+DATE=`date +"at %Y-%m-%d %H:%M"`
+
+# default values
+
+DATABASE="${DATABASE:-/var/lib/aide/aide.db}"
+
+AIDEARGS="-V4"
+
+if [ ! -f $DATABASE ]; then
+	/usr/sbin/sendmail $MAILTO <<EOF
+Subject: Daily AIDE report for $FQDN
+From: root@${FQDN}
+To: ${MAILTO}
+Fatal error: The AIDE database does not exist!
+This may mean you haven't created it, or it may mean that someone has removed it.
+EOF
+	exit 0
+fi
+
+# Removed so no deps on debianutils - strerror
+#[ -f "$LOGDIR/$LOGFILE" ] && savelog -j -t -g adm -m 640 -u root -c 7 "$LOGDIR/$LOGFILE" > /dev/null
+#[ -f "$LOGDIR/$ERRORLOG" ] && savelog -j -t -g adm -m 640 -u root -c 7 "$LOGDIR/$ERRORLOG" > /dev/null
+
+aide $AIDEARGS --$COMMAND >"$LOGDIR/$LOGFILE" 2>"$ERRORTMP"
+RETVAL=$?
+
+if [ -n "$QUIETREPORTS" ] && [ $QUIETREPORTS -a \! -s $LOGDIR/$LOGFILE -a \! -s $ERRORTMP ]; then
+	# Bail now because there was no output and QUIETREPORTS is set
+	exit 0
+fi
+
+MAILTMP=`tempfile --directory "/tmp" --prefix "$MAILLOG"`
+
+(cat << EOF
+This is an automated report generated by the Advanced Intrusion Detection
+Environment on $FQDN ${DATE}.
+
+EOF
+
+# include error log in daily report e-mail
+
+if [ "$RETVAL" != "0" ]; then
+	cat > "$LOGDIR/$ERRORLOG" << EOF
+	
+*****************************************************************************
+*                    aide returned a non-zero exit value                    *
+*****************************************************************************
+
+EOF
+	echo "exit value is: $RETVAL" >> "$LOGDIR/$ERRORLOG"
+else
+	touch "$LOGDIR/$ERRORLOG"
+fi
+< "$ERRORTMP" cat >> "$LOGDIR/$ERRORLOG"
+rm -f "$ERRORTMP"
+
+if [ -s "$LOGDIR/$ERRORLOG" ]; then
+	errorlines=`wc -l "$LOGDIR/$ERRORLOG" | awk '{ print $1 }'`
+	if [ ${errorlines:=0} -gt $LINES ]; then
+		cat << EOF
+
+****************************************************************************
+*                      aide has returned many errors.                      *
+*           the error log output has been truncated in this mail           *
+****************************************************************************
+
+EOF
+		echo "Error output is $errorlines lines, truncated to $LINES."
+		head -$LINES "$LOGDIR/$ERRORLOG"
+		echo "The full output can be found in $LOGDIR/$ERRORLOG."
+	else
+		echo "Errors produced  ($errorlines lines):"
+		cat "$LOGDIR/$ERRORLOG"
+	fi
+else
+	echo "AIDE produced no errors."
+fi
+
+# include de-noised log
+
+if [ -n "$NOISE" ]; then
+	NOISETMP=`tempfile --directory "/tmp" --prefix "aidenoise"`
+	NOISETMP2=`tempfile --directory "/tmp" --prefix "aidenoise"`
+	sed -n '1,/^Detailed information about changes:/p' "$LOGDIR/$LOGFILE" | \
+	grep '^\(changed\|removed\|added\):' | \
+	grep -v "^added: THERE WERE ALSO [0-9]\+ FILES ADDED UNDER THIS DIRECTORY" > $NOISETMP2
+	
+	if [ -n "$NOISE" ]; then
+		< $NOISETMP2 grep -v "^\(changed\|removed\|added\):$NOISE" > $NOISETMP
+		rm -f $NOISETMP2
+		echo "De-Noised output removes everything matching $NOISE."
+	else
+		mv $NOISETMP2 $NOISETMP
+		echo "No noise expression was given."
+	fi
+	
+	if [ -s "$NOISETMP" ]; then
+		loglines=`< $NOISETMP wc -l | awk '{ print $1 }'`
+		if [ ${loglines:=0} -gt $LINES ]; then
+			cat << EOF
+
+****************************************************************************
+*   aide has returned long output which has been truncated in this mail    *
+****************************************************************************
+
+EOF
+			echo "De-Noised output is $loglines lines, truncated to $LINES."
+			< $NOISETMP head -$LINES
+			echo "The full output can be found in $LOGDIR/$LOGFILE."
+		else
+			echo "De-Noised output of the daily AIDE run ($loglines lines):"
+			cat $NOISETMP
+		fi
+	else
+		echo "AIDE detected no changes after removing noise."
+	fi
+	rm -f $NOISETMP
+	echo "============================================================================"
+fi
+
+# include non-de-noised log
+
+if [ -s "$LOGDIR/$LOGFILE" ]; then
+	loglines=`wc -l "$LOGDIR/$LOGFILE" | awk '{ print $1 }'`
+	if [ ${loglines:=0} -gt $LINES ]; then
+		cat << EOF
+
+****************************************************************************
+*   aide has returned long output which has been truncated in this mail    *
+****************************************************************************
+
+EOF
+		echo "Output is $loglines lines, truncated to $LINES."
+		head -$LINES "$LOGDIR/$LOGFILE"
+		echo "The full output can be found in $LOGDIR/$LOGFILE."
+	else
+		echo "Output of the daily AIDE run ($loglines lines):"
+		cat "$LOGDIR/$LOGFILE"
+	fi
+else
+	echo "AIDE detected no changes."
+fi
+) > ${MAILTMP}
+
+(
+cat <<EOF
+Subject: Daily AIDE report for $FQDN
+From: root@${FQDN}
+To: ${MAILTO}
+EOF
+cat ${MAILTMP}
+) | /usr/sbin/sendmail $MAILTO
+
+rm -f "$MAILTMP"
diff --git a/app-forensics/aide/files/aideinit b/app-forensics/aide/files/aideinit
new file mode 100644
index 0000000..6a3c60c
--- /dev/null
+++ b/app-forensics/aide/files/aideinit
@@ -0,0 +1,145 @@
+#!/bin/sh
+# Copyright 2003 Mike Markley <mike@markley.org>
+# This script is free for any purpose whatseoever so long as the above
+# copyright notice remains in place.
+#
+# Modified for Gentoo: Benjamin Smee
+# Date: Fri Sep 10 11:36:04 BST 2004
+
+# This is the email address reports get mailed to
+MAILTO=root@localhost
+
+# Defaults
+#MAILTO="${MAILTO:-root}"
+
+# Options
+opt_f=0
+opt_y=0
+opt_c=0
+opt_b=0
+config="/etc/aide/aide.conf"
+
+aideinit_usage() {
+	echo "Usage: $0 [options] -- [aide options]"
+	echo "  -y|--yes         Overwrite output file"
+	echo "  -f|--force       Force overwrite of database"
+	echo "  -c|--config      Specify alternate config file"
+	echo "  -o|--output      Specify alternate output file"
+	echo "  -d|--database    Specify alternate database file"
+	echo "  -b|--background  Run in the background"
+}
+
+while [ -n "$1" ]; do
+	case "$1" in
+	    -h|--help)
+		aideinit_usage
+		exit 0
+		;;
+	    -f|--force)
+		opt_f=1
+		shift
+		;;
+	    -y|--yes)
+		opt_y=1
+		shift
+		;;
+	    -b|--background)
+		opt_b=1
+		shift
+		;;
+	    -o|--output)
+		shift
+		[ -z "$1" ] && aideinit_usage && exit 1
+		outfile=$1
+		shift
+		;;
+	    -d|--database)
+		shift
+		[ -z "$1" ] && aideinit_usage && exit 1
+		dbfile=$1
+		shift
+		;;
+	    -c|--config)
+		opt_c=1
+		shift
+		[ -z "$1" ] && aideinit_usage && exit 1
+		config=$1
+		shift
+		;;
+	    --)
+	    	shift
+		break 2
+		;;
+	    *)
+		echo "Unknown option $1 (use -- to delimit aideinit and aide options)"
+		exit
+		;;
+	esac
+done
+
+if [ ! -f "$config" ]; then
+	echo "$0: $config: file not found"
+	exit 1
+fi
+
+if [ -z "$outfile" ]; then
+	outfile=`egrep "database_out=file:" $config | cut -d: -f2`
+	[ -z "$outfile" ] && outfile="/var/lib/aide/aide.db.new"
+fi
+if [ -z "$dbfile" ]; then
+	dbfile=`egrep "database=file:" $config | cut -d: -f2`
+	[ -z "$dbfile" ] && dbfile="/var/lib/aide/aide.db"
+fi
+
+if [ -f $outfile ]; then
+	if [ $opt_y -eq 0 ]; then
+		echo -n "Overwrite existing $outfile [Yn]? "
+		read yn
+		case "$yn" in
+		    [Nn]*)
+			exit 0
+			;;
+		esac
+	fi
+fi
+
+extraflags=""
+
+if [ $opt_c -eq 1 ]; then
+	extraflags="$extraflags --config $config"
+fi
+
+if [ $opt_b -eq 1 ]; then
+	(aide --init $extraflags $@ >/var/log/aide/aideinit.log 2>/var/log/aide/aideinit.errors
+	if [ -f "$dbfile" -a $opt_f -eq 0 ]; then
+		echo "$dbfile exists and -f was not specified" >> /var/log/aide/aideinit.errors
+	fi
+	lines=`wc -l /var/log/aide/aideinit.errors | awk '{ print $1 }'`
+	if [ "$lines" -gt 0 ]; then
+		(echo "AIDE init errors:"; cat /var/log/aide/aideinit.errors) | /bin/mail -s "AIDE initialization problem" $MAILTO
+	else
+		cp -f $outfile $dbfile
+	fi) &
+	exit 0
+fi
+
+echo "Running aide --init..."
+aide --init $extraflags $@
+
+return=$?
+if [ $return -ne 0 ]; then
+	echo "Something didn't quite go right; see $outfile for details" >&2
+	exit $return
+fi
+
+if [ -f "$dbfile" -a $opt_f -eq 0 ]; then
+	echo -n "Overwrite $dbfile [yN]? "
+	read yn
+	case "$yn" in
+	    [yY]*)
+		cp -f $outfile $dbfile
+		;;
+	esac
+else
+	cp -f $outfile $dbfile
+fi
diff --git a/app-forensics/aide/metadata.xml b/app-forensics/aide/metadata.xml
new file mode 100644
index 0000000..c7da797
--- /dev/null
+++ b/app-forensics/aide/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<email>email@linxon.ru</email>
+		<name>Yury Martynov</name>
+	</maintainer>
+	<maintainer type="project">
+		<email>proxy-maint@gentoo.org</email>
+		<name>Proxy Maintainers</name>
+	</maintainer>
+	<use>
+		<flag name="e2fs">Enable support for checking file attributes on ext2/ext3/ext4 filesystems</flag>
+		<flag name="curl">Use curl for http,https and ftp backends</flag>
+		<flag name="postgres">Use postgresql library for storing databases</flag>
+		<flag name="prelink">Bypass prelinking when calculating checksums</flag>
+	</use>
+	<upstream>
+		<remote-id type="github">aide/aide</remote-id>
+		<remote-id type="sourceforge">aide</remote-id>
+	</upstream>
+</pkgmetadata>
diff --git a/dev-db/sqlite/Manifest b/dev-db/sqlite/Manifest
index fa0381a..b0beb0a 100644
--- a/dev-db/sqlite/Manifest
+++ b/dev-db/sqlite/Manifest
@@ -1,2 +1,2 @@
-DIST sqlite-doc-3320300.zip 9772933 BLAKE2B efd72c18d0398c103e3f9c4cfeb03e7794fd69691b1bcea95b74a0c5d8af22aa13abc84ce8dc5864b5f4cb79be239433933b4daca34d1adfcc6f31ce2cde66bf SHA512 af9dca970b4c03c058d7d1cd55a3d11fa4b112dccac942b8660d82a7e9ba2956963fcb429eedfdc85915637c102e1f904ace98c8e0455c4120422bbd9f2f3cd0
-DIST sqlite-src-3320300.zip 12461750 BLAKE2B 59cce74d284191cfc69ac09b6014701ddd2b7b3d7ebaad5da4ad71cc200e70285b3b201ff174819aa8dde5f610589d7947f547450334f0f17149014078316185 SHA512 7e027c7163a760fb9b6dbfd2e4ccffb39d4972280583fb0d7f8390017101dfed3b12a36653b3130a548ae4d04c6abb11c0a1921b6f09c54c6ae1e72fbdcb2fd4
+DIST sqlite-doc-3340100.zip 10074559 BLAKE2B 66aa999d87b7f3c994c289eda320d6a4e371b0a6a2ab8bcebde540aa955f3bdf4f00b739ca32aa913685cd35a88ee83bebd7fa43a0c148614e9086a1d3f5652a SHA512 20cbb9f05cd329bf7aa2877431781e46192544806042f4104e4eb0e87d84cd2dfc02c7ff226d4bef9bb2c6a69cc612201844d116abe99b0cfed9602adf243a60
+DIST sqlite-src-3340100.zip 12623711 BLAKE2B 08c98d0c56d46fe909f449f322002ae4d69fd952930d2f04514988a939b31744a13aea85935d84bc05db52faca1aad6a70d7c31e7da0e396bb649685a49699bb SHA512 5ed02fe609b3d08c3297cc43b21e6ee3f56fb51a6616ac391a0e50cd1677dbad03c6bf9bf9c8409cf94b83b16fe6b6e4a112640b18c7d4fd95328066da3c3943
diff --git a/dev-db/sqlite/OWNERS b/dev-db/sqlite/OWNERS
deleted file mode 100644
index 89610ec..0000000
--- a/dev-db/sqlite/OWNERS
+++ /dev/null
@@ -1,2 +0,0 @@
-simmonsjosh@google.com
-dats@chromium.org
diff --git a/dev-db/sqlite/files/sqlite-3.25.0-nonfull_archive-build.patch b/dev-db/sqlite/files/sqlite-3.25.0-nonfull_archive-build.patch
deleted file mode 100644
index be0a7e3..0000000
--- a/dev-db/sqlite/files/sqlite-3.25.0-nonfull_archive-build.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Fix building with dlopen() not available.
-
---- /configure.ac
-+++ /configure.ac
-@@ -102,6 +102,9 @@
-   [], [enable_dynamic_extensions=yes])
- if test x"$enable_dynamic_extensions" != "xno"; then
-   AC_SEARCH_LIBS(dlopen, dl)
-+  if test "${ac_cv_search_dlopen}" = "no"; then
-+    BUILD_CFLAGS="$BUILD_CFLAGS -DSQLITE_OMIT_LOAD_EXTENSION=1"
-+  fi
- else
-   BUILD_CFLAGS="$BUILD_CFLAGS -DSQLITE_OMIT_LOAD_EXTENSION=1"
- fi
diff --git a/dev-db/sqlite/files/sqlite-3.31.0-full_archive-build.patch b/dev-db/sqlite/files/sqlite-3.31.0-full_archive-build.patch
deleted file mode 100644
index 9ff44c0..0000000
--- a/dev-db/sqlite/files/sqlite-3.31.0-full_archive-build.patch
+++ /dev/null
@@ -1,466 +0,0 @@
-Move some code to libsqlite3.so to avoid duplication.
-Link executables against libsqlite3.so.
-Increase timeout for fuzzcheck.
-Fix building with dlopen() not available.
-
---- /Makefile.in
-+++ /Makefile.in
-@@ -311,6 +311,9 @@
- # Source code for extensions
- #
- SRC += \
-+  $(TOP)/ext/expert/sqlite3expert.c \
-+  $(TOP)/ext/expert/sqlite3expert.h
-+SRC += \
-   $(TOP)/ext/fts1/fts1.c \
-   $(TOP)/ext/fts1/fts1.h \
-   $(TOP)/ext/fts1/fts1_hash.c \
-@@ -363,8 +366,12 @@
-   $(TOP)/ext/rbu/sqlite3rbu.h \
-   $(TOP)/ext/rbu/sqlite3rbu.c
- SRC += \
-+  $(TOP)/ext/misc/appendvfs.c \
-+  $(TOP)/ext/misc/dbdata.c \
-   $(TOP)/ext/misc/json1.c \
--  $(TOP)/ext/misc/stmt.c
-+  $(TOP)/ext/misc/sqlar.c \
-+  $(TOP)/ext/misc/stmt.c \
-+  $(TOP)/ext/misc/zipfile.c
- 
- # Generated source code files
- #
-@@ -435,7 +442,6 @@
- # Statically linked extensions
- #
- TESTSRC += \
--  $(TOP)/ext/expert/sqlite3expert.c \
-   $(TOP)/ext/expert/test_expert.c \
-   $(TOP)/ext/misc/amatch.c \
-   $(TOP)/ext/misc/carray.c \
-@@ -461,7 +467,6 @@
-   $(TOP)/ext/misc/totype.c \
-   $(TOP)/ext/misc/unionvtab.c \
-   $(TOP)/ext/misc/wholenumber.c \
--  $(TOP)/ext/misc/zipfile.c \
-   $(TOP)/ext/userauth/userauth.c
- 
- # Source code to the library files needed by the test fixture
-@@ -639,25 +644,25 @@
- 
- libtclsqlite3.la:	tclsqlite.lo libsqlite3.la
- 	$(LTLINK) -no-undefined -o $@ tclsqlite.lo \
--		libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
-+		libsqlite3.la @TCL_STUB_LIB_SPEC@ \
- 		-rpath "$(TCLLIBDIR)" \
- 		-version-info "8:6:8" \
- 		-avoid-version
- 
--sqlite3$(TEXE):	shell.c sqlite3.c
--	$(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
--		shell.c sqlite3.c \
--		$(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
-+sqlite3$(TEXE):	shell.c libsqlite3.la
-+	$(LTLINK) $(READLINE_FLAGS) -o $@ \
-+		shell.c libsqlite3.la \
-+		$(LIBREADLINE)
- 
--sqldiff$(TEXE):	$(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h
--	$(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
-+sqldiff$(TEXE):	$(TOP)/tool/sqldiff.c libsqlite3.la
-+	$(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la
- 
--dbhash$(TEXE):	$(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
--	$(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)
-+dbhash$(TEXE):	$(TOP)/tool/dbhash.c libsqlite3.la
-+	$(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la
- 
--scrub$(TEXE):	$(TOP)/ext/misc/scrub.c sqlite3.lo
-+scrub$(TEXE):	$(TOP)/ext/misc/scrub.c libsqlite3.la
- 	$(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \
--		$(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS)
-+		$(TOP)/ext/misc/scrub.c libsqlite3.la
- 
- srcck1$(BEXE):	$(TOP)/tool/srcck1.c
- 	$(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
-@@ -767,7 +772,7 @@
- # Rule to build the amalgamation
- #
- sqlite3.lo:	sqlite3.c
--	$(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c
-+	$(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c
- 
- # Rules to build the LEMON compiler generator
- #
-@@ -1064,14 +1069,9 @@
- # Source files that go into making shell.c
- SHELL_SRC = \
- 	$(TOP)/src/shell.c.in \
--        $(TOP)/ext/misc/appendvfs.c \
- 	$(TOP)/ext/misc/shathree.c \
- 	$(TOP)/ext/misc/fileio.c \
- 	$(TOP)/ext/misc/completion.c \
--	$(TOP)/ext/misc/sqlar.c \
--	$(TOP)/ext/expert/sqlite3expert.c \
--	$(TOP)/ext/expert/sqlite3expert.h \
--	$(TOP)/ext/misc/zipfile.c \
- 	$(TOP)/ext/misc/memtrace.c \
-         $(TOP)/src/test_windirent.c
- 
-@@ -1239,11 +1239,11 @@
- 
- # Fuzz testing
- fuzztest:	fuzzcheck$(TEXE) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
--	./fuzzcheck$(TEXE) $(FUZZDATA)
-+	./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA)
- 	./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
- 
- valgrindfuzz:	fuzzcheck$(TEXT) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
--	valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA)
-+	valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA)
- 	valgrind ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
- 
- # The veryquick.test TCL tests.
-@@ -1274,24 +1274,23 @@
- smoketest:	$(TESTPROGS) fuzzcheck$(TEXE)
- 	./testfixture$(TEXE) $(TOP)/test/main.test $(TESTOPTS)
- 
--sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
-+sqlite3_analyzer.c:	$(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
- 	$(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in >sqlite3_analyzer.c
- 
--sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
--	$(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
-+sqlite3_analyzer$(TEXE):	sqlite3_analyzer.c libsqlite3.la
-+	$(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL)
- 
--sqltclsh.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl $(TOP)/ext/misc/appendvfs.c $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in
-+sqltclsh.c:	$(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in
- 	$(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in >sqltclsh.c
- 
--sqltclsh$(TEXE): sqltclsh.c
--	$(LTLINK) sqltclsh.c -o $@ $(LIBTCL) $(TLIBS)
-+sqltclsh$(TEXE):	sqltclsh.c libsqlite3.la
-+	$(LTLINK) sqltclsh.c -o $@ libsqlite3.la $(LIBTCL)
- 
--sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c
--	$(LTLINK)	$(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c -o sqlite3_expert $(TLIBS)
-+sqlite3_expert$(TEXE):	$(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/expert.c libsqlite3.la
-+	$(LTLINK) $(TOP)/ext/expert/expert.c -o sqlite3_expert libsqlite3.la
- 
- CHECKER_DEPS =\
-   $(TOP)/tool/mkccode.tcl \
--  sqlite3.c \
-   $(TOP)/src/tclsqlite.c \
-   $(TOP)/ext/repair/sqlite3_checker.tcl \
-   $(TOP)/ext/repair/checkindex.c \
-@@ -1302,36 +1301,36 @@
- sqlite3_checker.c:	$(CHECKER_DEPS)
- 	$(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/ext/repair/sqlite3_checker.c.in >$@
- 
--sqlite3_checker$(TEXE):	sqlite3_checker.c
--	$(LTLINK) sqlite3_checker.c -o $@ $(LIBTCL) $(TLIBS)
-+sqlite3_checker$(TEXE):	sqlite3_checker.c libsqlite3.la
-+	$(LTLINK) sqlite3_checker.c -o $@ libsqlite3.la $(LIBTCL)
- 
--dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c sqlite3.lo
-+dbdump$(TEXE):	$(TOP)/ext/misc/dbdump.c libsqlite3.la
- 	$(LTLINK) -DDBDUMP_STANDALONE -o $@ \
--           $(TOP)/ext/misc/dbdump.c sqlite3.lo $(TLIBS)
-+           $(TOP)/ext/misc/dbdump.c libsqlite3.la
- 
--dbtotxt$(TEXE): $(TOP)/tool/dbtotxt.c
--	$(LTLINK)-o $@ $(TOP)/tool/dbtotxt.c
-+dbtotxt$(TEXE):	$(TOP)/tool/dbtotxt.c
-+	$(LTLINK) -o $@ $(TOP)/tool/dbtotxt.c
- 
--showdb$(TEXE):	$(TOP)/tool/showdb.c sqlite3.lo
--	$(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
-+showdb$(TEXE):	$(TOP)/tool/showdb.c libsqlite3.la
-+	$(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la
- 
--showstat4$(TEXE):	$(TOP)/tool/showstat4.c sqlite3.lo
--	$(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS)
-+showstat4$(TEXE):	$(TOP)/tool/showstat4.c libsqlite3.la
-+	$(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la
- 
--showjournal$(TEXE):	$(TOP)/tool/showjournal.c sqlite3.lo
--	$(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS)
-+showjournal$(TEXE):	$(TOP)/tool/showjournal.c
-+	$(LTLINK) -o $@ $(TOP)/tool/showjournal.c
- 
--showwal$(TEXE):	$(TOP)/tool/showwal.c sqlite3.lo
--	$(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS)
-+showwal$(TEXE):	$(TOP)/tool/showwal.c
-+	$(LTLINK) -o $@ $(TOP)/tool/showwal.c
- 
- showshm$(TEXE):	$(TOP)/tool/showshm.c
- 	$(LTLINK) -o $@ $(TOP)/tool/showshm.c
- 
--index_usage$(TEXE): $(TOP)/tool/index_usage.c sqlite3.lo
--	$(LTLINK) $(SHELL_OPT) -o $@ $(TOP)/tool/index_usage.c sqlite3.lo $(TLIBS)
-+index_usage$(TEXE):	$(TOP)/tool/index_usage.c libsqlite3.la
-+	$(LTLINK) -o $@ $(TOP)/tool/index_usage.c libsqlite3.la
- 
--changeset$(TEXE):	$(TOP)/ext/session/changeset.c sqlite3.lo
--	$(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS)
-+changeset$(TEXE):	$(TOP)/ext/session/changeset.c libsqlite3.la
-+	$(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la
- 
- changesetfuzz$(TEXE):	$(TOP)/ext/session/changesetfuzz.c sqlite3.lo
- 	$(LTLINK) -o $@ $(TOP)/ext/session/changesetfuzz.c sqlite3.lo $(TLIBS)
-@@ -1356,11 +1355,11 @@
- kvtest$(TEXE):	$(TOP)/test/kvtest.c sqlite3.c
- 	$(LTLINK) $(KV_OPT) -o $@ $(TOP)/test/kvtest.c sqlite3.c $(TLIBS)
- 
--rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
--	$(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
-+rbu$(EXE):	$(TOP)/ext/rbu/rbu.c libsqlite3.la
-+	$(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la
- 
--loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
--	$(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
-+loadfts$(EXE):	$(TOP)/tool/loadfts.c libsqlite3.la
-+	$(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@
- 
- # This target will fail if the SQLite amalgamation contains any exported
- # symbols that do not begin with "sqlite3_". It is run as part of the
---- /configure.ac
-+++ /configure.ac
-@@ -587,6 +587,9 @@
- if test "${enable_load_extension}" = "yes" ; then
-   OPT_FEATURE_FLAGS=""
-   AC_SEARCH_LIBS(dlopen, dl)
-+  if test "${ac_cv_search_dlopen}" = "no" ; then
-+    OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
-+  fi
- else
-   OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
- fi
---- /ext/misc/sqlar.c
-+++ /ext/misc/sqlar.c
-@@ -14,6 +14,8 @@
- ** for working with sqlar archives and used by the shell tool's built-in
- ** sqlar support.
- */
-+#ifdef SQLITE_HAVE_ZLIB
-+
- #include "sqlite3ext.h"
- SQLITE_EXTENSION_INIT1
- #include <zlib.h>
-@@ -121,3 +123,5 @@
-   }
-   return rc;
- }
-+
-+#endif /* SQLITE_HAVE_ZLIB */
---- /ext/misc/zipfile.c
-+++ /ext/misc/zipfile.c
-@@ -24,6 +24,8 @@
- **    *  No support for zip64 extensions
- **    *  Only the "inflate/deflate" (zlib) compression method is supported
- */
-+#ifdef SQLITE_HAVE_ZLIB
-+
- #include "sqlite3ext.h"
- SQLITE_EXTENSION_INIT1
- #include <stdio.h>
-@@ -2186,3 +2188,5 @@
-   (void)pzErrMsg;  /* Unused parameter */
-   return zipfileRegister(db);
- }
-+
-+#endif /* SQLITE_HAVE_ZLIB */
---- /ext/repair/sqlite3_checker.c.in
-+++ /ext/repair/sqlite3_checker.c.in
-@@ -2,6 +2,7 @@
- ** Read an SQLite database file and analyze its space utilization.  Generate
- ** text on standard output.
- */
-+#define SQLITE_CORE 1
- #define TCLSH_INIT_PROC sqlite3_checker_init_proc
- #define SQLITE_ENABLE_DBPAGE_VTAB 1
- #define SQLITE_ENABLE_JSON1 1
-@@ -14,7 +15,7 @@
- #define SQLITE_OMIT_SHARED_CACHE 1
- #define SQLITE_DEFAULT_MEMSTATUS 0
- #define SQLITE_MAX_EXPR_DEPTH 0
--INCLUDE sqlite3.c
-+#include "sqlite3.h"
- INCLUDE $ROOT/src/tclsqlite.c
- INCLUDE $ROOT/ext/misc/btreeinfo.c
- INCLUDE $ROOT/ext/repair/checkindex.c
---- /src/shell.c.in
-+++ /src/shell.c.in
-@@ -61,6 +61,7 @@
- #include <stdio.h>
- #include <assert.h>
- #include "sqlite3.h"
-+#include "ext/expert/sqlite3expert.h"
- typedef sqlite3_int64 i64;
- typedef sqlite3_uint64 u64;
- typedef unsigned char u8;
-@@ -127,6 +128,10 @@
- # define SHELL_USE_LOCAL_GETLINE 1
- #endif
- 
-+#ifdef SQLITE_HAVE_ZLIB
-+#include <zlib.h>
-+#endif
-+
- 
- #if defined(_WIN32) || defined(WIN32)
- # include <io.h>
-@@ -939,18 +944,7 @@
- INCLUDE ../ext/misc/shathree.c
- INCLUDE ../ext/misc/fileio.c
- INCLUDE ../ext/misc/completion.c
--INCLUDE ../ext/misc/appendvfs.c
- INCLUDE ../ext/misc/memtrace.c
--#ifdef SQLITE_HAVE_ZLIB
--INCLUDE ../ext/misc/zipfile.c
--INCLUDE ../ext/misc/sqlar.c
--#endif
--INCLUDE ../ext/expert/sqlite3expert.h
--INCLUDE ../ext/expert/sqlite3expert.c
--
--#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
--INCLUDE ../ext/misc/dbdata.c
--#endif
- 
- #if defined(SQLITE_ENABLE_SESSION)
- /*
-@@ -4173,10 +4167,13 @@
-     sqlite3_shathree_init(p->db, 0, 0);
-     sqlite3_completion_init(p->db, 0, 0);
- #if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
-+    extern int sqlite3_dbdata_init(sqlite3 *, char **, const sqlite3_api_routines *);
-     sqlite3_dbdata_init(p->db, 0, 0);
- #endif
- #ifdef SQLITE_HAVE_ZLIB
-+    extern int sqlite3_zipfile_init(sqlite3 *, char **, const sqlite3_api_routines *);
-     sqlite3_zipfile_init(p->db, 0, 0);
-+    extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
-     sqlite3_sqlar_init(p->db, 0, 0);
- #endif
-     sqlite3_create_function(p->db, "shell_add_schema", 3, SQLITE_UTF8, 0,
-@@ -6176,6 +6173,7 @@
-         goto end_ar_command;
-       }
-       sqlite3_fileio_init(cmd.db, 0, 0);
-+      extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
-       sqlite3_sqlar_init(cmd.db, 0, 0);
-       sqlite3_create_function(cmd.db, "shell_putsnl", 1, SQLITE_UTF8, cmd.p,
-                               shellPutsFunc, 0, 0);
-@@ -10354,6 +10352,7 @@
- #endif
-   }
-   data.out = stdout;
-+  extern int sqlite3_appendvfs_init(sqlite3 *, char **, const sqlite3_api_routines *);
-   sqlite3_appendvfs_init(0,0,0);
- 
-   /* Go ahead and open the database file if it already exists.  If the
---- /test/sessionfuzz.c
-+++ /test/sessionfuzz.c
-@@ -700,42 +700,6 @@
- #include <assert.h>
- #include "zlib.h"
- 
--/*
--** Implementation of the "sqlar_uncompress(X,SZ)" SQL function
--**
--** Parameter SZ is interpreted as an integer. If it is less than or
--** equal to zero, then this function returns a copy of X. Or, if
--** SZ is equal to the size of X when interpreted as a blob, also
--** return a copy of X. Otherwise, decompress blob X using zlib
--** utility function uncompress() and return the results (another
--** blob).
--*/
--static void sqlarUncompressFunc(
--  sqlite3_context *context,
--  int argc,
--  sqlite3_value **argv
--){
--  uLong nData;
--  uLongf sz;
--
--  assert( argc==2 );
--  sz = sqlite3_value_int(argv[1]);
--
--  if( sz<=0 || sz==(nData = sqlite3_value_bytes(argv[0])) ){
--    sqlite3_result_value(context, argv[0]);
--  }else{
--    const Bytef *pData= sqlite3_value_blob(argv[0]);
--    Bytef *pOut = sqlite3_malloc(sz);
--    if( Z_OK!=uncompress(pOut, &sz, pData, nData) ){
--      sqlite3_result_error(context, "error in uncompress()", -1);
--    }else{
--      sqlite3_result_blob(context, pOut, sz, SQLITE_TRANSIENT);
--    }
--    sqlite3_free(pOut);
--  }
--}
--
--
- /* Run a chunk of SQL.  If any errors happen, print an error message
- ** and exit.
- */
---- /tool/mksqlite3c.tcl
-+++ /tool/mksqlite3c.tcl
-@@ -117,6 +117,7 @@
-    rtree.h
-    sqlite3session.h
-    sqlite3.h
-+   sqlite3expert.h
-    sqlite3ext.h
-    sqlite3rbu.h
-    sqliteicu.h
-@@ -403,6 +404,11 @@
-    sqlite3session.c
-    fts5.c
-    stmt.c
-+   appendvfs.c
-+   dbdata.c
-+   sqlar.c
-+   sqlite3expert.c
-+   zipfile.c
- } {
-   copy_file tsrc/$file
- }
---- /tool/sqlite3_analyzer.c.in
-+++ /tool/sqlite3_analyzer.c.in
-@@ -14,9 +14,6 @@
- #define SQLITE_DEFAULT_MEMSTATUS 0
- #define SQLITE_MAX_EXPR_DEPTH 0
- #define SQLITE_OMIT_LOAD_EXTENSION 1
--#ifndef USE_EXTERNAL_SQLITE
--INCLUDE sqlite3.c
--#endif
- INCLUDE $ROOT/src/tclsqlite.c
- 
- const char *sqlite3_analyzer_init_proc(Tcl_Interp *interp){
---- /tool/sqltclsh.c.in
-+++ /tool/sqltclsh.c.in
-@@ -27,19 +27,17 @@
- #define SQLITE_OMIT_SHARED_CACHE 1
- #define SQLITE_DEFAULT_MEMSTATUS 0
- #define SQLITE_MAX_EXPR_DEPTH 0
--INCLUDE sqlite3.c
--INCLUDE $ROOT/ext/misc/appendvfs.c
--#ifdef SQLITE_HAVE_ZLIB
--INCLUDE $ROOT/ext/misc/zipfile.c
--INCLUDE $ROOT/ext/misc/sqlar.c
--#endif
-+#include "sqlite3.h"
- INCLUDE $ROOT/src/tclsqlite.c
- 
- const char *sqlite3_tclapp_init_proc(Tcl_Interp *interp){
-   (void)interp;
-+  extern int sqlite3_appendvfs_init(sqlite3 *,char **, const sqlite3_api_routines *);
-   sqlite3_appendvfs_init(0,0,0);
- #ifdef SQLITE_HAVE_ZLIB
-+  extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
-   sqlite3_auto_extension((void(*)(void))sqlite3_sqlar_init);
-+  extern int sqlite3_zipfile_init(sqlite3 *, char **, const sqlite3_api_routines *);
-   sqlite3_auto_extension((void(*)(void))sqlite3_zipfile_init);
- #endif
- 
diff --git a/dev-db/sqlite/files/sqlite-3.31.1-full_archive-architectures.patch b/dev-db/sqlite/files/sqlite-3.31.1-full_archive-architectures.patch
deleted file mode 100644
index a0cf751..0000000
--- a/dev-db/sqlite/files/sqlite-3.31.1-full_archive-architectures.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-https://sqlite.org/cgi/src/info/04885763c4cd00cb
-https://sqlite.org/cgi/src/info/b20503aaf5b6595a
-
---- /ext/fts5/test/fts5matchinfo.test
-+++ /ext/fts5/test/fts5matchinfo.test
-@@ -500,14 +500,18 @@
-   INSERT INTO t1 VALUES('c', 'd');
- }
- 
-+if {$tcl_platform(byteOrder)=="littleEndian"} {
-+  set res {X'02000000'}
-+} else {
-+  set res {X'00000002'}
-+}
- do_execsql_test 15.1 {
-   SELECT quote(matchinfo(t1, 'n')) FROM t1 LIMIT 1;
--} {X'02000000'}
--
-+} $res
- do_execsql_test 15.2 {
-   DELETE FROM t1_content WHERE rowid=1;
-   SELECT quote(matchinfo(t1, 'n')) FROM t1 LIMIT 1;
--} {X'02000000'}
-+} $res
- 
- fts5_aux_test_functions db
- do_execsql_test 15.3 {
-@@ -517,4 +521,3 @@
- }
- 
- finish_test
--
---- /src/insert.c
-+++ /src/insert.c
-@@ -2170,12 +2170,14 @@
-             x = *sqlite3VdbeGetOp(v, addrConflictCk);
-             if( x.opcode!=OP_IdxRowid ){
-               int p2;      /* New P2 value for copied conflict check opcode */
-+              const char *zP4;
-               if( sqlite3OpcodeProperty[x.opcode]&OPFLG_JUMP ){
-                 p2 = lblRecheckOk;
-               }else{
-                 p2 = x.p2;
-               }
--              sqlite3VdbeAddOp4(v, x.opcode, x.p1, p2, x.p3, x.p4.z, x.p4type);
-+              zP4 = x.p4type==P4_INT32 ? SQLITE_INT_TO_PTR(x.p4.i) : x.p4.z;
-+              sqlite3VdbeAddOp4(v, x.opcode, x.p1, p2, x.p3, zP4, x.p4type);
-               sqlite3VdbeChangeP5(v, x.p5);
-               VdbeCoverageIf(v, p2!=x.p2);
-             }
---- /test/fts4aa.test
-+++ /test/fts4aa.test
-@@ -229,13 +229,18 @@
- # 2019-11-18 https://bugs.chromium.org/p/chromium/issues/detail?id=1025467
- db close
- sqlite3 db :memory:
-+if {$tcl_platform(byteOrder)=="littleEndian"} {
-+  set res {X'0200000000000000000000000E0000000E00000001000000010000000100000001000000'}
-+} else {
-+  set res {X'0000000200000000000000000000000E0000000E00000001000000010000000100000001'}
-+}
- do_execsql_test fts4aa-6.10 {
-   CREATE VIRTUAL TABLE f USING fts4();
-   INSERT INTO f_segdir VALUES (77,91,0,0,'255 77',x'0001308000004d5c4ddddddd4d4d7b4d4d4d614d8019ff4d05000001204d4d2e4d6e4d4d4d4b4d6c4d004d4d4d4d4d4d3d000000004d5d4d4d645d4d004d4d4d4d4d4d4d4d4d454d6910004d05ffff054d646c4d004d5d4d4d4d4d3d000000004d4d4d4d4d4d4d4d4d4d4d69624d4d4d04004d4d4d4d4d604d4ce1404d554d45');
-   INSERT INTO f_segdir VALUES (77,108,0,0,'255 77',x'0001310000fa64004d4d4d3c5d4d654d4d4d614d8000ff4d05000001204d4d2e4d6e4d4d4dff4d4d4d4d4d4d00104d4d4d4d000000004d4d4d0400311d4d4d4d4d4d4d4d4d4d684d6910004d05ffff054d4d6c4d004d4d4d4d4d4d3d000000004d4d4d4d644d4d4d4d4d4d69624d4d4d03ed4d4d4d4d4d604d4ce1404d550080');
-   INSERT INTO f_stat VALUES (0,x'80808080100000000064004d4d4d3c4d4d654d4d4d614d8000ff4df6ff1a00204d4d2e4d6e4d4d4d104d4d4d4d4d4d00104d4d4d4d4d4d69574d4d4d000031044d4d4d3e4d4d4c4d05004d6910');
-   SELECT quote(matchinfo(f,'pnax')) from f where f match '0 1';
--} {X'0200000000000000000000000E0000000E00000001000000010000000100000001000000'}
-+} $res
- 
- # 2019-11-18 Detect infinite loop in fts3SelectLeaf()
- db close
diff --git a/dev-db/sqlite/files/sqlite-3.31.1-full_archive-security_fixes.patch b/dev-db/sqlite/files/sqlite-3.31.1-full_archive-security_fixes.patch
deleted file mode 100644
index c0bb714..0000000
--- a/dev-db/sqlite/files/sqlite-3.31.1-full_archive-security_fixes.patch
+++ /dev/null
@@ -1,163 +0,0 @@
-https://sqlite.org/cgi/src/info/9d0d4ab95dc0c56e
-https://sqlite.org/cgi/src/info/abc473fb8fb99900
-https://sqlite.org/cgi/src/info/5aeb5a2d295e10d5
-https://sqlite.org/cgi/src/info/a67cf5b7d37d5b14
-https://sqlite.org/cgi/src/info/14d14eb537075c6a
-https://sqlite.org/cgi/src/info/c431b3fd8fd0f6a6
-
---- /src/expr.c
-+++ /src/expr.c
-@@ -5463,19 +5463,25 @@
-     case TK_LT:
-     case TK_LE:
-     case TK_GT:
--    case TK_GE:
-+    case TK_GE: {
-+      Expr *pLeft = pExpr->pLeft;
-+      Expr *pRight = pExpr->pRight;
-       testcase( pExpr->op==TK_EQ );
-       testcase( pExpr->op==TK_NE );
-       testcase( pExpr->op==TK_LT );
-       testcase( pExpr->op==TK_LE );
-       testcase( pExpr->op==TK_GT );
-       testcase( pExpr->op==TK_GE );
--      if( (pExpr->pLeft->op==TK_COLUMN && IsVirtual(pExpr->pLeft->y.pTab))
--       || (pExpr->pRight->op==TK_COLUMN && IsVirtual(pExpr->pRight->y.pTab))
-+      /* The y.pTab=0 assignment in wherecode.c always happens after the
-+      ** impliesNotNullRow() test */
-+      if( (pLeft->op==TK_COLUMN && ALWAYS(pLeft->y.pTab!=0)
-+                               && IsVirtual(pLeft->y.pTab))
-+       || (pRight->op==TK_COLUMN && ALWAYS(pRight->y.pTab!=0)
-+                               && IsVirtual(pRight->y.pTab))
-       ){
--       return WRC_Prune;
-+        return WRC_Prune;
-       }
--
-+    }
-     default:
-       return WRC_Continue;
-   }
---- /src/resolve.c
-+++ /src/resolve.c
-@@ -1051,7 +1051,7 @@
-       assert( !ExprHasProperty(pExpr, EP_Reduced) );
-       /* Handle special cases of "x IS TRUE", "x IS FALSE", "x IS NOT TRUE",
-       ** and "x IS NOT FALSE". */
--      if( pRight->op==TK_ID ){
-+      if( pRight && pRight->op==TK_ID ){
-         int rc = resolveExprStep(pWalker, pRight);
-         if( rc==WRC_Abort ) return WRC_Abort;
-         if( pRight->op==TK_TRUEFALSE ){
---- /src/select.c
-+++ /src/select.c
-@@ -2806,6 +2806,7 @@
-         /* Generate code to take the intersection of the two temporary
-         ** tables.
-         */
-+        if( rc ) break;
-         assert( p->pEList );
-         iBreak = sqlite3VdbeMakeLabel(pParse);
-         iCont = sqlite3VdbeMakeLabel(pParse);
-@@ -5148,7 +5149,7 @@
-             pNew = sqlite3ExprListAppend(pParse, pNew, pExpr);
-             sqlite3TokenInit(&sColname, zColname);
-             sqlite3ExprListSetName(pParse, pNew, &sColname, 0);
--            if( pNew && (p->selFlags & SF_NestedFrom)!=0 ){
-+            if( pNew && (p->selFlags & SF_NestedFrom)!=0 && !IN_RENAME_OBJECT ){
-               struct ExprList_item *pX = &pNew->a[pNew->nExpr-1];
-               sqlite3DbFree(db, pX->zEName);
-               if( pSub ){
---- /src/sqliteInt.h
-+++ /src/sqliteInt.h
-@@ -2153,8 +2153,11 @@
- */
- #ifndef SQLITE_OMIT_VIRTUALTABLE
- #  define IsVirtual(X)      ((X)->nModuleArg)
-+#  define ExprIsVtab(X)  \
-+              ((X)->op==TK_COLUMN && (X)->y.pTab!=0 && (X)->y.pTab->nModuleArg)
- #else
- #  define IsVirtual(X)      0
-+#  define ExprIsVtab(X)     0
- #endif
- 
- /*
---- /src/whereexpr.c
-+++ /src/whereexpr.c
-@@ -377,7 +377,8 @@
-     **       MATCH(expression,vtab_column)
-     */
-     pCol = pList->a[1].pExpr;
--    if( pCol->op==TK_COLUMN && IsVirtual(pCol->y.pTab) ){
-+    testcase( pCol->op==TK_COLUMN && pCol->y.pTab==0 );
-+    if( ExprIsVtab(pCol) ){
-       for(i=0; i<ArraySize(aOp); i++){
-         if( sqlite3StrICmp(pExpr->u.zToken, aOp[i].zOp)==0 ){
-           *peOp2 = aOp[i].eOp2;
-@@ -399,7 +400,8 @@
-     ** with function names in an arbitrary case.
-     */
-     pCol = pList->a[0].pExpr;
--    if( pCol->op==TK_COLUMN && IsVirtual(pCol->y.pTab) ){
-+    testcase( pCol->op==TK_COLUMN && pCol->y.pTab==0 );
-+    if( ExprIsVtab(pCol) ){
-       sqlite3_vtab *pVtab;
-       sqlite3_module *pMod;
-       void (*xNotUsed)(sqlite3_context*,int,sqlite3_value**);
-@@ -422,10 +424,12 @@
-     int res = 0;
-     Expr *pLeft = pExpr->pLeft;
-     Expr *pRight = pExpr->pRight;
--    if( pLeft->op==TK_COLUMN && IsVirtual(pLeft->y.pTab) ){
-+    testcase( pLeft->op==TK_COLUMN && pLeft->y.pTab==0 );
-+    if( ExprIsVtab(pLeft) ){
-       res++;
-     }
--    if( pRight && pRight->op==TK_COLUMN && IsVirtual(pRight->y.pTab) ){
-+    testcase( pRight && pRight->op==TK_COLUMN && pRight->y.pTab==0 );
-+    if( pRight && ExprIsVtab(pRight) ){
-       res++;
-       SWAP(Expr*, pLeft, pRight);
-     }
---- /test/altertab.test
-+++ /test/altertab.test
-@@ -613,4 +613,21 @@
-   SELECT sql FROM sqlite_master;
- } {{CREATE TABLE t0 (c1 INTEGER, PRIMARY KEY(c1))}}
- 
-+# 2020-02-23 ticket f50af3e8a565776b
-+reset_db
-+do_execsql_test 19.100 {
-+  CREATE TABLE t1(x);
-+  CREATE VIEW t2 AS SELECT 1 FROM t1, (t1 AS a0, t1);
-+  ALTER TABLE t1 RENAME TO t3;
-+  SELECT sql FROM sqlite_master;
-+} {{CREATE TABLE "t3"(x)} {CREATE VIEW t2 AS SELECT 1 FROM "t3", ("t3" AS a0, "t3")}}
-+do_execsql_test 19.110 {
-+  INSERT INTO t3(x) VALUES(123);
-+  SELECT * FROM t2;
-+} {1}
-+do_execsql_test 19.120 {
-+  INSERT INTO t3(x) VALUES('xyz');
-+  SELECT * FROM t2;
-+} {1 1 1 1 1 1 1 1}
-+
- finish_test
---- /test/windowfault.test
-+++ /test/windowfault.test
-@@ -263,4 +263,15 @@
-   faultsim_test_result {0 {}}
- }
- 
-+do_faultsim_test 11 -faults oom* -prep {
-+} -body {
-+  execsql {
-+    VALUES(false),(current_date collate binary) 
-+    intersect 
-+    values(count() not like group_concat(cast(cast(0e00 as text) as integer) <= NULL || 0.4e-0 || 0x8 & true ) over () collate rtrim);
-+  }
-+} -test {
-+  faultsim_test_result {0 {}}
-+}
-+
- finish_test
diff --git a/dev-db/sqlite/files/sqlite-3.31.1-nonfull_archive-architectures.patch b/dev-db/sqlite/files/sqlite-3.31.1-nonfull_archive-architectures.patch
deleted file mode 100644
index 79f6f07..0000000
--- a/dev-db/sqlite/files/sqlite-3.31.1-nonfull_archive-architectures.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-https://sqlite.org/cgi/src/info/04885763c4cd00cb
-
---- /sqlite3.c
-+++ /sqlite3.c
-@@ -121302,12 +121302,14 @@
-             x = *sqlite3VdbeGetOp(v, addrConflictCk);
-             if( x.opcode!=OP_IdxRowid ){
-               int p2;      /* New P2 value for copied conflict check opcode */
-+              const char *zP4;
-               if( sqlite3OpcodeProperty[x.opcode]&OPFLG_JUMP ){
-                 p2 = lblRecheckOk;
-               }else{
-                 p2 = x.p2;
-               }
--              sqlite3VdbeAddOp4(v, x.opcode, x.p1, p2, x.p3, x.p4.z, x.p4type);
-+              zP4 = x.p4type==P4_INT32 ? SQLITE_INT_TO_PTR(x.p4.i) : x.p4.z;
-+              sqlite3VdbeAddOp4(v, x.opcode, x.p1, p2, x.p3, zP4, x.p4type);
-               sqlite3VdbeChangeP5(v, x.p5);
-               VdbeCoverageIf(v, p2!=x.p2);
-             }
diff --git a/dev-db/sqlite/files/sqlite-3.31.1-nonfull_archive-security_fixes.patch b/dev-db/sqlite/files/sqlite-3.31.1-nonfull_archive-security_fixes.patch
deleted file mode 100644
index 3bbbbf7..0000000
--- a/dev-db/sqlite/files/sqlite-3.31.1-nonfull_archive-security_fixes.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-https://sqlite.org/cgi/src/info/9d0d4ab95dc0c56e
-https://sqlite.org/cgi/src/info/abc473fb8fb99900
-https://sqlite.org/cgi/src/info/5aeb5a2d295e10d5
-https://sqlite.org/cgi/src/info/a67cf5b7d37d5b14
-https://sqlite.org/cgi/src/info/c431b3fd8fd0f6a6
-
---- /sqlite3.c
-+++ /sqlite3.c
-@@ -17428,8 +17428,11 @@
- */
- #ifndef SQLITE_OMIT_VIRTUALTABLE
- #  define IsVirtual(X)      ((X)->nModuleArg)
-+#  define ExprIsVtab(X)  \
-+              ((X)->op==TK_COLUMN && (X)->y.pTab!=0 && (X)->y.pTab->nModuleArg)
- #else
- #  define IsVirtual(X)      0
-+#  define ExprIsVtab(X)     0
- #endif
- 
- /*
-@@ -97816,7 +97819,7 @@
-       assert( !ExprHasProperty(pExpr, EP_Reduced) );
-       /* Handle special cases of "x IS TRUE", "x IS FALSE", "x IS NOT TRUE",
-       ** and "x IS NOT FALSE". */
--      if( pRight->op==TK_ID ){
-+      if( pRight && pRight->op==TK_ID ){
-         int rc = resolveExprStep(pWalker, pRight);
-         if( rc==WRC_Abort ) return WRC_Abort;
-         if( pRight->op==TK_TRUEFALSE ){
-@@ -104133,19 +104136,25 @@
-     case TK_LT:
-     case TK_LE:
-     case TK_GT:
--    case TK_GE:
-+    case TK_GE: {
-+      Expr *pLeft = pExpr->pLeft;
-+      Expr *pRight = pExpr->pRight;
-       testcase( pExpr->op==TK_EQ );
-       testcase( pExpr->op==TK_NE );
-       testcase( pExpr->op==TK_LT );
-       testcase( pExpr->op==TK_LE );
-       testcase( pExpr->op==TK_GT );
-       testcase( pExpr->op==TK_GE );
--      if( (pExpr->pLeft->op==TK_COLUMN && IsVirtual(pExpr->pLeft->y.pTab))
--       || (pExpr->pRight->op==TK_COLUMN && IsVirtual(pExpr->pRight->y.pTab))
-+      /* The y.pTab=0 assignment in wherecode.c always happens after the
-+      ** impliesNotNullRow() test */
-+      if( (pLeft->op==TK_COLUMN && ALWAYS(pLeft->y.pTab!=0)
-+                               && IsVirtual(pLeft->y.pTab))
-+       || (pRight->op==TK_COLUMN && ALWAYS(pRight->y.pTab!=0)
-+                               && IsVirtual(pRight->y.pTab))
-       ){
--       return WRC_Prune;
-+        return WRC_Prune;
-       }
--
-+    }
-     default:
-       return WRC_Continue;
-   }
-@@ -130673,6 +130682,7 @@
-         /* Generate code to take the intersection of the two temporary
-         ** tables.
-         */
-+        if( rc ) break;
-         assert( p->pEList );
-         iBreak = sqlite3VdbeMakeLabel(pParse);
-         iCont = sqlite3VdbeMakeLabel(pParse);
-@@ -133015,7 +133025,7 @@
-             pNew = sqlite3ExprListAppend(pParse, pNew, pExpr);
-             sqlite3TokenInit(&sColname, zColname);
-             sqlite3ExprListSetName(pParse, pNew, &sColname, 0);
--            if( pNew && (p->selFlags & SF_NestedFrom)!=0 ){
-+            if( pNew && (p->selFlags & SF_NestedFrom)!=0 && !IN_RENAME_OBJECT ){
-               struct ExprList_item *pX = &pNew->a[pNew->nExpr-1];
-               sqlite3DbFree(db, pX->zEName);
-               if( pSub ){
-@@ -142593,7 +142603,8 @@
-     **       MATCH(expression,vtab_column)
-     */
-     pCol = pList->a[1].pExpr;
--    if( pCol->op==TK_COLUMN && IsVirtual(pCol->y.pTab) ){
-+    testcase( pCol->op==TK_COLUMN && pCol->y.pTab==0 );
-+    if( ExprIsVtab(pCol) ){
-       for(i=0; i<ArraySize(aOp); i++){
-         if( sqlite3StrICmp(pExpr->u.zToken, aOp[i].zOp)==0 ){
-           *peOp2 = aOp[i].eOp2;
-@@ -142615,7 +142626,8 @@
-     ** with function names in an arbitrary case.
-     */
-     pCol = pList->a[0].pExpr;
--    if( pCol->op==TK_COLUMN && IsVirtual(pCol->y.pTab) ){
-+    testcase( pCol->op==TK_COLUMN && pCol->y.pTab==0 );
-+    if( ExprIsVtab(pCol) ){
-       sqlite3_vtab *pVtab;
-       sqlite3_module *pMod;
-       void (*xNotUsed)(sqlite3_context*,int,sqlite3_value**);
-@@ -142638,10 +142650,12 @@
-     int res = 0;
-     Expr *pLeft = pExpr->pLeft;
-     Expr *pRight = pExpr->pRight;
--    if( pLeft->op==TK_COLUMN && IsVirtual(pLeft->y.pTab) ){
-+    testcase( pLeft->op==TK_COLUMN && pLeft->y.pTab==0 );
-+    if( ExprIsVtab(pLeft) ){
-       res++;
-     }
--    if( pRight && pRight->op==TK_COLUMN && IsVirtual(pRight->y.pTab) ){
-+    testcase( pRight && pRight->op==TK_COLUMN && pRight->y.pTab==0 );
-+    if( pRight && ExprIsVtab(pRight) ){
-       res++;
-       SWAP(Expr*, pLeft, pRight);
-     }
diff --git a/dev-db/sqlite/files/sqlite-3.32.1-full_archive-build_2.patch b/dev-db/sqlite/files/sqlite-3.32.1-full_archive-build_2.patch
deleted file mode 100644
index f12c0b2..0000000
--- a/dev-db/sqlite/files/sqlite-3.32.1-full_archive-build_2.patch
+++ /dev/null
@@ -1,640 +0,0 @@
-Enable some extensions in libsqlite3.so.
-Move some code to libsqlite3.so to avoid duplication.
-Link executables against libsqlite3.so.
-Increase timeout for fuzzcheck.
-Fix building with dlopen() not available.
-
---- /Makefile.in
-+++ /Makefile.in
-@@ -313,6 +313,9 @@
- # Source code for extensions
- #
- SRC += \
-+  $(TOP)/ext/expert/sqlite3expert.c \
-+  $(TOP)/ext/expert/sqlite3expert.h
-+SRC += \
-   $(TOP)/ext/fts1/fts1.c \
-   $(TOP)/ext/fts1/fts1.h \
-   $(TOP)/ext/fts1/fts1_hash.c \
-@@ -365,8 +368,24 @@
-   $(TOP)/ext/rbu/sqlite3rbu.h \
-   $(TOP)/ext/rbu/sqlite3rbu.c
- SRC += \
-+  $(TOP)/ext/misc/appendvfs.c \
-+  $(TOP)/ext/misc/carray.c \
-+  $(TOP)/ext/misc/completion.c \
-+  $(TOP)/ext/misc/csv.c \
-+  $(TOP)/ext/misc/dbdata.c \
-+  $(TOP)/ext/misc/eval.c \
-+  $(TOP)/ext/misc/fileio.c \
-+  $(TOP)/ext/misc/ieee754.c \
-   $(TOP)/ext/misc/json1.c \
--  $(TOP)/ext/misc/stmt.c
-+  $(TOP)/ext/misc/regexp.c \
-+  $(TOP)/ext/misc/sha1.c \
-+  $(TOP)/ext/misc/shathree.c \
-+  $(TOP)/ext/misc/sqlar.c \
-+  $(TOP)/ext/misc/stmt.c \
-+  $(TOP)/ext/misc/totype.c \
-+  $(TOP)/ext/misc/uint.c \
-+  $(TOP)/ext/misc/uuid.c \
-+  $(TOP)/ext/misc/zipfile.c
- 
- # Generated source code files
- #
-@@ -437,33 +456,24 @@
- # Statically linked extensions
- #
- TESTSRC += \
--  $(TOP)/ext/expert/sqlite3expert.c \
-   $(TOP)/ext/expert/test_expert.c \
-   $(TOP)/ext/misc/amatch.c \
--  $(TOP)/ext/misc/carray.c \
-   $(TOP)/ext/misc/closure.c \
--  $(TOP)/ext/misc/csv.c \
--  $(TOP)/ext/misc/eval.c \
-   $(TOP)/ext/misc/explain.c \
--  $(TOP)/ext/misc/fileio.c \
-   $(TOP)/ext/misc/fuzzer.c \
-   $(TOP)/ext/fts5/fts5_tcl.c \
-   $(TOP)/ext/fts5/fts5_test_mi.c \
-   $(TOP)/ext/fts5/fts5_test_tok.c \
--  $(TOP)/ext/misc/ieee754.c \
-   $(TOP)/ext/misc/mmapwarm.c \
-   $(TOP)/ext/misc/nextchar.c \
-   $(TOP)/ext/misc/normalize.c \
-   $(TOP)/ext/misc/percentile.c \
-   $(TOP)/ext/misc/prefixes.c \
--  $(TOP)/ext/misc/regexp.c \
-   $(TOP)/ext/misc/remember.c \
-   $(TOP)/ext/misc/series.c \
-   $(TOP)/ext/misc/spellfix.c \
--  $(TOP)/ext/misc/totype.c \
-   $(TOP)/ext/misc/unionvtab.c \
-   $(TOP)/ext/misc/wholenumber.c \
--  $(TOP)/ext/misc/zipfile.c \
-   $(TOP)/ext/userauth/userauth.c
- 
- # Source code to the library files needed by the test fixture
-@@ -645,25 +655,25 @@
- 
- libtclsqlite3.la:	tclsqlite.lo libsqlite3.la
- 	$(LTLINK) -no-undefined -o $@ tclsqlite.lo \
--		libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
-+		libsqlite3.la @TCL_STUB_LIB_SPEC@ \
- 		-rpath "$(TCLLIBDIR)" \
- 		-version-info "8:6:8" \
- 		-avoid-version
- 
--sqlite3$(TEXE):	shell.c sqlite3.c
--	$(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
--		shell.c sqlite3.c \
--		$(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
-+sqlite3$(TEXE):	shell.c libsqlite3.la
-+	$(LTLINK) $(READLINE_FLAGS) -o $@ \
-+		shell.c libsqlite3.la \
-+		$(LIBREADLINE)
- 
--sqldiff$(TEXE):	$(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h
--	$(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
-+sqldiff$(TEXE):	$(TOP)/tool/sqldiff.c libsqlite3.la
-+	$(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la
- 
--dbhash$(TEXE):	$(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
--	$(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)
-+dbhash$(TEXE):	$(TOP)/tool/dbhash.c libsqlite3.la
-+	$(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la
- 
--scrub$(TEXE):	$(TOP)/ext/misc/scrub.c sqlite3.lo
-+scrub$(TEXE):	$(TOP)/ext/misc/scrub.c libsqlite3.la
- 	$(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \
--		$(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS)
-+		$(TOP)/ext/misc/scrub.c libsqlite3.la
- 
- srcck1$(BEXE):	$(TOP)/tool/srcck1.c
- 	$(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
-@@ -774,7 +784,7 @@
- # Rule to build the amalgamation
- #
- sqlite3.lo:	sqlite3.c
--	$(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c
-+	$(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c
- 
- # Rules to build the LEMON compiler generator
- #
-@@ -1074,15 +1084,6 @@
- # Source files that go into making shell.c
- SHELL_SRC = \
- 	$(TOP)/src/shell.c.in \
--        $(TOP)/ext/misc/appendvfs.c \
--	$(TOP)/ext/misc/shathree.c \
--	$(TOP)/ext/misc/fileio.c \
--	$(TOP)/ext/misc/completion.c \
--	$(TOP)/ext/misc/sqlar.c \
--        $(TOP)/ext/misc/uint.c \
--	$(TOP)/ext/expert/sqlite3expert.c \
--	$(TOP)/ext/expert/sqlite3expert.h \
--	$(TOP)/ext/misc/zipfile.c \
- 	$(TOP)/ext/misc/memtrace.c \
-         $(TOP)/src/test_windirent.c
- 
-@@ -1251,11 +1252,11 @@
- 
- # Fuzz testing
- fuzztest:	fuzzcheck$(TEXE) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
--	./fuzzcheck$(TEXE) $(FUZZDATA)
-+	./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA)
- 	./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
- 
- valgrindfuzz:	fuzzcheck$(TEXT) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
--	valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA)
-+	valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA)
- 	valgrind ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
- 
- # The veryquick.test TCL tests.
-@@ -1286,24 +1287,23 @@
- smoketest:	$(TESTPROGS) fuzzcheck$(TEXE)
- 	./testfixture$(TEXE) $(TOP)/test/main.test $(TESTOPTS)
- 
--sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
-+sqlite3_analyzer.c:	$(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
- 	$(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in >sqlite3_analyzer.c
- 
--sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
--	$(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
-+sqlite3_analyzer$(TEXE):	sqlite3_analyzer.c libsqlite3.la
-+	$(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL)
- 
--sqltclsh.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl $(TOP)/ext/misc/appendvfs.c $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in
-+sqltclsh.c:	$(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in
- 	$(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in >sqltclsh.c
- 
--sqltclsh$(TEXE): sqltclsh.c
--	$(LTLINK) sqltclsh.c -o $@ $(LIBTCL) $(TLIBS)
-+sqltclsh$(TEXE):	sqltclsh.c libsqlite3.la
-+	$(LTLINK) sqltclsh.c -o $@ libsqlite3.la $(LIBTCL)
- 
--sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c
--	$(LTLINK)	$(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c -o sqlite3_expert $(TLIBS)
-+sqlite3_expert$(TEXE):	$(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/expert.c libsqlite3.la
-+	$(LTLINK) $(TOP)/ext/expert/expert.c -o sqlite3_expert libsqlite3.la
- 
- CHECKER_DEPS =\
-   $(TOP)/tool/mkccode.tcl \
--  sqlite3.c \
-   $(TOP)/src/tclsqlite.c \
-   $(TOP)/ext/repair/sqlite3_checker.tcl \
-   $(TOP)/ext/repair/checkindex.c \
-@@ -1314,36 +1314,36 @@
- sqlite3_checker.c:	$(CHECKER_DEPS)
- 	$(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/ext/repair/sqlite3_checker.c.in >$@
- 
--sqlite3_checker$(TEXE):	sqlite3_checker.c
--	$(LTLINK) sqlite3_checker.c -o $@ $(LIBTCL) $(TLIBS)
-+sqlite3_checker$(TEXE):	sqlite3_checker.c libsqlite3.la
-+	$(LTLINK) sqlite3_checker.c -o $@ libsqlite3.la $(LIBTCL)
- 
--dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c sqlite3.lo
-+dbdump$(TEXE):	$(TOP)/ext/misc/dbdump.c libsqlite3.la
- 	$(LTLINK) -DDBDUMP_STANDALONE -o $@ \
--           $(TOP)/ext/misc/dbdump.c sqlite3.lo $(TLIBS)
-+           $(TOP)/ext/misc/dbdump.c libsqlite3.la
- 
--dbtotxt$(TEXE): $(TOP)/tool/dbtotxt.c
--	$(LTLINK)-o $@ $(TOP)/tool/dbtotxt.c
-+dbtotxt$(TEXE):	$(TOP)/tool/dbtotxt.c
-+	$(LTLINK) -o $@ $(TOP)/tool/dbtotxt.c
- 
--showdb$(TEXE):	$(TOP)/tool/showdb.c sqlite3.lo
--	$(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
-+showdb$(TEXE):	$(TOP)/tool/showdb.c libsqlite3.la
-+	$(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la
- 
--showstat4$(TEXE):	$(TOP)/tool/showstat4.c sqlite3.lo
--	$(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS)
-+showstat4$(TEXE):	$(TOP)/tool/showstat4.c libsqlite3.la
-+	$(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la
- 
--showjournal$(TEXE):	$(TOP)/tool/showjournal.c sqlite3.lo
--	$(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS)
-+showjournal$(TEXE):	$(TOP)/tool/showjournal.c
-+	$(LTLINK) -o $@ $(TOP)/tool/showjournal.c
- 
--showwal$(TEXE):	$(TOP)/tool/showwal.c sqlite3.lo
--	$(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS)
-+showwal$(TEXE):	$(TOP)/tool/showwal.c
-+	$(LTLINK) -o $@ $(TOP)/tool/showwal.c
- 
- showshm$(TEXE):	$(TOP)/tool/showshm.c
- 	$(LTLINK) -o $@ $(TOP)/tool/showshm.c
- 
--index_usage$(TEXE): $(TOP)/tool/index_usage.c sqlite3.lo
--	$(LTLINK) $(SHELL_OPT) -o $@ $(TOP)/tool/index_usage.c sqlite3.lo $(TLIBS)
-+index_usage$(TEXE):	$(TOP)/tool/index_usage.c libsqlite3.la
-+	$(LTLINK) -o $@ $(TOP)/tool/index_usage.c libsqlite3.la
- 
--changeset$(TEXE):	$(TOP)/ext/session/changeset.c sqlite3.lo
--	$(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS)
-+changeset$(TEXE):	$(TOP)/ext/session/changeset.c libsqlite3.la
-+	$(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la
- 
- changesetfuzz$(TEXE):	$(TOP)/ext/session/changesetfuzz.c sqlite3.lo
- 	$(LTLINK) -o $@ $(TOP)/ext/session/changesetfuzz.c sqlite3.lo $(TLIBS)
-@@ -1368,11 +1368,11 @@
- kvtest$(TEXE):	$(TOP)/test/kvtest.c sqlite3.c
- 	$(LTLINK) $(KV_OPT) -o $@ $(TOP)/test/kvtest.c sqlite3.c $(TLIBS)
- 
--rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
--	$(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
-+rbu$(EXE):	$(TOP)/ext/rbu/rbu.c libsqlite3.la
-+	$(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la
- 
--loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
--	$(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
-+loadfts$(EXE):	$(TOP)/tool/loadfts.c libsqlite3.la
-+	$(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@
- 
- # This target will fail if the SQLite amalgamation contains any exported
- # symbols that do not begin with "sqlite3_". It is run as part of the
---- /configure.ac
-+++ /configure.ac
-@@ -587,6 +587,9 @@
- if test "${enable_load_extension}" = "yes" ; then
-   OPT_FEATURE_FLAGS=""
-   AC_SEARCH_LIBS(dlopen, dl)
-+  if test "${ac_cv_search_dlopen}" = "no" ; then
-+    OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
-+  fi
- else
-   OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
- fi
---- /ext/repair/sqlite3_checker.c.in
-+++ /ext/repair/sqlite3_checker.c.in
-@@ -2,6 +2,7 @@
- ** Read an SQLite database file and analyze its space utilization.  Generate
- ** text on standard output.
- */
-+#define SQLITE_CORE 1
- #define TCLSH_INIT_PROC sqlite3_checker_init_proc
- #define SQLITE_ENABLE_DBPAGE_VTAB 1
- #define SQLITE_ENABLE_JSON1 1
-@@ -14,7 +15,7 @@
- #define SQLITE_OMIT_SHARED_CACHE 1
- #define SQLITE_DEFAULT_MEMSTATUS 0
- #define SQLITE_MAX_EXPR_DEPTH 0
--INCLUDE sqlite3.c
-+#include "sqlite3.h"
- INCLUDE $ROOT/src/tclsqlite.c
- INCLUDE $ROOT/ext/misc/btreeinfo.c
- INCLUDE $ROOT/ext/repair/checkindex.c
---- /src/main.c
-+++ /src/main.c
-@@ -50,12 +50,31 @@
- #ifdef SQLITE_ENABLE_FTS5
- int sqlite3Fts5Init(sqlite3*);
- #endif
-+#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
-+int sqlite3DbdataRegister(sqlite3*);
-+#endif
- #ifdef SQLITE_ENABLE_JSON1
- int sqlite3Json1Init(sqlite3*);
- #endif
- #ifdef SQLITE_ENABLE_STMTVTAB
- int sqlite3StmtVtabInit(sqlite3*);
- #endif
-+int sqlite3CarrayInit(sqlite3*);
-+int sqlite3CompletionVtabInit(sqlite3*);
-+int sqlite3CsvInit(sqlite3*);
-+int sqlite3EvalInit(sqlite3*);
-+int sqlite3FileioInit(sqlite3*);
-+int sqlite3IeeeInit(sqlite3*);
-+int sqlite3RegexpInit(sqlite3*);
-+int sqlite3ShaInit(sqlite3*);
-+int sqlite3ShathreeInit(sqlite3*);
-+int sqlite3TotypeInit(sqlite3*);
-+int sqlite3UintInit(sqlite3*);
-+int sqlite3UuidInit(sqlite3*);
-+#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_HAVE_ZLIB)
-+int sqlite3ZipfileInit(sqlite3*);
-+int sqlite3SqlarInit(sqlite3*);
-+#endif
- 
- /*
- ** An array of pointers to extension initializer functions for
-@@ -83,6 +102,9 @@
- #ifdef SQLITE_ENABLE_DBPAGE_VTAB
-   sqlite3DbpageRegister,
- #endif
-+#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
-+  sqlite3DbdataRegister,
-+#endif
- #ifdef SQLITE_ENABLE_DBSTAT_VTAB
-   sqlite3DbstatRegister,
- #endif
-@@ -96,6 +118,22 @@
- #ifdef SQLITE_ENABLE_BYTECODE_VTAB
-   sqlite3VdbeBytecodeVtabInit,
- #endif
-+  sqlite3CarrayInit,
-+  sqlite3CompletionVtabInit,
-+  sqlite3CsvInit,
-+  sqlite3EvalInit,
-+  sqlite3FileioInit,
-+  sqlite3IeeeInit,
-+  sqlite3RegexpInit,
-+  sqlite3ShaInit,
-+  sqlite3ShathreeInit,
-+  sqlite3TotypeInit,
-+  sqlite3UintInit,
-+  sqlite3UuidInit,
-+#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_HAVE_ZLIB)
-+  sqlite3ZipfileInit,
-+  sqlite3SqlarInit,
-+#endif
- };
- 
- #ifndef SQLITE_AMALGAMATION
---- /src/shell.c.in
-+++ /src/shell.c.in
-@@ -69,6 +69,7 @@
- #include <stdio.h>
- #include <assert.h>
- #include "sqlite3.h"
-+#include "ext/expert/sqlite3expert.h"
- typedef sqlite3_int64 i64;
- typedef sqlite3_uint64 u64;
- typedef unsigned char u8;
-@@ -135,6 +136,10 @@
- # define SHELL_USE_LOCAL_GETLINE 1
- #endif
- 
-+#ifdef SQLITE_HAVE_ZLIB
-+#include <zlib.h>
-+#endif
-+
- 
- #if defined(_WIN32) || defined(WIN32)
- # if SQLITE_OS_WINRT
-@@ -1005,22 +1010,7 @@
- INCLUDE test_windirent.c
- #define dirent DIRENT
- #endif
--INCLUDE ../ext/misc/shathree.c
--INCLUDE ../ext/misc/fileio.c
--INCLUDE ../ext/misc/completion.c
--INCLUDE ../ext/misc/appendvfs.c
- INCLUDE ../ext/misc/memtrace.c
--INCLUDE ../ext/misc/uint.c
--#ifdef SQLITE_HAVE_ZLIB
--INCLUDE ../ext/misc/zipfile.c
--INCLUDE ../ext/misc/sqlar.c
--#endif
--INCLUDE ../ext/expert/sqlite3expert.h
--INCLUDE ../ext/expert/sqlite3expert.c
--
--#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
--INCLUDE ../ext/misc/dbdata.c
--#endif
- 
- #if defined(SQLITE_ENABLE_SESSION)
- /*
-@@ -4261,17 +4251,6 @@
- #ifndef SQLITE_OMIT_LOAD_EXTENSION
-     sqlite3_enable_load_extension(p->db, 1);
- #endif
--    sqlite3_fileio_init(p->db, 0, 0);
--    sqlite3_shathree_init(p->db, 0, 0);
--    sqlite3_completion_init(p->db, 0, 0);
--    sqlite3_uint_init(p->db, 0, 0);
--#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
--    sqlite3_dbdata_init(p->db, 0, 0);
--#endif
--#ifdef SQLITE_HAVE_ZLIB
--    sqlite3_zipfile_init(p->db, 0, 0);
--    sqlite3_sqlar_init(p->db, 0, 0);
--#endif
-     sqlite3_create_function(p->db, "shell_add_schema", 3, SQLITE_UTF8, 0,
-                             shellAddSchemaName, 0, 0);
-     sqlite3_create_function(p->db, "shell_module_schema", 1, SQLITE_UTF8, 0,
-@@ -6281,8 +6260,6 @@
-         );
-         goto end_ar_command;
-       }
--      sqlite3_fileio_init(cmd.db, 0, 0);
--      sqlite3_sqlar_init(cmd.db, 0, 0);
-       sqlite3_create_function(cmd.db, "shell_putsnl", 1, SQLITE_UTF8, cmd.p,
-                               shellPutsFunc, 0, 0);
- 
-@@ -10621,6 +10598,7 @@
- #endif
-   }
-   data.out = stdout;
-+  extern int sqlite3_appendvfs_init(sqlite3 *, char **, const sqlite3_api_routines *);
-   sqlite3_appendvfs_init(0,0,0);
- 
-   /* Go ahead and open the database file if it already exists.  If the
---- /src/test_config.c
-+++ /src/test_config.c
-@@ -540,6 +540,8 @@
-   Tcl_SetVar2(interp, "sqlite_options", "progress", "1", TCL_GLOBAL_ONLY);
- #endif
- 
-+  Tcl_SetVar2(interp, "sqlite_options", "regexp", "1", TCL_GLOBAL_ONLY);
-+
- #ifdef SQLITE_OMIT_REINDEX
-   Tcl_SetVar2(interp, "sqlite_options", "reindex", "0", TCL_GLOBAL_ONLY);
- #else
-@@ -662,6 +664,8 @@
-   Tcl_SetVar2(interp, "sqlite_options", "truncate_opt", "1", TCL_GLOBAL_ONLY);
- #endif
- 
-+  Tcl_SetVar2(interp, "sqlite_options", "uint", "1", TCL_GLOBAL_ONLY);
-+
- #ifdef SQLITE_OMIT_UTF16
-   Tcl_SetVar2(interp, "sqlite_options", "utf16", "0", TCL_GLOBAL_ONLY);
- #else
---- /test/e_expr.test
-+++ /test/e_expr.test
-@@ -1078,7 +1078,7 @@
- #
- #   There is a regexp function if ICU is enabled though.
- #
--ifcapable !icu {
-+ifcapable !icu&&!regexp {
-   do_catchsql_test e_expr-18.1.1 { 
-     SELECT regexp('abc', 'def') 
-   } {1 {no such function: regexp}}
---- /test/icu.test
-+++ /test/icu.test
-@@ -41,7 +41,7 @@
-   #
-   test_expr icu-1.1 {i1='hello'} {i1 REGEXP 'hello'}  1
-   test_expr icu-1.2 {i1='hello'} {i1 REGEXP '.ello'}  1
--  test_expr icu-1.3 {i1='hello'} {i1 REGEXP '.ell'}   0
-+  test_expr icu-1.3 {i1='hello'} {i1 REGEXP '.ell$'}  0
-   test_expr icu-1.4 {i1='hello'} {i1 REGEXP '.ell.*'} 1
-   test_expr icu-1.5 {i1=NULL}    {i1 REGEXP '.ell.*'} {}
- 
---- /test/pragma.test
-+++ /test/pragma.test
-@@ -1360,17 +1360,32 @@
- } ;# ifcapable trigger
- 
- ifcapable schema_pragmas {
--  do_test pragma-11.1 {
--    execsql2 {
--      pragma collation_list;
--    }
--  } {seq 0 name RTRIM seq 1 name NOCASE seq 2 name BINARY}
--  do_test pragma-11.2 {
--    db collate New_Collation blah...
--    execsql {
--      pragma collation_list;
--    }
--  } {0 New_Collation 1 RTRIM 2 NOCASE 3 BINARY}
-+  ifcapable uint {
-+    do_test pragma-11.1 {
-+      execsql2 {
-+        pragma collation_list;
-+      }
-+    } {seq 0 name UINT seq 1 name RTRIM seq 2 name NOCASE seq 3 name BINARY}
-+    do_test pragma-11.2 {
-+      db collate New_Collation blah...
-+      execsql {
-+        pragma collation_list;
-+      }
-+    } {0 New_Collation 1 UINT 2 RTRIM 3 NOCASE 4 BINARY}
-+  }
-+  ifcapable !uint {
-+    do_test pragma-11.1 {
-+      execsql2 {
-+        pragma collation_list;
-+      }
-+    } {seq 0 name RTRIM seq 1 name NOCASE seq 2 name BINARY}
-+    do_test pragma-11.2 {
-+      db collate New_Collation blah...
-+      execsql {
-+        pragma collation_list;
-+      }
-+    } {0 New_Collation 1 RTRIM 2 NOCASE 3 BINARY}
-+  }
- }
- 
- ifcapable schema_pragmas&&tempdb {
---- /test/sessionfuzz.c
-+++ /test/sessionfuzz.c
-@@ -700,42 +700,6 @@
- #include <assert.h>
- #include "zlib.h"
- 
--/*
--** Implementation of the "sqlar_uncompress(X,SZ)" SQL function
--**
--** Parameter SZ is interpreted as an integer. If it is less than or
--** equal to zero, then this function returns a copy of X. Or, if
--** SZ is equal to the size of X when interpreted as a blob, also
--** return a copy of X. Otherwise, decompress blob X using zlib
--** utility function uncompress() and return the results (another
--** blob).
--*/
--static void sqlarUncompressFunc(
--  sqlite3_context *context,
--  int argc,
--  sqlite3_value **argv
--){
--  uLong nData;
--  uLongf sz;
--
--  assert( argc==2 );
--  sz = sqlite3_value_int(argv[1]);
--
--  if( sz<=0 || sz==(nData = sqlite3_value_bytes(argv[0])) ){
--    sqlite3_result_value(context, argv[0]);
--  }else{
--    const Bytef *pData= sqlite3_value_blob(argv[0]);
--    Bytef *pOut = sqlite3_malloc(sz);
--    if( Z_OK!=uncompress(pOut, &sz, pData, nData) ){
--      sqlite3_result_error(context, "error in uncompress()", -1);
--    }else{
--      sqlite3_result_blob(context, pOut, sz, SQLITE_TRANSIENT);
--    }
--    sqlite3_free(pOut);
--  }
--}
--
--
- /* Run a chunk of SQL.  If any errors happen, print an error message
- ** and exit.
- */
---- /tool/mksqlite3c.tcl
-+++ /tool/mksqlite3c.tcl
-@@ -117,6 +117,7 @@
-    rtree.h
-    sqlite3session.h
-    sqlite3.h
-+   sqlite3expert.h
-    sqlite3ext.h
-    sqlite3rbu.h
-    sqliteicu.h
-@@ -404,6 +405,23 @@
-    sqlite3session.c
-    fts5.c
-    stmt.c
-+   appendvfs.c
-+   carray.c
-+   completion.c
-+   csv.c
-+   dbdata.c
-+   eval.c
-+   fileio.c
-+   ieee754.c
-+   regexp.c
-+   sha1.c
-+   shathree.c
-+   sqlar.c
-+   sqlite3expert.c
-+   totype.c
-+   uint.c
-+   uuid.c
-+   zipfile.c
- } {
-   copy_file tsrc/$file
- }
---- /tool/sqlite3_analyzer.c.in
-+++ /tool/sqlite3_analyzer.c.in
-@@ -14,9 +14,6 @@
- #define SQLITE_DEFAULT_MEMSTATUS 0
- #define SQLITE_MAX_EXPR_DEPTH 0
- #define SQLITE_OMIT_LOAD_EXTENSION 1
--#ifndef USE_EXTERNAL_SQLITE
--INCLUDE sqlite3.c
--#endif
- INCLUDE $ROOT/src/tclsqlite.c
- 
- const char *sqlite3_analyzer_init_proc(Tcl_Interp *interp){
---- /tool/sqltclsh.c.in
-+++ /tool/sqltclsh.c.in
-@@ -27,21 +27,13 @@
- #define SQLITE_OMIT_SHARED_CACHE 1
- #define SQLITE_DEFAULT_MEMSTATUS 0
- #define SQLITE_MAX_EXPR_DEPTH 0
--INCLUDE sqlite3.c
--INCLUDE $ROOT/ext/misc/appendvfs.c
--#ifdef SQLITE_HAVE_ZLIB
--INCLUDE $ROOT/ext/misc/zipfile.c
--INCLUDE $ROOT/ext/misc/sqlar.c
--#endif
-+#include "sqlite3.h"
- INCLUDE $ROOT/src/tclsqlite.c
- 
- const char *sqlite3_tclapp_init_proc(Tcl_Interp *interp){
-   (void)interp;
-+  extern int sqlite3_appendvfs_init(sqlite3 *,char **, const sqlite3_api_routines *);
-   sqlite3_appendvfs_init(0,0,0);
--#ifdef SQLITE_HAVE_ZLIB
--  sqlite3_auto_extension((void(*)(void))sqlite3_sqlar_init);
--  sqlite3_auto_extension((void(*)(void))sqlite3_zipfile_init);
--#endif
- 
-   return
- BEGIN_STRING
diff --git a/dev-db/sqlite/files/sqlite-3.32.3-security_fixes.patch b/dev-db/sqlite/files/sqlite-3.32.3-security_fixes.patch
deleted file mode 100644
index ad2a3bf..0000000
--- a/dev-db/sqlite/files/sqlite-3.32.3-security_fixes.patch
+++ /dev/null
@@ -1,146 +0,0 @@
-https://sqlite.org/src/info/cc888878ea8d5bc7
-https://sqlite.org/src/info/be545f85a6ef09cc
-https://sqlite.org/src/info/6e0ffa2053124168
-https://sqlite.org/src/info/4d0cfb1236884349
-
---- /ext/fts3/fts3.c
-+++ /ext/fts3/fts3.c
-@@ -5208,10 +5208,12 @@
-   );
-   if( res ){
-     nNew = (int)(pOut - pPhrase->doclist.pList) - 1;
--    assert( pPhrase->doclist.pList[nNew]=='\0' );
--    assert( nNew<=pPhrase->doclist.nList && nNew>0 );
--    memset(&pPhrase->doclist.pList[nNew], 0, pPhrase->doclist.nList - nNew);
--    pPhrase->doclist.nList = nNew;
-+    if( nNew>=0 ){
-+      assert( pPhrase->doclist.pList[nNew]=='\0' );
-+      assert( nNew<=pPhrase->doclist.nList && nNew>0 );
-+      memset(&pPhrase->doclist.pList[nNew], 0, pPhrase->doclist.nList - nNew);
-+      pPhrase->doclist.nList = nNew;
-+    }
-     *paPoslist = pPhrase->doclist.pList;
-     *pnToken = pPhrase->nToken;
-   }
---- /ext/fts3/fts3_write.c
-+++ /ext/fts3/fts3_write.c
-@@ -341,7 +341,9 @@
- ** created by merging the oldest :2 segments from absolute level :1. See 
- ** function sqlite3Fts3Incrmerge() for details.  */
- /* 29 */ "SELECT 2 * total(1 + leaves_end_block - start_block) "
--         "  FROM %Q.'%q_segdir' WHERE level = ? AND idx < ?",
-+         "  FROM (SELECT * FROM %Q.'%q_segdir' "
-+         "        WHERE level = ? ORDER BY idx ASC LIMIT ?"
-+         "  )",
- 
- /* SQL_DELETE_SEGDIR_ENTRY
- **   Delete the %_segdir entry on absolute level :1 with index :2.  */
-@@ -2853,6 +2855,19 @@
-   return SQLITE_OK;
- }
- 
-+static int fts3GrowSegReaderBuffer(Fts3MultiSegReader *pCsr, int nReq){
-+  if( nReq>pCsr->nBuffer ){
-+    char *aNew;
-+    pCsr->nBuffer = nReq*2;
-+    aNew = sqlite3_realloc(pCsr->aBuffer, pCsr->nBuffer);
-+    if( !aNew ){
-+      return SQLITE_NOMEM;
-+    }
-+    pCsr->aBuffer = aNew;
-+  }
-+  return SQLITE_OK;
-+}
-+
- 
- int sqlite3Fts3SegReaderStep(
-   Fts3Table *p,                   /* Virtual table handle */
-@@ -2987,15 +3002,9 @@
-           }
- 
-           nByte = sqlite3Fts3VarintLen(iDelta) + (isRequirePos?nList+1:0);
--          if( nDoclist+nByte>pCsr->nBuffer ){
--            char *aNew;
--            pCsr->nBuffer = (nDoclist+nByte)*2;
--            aNew = sqlite3_realloc(pCsr->aBuffer, pCsr->nBuffer);
--            if( !aNew ){
--              return SQLITE_NOMEM;
--            }
--            pCsr->aBuffer = aNew;
--          }
-+
-+          rc = fts3GrowSegReaderBuffer(pCsr, nByte+nDoclist);
-+          if( rc ) return rc;
- 
-           if( isFirst ){
-             char *a = &pCsr->aBuffer[nDoclist];
-@@ -3020,6 +3029,9 @@
-         fts3SegReaderSort(apSegment, nMerge, j, xCmp);
-       }
-       if( nDoclist>0 ){
-+        rc = fts3GrowSegReaderBuffer(pCsr, nDoclist+FTS3_NODE_PADDING);
-+        if( rc ) return rc;
-+        memset(&pCsr->aBuffer[nDoclist], 0, FTS3_NODE_PADDING);
-         pCsr->aDoclist = pCsr->aBuffer;
-         pCsr->nDoclist = nDoclist;
-         rc = SQLITE_ROW;
---- /src/expr.c
-+++ /src/expr.c
-@@ -4272,7 +4272,9 @@
-       int nCol;
-       testcase( op==TK_EXISTS );
-       testcase( op==TK_SELECT );
--      if( op==TK_SELECT && (nCol = pExpr->x.pSelect->pEList->nExpr)!=1 ){
-+      if( pParse->db->mallocFailed ){
-+        return 0;
-+      }else if( op==TK_SELECT && (nCol = pExpr->x.pSelect->pEList->nExpr)!=1 ){
-         sqlite3SubselectError(pParse, nCol, 1);
-       }else{
-         return sqlite3CodeSubselect(pParse, pExpr);
---- /test/fts3corrupt4.test
-+++ /test/fts3corrupt4.test
-@@ -6123,4 +6123,44 @@
-   SELECT offsets(t1) FROM t1 WHERE t1 MATCH 'rtree ner "json1^enable"';
- }
- 
-+#-------------------------------------------------------------------------
-+do_execsql_test 42.1 {
-+  CREATE VIRTUAL TABLE f USING fts3(a, b);
-+}
-+do_execsql_test 42.2 {
-+  INSERT INTO f_segdir VALUES(0,2,1111,0,0,X'00');
-+  INSERT INTO f_segdir VALUES(0,3,0   ,0,0,X'00013003010200');
-+}
-+do_execsql_test 42.3 {
-+  INSERT INTO f(f) VALUES ('merge=107,2');
-+}
-+
-+#-------------------------------------------------------------------------
-+reset_db
-+set saved $sqlite_fts3_enable_parentheses
-+set sqlite_fts3_enable_parentheses 1
-+do_execsql_test 43.1 {
-+  CREATE VIRTUAL TABLE def USING fts3(xyz);
-+  INSERT INTO def_segdir VALUES(0,0,0,0,0, X'0001310301c9000103323334050d81');
-+} {}
-+
-+do_execsql_test 43.2 {
-+  SELECT rowid FROM def WHERE def MATCH '1 NEAR 1'
-+} {1}
-+
-+set sqlite_fts3_enable_parentheses $saved
-+
-+#-------------------------------------------------------------------------
-+reset_db
-+do_execsql_test 44.1 {
-+  CREATE VIRTUAL TABLE t0 USING fts3(col0 INTEGER PRIMARY KEY,col1 VARCHAR(8),col2 BINARY,col3 BINARY);
-+  INSERT INTO t0_content VALUES(0,NULL,NULL,NULL,NULL);
-+  INSERT INTO t0_segdir VALUES(0,0,0,0,'0 42',X'00013103010200010332333405010201ba00000461616161050101020200000462626262050101030200');
-+}
-+
-+do_execsql_test 44.2 {
-+  SELECT matchinfo(t0, t0) IS NULL FROM t0 WHERE t0 MATCH '1*'
-+} {0}
-+
-+
- finish_test
diff --git a/dev-db/sqlite/files/sqlite-3.34.1-build_1.1.patch b/dev-db/sqlite/files/sqlite-3.34.1-build_1.1.patch
new file mode 100644
index 0000000..d7f759a
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.34.1-build_1.1.patch
@@ -0,0 +1,375 @@
+Add initialization functions for internal usage in libsqlite3.so.
+
+SQLite revision: 10e20c0b43500cfb9bbc0eaa061c57514f715d87238f4d835880cd846b9ebd1f
+
+--- /ext/misc/amatch.c
++++ /ext/misc/amatch.c
+@@ -1480,9 +1480,18 @@
+ 
+ #endif /* SQLITE_OMIT_VIRTUALTABLE */
+ 
++int sqlite3AmatchInit(sqlite3 *db){
++  int rc = SQLITE_OK;
++#ifndef SQLITE_OMIT_VIRTUALTABLE
++  rc = sqlite3_create_module(db, "approximate_match", &amatchModule, 0);
++#endif /* SQLITE_OMIT_VIRTUALTABLE */
++  return rc;
++}
++
+ /*
+ ** Register the amatch virtual table
+ */
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -1491,11 +1500,8 @@
+   char **pzErrMsg, 
+   const sqlite3_api_routines *pApi
+ ){
+-  int rc = SQLITE_OK;
+   SQLITE_EXTENSION_INIT2(pApi);
+   (void)pzErrMsg;  /* Not used */
+-#ifndef SQLITE_OMIT_VIRTUALTABLE
+-  rc = sqlite3_create_module(db, "approximate_match", &amatchModule, 0);
+-#endif /* SQLITE_OMIT_VIRTUALTABLE */
+-  return rc;
++  return sqlite3AmatchInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/carray.c
++++ /ext/misc/carray.c
+@@ -498,16 +498,8 @@
+ 
+ #endif /* SQLITE_OMIT_VIRTUALTABLE */
+ 
+-#ifdef _WIN32
+-__declspec(dllexport)
+-#endif
+-int sqlite3_carray_init(
+-  sqlite3 *db, 
+-  char **pzErrMsg, 
+-  const sqlite3_api_routines *pApi
+-){
++int sqlite3CarrayInit(sqlite3 *db){
+   int rc = SQLITE_OK;
+-  SQLITE_EXTENSION_INIT2(pApi);
+ #ifndef SQLITE_OMIT_VIRTUALTABLE
+   rc = sqlite3_create_module(db, "carray", &carrayModule, 0);
+ #ifdef SQLITE_TEST
+@@ -519,3 +511,18 @@
+ #endif /* SQLITE_OMIT_VIRTUALTABLE */
+   return rc;
+ }
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
++#ifdef _WIN32
++__declspec(dllexport)
++#endif
++int sqlite3_carray_init(
++  sqlite3 *db, 
++  char **pzErrMsg, 
++  const sqlite3_api_routines *pApi
++){
++  SQLITE_EXTENSION_INIT2(pApi);
++  (void)pzErrMsg;  /* Unused parameter */
++  return sqlite3CarrayInit(db);
++}
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/completion.c
++++ /ext/misc/completion.c
+@@ -483,12 +483,13 @@
+   return rc;
+ }
+ 
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+ int sqlite3_completion_init(
+-  sqlite3 *db, 
+-  char **pzErrMsg, 
++  sqlite3 *db,
++  char **pzErrMsg,
+   const sqlite3_api_routines *pApi
+ ){
+   int rc = SQLITE_OK;
+@@ -499,3 +500,4 @@
+ #endif
+   return rc;
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/csv.c
++++ /ext/misc/csv.c
+@@ -928,6 +928,22 @@
+ #endif /* !defined(SQLITE_OMIT_VIRTUALTABLE) */
+ 
+ 
++int sqlite3CsvInit(sqlite3 *db){
++#ifndef SQLITE_OMIT_VIRTUALTABLE
++  int rc;
++  rc = sqlite3_create_module(db, "csv", &CsvModule, 0);
++#ifdef SQLITE_TEST
++  if( rc==SQLITE_OK ){
++    rc = sqlite3_create_module(db, "csv_wr", &CsvModuleFauxWrite, 0);
++  }
++#endif
++  return rc;
++#else
++  return SQLITE_OK;
++#endif
++}
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -941,17 +957,8 @@
+   char **pzErrMsg, 
+   const sqlite3_api_routines *pApi
+ ){
+-#ifndef SQLITE_OMIT_VIRTUALTABLE	
+-  int rc;
+   SQLITE_EXTENSION_INIT2(pApi);
+-  rc = sqlite3_create_module(db, "csv", &CsvModule, 0);
+-#ifdef SQLITE_TEST
+-  if( rc==SQLITE_OK ){
+-    rc = sqlite3_create_module(db, "csv_wr", &CsvModuleFauxWrite, 0);
+-  }
+-#endif
+-  return rc;
+-#else
+-  return SQLITE_OK;
+-#endif
++  (void)pzErrMsg;  /* Unused parameter */
++  return sqlite3CsvInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/dbdata.c
++++ /ext/misc/dbdata.c
+@@ -803,7 +803,7 @@
+ /*
+ ** Invoke this routine to register the "sqlite_dbdata" virtual table module
+ */
+-static int sqlite3DbdataRegister(sqlite3 *db){
++int sqlite3DbdataRegister(sqlite3 *db){
+   static sqlite3_module dbdata_module = {
+     0,                            /* iVersion */
+     0,                            /* xCreate */
+@@ -838,6 +838,7 @@
+   return rc;
+ }
+ 
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -849,3 +850,4 @@
+   SQLITE_EXTENSION_INIT2(pApi);
+   return sqlite3DbdataRegister(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/decimal.c
++++ /ext/misc/decimal.c
+@@ -590,14 +590,7 @@
+   decimal_free(pB);
+ }
+ 
+-#ifdef _WIN32
+-__declspec(dllexport)
+-#endif
+-int sqlite3_decimal_init(
+-  sqlite3 *db, 
+-  char **pzErrMsg, 
+-  const sqlite3_api_routines *pApi
+-){
++int sqlite3DecimalInit(sqlite3 *db){
+   int rc = SQLITE_OK;
+   static const struct {
+     const char *zFuncName;
+@@ -611,10 +604,6 @@
+     { "decimal_mul",   2,   decimalMulFunc     },
+   };
+   unsigned int i;
+-  (void)pzErrMsg;  /* Unused parameter */
+-
+-  SQLITE_EXTENSION_INIT2(pApi);
+-
+   for(i=0; i<sizeof(aFunc)/sizeof(aFunc[0]) && rc==SQLITE_OK; i++){
+     rc = sqlite3_create_function(db, aFunc[i].zFuncName, aFunc[i].nArg,
+                    SQLITE_UTF8|SQLITE_INNOCUOUS|SQLITE_DETERMINISTIC,
+@@ -632,3 +621,20 @@
+   }
+   return rc;
+ }
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
++#ifdef _WIN32
++__declspec(dllexport)
++#endif
++int sqlite3_decimal_init(
++  sqlite3 *db, 
++  char **pzErrMsg, 
++  const sqlite3_api_routines *pApi
++){
++  (void)pzErrMsg;  /* Unused parameter */
++
++  SQLITE_EXTENSION_INIT2(pApi);
++
++  return sqlite3DecimalInit(db);
++}
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/eval.c
++++ /ext/misc/eval.c
+@@ -102,6 +102,20 @@
+ }
+ 
+ 
++int sqlite3EvalInit(sqlite3 *db){
++  int rc = SQLITE_OK;
++  rc = sqlite3_create_function(db, "eval", 1,
++                               SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
++                               sqlEvalFunc, 0, 0);
++  if( rc==SQLITE_OK ){
++    rc = sqlite3_create_function(db, "eval", 2,
++                                 SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
++                                 sqlEvalFunc, 0, 0);
++  }
++  return rc;
++}
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -110,16 +124,8 @@
+   char **pzErrMsg, 
+   const sqlite3_api_routines *pApi
+ ){
+-  int rc = SQLITE_OK;
+   SQLITE_EXTENSION_INIT2(pApi);
+   (void)pzErrMsg;  /* Unused parameter */
+-  rc = sqlite3_create_function(db, "eval", 1, 
+-                               SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
+-                               sqlEvalFunc, 0, 0);
+-  if( rc==SQLITE_OK ){
+-    rc = sqlite3_create_function(db, "eval", 2,
+-                                 SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
+-                                 sqlEvalFunc, 0, 0);
+-  }
+-  return rc;
++  return sqlite3EvalInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/fileio.c
++++ /ext/misc/fileio.c
+@@ -340,7 +340,7 @@
+ ** This function does the work for the writefile() UDF. Refer to 
+ ** header comments at the top of this file for details.
+ */
+-static int writeFile(
++static int writeFileContents(
+   sqlite3_context *pCtx,          /* Context to return bytes written in */
+   const char *zFile,              /* File to write */
+   sqlite3_value *pData,           /* Data to write */
+@@ -480,10 +480,10 @@
+     mtime = sqlite3_value_int64(argv[3]);
+   }
+ 
+-  res = writeFile(context, zFile, argv[1], mode, mtime);
++  res = writeFileContents(context, zFile, argv[1], mode, mtime);
+   if( res==1 && errno==ENOENT ){
+     if( makeDirectory(zFile)==SQLITE_OK ){
+-      res = writeFile(context, zFile, argv[1], mode, mtime);
++      res = writeFileContents(context, zFile, argv[1], mode, mtime);
+     }
+   }
+ 
+@@ -970,18 +970,9 @@
+ # define fsdirRegister(x) SQLITE_OK
+ #endif
+ 
+-#ifdef _WIN32
+-__declspec(dllexport)
+-#endif
+-int sqlite3_fileio_init(
+-  sqlite3 *db, 
+-  char **pzErrMsg, 
+-  const sqlite3_api_routines *pApi
+-){
++int sqlite3FileioInit(sqlite3 *db){
+   int rc = SQLITE_OK;
+-  SQLITE_EXTENSION_INIT2(pApi);
+-  (void)pzErrMsg;  /* Unused parameter */
+-  rc = sqlite3_create_function(db, "readfile", 1, 
++  rc = sqlite3_create_function(db, "readfile", 1,
+                                SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
+                                readfileFunc, 0, 0);
+   if( rc==SQLITE_OK ){
+@@ -998,3 +989,18 @@
+   }
+   return rc;
+ }
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
++#ifdef _WIN32
++__declspec(dllexport)
++#endif
++int sqlite3_fileio_init(
++  sqlite3 *db, 
++  char **pzErrMsg, 
++  const sqlite3_api_routines *pApi
++){
++  SQLITE_EXTENSION_INIT2(pApi);
++  (void)pzErrMsg;  /* Unused parameter */
++  return sqlite3FileioInit(db);
++}
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/ieee754.c
++++ /ext/misc/ieee754.c
+@@ -245,14 +245,7 @@
+ }
+ 
+ 
+-#ifdef _WIN32
+-__declspec(dllexport)
+-#endif
+-int sqlite3_ieee_init(
+-  sqlite3 *db, 
+-  char **pzErrMsg, 
+-  const sqlite3_api_routines *pApi
+-){
++int sqlite3IeeeInit(sqlite3 *db){
+   static const struct {
+     char *zFName;
+     int nArg;
+@@ -269,13 +262,26 @@
+   };
+   unsigned int i;
+   int rc = SQLITE_OK;
+-  SQLITE_EXTENSION_INIT2(pApi);
+-  (void)pzErrMsg;  /* Unused parameter */
+   for(i=0; i<sizeof(aFunc)/sizeof(aFunc[0]) && rc==SQLITE_OK; i++){
+-    rc = sqlite3_create_function(db, aFunc[i].zFName, aFunc[i].nArg,	
++    rc = sqlite3_create_function(db, aFunc[i].zFName, aFunc[i].nArg,
+                                SQLITE_UTF8|SQLITE_INNOCUOUS,
+                                (void*)&aFunc[i].iAux,
+                                aFunc[i].xFunc, 0, 0);
+   }
+   return rc;
+ }
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
++#ifdef _WIN32
++__declspec(dllexport)
++#endif
++int sqlite3_ieee_init(
++  sqlite3 *db, 
++  char **pzErrMsg, 
++  const sqlite3_api_routines *pApi
++){
++  SQLITE_EXTENSION_INIT2(pApi);
++  (void)pzErrMsg;  /* Unused parameter */
++  return sqlite3IeeeInit(db);
++}
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
diff --git a/dev-db/sqlite/files/sqlite-3.32.1-full_archive-build_1.patch b/dev-db/sqlite/files/sqlite-3.34.1-build_1.2.patch
similarity index 65%
copy from dev-db/sqlite/files/sqlite-3.32.1-full_archive-build_1.patch
copy to dev-db/sqlite/files/sqlite-3.34.1-build_1.2.patch
index aec90e4..5c5d6e9 100644
--- a/dev-db/sqlite/files/sqlite-3.32.1-full_archive-build_1.patch
+++ b/dev-db/sqlite/files/sqlite-3.34.1-build_1.2.patch
@@ -1,225 +1,29 @@
 Add initialization functions for internal usage in libsqlite3.so.
 
---- /ext/misc/carray.c
-+++ /ext/misc/carray.c
-@@ -383,16 +383,8 @@
- 
- #endif /* SQLITE_OMIT_VIRTUALTABLE */
+SQLite revision: 10e20c0b43500cfb9bbc0eaa061c57514f715d87238f4d835880cd846b9ebd1f
+
+--- /ext/misc/nextchar.c
++++ /ext/misc/nextchar.c
+@@ -286,17 +286,8 @@
+   sqlite3_free(c.aResult);
+ }
  
 -#ifdef _WIN32
 -__declspec(dllexport)
 -#endif
--int sqlite3_carray_init(
+-int sqlite3_nextchar_init(
 -  sqlite3 *db, 
 -  char **pzErrMsg, 
 -  const sqlite3_api_routines *pApi
 -){
-+int sqlite3CarrayInit(sqlite3 *db){
-   int rc = SQLITE_OK;
--  SQLITE_EXTENSION_INIT2(pApi);
- #ifndef SQLITE_OMIT_VIRTUALTABLE
-   rc = sqlite3_create_module(db, "carray", &carrayModule, 0);
- #ifdef SQLITE_TEST
-@@ -404,3 +396,18 @@
- #endif /* SQLITE_OMIT_VIRTUALTABLE */
-   return rc;
- }
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
-+#ifdef _WIN32
-+__declspec(dllexport)
-+#endif
-+int sqlite3_carray_init(
-+  sqlite3 *db, 
-+  char **pzErrMsg, 
-+  const sqlite3_api_routines *pApi
-+){
-+  SQLITE_EXTENSION_INIT2(pApi);
-+  (void)pzErrMsg;  /* Unused parameter */
-+  return sqlite3CarrayInit(db);
-+}
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/completion.c
-+++ /ext/misc/completion.c
-@@ -483,12 +483,13 @@
-   return rc;
- }
- 
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
- int sqlite3_completion_init(
--  sqlite3 *db, 
--  char **pzErrMsg, 
-+  sqlite3 *db,
-+  char **pzErrMsg,
-   const sqlite3_api_routines *pApi
- ){
-   int rc = SQLITE_OK;
-@@ -499,3 +500,4 @@
- #endif
-   return rc;
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/csv.c
-+++ /ext/misc/csv.c
-@@ -928,6 +928,22 @@
- #endif /* !defined(SQLITE_OMIT_VIRTUALTABLE) */
- 
- 
-+int sqlite3CsvInit(sqlite3 *db){
-+#ifndef SQLITE_OMIT_VIRTUALTABLE
-+  int rc;
-+  rc = sqlite3_create_module(db, "csv", &CsvModule, 0);
-+#ifdef SQLITE_TEST
-+  if( rc==SQLITE_OK ){
-+    rc = sqlite3_create_module(db, "csv_wr", &CsvModuleFauxWrite, 0);
-+  }
-+#endif
-+  return rc;
-+#else
-+  return SQLITE_OK;
-+#endif
-+}
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
-@@ -941,17 +957,8 @@
-   char **pzErrMsg, 
-   const sqlite3_api_routines *pApi
- ){
--#ifndef SQLITE_OMIT_VIRTUALTABLE	
--  int rc;
-   SQLITE_EXTENSION_INIT2(pApi);
--  rc = sqlite3_create_module(db, "csv", &CsvModule, 0);
--#ifdef SQLITE_TEST
--  if( rc==SQLITE_OK ){
--    rc = sqlite3_create_module(db, "csv_wr", &CsvModuleFauxWrite, 0);
--  }
--#endif
--  return rc;
--#else
--  return SQLITE_OK;
--#endif
-+  (void)pzErrMsg;  /* Unused parameter */
-+  return sqlite3CsvInit(db);
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/dbdata.c
-+++ /ext/misc/dbdata.c
-@@ -803,7 +803,7 @@
- /*
- ** Invoke this routine to register the "sqlite_dbdata" virtual table module
- */
--static int sqlite3DbdataRegister(sqlite3 *db){
-+int sqlite3DbdataRegister(sqlite3 *db){
-   static sqlite3_module dbdata_module = {
-     0,                            /* iVersion */
-     0,                            /* xCreate */
-@@ -838,6 +838,7 @@
-   return rc;
- }
- 
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
-@@ -849,3 +850,4 @@
-   SQLITE_EXTENSION_INIT2(pApi);
-   return sqlite3DbdataRegister(db);
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/eval.c
-+++ /ext/misc/eval.c
-@@ -102,6 +102,20 @@
- }
- 
- 
-+int sqlite3EvalInit(sqlite3 *db){
-+  int rc = SQLITE_OK;
-+  rc = sqlite3_create_function(db, "eval", 1,
-+                               SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
-+                               sqlEvalFunc, 0, 0);
-+  if( rc==SQLITE_OK ){
-+    rc = sqlite3_create_function(db, "eval", 2,
-+                                 SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
-+                                 sqlEvalFunc, 0, 0);
-+  }
-+  return rc;
-+}
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
-@@ -110,16 +124,8 @@
-   char **pzErrMsg, 
-   const sqlite3_api_routines *pApi
- ){
--  int rc = SQLITE_OK;
-   SQLITE_EXTENSION_INIT2(pApi);
-   (void)pzErrMsg;  /* Unused parameter */
--  rc = sqlite3_create_function(db, "eval", 1, 
--                               SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
--                               sqlEvalFunc, 0, 0);
--  if( rc==SQLITE_OK ){
--    rc = sqlite3_create_function(db, "eval", 2,
--                                 SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
--                                 sqlEvalFunc, 0, 0);
--  }
--  return rc;
-+  return sqlite3EvalInit(db);
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/fileio.c
-+++ /ext/misc/fileio.c
-@@ -340,7 +340,7 @@
- ** This function does the work for the writefile() UDF. Refer to 
- ** header comments at the top of this file for details.
- */
--static int writeFile(
-+static int writeFileContents(
-   sqlite3_context *pCtx,          /* Context to return bytes written in */
-   const char *zFile,              /* File to write */
-   sqlite3_value *pData,           /* Data to write */
-@@ -480,10 +480,10 @@
-     mtime = sqlite3_value_int64(argv[3]);
-   }
- 
--  res = writeFile(context, zFile, argv[1], mode, mtime);
-+  res = writeFileContents(context, zFile, argv[1], mode, mtime);
-   if( res==1 && errno==ENOENT ){
-     if( makeDirectory(zFile)==SQLITE_OK ){
--      res = writeFile(context, zFile, argv[1], mode, mtime);
-+      res = writeFileContents(context, zFile, argv[1], mode, mtime);
-     }
-   }
- 
-@@ -970,18 +970,9 @@
- # define fsdirRegister(x) SQLITE_OK
- #endif
- 
--#ifdef _WIN32
--__declspec(dllexport)
--#endif
--int sqlite3_fileio_init(
--  sqlite3 *db, 
--  char **pzErrMsg, 
--  const sqlite3_api_routines *pApi
--){
-+int sqlite3FileioInit(sqlite3 *db){
++int sqlite3NextcharInit(sqlite3 *db){
    int rc = SQLITE_OK;
 -  SQLITE_EXTENSION_INIT2(pApi);
 -  (void)pzErrMsg;  /* Unused parameter */
--  rc = sqlite3_create_function(db, "readfile", 1, 
-+  rc = sqlite3_create_function(db, "readfile", 1,
-                                SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
-                                readfileFunc, 0, 0);
-   if( rc==SQLITE_OK ){
-@@ -998,3 +989,18 @@
+   rc = sqlite3_create_function(db, "next_char", 3,
+                                SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
+                                nextCharFunc, 0, 0);
+@@ -312,3 +303,18 @@
    }
    return rc;
  }
@@ -228,32 +32,27 @@
 +#ifdef _WIN32
 +__declspec(dllexport)
 +#endif
-+int sqlite3_fileio_init(
++int sqlite3_nextchar_init(
 +  sqlite3 *db, 
 +  char **pzErrMsg, 
 +  const sqlite3_api_routines *pApi
 +){
 +  SQLITE_EXTENSION_INIT2(pApi);
 +  (void)pzErrMsg;  /* Unused parameter */
-+  return sqlite3FileioInit(db);
++  return sqlite3NextcharInit(db);
 +}
 +#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/ieee754.c
-+++ /ext/misc/ieee754.c
-@@ -110,6 +110,20 @@
+--- /ext/misc/percentile.c
++++ /ext/misc/percentile.c
+@@ -202,6 +202,15 @@
  }
  
  
-+int sqlite3IeeeInit(sqlite3 *db){
++int sqlite3PercentileInit(sqlite3 *db){
 +  int rc = SQLITE_OK;
-+  rc = sqlite3_create_function(db, "ieee754", 1,
++  rc = sqlite3_create_function(db, "percentile", 2,
 +                               SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
-+                               ieee754func, 0, 0);
-+  if( rc==SQLITE_OK ){
-+    rc = sqlite3_create_function(db, "ieee754", 2,
-+                                 SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
-+                                 ieee754func, 0, 0);
-+  }
++                               0, percentStep, percentFinal);
 +  return rc;
 +}
 +
@@ -261,23 +60,18 @@
  #ifdef _WIN32
  __declspec(dllexport)
  #endif
-@@ -118,16 +132,8 @@
+@@ -210,11 +219,8 @@
    char **pzErrMsg, 
    const sqlite3_api_routines *pApi
  ){
 -  int rc = SQLITE_OK;
    SQLITE_EXTENSION_INIT2(pApi);
    (void)pzErrMsg;  /* Unused parameter */
--  rc = sqlite3_create_function(db, "ieee754", 1, 
+-  rc = sqlite3_create_function(db, "percentile", 2, 
 -                               SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
--                               ieee754func, 0, 0);
--  if( rc==SQLITE_OK ){
--    rc = sqlite3_create_function(db, "ieee754", 2,
--                                 SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
--                                 ieee754func, 0, 0);
--  }
+-                               0, percentStep, percentFinal);
 -  return rc;
-+  return sqlite3IeeeInit(db);
++  return sqlite3PercentileInit(db);
  }
 +#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
 --- /ext/misc/regexp.c
@@ -314,6 +108,42 @@
 +  return sqlite3RegexpInit(db);
  }
 +#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/series.c
++++ /ext/misc/series.c
+@@ -413,6 +413,15 @@
+ 
+ #endif /* SQLITE_OMIT_VIRTUALTABLE */
+ 
++int sqlite3SeriesInit(sqlite3 *db){
++  int rc = SQLITE_OK;
++#ifndef SQLITE_OMIT_VIRTUALTABLE
++  rc = sqlite3_create_module(db, "generate_series", &seriesModule, 0);
++#endif
++  return rc;
++}
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -421,7 +430,6 @@
+   char **pzErrMsg, 
+   const sqlite3_api_routines *pApi
+ ){
+-  int rc = SQLITE_OK;
+   SQLITE_EXTENSION_INIT2(pApi);
+ #ifndef SQLITE_OMIT_VIRTUALTABLE
+   if( sqlite3_libversion_number()<3008012 ){
+@@ -429,7 +437,7 @@
+         "generate_series() requires SQLite 3.8.12 or later");
+     return SQLITE_ERROR;
+   }
+-  rc = sqlite3_create_module(db, "generate_series", &seriesModule, 0);
+ #endif
+-  return rc;
++  return sqlite3SeriesInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
 --- /ext/misc/sha1.c
 +++ /ext/misc/sha1.c
 @@ -175,7 +175,7 @@
@@ -402,16 +232,16 @@
    SHA3Context *p,                 /* Add content to this context */
    const char *zFormat,
    ...
-@@ -622,7 +622,7 @@
-     nCol = sqlite3_column_count(pStmt);
+@@ -623,7 +623,7 @@
      z = sqlite3_sql(pStmt);
-     n = (int)strlen(z);
--    hash_step_vformat(&cx,"S%d:",n);
-+    sha3_hash_step_vformat(&cx,"S%d:",n);
-     SHA3Update(&cx,(unsigned char*)z,n);
+     if( z ){
+       n = (int)strlen(z);
+-      hash_step_vformat(&cx,"S%d:",n);
++      sha3_hash_step_vformat(&cx,"S%d:",n);
+       SHA3Update(&cx,(unsigned char*)z,n);
+     }
  
-     /* Compute a hash over the result of the query */
-@@ -665,14 +665,14 @@
+@@ -667,14 +667,14 @@
            case SQLITE_TEXT: {
              int n2 = sqlite3_column_bytes(pStmt, i);
              const unsigned char *z2 = sqlite3_column_text(pStmt, i);
@@ -428,7 +258,7 @@
              SHA3Update(&cx, z2, n2);
              break;
            }
-@@ -685,17 +685,8 @@
+@@ -687,17 +687,8 @@
  }
  
  
@@ -447,7 +277,7 @@
    rc = sqlite3_create_function(db, "sha3", 1,
                        SQLITE_UTF8 | SQLITE_INNOCUOUS | SQLITE_DETERMINISTIC,
                        0, sha3Func, 0, 0);
-@@ -716,3 +707,18 @@
+@@ -718,3 +709,18 @@
    }
    return rc;
  }
@@ -637,7 +467,7 @@
  #include "sqlite3ext.h"
  SQLITE_EXTENSION_INIT1
  #include <stdio.h>
-@@ -2137,7 +2139,7 @@
+@@ -2139,7 +2141,7 @@
  /*
  ** Register the "zipfile" virtual table.
  */
@@ -646,7 +476,7 @@
    static sqlite3_module zipfileModule = {
      1,                         /* iVersion */
      zipfileConnect,            /* xCreate */
-@@ -2171,9 +2173,10 @@
+@@ -2173,9 +2175,10 @@
    return rc;
  }
  #else         /* SQLITE_OMIT_VIRTUALTABLE */
@@ -658,7 +488,7 @@
  #ifdef _WIN32
  __declspec(dllexport)
  #endif
-@@ -2184,5 +2187,8 @@
+@@ -2186,5 +2189,8 @@
  ){
    SQLITE_EXTENSION_INIT2(pApi);
    (void)pzErrMsg;  /* Unused parameter */
diff --git a/dev-db/sqlite/files/sqlite-3.34.1-build_2.1.patch b/dev-db/sqlite/files/sqlite-3.34.1-build_2.1.patch
new file mode 100644
index 0000000..fe5fb7e
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.34.1-build_2.1.patch
@@ -0,0 +1,291 @@
+Move some code to libsqlite3.so to avoid duplication.
+Link executables against libsqlite3.so.
+Increase timeout for fuzzcheck.
+Update list of optionally available functions.
+Fix building with dlopen() not available.
+
+SQLite revision: 10e20c0b43500cfb9bbc0eaa061c57514f715d87238f4d835880cd846b9ebd1f
+
+--- /Makefile.in
++++ /Makefile.in
+@@ -313,6 +313,9 @@
+ # Source code for extensions
+ #
+ SRC += \
++  $(TOP)/ext/expert/sqlite3expert.c \
++  $(TOP)/ext/expert/sqlite3expert.h
++SRC += \
+   $(TOP)/ext/fts1/fts1.c \
+   $(TOP)/ext/fts1/fts1.h \
+   $(TOP)/ext/fts1/fts1_hash.c \
+@@ -365,8 +368,29 @@
+   $(TOP)/ext/rbu/sqlite3rbu.h \
+   $(TOP)/ext/rbu/sqlite3rbu.c
+ SRC += \
++  $(TOP)/ext/misc/amatch.c \
++  $(TOP)/ext/misc/appendvfs.c \
++  $(TOP)/ext/misc/carray.c \
++  $(TOP)/ext/misc/completion.c \
++  $(TOP)/ext/misc/csv.c \
++  $(TOP)/ext/misc/dbdata.c \
++  $(TOP)/ext/misc/decimal.c \
++  $(TOP)/ext/misc/eval.c \
++  $(TOP)/ext/misc/fileio.c \
++  $(TOP)/ext/misc/ieee754.c \
+   $(TOP)/ext/misc/json1.c \
+-  $(TOP)/ext/misc/stmt.c
++  $(TOP)/ext/misc/nextchar.c \
++  $(TOP)/ext/misc/percentile.c \
++  $(TOP)/ext/misc/regexp.c \
++  $(TOP)/ext/misc/series.c \
++  $(TOP)/ext/misc/sha1.c \
++  $(TOP)/ext/misc/shathree.c \
++  $(TOP)/ext/misc/sqlar.c \
++  $(TOP)/ext/misc/stmt.c \
++  $(TOP)/ext/misc/totype.c \
++  $(TOP)/ext/misc/uint.c \
++  $(TOP)/ext/misc/uuid.c \
++  $(TOP)/ext/misc/zipfile.c
+ 
+ # Generated source code files
+ #
+@@ -437,35 +461,21 @@
+ # Statically linked extensions
+ #
+ TESTSRC += \
+-  $(TOP)/ext/expert/sqlite3expert.c \
+   $(TOP)/ext/expert/test_expert.c \
+-  $(TOP)/ext/misc/amatch.c \
+-  $(TOP)/ext/misc/carray.c \
+   $(TOP)/ext/misc/cksumvfs.c \
+   $(TOP)/ext/misc/closure.c \
+-  $(TOP)/ext/misc/csv.c \
+-  $(TOP)/ext/misc/decimal.c \
+-  $(TOP)/ext/misc/eval.c \
+   $(TOP)/ext/misc/explain.c \
+-  $(TOP)/ext/misc/fileio.c \
+   $(TOP)/ext/misc/fuzzer.c \
+   $(TOP)/ext/fts5/fts5_tcl.c \
+   $(TOP)/ext/fts5/fts5_test_mi.c \
+   $(TOP)/ext/fts5/fts5_test_tok.c \
+-  $(TOP)/ext/misc/ieee754.c \
+   $(TOP)/ext/misc/mmapwarm.c \
+-  $(TOP)/ext/misc/nextchar.c \
+   $(TOP)/ext/misc/normalize.c \
+-  $(TOP)/ext/misc/percentile.c \
+   $(TOP)/ext/misc/prefixes.c \
+-  $(TOP)/ext/misc/regexp.c \
+   $(TOP)/ext/misc/remember.c \
+-  $(TOP)/ext/misc/series.c \
+   $(TOP)/ext/misc/spellfix.c \
+-  $(TOP)/ext/misc/totype.c \
+   $(TOP)/ext/misc/unionvtab.c \
+   $(TOP)/ext/misc/wholenumber.c \
+-  $(TOP)/ext/misc/zipfile.c \
+   $(TOP)/ext/userauth/userauth.c
+ 
+ # Source code to the library files needed by the test fixture
+@@ -647,25 +657,25 @@
+ 
+ libtclsqlite3.la:	tclsqlite.lo libsqlite3.la
+ 	$(LTLINK) -no-undefined -o $@ tclsqlite.lo \
+-		libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
++		libsqlite3.la @TCL_STUB_LIB_SPEC@ \
+ 		-rpath "$(TCLLIBDIR)" \
+ 		-version-info "8:6:8" \
+ 		-avoid-version
+ 
+-sqlite3$(TEXE):	shell.c sqlite3.c
+-	$(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
+-		shell.c sqlite3.c \
+-		$(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
++sqlite3$(TEXE):	shell.c libsqlite3.la
++	$(LTLINK) $(READLINE_FLAGS) -o $@ \
++		shell.c libsqlite3.la \
++		$(LIBREADLINE)
+ 
+-sqldiff$(TEXE):	$(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h
+-	$(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
++sqldiff$(TEXE):	$(TOP)/tool/sqldiff.c libsqlite3.la
++	$(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la
+ 
+-dbhash$(TEXE):	$(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
+-	$(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)
++dbhash$(TEXE):	$(TOP)/tool/dbhash.c libsqlite3.la
++	$(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la
+ 
+-scrub$(TEXE):	$(TOP)/ext/misc/scrub.c sqlite3.lo
++scrub$(TEXE):	$(TOP)/ext/misc/scrub.c libsqlite3.la
+ 	$(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \
+-		$(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS)
++		$(TOP)/ext/misc/scrub.c libsqlite3.la
+ 
+ srcck1$(BEXE):	$(TOP)/tool/srcck1.c
+ 	$(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
+@@ -776,7 +786,7 @@
+ # Rule to build the amalgamation
+ #
+ sqlite3.lo:	sqlite3.c
+-	$(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c
++	$(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c
+ 
+ # Rules to build the LEMON compiler generator
+ #
+@@ -1082,18 +1092,6 @@
+ # Source files that go into making shell.c
+ SHELL_SRC = \
+ 	$(TOP)/src/shell.c.in \
+-        $(TOP)/ext/misc/appendvfs.c \
+-	$(TOP)/ext/misc/completion.c \
+-        $(TOP)/ext/misc/decimal.c \
+-	$(TOP)/ext/misc/fileio.c \
+-        $(TOP)/ext/misc/ieee754.c \
+-        $(TOP)/ext/misc/series.c \
+-	$(TOP)/ext/misc/shathree.c \
+-	$(TOP)/ext/misc/sqlar.c \
+-        $(TOP)/ext/misc/uint.c \
+-	$(TOP)/ext/expert/sqlite3expert.c \
+-	$(TOP)/ext/expert/sqlite3expert.h \
+-	$(TOP)/ext/misc/zipfile.c \
+ 	$(TOP)/ext/misc/memtrace.c \
+         $(TOP)/src/test_windirent.c
+ 
+@@ -1263,11 +1261,11 @@
+ 
+ # Fuzz testing
+ fuzztest:	fuzzcheck$(TEXE) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
+-	./fuzzcheck$(TEXE) $(FUZZDATA)
++	./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA)
+ 	./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
+ 
+ valgrindfuzz:	fuzzcheck$(TEXT) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
+-	valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA)
++	valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA)
+ 	valgrind ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
+ 
+ # The veryquick.test TCL tests.
+@@ -1301,24 +1299,23 @@
+ shelltest: $(TESTPROGS)
+ 	./testfixture$(TEXT) $(TOP)/test/permutations.test shell
+ 
+-sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
++sqlite3_analyzer.c:	$(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
+ 	$(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in >sqlite3_analyzer.c
+ 
+-sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
+-	$(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
++sqlite3_analyzer$(TEXE):	sqlite3_analyzer.c libsqlite3.la
++	$(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL)
+ 
+-sqltclsh.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl $(TOP)/ext/misc/appendvfs.c $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in
++sqltclsh.c:	$(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in
+ 	$(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in >sqltclsh.c
+ 
+-sqltclsh$(TEXE): sqltclsh.c
+-	$(LTLINK) sqltclsh.c -o $@ $(LIBTCL) $(TLIBS)
++sqltclsh$(TEXE):	sqltclsh.c libsqlite3.la
++	$(LTLINK) sqltclsh.c -o $@ libsqlite3.la $(LIBTCL)
+ 
+-sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c
+-	$(LTLINK)	$(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c -o sqlite3_expert $(TLIBS)
++sqlite3_expert$(TEXE):	$(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/expert.c libsqlite3.la
++	$(LTLINK) $(TOP)/ext/expert/expert.c -o sqlite3_expert libsqlite3.la
+ 
+ CHECKER_DEPS =\
+   $(TOP)/tool/mkccode.tcl \
+-  sqlite3.c \
+   $(TOP)/src/tclsqlite.c \
+   $(TOP)/ext/repair/sqlite3_checker.tcl \
+   $(TOP)/ext/repair/checkindex.c \
+@@ -1329,36 +1326,36 @@
+ sqlite3_checker.c:	$(CHECKER_DEPS)
+ 	$(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/ext/repair/sqlite3_checker.c.in >$@
+ 
+-sqlite3_checker$(TEXE):	sqlite3_checker.c
+-	$(LTLINK) sqlite3_checker.c -o $@ $(LIBTCL) $(TLIBS)
++sqlite3_checker$(TEXE):	sqlite3_checker.c libsqlite3.la
++	$(LTLINK) sqlite3_checker.c -o $@ libsqlite3.la $(LIBTCL)
+ 
+-dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c sqlite3.lo
++dbdump$(TEXE):	$(TOP)/ext/misc/dbdump.c libsqlite3.la
+ 	$(LTLINK) -DDBDUMP_STANDALONE -o $@ \
+-           $(TOP)/ext/misc/dbdump.c sqlite3.lo $(TLIBS)
++           $(TOP)/ext/misc/dbdump.c libsqlite3.la
+ 
+-dbtotxt$(TEXE): $(TOP)/tool/dbtotxt.c
+-	$(LTLINK)-o $@ $(TOP)/tool/dbtotxt.c
++dbtotxt$(TEXE):	$(TOP)/tool/dbtotxt.c
++	$(LTLINK) -o $@ $(TOP)/tool/dbtotxt.c
+ 
+-showdb$(TEXE):	$(TOP)/tool/showdb.c sqlite3.lo
+-	$(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
++showdb$(TEXE):	$(TOP)/tool/showdb.c libsqlite3.la
++	$(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la
+ 
+-showstat4$(TEXE):	$(TOP)/tool/showstat4.c sqlite3.lo
+-	$(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS)
++showstat4$(TEXE):	$(TOP)/tool/showstat4.c libsqlite3.la
++	$(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la
+ 
+-showjournal$(TEXE):	$(TOP)/tool/showjournal.c sqlite3.lo
+-	$(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS)
++showjournal$(TEXE):	$(TOP)/tool/showjournal.c
++	$(LTLINK) -o $@ $(TOP)/tool/showjournal.c
+ 
+-showwal$(TEXE):	$(TOP)/tool/showwal.c sqlite3.lo
+-	$(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS)
++showwal$(TEXE):	$(TOP)/tool/showwal.c
++	$(LTLINK) -o $@ $(TOP)/tool/showwal.c
+ 
+ showshm$(TEXE):	$(TOP)/tool/showshm.c
+ 	$(LTLINK) -o $@ $(TOP)/tool/showshm.c
+ 
+-index_usage$(TEXE): $(TOP)/tool/index_usage.c sqlite3.lo
+-	$(LTLINK) $(SHELL_OPT) -o $@ $(TOP)/tool/index_usage.c sqlite3.lo $(TLIBS)
++index_usage$(TEXE):	$(TOP)/tool/index_usage.c libsqlite3.la
++	$(LTLINK) -o $@ $(TOP)/tool/index_usage.c libsqlite3.la
+ 
+-changeset$(TEXE):	$(TOP)/ext/session/changeset.c sqlite3.lo
+-	$(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS)
++changeset$(TEXE):	$(TOP)/ext/session/changeset.c libsqlite3.la
++	$(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la
+ 
+ changesetfuzz$(TEXE):	$(TOP)/ext/session/changesetfuzz.c sqlite3.lo
+ 	$(LTLINK) -o $@ $(TOP)/ext/session/changesetfuzz.c sqlite3.lo $(TLIBS)
+@@ -1383,11 +1380,11 @@
+ kvtest$(TEXE):	$(TOP)/test/kvtest.c sqlite3.c
+ 	$(LTLINK) $(KV_OPT) -o $@ $(TOP)/test/kvtest.c sqlite3.c $(TLIBS)
+ 
+-rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
+-	$(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
++rbu$(EXE):	$(TOP)/ext/rbu/rbu.c libsqlite3.la
++	$(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la
+ 
+-loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
+-	$(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
++loadfts$(EXE):	$(TOP)/tool/loadfts.c libsqlite3.la
++	$(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@
+ 
+ # This target will fail if the SQLite amalgamation contains any exported
+ # symbols that do not begin with "sqlite3_". It is run as part of the
+--- /configure.ac
++++ /configure.ac
+@@ -108,7 +108,7 @@
+ #########
+ # Figure out whether or not we have these functions
+ #
+-AC_CHECK_FUNCS([fdatasync gmtime_r isnan localtime_r localtime_s malloc_usable_size strchrnul usleep utime pread pread64 pwrite pwrite64])
++AC_CHECK_FUNCS([fdatasync fullfsync gmtime_r isnan localtime_r localtime_s malloc_usable_size posix_fallocate pread pread64 pwrite pwrite64 strchrnul usleep utime])
+ 
+ #########
+ # By default, we use the amalgamation (this may be changed below...)
+@@ -582,6 +582,9 @@
+ if test "${enable_load_extension}" = "yes" ; then
+   OPT_FEATURE_FLAGS=""
+   AC_SEARCH_LIBS(dlopen, dl)
++  if test "${ac_cv_search_dlopen}" = "no" ; then
++    OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
++  fi
+ else
+   OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
+ fi
diff --git a/dev-db/sqlite/files/sqlite-3.34.1-build_2.2.patch b/dev-db/sqlite/files/sqlite-3.34.1-build_2.2.patch
new file mode 100644
index 0000000..7bb99c6
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.34.1-build_2.2.patch
@@ -0,0 +1,441 @@
+Move some code to libsqlite3.so to avoid duplication.
+Initialize some extensions in libsqlite3.so.
+Update test suite.
+
+SQLite revision: 10e20c0b43500cfb9bbc0eaa061c57514f715d87238f4d835880cd846b9ebd1f
+
+--- /ext/repair/sqlite3_checker.c.in
++++ /ext/repair/sqlite3_checker.c.in
+@@ -2,6 +2,7 @@
+ ** Read an SQLite database file and analyze its space utilization.  Generate
+ ** text on standard output.
+ */
++#define SQLITE_CORE 1
+ #define TCLSH_INIT_PROC sqlite3_checker_init_proc
+ #define SQLITE_ENABLE_DBPAGE_VTAB 1
+ #define SQLITE_ENABLE_JSON1 1
+@@ -14,7 +15,7 @@
+ #define SQLITE_OMIT_SHARED_CACHE 1
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+-INCLUDE sqlite3.c
++#include "sqlite3.h"
+ INCLUDE $ROOT/src/tclsqlite.c
+ INCLUDE $ROOT/ext/misc/btreeinfo.c
+ INCLUDE $ROOT/ext/repair/checkindex.c
+--- /src/main.c
++++ /src/main.c
+@@ -50,12 +50,36 @@
+ #ifdef SQLITE_ENABLE_FTS5
+ int sqlite3Fts5Init(sqlite3*);
+ #endif
++#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
++int sqlite3DbdataRegister(sqlite3*);
++#endif
+ #ifdef SQLITE_ENABLE_JSON1
+ int sqlite3Json1Init(sqlite3*);
+ #endif
+ #ifdef SQLITE_ENABLE_STMTVTAB
+ int sqlite3StmtVtabInit(sqlite3*);
+ #endif
++int sqlite3AmatchInit(sqlite3*);
++int sqlite3CarrayInit(sqlite3*);
++int sqlite3CompletionVtabInit(sqlite3*);
++int sqlite3CsvInit(sqlite3*);
++int sqlite3DecimalInit(sqlite3*);
++int sqlite3EvalInit(sqlite3*);
++int sqlite3FileioInit(sqlite3*);
++int sqlite3IeeeInit(sqlite3*);
++int sqlite3NextcharInit(sqlite3*);
++int sqlite3PercentileInit(sqlite3*);
++int sqlite3RegexpInit(sqlite3*);
++int sqlite3SeriesInit(sqlite3*);
++int sqlite3ShaInit(sqlite3*);
++int sqlite3ShathreeInit(sqlite3*);
++int sqlite3TotypeInit(sqlite3*);
++int sqlite3UintInit(sqlite3*);
++int sqlite3UuidInit(sqlite3*);
++#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_HAVE_ZLIB)
++int sqlite3ZipfileInit(sqlite3*);
++int sqlite3SqlarInit(sqlite3*);
++#endif
+ 
+ /*
+ ** An array of pointers to extension initializer functions for
+@@ -83,6 +107,9 @@
+ #ifdef SQLITE_ENABLE_DBPAGE_VTAB
+   sqlite3DbpageRegister,
+ #endif
++#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
++  sqlite3DbdataRegister,
++#endif
+ #ifdef SQLITE_ENABLE_DBSTAT_VTAB
+   sqlite3DbstatRegister,
+ #endif
+@@ -96,6 +123,27 @@
+ #ifdef SQLITE_ENABLE_BYTECODE_VTAB
+   sqlite3VdbeBytecodeVtabInit,
+ #endif
++  sqlite3AmatchInit,
++  sqlite3CarrayInit,
++  sqlite3CompletionVtabInit,
++  sqlite3CsvInit,
++  sqlite3DecimalInit,
++  sqlite3EvalInit,
++  sqlite3FileioInit,
++  sqlite3IeeeInit,
++  sqlite3NextcharInit,
++  sqlite3PercentileInit,
++  sqlite3RegexpInit,
++  sqlite3SeriesInit,
++  sqlite3ShaInit,
++  sqlite3ShathreeInit,
++  sqlite3TotypeInit,
++  sqlite3UintInit,
++  sqlite3UuidInit,
++#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_HAVE_ZLIB)
++  sqlite3ZipfileInit,
++  sqlite3SqlarInit,
++#endif
+ };
+ 
+ #ifndef SQLITE_AMALGAMATION
+--- /src/shell.c.in
++++ /src/shell.c.in
+@@ -69,6 +69,7 @@
+ #include <stdio.h>
+ #include <assert.h>
+ #include "sqlite3.h"
++#include "ext/expert/sqlite3expert.h"
+ typedef sqlite3_int64 i64;
+ typedef sqlite3_uint64 u64;
+ typedef unsigned char u8;
+@@ -135,6 +136,10 @@
+ # define SHELL_USE_LOCAL_GETLINE 1
+ #endif
+ 
++#ifdef SQLITE_HAVE_ZLIB
++#include <zlib.h>
++#endif
++
+ 
+ #if defined(_WIN32) || defined(WIN32)
+ # if SQLITE_OS_WINRT
+@@ -1018,25 +1023,7 @@
+ INCLUDE test_windirent.c
+ #define dirent DIRENT
+ #endif
+-INCLUDE ../ext/misc/shathree.c
+-INCLUDE ../ext/misc/fileio.c
+-INCLUDE ../ext/misc/completion.c
+-INCLUDE ../ext/misc/appendvfs.c
+ INCLUDE ../ext/misc/memtrace.c
+-INCLUDE ../ext/misc/uint.c
+-INCLUDE ../ext/misc/decimal.c
+-INCLUDE ../ext/misc/ieee754.c
+-INCLUDE ../ext/misc/series.c
+-#ifdef SQLITE_HAVE_ZLIB
+-INCLUDE ../ext/misc/zipfile.c
+-INCLUDE ../ext/misc/sqlar.c
+-#endif
+-INCLUDE ../ext/expert/sqlite3expert.h
+-INCLUDE ../ext/expert/sqlite3expert.c
+-
+-#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
+-INCLUDE ../ext/misc/dbdata.c
+-#endif
+ 
+ #if defined(SQLITE_ENABLE_SESSION)
+ /*
+@@ -4608,20 +4595,6 @@
+ #ifndef SQLITE_OMIT_LOAD_EXTENSION
+     sqlite3_enable_load_extension(p->db, 1);
+ #endif
+-    sqlite3_fileio_init(p->db, 0, 0);
+-    sqlite3_shathree_init(p->db, 0, 0);
+-    sqlite3_completion_init(p->db, 0, 0);
+-    sqlite3_uint_init(p->db, 0, 0);
+-    sqlite3_decimal_init(p->db, 0, 0);
+-    sqlite3_ieee_init(p->db, 0, 0);
+-    sqlite3_series_init(p->db, 0, 0);
+-#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
+-    sqlite3_dbdata_init(p->db, 0, 0);
+-#endif
+-#ifdef SQLITE_HAVE_ZLIB
+-    sqlite3_zipfile_init(p->db, 0, 0);
+-    sqlite3_sqlar_init(p->db, 0, 0);
+-#endif
+     sqlite3_create_function(p->db, "shell_add_schema", 3, SQLITE_UTF8, 0,
+                             shellAddSchemaName, 0, 0);
+     sqlite3_create_function(p->db, "shell_module_schema", 1, SQLITE_UTF8, 0,
+@@ -6644,8 +6617,6 @@
+         );
+         goto end_ar_command;
+       }
+-      sqlite3_fileio_init(cmd.db, 0, 0);
+-      sqlite3_sqlar_init(cmd.db, 0, 0);
+       sqlite3_create_function(cmd.db, "shell_putsnl", 1, SQLITE_UTF8, cmd.p,
+                               shellPutsFunc, 0, 0);
+ 
+@@ -11076,6 +11047,7 @@
+ #endif
+   }
+   data.out = stdout;
++  extern int sqlite3_appendvfs_init(sqlite3 *, char **, const sqlite3_api_routines *);
+   sqlite3_appendvfs_init(0,0,0);
+ 
+   /* Go ahead and open the database file if it already exists.  If the
+--- /src/test_config.c
++++ /src/test_config.c
+@@ -353,6 +353,8 @@
+   Tcl_SetVar2(interp, "sqlite_options", "datetime", "1", TCL_GLOBAL_ONLY);
+ #endif
+ 
++  Tcl_SetVar2(interp, "sqlite_options", "decimal", "1", TCL_GLOBAL_ONLY);
++
+ #ifdef SQLITE_OMIT_DECLTYPE
+   Tcl_SetVar2(interp, "sqlite_options", "decltype", "0", TCL_GLOBAL_ONLY);
+ #else
+@@ -540,6 +542,8 @@
+   Tcl_SetVar2(interp, "sqlite_options", "progress", "1", TCL_GLOBAL_ONLY);
+ #endif
+ 
++  Tcl_SetVar2(interp, "sqlite_options", "regexp", "1", TCL_GLOBAL_ONLY);
++
+ #ifdef SQLITE_OMIT_REINDEX
+   Tcl_SetVar2(interp, "sqlite_options", "reindex", "0", TCL_GLOBAL_ONLY);
+ #else
+@@ -662,6 +666,8 @@
+   Tcl_SetVar2(interp, "sqlite_options", "truncate_opt", "1", TCL_GLOBAL_ONLY);
+ #endif
+ 
++  Tcl_SetVar2(interp, "sqlite_options", "uint", "1", TCL_GLOBAL_ONLY);
++
+ #ifdef SQLITE_OMIT_UTF16
+   Tcl_SetVar2(interp, "sqlite_options", "utf16", "0", TCL_GLOBAL_ONLY);
+ #else
+--- /test/e_expr.test
++++ /test/e_expr.test
+@@ -1079,7 +1079,7 @@
+ #
+ #   There is a regexp function if ICU is enabled though.
+ #
+-ifcapable !icu {
++ifcapable !icu&&!regexp {
+   do_catchsql_test e_expr-18.1.1 { 
+     SELECT regexp('abc', 'def') 
+   } {1 {no such function: regexp}}
+--- /test/icu.test
++++ /test/icu.test
+@@ -41,7 +41,7 @@
+   #
+   test_expr icu-1.1 {i1='hello'} {i1 REGEXP 'hello'}  1
+   test_expr icu-1.2 {i1='hello'} {i1 REGEXP '.ello'}  1
+-  test_expr icu-1.3 {i1='hello'} {i1 REGEXP '.ell'}   0
++  test_expr icu-1.3 {i1='hello'} {i1 REGEXP '.ell$'}  0
+   test_expr icu-1.4 {i1='hello'} {i1 REGEXP '.ell.*'} 1
+   test_expr icu-1.5 {i1=NULL}    {i1 REGEXP '.ell.*'} {}
+ 
+--- /test/pragma.test
++++ /test/pragma.test
+@@ -1370,17 +1370,62 @@
+ } ;# ifcapable trigger
+ 
+ ifcapable schema_pragmas {
+-  do_test pragma-11.1 {
+-    execsql2 {
+-      pragma collation_list;
++  ifcapable decimal {
++    ifcapable uint {
++      do_test pragma-11.1 {
++        execsql2 {
++          pragma collation_list;
++        }
++      } {seq 0 name UINT seq 1 name decimal seq 2 name RTRIM seq 3 name NOCASE seq 4 name BINARY}
++      do_test pragma-11.2 {
++        db collate New_Collation blah...
++        execsql {
++          pragma collation_list;
++        }
++      } {0 New_Collation 1 UINT 2 decimal 3 RTRIM 4 NOCASE 5 BINARY}
+     }
+-  } {seq 0 name RTRIM seq 1 name NOCASE seq 2 name BINARY}
+-  do_test pragma-11.2 {
+-    db collate New_Collation blah...
+-    execsql {
+-      pragma collation_list;
++    ifcapable !uint {
++      do_test pragma-11.1 {
++        execsql2 {
++          pragma collation_list;
++        }
++      } {seq 0 name decimal seq 1 name RTRIM seq 2 name NOCASE seq 3 name BINARY}
++      do_test pragma-11.2 {
++        db collate New_Collation blah...
++        execsql {
++          pragma collation_list;
++        }
++      } {0 New_Collation 1 decimal 2 RTRIM 3 NOCASE 4 BINARY}
+     }
+-  } {0 New_Collation 1 RTRIM 2 NOCASE 3 BINARY}
++  }
++  ifcapable !decimal {
++    ifcapable uint {
++      do_test pragma-11.1 {
++        execsql2 {
++          pragma collation_list;
++        }
++      } {seq 0 name UINT seq 1 name RTRIM seq 2 name NOCASE seq 3 name BINARY}
++      do_test pragma-11.2 {
++        db collate New_Collation blah...
++        execsql {
++          pragma collation_list;
++        }
++      } {0 New_Collation 1 UINT 2 RTRIM 3 NOCASE 4 BINARY}
++    }
++    ifcapable !uint {
++      do_test pragma-11.1 {
++        execsql2 {
++          pragma collation_list;
++        }
++      } {seq 0 name RTRIM seq 1 name NOCASE seq 2 name BINARY}
++      do_test pragma-11.2 {
++        db collate New_Collation blah...
++        execsql {
++          pragma collation_list;
++        }
++      } {0 New_Collation 1 RTRIM 2 NOCASE 3 BINARY}
++    }
++  }
+ }
+ 
+ ifcapable schema_pragmas&&tempdb {
+--- /test/sessionfuzz.c
++++ /test/sessionfuzz.c
+@@ -698,49 +698,6 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <assert.h>
+-#ifndef OMIT_ZLIB
+-#include "zlib.h"
+-#endif
+-
+-/*
+-** Implementation of the "sqlar_uncompress(X,SZ)" SQL function
+-**
+-** Parameter SZ is interpreted as an integer. If it is less than or
+-** equal to zero, then this function returns a copy of X. Or, if
+-** SZ is equal to the size of X when interpreted as a blob, also
+-** return a copy of X. Otherwise, decompress blob X using zlib
+-** utility function uncompress() and return the results (another
+-** blob).
+-*/
+-static void sqlarUncompressFunc(
+-  sqlite3_context *context,
+-  int argc,
+-  sqlite3_value **argv
+-){
+-#ifdef OMIT_ZLIB
+-  sqlite3_result_value(context, argv[0]);
+-#else
+-  uLong nData;
+-  uLongf sz;
+-
+-  assert( argc==2 );
+-  sz = sqlite3_value_int(argv[1]);
+-
+-  if( sz<=0 || sz==(nData = sqlite3_value_bytes(argv[0])) ){
+-    sqlite3_result_value(context, argv[0]);
+-  }else{
+-    const Bytef *pData= sqlite3_value_blob(argv[0]);
+-    Bytef *pOut = sqlite3_malloc(sz);
+-    if( Z_OK!=uncompress(pOut, &sz, pData, nData) ){
+-      sqlite3_result_error(context, "error in uncompress()", -1);
+-    }else{
+-      sqlite3_result_blob(context, pOut, sz, SQLITE_TRANSIENT);
+-    }
+-    sqlite3_free(pOut);
+-  }
+-#endif
+-}
+-
+ 
+ /* Run a chunk of SQL.  If any errors happen, print an error message
+ ** and exit.
+--- /tool/mksqlite3c.tcl
++++ /tool/mksqlite3c.tcl
+@@ -129,6 +129,7 @@
+    rtree.h
+    sqlite3session.h
+    sqlite3.h
++   sqlite3expert.h
+    sqlite3ext.h
+    sqlite3rbu.h
+    sqliteicu.h
+@@ -416,6 +417,28 @@
+    sqlite3session.c
+    fts5.c
+    stmt.c
++   amatch.c
++   appendvfs.c
++   carray.c
++   completion.c
++   csv.c
++   dbdata.c
++   decimal.c
++   eval.c
++   fileio.c
++   ieee754.c
++   nextchar.c
++   percentile.c
++   regexp.c
++   series.c
++   sha1.c
++   shathree.c
++   sqlar.c
++   sqlite3expert.c
++   totype.c
++   uint.c
++   uuid.c
++   zipfile.c
+ } {
+   copy_file tsrc/$file
+ }
+--- /tool/sqlite3_analyzer.c.in
++++ /tool/sqlite3_analyzer.c.in
+@@ -14,9 +14,6 @@
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+ #define SQLITE_OMIT_LOAD_EXTENSION 1
+-#ifndef USE_EXTERNAL_SQLITE
+-INCLUDE sqlite3.c
+-#endif
+ INCLUDE $ROOT/src/tclsqlite.c
+ 
+ const char *sqlite3_analyzer_init_proc(Tcl_Interp *interp){
+--- /tool/sqltclsh.c.in
++++ /tool/sqltclsh.c.in
+@@ -27,21 +27,13 @@
+ #define SQLITE_OMIT_SHARED_CACHE 1
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+-INCLUDE sqlite3.c
+-INCLUDE $ROOT/ext/misc/appendvfs.c
+-#ifdef SQLITE_HAVE_ZLIB
+-INCLUDE $ROOT/ext/misc/zipfile.c
+-INCLUDE $ROOT/ext/misc/sqlar.c
+-#endif
++#include "sqlite3.h"
+ INCLUDE $ROOT/src/tclsqlite.c
+ 
+ const char *sqlite3_tclapp_init_proc(Tcl_Interp *interp){
+   (void)interp;
++  extern int sqlite3_appendvfs_init(sqlite3 *,char **, const sqlite3_api_routines *);
+   sqlite3_appendvfs_init(0,0,0);
+-#ifdef SQLITE_HAVE_ZLIB
+-  sqlite3_auto_extension((void(*)(void))sqlite3_sqlar_init);
+-  sqlite3_auto_extension((void(*)(void))sqlite3_zipfile_init);
+-#endif
+ 
+   return
+ BEGIN_STRING
diff --git a/dev-db/sqlite/files/sqlite-3.35.0-build_1.1.patch b/dev-db/sqlite/files/sqlite-3.35.0-build_1.1.patch
new file mode 100644
index 0000000..1506f3d
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.35.0-build_1.1.patch
@@ -0,0 +1,375 @@
+Add initialization functions for internal usage in libsqlite3.so.
+
+SQLite revision: acd63062eb06748bfe9e4886639e4f2b54ea6a496a83f10716abbaba4115500b
+
+--- /ext/misc/amatch.c
++++ /ext/misc/amatch.c
+@@ -1480,9 +1480,18 @@
+ 
+ #endif /* SQLITE_OMIT_VIRTUALTABLE */
+ 
++int sqlite3AmatchInit(sqlite3 *db){
++  int rc = SQLITE_OK;
++#ifndef SQLITE_OMIT_VIRTUALTABLE
++  rc = sqlite3_create_module(db, "approximate_match", &amatchModule, 0);
++#endif /* SQLITE_OMIT_VIRTUALTABLE */
++  return rc;
++}
++
+ /*
+ ** Register the amatch virtual table
+ */
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -1491,11 +1500,8 @@
+   char **pzErrMsg, 
+   const sqlite3_api_routines *pApi
+ ){
+-  int rc = SQLITE_OK;
+   SQLITE_EXTENSION_INIT2(pApi);
+   (void)pzErrMsg;  /* Not used */
+-#ifndef SQLITE_OMIT_VIRTUALTABLE
+-  rc = sqlite3_create_module(db, "approximate_match", &amatchModule, 0);
+-#endif /* SQLITE_OMIT_VIRTUALTABLE */
+-  return rc;
++  return sqlite3AmatchInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/carray.c
++++ /ext/misc/carray.c
+@@ -498,16 +498,8 @@
+ 
+ #endif /* SQLITE_OMIT_VIRTUALTABLE */
+ 
+-#ifdef _WIN32
+-__declspec(dllexport)
+-#endif
+-int sqlite3_carray_init(
+-  sqlite3 *db, 
+-  char **pzErrMsg, 
+-  const sqlite3_api_routines *pApi
+-){
++int sqlite3CarrayInit(sqlite3 *db){
+   int rc = SQLITE_OK;
+-  SQLITE_EXTENSION_INIT2(pApi);
+ #ifndef SQLITE_OMIT_VIRTUALTABLE
+   rc = sqlite3_create_module(db, "carray", &carrayModule, 0);
+ #ifdef SQLITE_TEST
+@@ -519,3 +511,18 @@
+ #endif /* SQLITE_OMIT_VIRTUALTABLE */
+   return rc;
+ }
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
++#ifdef _WIN32
++__declspec(dllexport)
++#endif
++int sqlite3_carray_init(
++  sqlite3 *db, 
++  char **pzErrMsg, 
++  const sqlite3_api_routines *pApi
++){
++  SQLITE_EXTENSION_INIT2(pApi);
++  (void)pzErrMsg;  /* Unused parameter */
++  return sqlite3CarrayInit(db);
++}
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/completion.c
++++ /ext/misc/completion.c
+@@ -483,12 +483,13 @@
+   return rc;
+ }
+ 
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+ int sqlite3_completion_init(
+-  sqlite3 *db, 
+-  char **pzErrMsg, 
++  sqlite3 *db,
++  char **pzErrMsg,
+   const sqlite3_api_routines *pApi
+ ){
+   int rc = SQLITE_OK;
+@@ -499,3 +500,4 @@
+ #endif
+   return rc;
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/csv.c
++++ /ext/misc/csv.c
+@@ -928,6 +928,22 @@
+ #endif /* !defined(SQLITE_OMIT_VIRTUALTABLE) */
+ 
+ 
++int sqlite3CsvInit(sqlite3 *db){
++#ifndef SQLITE_OMIT_VIRTUALTABLE
++  int rc;
++  rc = sqlite3_create_module(db, "csv", &CsvModule, 0);
++#ifdef SQLITE_TEST
++  if( rc==SQLITE_OK ){
++    rc = sqlite3_create_module(db, "csv_wr", &CsvModuleFauxWrite, 0);
++  }
++#endif
++  return rc;
++#else
++  return SQLITE_OK;
++#endif
++}
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -941,17 +957,8 @@
+   char **pzErrMsg, 
+   const sqlite3_api_routines *pApi
+ ){
+-#ifndef SQLITE_OMIT_VIRTUALTABLE	
+-  int rc;
+   SQLITE_EXTENSION_INIT2(pApi);
+-  rc = sqlite3_create_module(db, "csv", &CsvModule, 0);
+-#ifdef SQLITE_TEST
+-  if( rc==SQLITE_OK ){
+-    rc = sqlite3_create_module(db, "csv_wr", &CsvModuleFauxWrite, 0);
+-  }
+-#endif
+-  return rc;
+-#else
+-  return SQLITE_OK;
+-#endif
++  (void)pzErrMsg;  /* Unused parameter */
++  return sqlite3CsvInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/dbdata.c
++++ /ext/misc/dbdata.c
+@@ -803,7 +803,7 @@
+ /*
+ ** Invoke this routine to register the "sqlite_dbdata" virtual table module
+ */
+-static int sqlite3DbdataRegister(sqlite3 *db){
++int sqlite3DbdataRegister(sqlite3 *db){
+   static sqlite3_module dbdata_module = {
+     0,                            /* iVersion */
+     0,                            /* xCreate */
+@@ -838,6 +838,7 @@
+   return rc;
+ }
+ 
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -849,3 +850,4 @@
+   SQLITE_EXTENSION_INIT2(pApi);
+   return sqlite3DbdataRegister(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/decimal.c
++++ /ext/misc/decimal.c
+@@ -590,14 +590,7 @@
+   decimal_free(pB);
+ }
+ 
+-#ifdef _WIN32
+-__declspec(dllexport)
+-#endif
+-int sqlite3_decimal_init(
+-  sqlite3 *db, 
+-  char **pzErrMsg, 
+-  const sqlite3_api_routines *pApi
+-){
++int sqlite3DecimalInit(sqlite3 *db){
+   int rc = SQLITE_OK;
+   static const struct {
+     const char *zFuncName;
+@@ -611,10 +604,6 @@
+     { "decimal_mul",   2,   decimalMulFunc     },
+   };
+   unsigned int i;
+-  (void)pzErrMsg;  /* Unused parameter */
+-
+-  SQLITE_EXTENSION_INIT2(pApi);
+-
+   for(i=0; i<sizeof(aFunc)/sizeof(aFunc[0]) && rc==SQLITE_OK; i++){
+     rc = sqlite3_create_function(db, aFunc[i].zFuncName, aFunc[i].nArg,
+                    SQLITE_UTF8|SQLITE_INNOCUOUS|SQLITE_DETERMINISTIC,
+@@ -632,3 +621,20 @@
+   }
+   return rc;
+ }
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
++#ifdef _WIN32
++__declspec(dllexport)
++#endif
++int sqlite3_decimal_init(
++  sqlite3 *db, 
++  char **pzErrMsg, 
++  const sqlite3_api_routines *pApi
++){
++  (void)pzErrMsg;  /* Unused parameter */
++
++  SQLITE_EXTENSION_INIT2(pApi);
++
++  return sqlite3DecimalInit(db);
++}
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/eval.c
++++ /ext/misc/eval.c
+@@ -102,6 +102,20 @@
+ }
+ 
+ 
++int sqlite3EvalInit(sqlite3 *db){
++  int rc = SQLITE_OK;
++  rc = sqlite3_create_function(db, "eval", 1,
++                               SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
++                               sqlEvalFunc, 0, 0);
++  if( rc==SQLITE_OK ){
++    rc = sqlite3_create_function(db, "eval", 2,
++                                 SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
++                                 sqlEvalFunc, 0, 0);
++  }
++  return rc;
++}
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -110,16 +124,8 @@
+   char **pzErrMsg, 
+   const sqlite3_api_routines *pApi
+ ){
+-  int rc = SQLITE_OK;
+   SQLITE_EXTENSION_INIT2(pApi);
+   (void)pzErrMsg;  /* Unused parameter */
+-  rc = sqlite3_create_function(db, "eval", 1, 
+-                               SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
+-                               sqlEvalFunc, 0, 0);
+-  if( rc==SQLITE_OK ){
+-    rc = sqlite3_create_function(db, "eval", 2,
+-                                 SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
+-                                 sqlEvalFunc, 0, 0);
+-  }
+-  return rc;
++  return sqlite3EvalInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/fileio.c
++++ /ext/misc/fileio.c
+@@ -340,7 +340,7 @@
+ ** This function does the work for the writefile() UDF. Refer to 
+ ** header comments at the top of this file for details.
+ */
+-static int writeFile(
++static int writeFileContents(
+   sqlite3_context *pCtx,          /* Context to return bytes written in */
+   const char *zFile,              /* File to write */
+   sqlite3_value *pData,           /* Data to write */
+@@ -480,10 +480,10 @@
+     mtime = sqlite3_value_int64(argv[3]);
+   }
+ 
+-  res = writeFile(context, zFile, argv[1], mode, mtime);
++  res = writeFileContents(context, zFile, argv[1], mode, mtime);
+   if( res==1 && errno==ENOENT ){
+     if( makeDirectory(zFile)==SQLITE_OK ){
+-      res = writeFile(context, zFile, argv[1], mode, mtime);
++      res = writeFileContents(context, zFile, argv[1], mode, mtime);
+     }
+   }
+ 
+@@ -970,18 +970,9 @@
+ # define fsdirRegister(x) SQLITE_OK
+ #endif
+ 
+-#ifdef _WIN32
+-__declspec(dllexport)
+-#endif
+-int sqlite3_fileio_init(
+-  sqlite3 *db, 
+-  char **pzErrMsg, 
+-  const sqlite3_api_routines *pApi
+-){
++int sqlite3FileioInit(sqlite3 *db){
+   int rc = SQLITE_OK;
+-  SQLITE_EXTENSION_INIT2(pApi);
+-  (void)pzErrMsg;  /* Unused parameter */
+-  rc = sqlite3_create_function(db, "readfile", 1, 
++  rc = sqlite3_create_function(db, "readfile", 1,
+                                SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
+                                readfileFunc, 0, 0);
+   if( rc==SQLITE_OK ){
+@@ -998,3 +989,18 @@
+   }
+   return rc;
+ }
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
++#ifdef _WIN32
++__declspec(dllexport)
++#endif
++int sqlite3_fileio_init(
++  sqlite3 *db, 
++  char **pzErrMsg, 
++  const sqlite3_api_routines *pApi
++){
++  SQLITE_EXTENSION_INIT2(pApi);
++  (void)pzErrMsg;  /* Unused parameter */
++  return sqlite3FileioInit(db);
++}
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/ieee754.c
++++ /ext/misc/ieee754.c
+@@ -253,14 +253,7 @@
+ }
+ 
+ 
+-#ifdef _WIN32
+-__declspec(dllexport)
+-#endif
+-int sqlite3_ieee_init(
+-  sqlite3 *db, 
+-  char **pzErrMsg, 
+-  const sqlite3_api_routines *pApi
+-){
++int sqlite3IeeeInit(sqlite3 *db){
+   static const struct {
+     char *zFName;
+     int nArg;
+@@ -277,13 +270,26 @@
+   };
+   unsigned int i;
+   int rc = SQLITE_OK;
+-  SQLITE_EXTENSION_INIT2(pApi);
+-  (void)pzErrMsg;  /* Unused parameter */
+   for(i=0; i<sizeof(aFunc)/sizeof(aFunc[0]) && rc==SQLITE_OK; i++){
+-    rc = sqlite3_create_function(db, aFunc[i].zFName, aFunc[i].nArg,	
++    rc = sqlite3_create_function(db, aFunc[i].zFName, aFunc[i].nArg,
+                                SQLITE_UTF8|SQLITE_INNOCUOUS,
+                                (void*)&aFunc[i].iAux,
+                                aFunc[i].xFunc, 0, 0);
+   }
+   return rc;
+ }
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
++#ifdef _WIN32
++__declspec(dllexport)
++#endif
++int sqlite3_ieee_init(
++  sqlite3 *db, 
++  char **pzErrMsg, 
++  const sqlite3_api_routines *pApi
++){
++  SQLITE_EXTENSION_INIT2(pApi);
++  (void)pzErrMsg;  /* Unused parameter */
++  return sqlite3IeeeInit(db);
++}
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
diff --git a/dev-db/sqlite/files/sqlite-3.32.1-full_archive-build_1.patch b/dev-db/sqlite/files/sqlite-3.35.0-build_1.2.patch
similarity index 65%
rename from dev-db/sqlite/files/sqlite-3.32.1-full_archive-build_1.patch
rename to dev-db/sqlite/files/sqlite-3.35.0-build_1.2.patch
index aec90e4..0c3577f 100644
--- a/dev-db/sqlite/files/sqlite-3.32.1-full_archive-build_1.patch
+++ b/dev-db/sqlite/files/sqlite-3.35.0-build_1.2.patch
@@ -1,225 +1,29 @@
 Add initialization functions for internal usage in libsqlite3.so.
 
---- /ext/misc/carray.c
-+++ /ext/misc/carray.c
-@@ -383,16 +383,8 @@
- 
- #endif /* SQLITE_OMIT_VIRTUALTABLE */
+SQLite revision: acd63062eb06748bfe9e4886639e4f2b54ea6a496a83f10716abbaba4115500b
+
+--- /ext/misc/nextchar.c
++++ /ext/misc/nextchar.c
+@@ -286,17 +286,8 @@
+   sqlite3_free(c.aResult);
+ }
  
 -#ifdef _WIN32
 -__declspec(dllexport)
 -#endif
--int sqlite3_carray_init(
+-int sqlite3_nextchar_init(
 -  sqlite3 *db, 
 -  char **pzErrMsg, 
 -  const sqlite3_api_routines *pApi
 -){
-+int sqlite3CarrayInit(sqlite3 *db){
-   int rc = SQLITE_OK;
--  SQLITE_EXTENSION_INIT2(pApi);
- #ifndef SQLITE_OMIT_VIRTUALTABLE
-   rc = sqlite3_create_module(db, "carray", &carrayModule, 0);
- #ifdef SQLITE_TEST
-@@ -404,3 +396,18 @@
- #endif /* SQLITE_OMIT_VIRTUALTABLE */
-   return rc;
- }
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
-+#ifdef _WIN32
-+__declspec(dllexport)
-+#endif
-+int sqlite3_carray_init(
-+  sqlite3 *db, 
-+  char **pzErrMsg, 
-+  const sqlite3_api_routines *pApi
-+){
-+  SQLITE_EXTENSION_INIT2(pApi);
-+  (void)pzErrMsg;  /* Unused parameter */
-+  return sqlite3CarrayInit(db);
-+}
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/completion.c
-+++ /ext/misc/completion.c
-@@ -483,12 +483,13 @@
-   return rc;
- }
- 
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
- int sqlite3_completion_init(
--  sqlite3 *db, 
--  char **pzErrMsg, 
-+  sqlite3 *db,
-+  char **pzErrMsg,
-   const sqlite3_api_routines *pApi
- ){
-   int rc = SQLITE_OK;
-@@ -499,3 +500,4 @@
- #endif
-   return rc;
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/csv.c
-+++ /ext/misc/csv.c
-@@ -928,6 +928,22 @@
- #endif /* !defined(SQLITE_OMIT_VIRTUALTABLE) */
- 
- 
-+int sqlite3CsvInit(sqlite3 *db){
-+#ifndef SQLITE_OMIT_VIRTUALTABLE
-+  int rc;
-+  rc = sqlite3_create_module(db, "csv", &CsvModule, 0);
-+#ifdef SQLITE_TEST
-+  if( rc==SQLITE_OK ){
-+    rc = sqlite3_create_module(db, "csv_wr", &CsvModuleFauxWrite, 0);
-+  }
-+#endif
-+  return rc;
-+#else
-+  return SQLITE_OK;
-+#endif
-+}
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
-@@ -941,17 +957,8 @@
-   char **pzErrMsg, 
-   const sqlite3_api_routines *pApi
- ){
--#ifndef SQLITE_OMIT_VIRTUALTABLE	
--  int rc;
-   SQLITE_EXTENSION_INIT2(pApi);
--  rc = sqlite3_create_module(db, "csv", &CsvModule, 0);
--#ifdef SQLITE_TEST
--  if( rc==SQLITE_OK ){
--    rc = sqlite3_create_module(db, "csv_wr", &CsvModuleFauxWrite, 0);
--  }
--#endif
--  return rc;
--#else
--  return SQLITE_OK;
--#endif
-+  (void)pzErrMsg;  /* Unused parameter */
-+  return sqlite3CsvInit(db);
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/dbdata.c
-+++ /ext/misc/dbdata.c
-@@ -803,7 +803,7 @@
- /*
- ** Invoke this routine to register the "sqlite_dbdata" virtual table module
- */
--static int sqlite3DbdataRegister(sqlite3 *db){
-+int sqlite3DbdataRegister(sqlite3 *db){
-   static sqlite3_module dbdata_module = {
-     0,                            /* iVersion */
-     0,                            /* xCreate */
-@@ -838,6 +838,7 @@
-   return rc;
- }
- 
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
-@@ -849,3 +850,4 @@
-   SQLITE_EXTENSION_INIT2(pApi);
-   return sqlite3DbdataRegister(db);
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/eval.c
-+++ /ext/misc/eval.c
-@@ -102,6 +102,20 @@
- }
- 
- 
-+int sqlite3EvalInit(sqlite3 *db){
-+  int rc = SQLITE_OK;
-+  rc = sqlite3_create_function(db, "eval", 1,
-+                               SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
-+                               sqlEvalFunc, 0, 0);
-+  if( rc==SQLITE_OK ){
-+    rc = sqlite3_create_function(db, "eval", 2,
-+                                 SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
-+                                 sqlEvalFunc, 0, 0);
-+  }
-+  return rc;
-+}
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
-@@ -110,16 +124,8 @@
-   char **pzErrMsg, 
-   const sqlite3_api_routines *pApi
- ){
--  int rc = SQLITE_OK;
-   SQLITE_EXTENSION_INIT2(pApi);
-   (void)pzErrMsg;  /* Unused parameter */
--  rc = sqlite3_create_function(db, "eval", 1, 
--                               SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
--                               sqlEvalFunc, 0, 0);
--  if( rc==SQLITE_OK ){
--    rc = sqlite3_create_function(db, "eval", 2,
--                                 SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
--                                 sqlEvalFunc, 0, 0);
--  }
--  return rc;
-+  return sqlite3EvalInit(db);
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/fileio.c
-+++ /ext/misc/fileio.c
-@@ -340,7 +340,7 @@
- ** This function does the work for the writefile() UDF. Refer to 
- ** header comments at the top of this file for details.
- */
--static int writeFile(
-+static int writeFileContents(
-   sqlite3_context *pCtx,          /* Context to return bytes written in */
-   const char *zFile,              /* File to write */
-   sqlite3_value *pData,           /* Data to write */
-@@ -480,10 +480,10 @@
-     mtime = sqlite3_value_int64(argv[3]);
-   }
- 
--  res = writeFile(context, zFile, argv[1], mode, mtime);
-+  res = writeFileContents(context, zFile, argv[1], mode, mtime);
-   if( res==1 && errno==ENOENT ){
-     if( makeDirectory(zFile)==SQLITE_OK ){
--      res = writeFile(context, zFile, argv[1], mode, mtime);
-+      res = writeFileContents(context, zFile, argv[1], mode, mtime);
-     }
-   }
- 
-@@ -970,18 +970,9 @@
- # define fsdirRegister(x) SQLITE_OK
- #endif
- 
--#ifdef _WIN32
--__declspec(dllexport)
--#endif
--int sqlite3_fileio_init(
--  sqlite3 *db, 
--  char **pzErrMsg, 
--  const sqlite3_api_routines *pApi
--){
-+int sqlite3FileioInit(sqlite3 *db){
++int sqlite3NextcharInit(sqlite3 *db){
    int rc = SQLITE_OK;
 -  SQLITE_EXTENSION_INIT2(pApi);
 -  (void)pzErrMsg;  /* Unused parameter */
--  rc = sqlite3_create_function(db, "readfile", 1, 
-+  rc = sqlite3_create_function(db, "readfile", 1,
-                                SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
-                                readfileFunc, 0, 0);
-   if( rc==SQLITE_OK ){
-@@ -998,3 +989,18 @@
+   rc = sqlite3_create_function(db, "next_char", 3,
+                                SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
+                                nextCharFunc, 0, 0);
+@@ -312,3 +303,18 @@
    }
    return rc;
  }
@@ -228,32 +32,27 @@
 +#ifdef _WIN32
 +__declspec(dllexport)
 +#endif
-+int sqlite3_fileio_init(
++int sqlite3_nextchar_init(
 +  sqlite3 *db, 
 +  char **pzErrMsg, 
 +  const sqlite3_api_routines *pApi
 +){
 +  SQLITE_EXTENSION_INIT2(pApi);
 +  (void)pzErrMsg;  /* Unused parameter */
-+  return sqlite3FileioInit(db);
++  return sqlite3NextcharInit(db);
 +}
 +#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/ieee754.c
-+++ /ext/misc/ieee754.c
-@@ -110,6 +110,20 @@
+--- /ext/misc/percentile.c
++++ /ext/misc/percentile.c
+@@ -202,6 +202,15 @@
  }
  
  
-+int sqlite3IeeeInit(sqlite3 *db){
++int sqlite3PercentileInit(sqlite3 *db){
 +  int rc = SQLITE_OK;
-+  rc = sqlite3_create_function(db, "ieee754", 1,
++  rc = sqlite3_create_function(db, "percentile", 2,
 +                               SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
-+                               ieee754func, 0, 0);
-+  if( rc==SQLITE_OK ){
-+    rc = sqlite3_create_function(db, "ieee754", 2,
-+                                 SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
-+                                 ieee754func, 0, 0);
-+  }
++                               0, percentStep, percentFinal);
 +  return rc;
 +}
 +
@@ -261,23 +60,18 @@
  #ifdef _WIN32
  __declspec(dllexport)
  #endif
-@@ -118,16 +132,8 @@
+@@ -210,11 +219,8 @@
    char **pzErrMsg, 
    const sqlite3_api_routines *pApi
  ){
 -  int rc = SQLITE_OK;
    SQLITE_EXTENSION_INIT2(pApi);
    (void)pzErrMsg;  /* Unused parameter */
--  rc = sqlite3_create_function(db, "ieee754", 1, 
+-  rc = sqlite3_create_function(db, "percentile", 2, 
 -                               SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
--                               ieee754func, 0, 0);
--  if( rc==SQLITE_OK ){
--    rc = sqlite3_create_function(db, "ieee754", 2,
--                                 SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
--                                 ieee754func, 0, 0);
--  }
+-                               0, percentStep, percentFinal);
 -  return rc;
-+  return sqlite3IeeeInit(db);
++  return sqlite3PercentileInit(db);
  }
 +#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
 --- /ext/misc/regexp.c
@@ -314,6 +108,42 @@
 +  return sqlite3RegexpInit(db);
  }
 +#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/series.c
++++ /ext/misc/series.c
+@@ -423,6 +423,15 @@
+ 
+ #endif /* SQLITE_OMIT_VIRTUALTABLE */
+ 
++int sqlite3SeriesInit(sqlite3 *db){
++  int rc = SQLITE_OK;
++#ifndef SQLITE_OMIT_VIRTUALTABLE
++  rc = sqlite3_create_module(db, "generate_series", &seriesModule, 0);
++#endif
++  return rc;
++}
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -431,7 +440,6 @@
+   char **pzErrMsg, 
+   const sqlite3_api_routines *pApi
+ ){
+-  int rc = SQLITE_OK;
+   SQLITE_EXTENSION_INIT2(pApi);
+ #ifndef SQLITE_OMIT_VIRTUALTABLE
+   if( sqlite3_libversion_number()<3008012 ){
+@@ -439,7 +447,7 @@
+         "generate_series() requires SQLite 3.8.12 or later");
+     return SQLITE_ERROR;
+   }
+-  rc = sqlite3_create_module(db, "generate_series", &seriesModule, 0);
+ #endif
+-  return rc;
++  return sqlite3SeriesInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
 --- /ext/misc/sha1.c
 +++ /ext/misc/sha1.c
 @@ -175,7 +175,7 @@
@@ -393,7 +223,7 @@
 +#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
 --- /ext/misc/shathree.c
 +++ /ext/misc/shathree.c
-@@ -527,7 +527,7 @@
+@@ -530,7 +530,7 @@
  /* Compute a string using sqlite3_vsnprintf() with a maximum length
  ** of 50 bytes and add it to the hash.
  */
@@ -402,16 +232,16 @@
    SHA3Context *p,                 /* Add content to this context */
    const char *zFormat,
    ...
-@@ -622,7 +622,7 @@
-     nCol = sqlite3_column_count(pStmt);
+@@ -626,7 +626,7 @@
      z = sqlite3_sql(pStmt);
-     n = (int)strlen(z);
--    hash_step_vformat(&cx,"S%d:",n);
-+    sha3_hash_step_vformat(&cx,"S%d:",n);
-     SHA3Update(&cx,(unsigned char*)z,n);
+     if( z ){
+       n = (int)strlen(z);
+-      hash_step_vformat(&cx,"S%d:",n);
++      sha3_hash_step_vformat(&cx,"S%d:",n);
+       SHA3Update(&cx,(unsigned char*)z,n);
+     }
  
-     /* Compute a hash over the result of the query */
-@@ -665,14 +665,14 @@
+@@ -670,14 +670,14 @@
            case SQLITE_TEXT: {
              int n2 = sqlite3_column_bytes(pStmt, i);
              const unsigned char *z2 = sqlite3_column_text(pStmt, i);
@@ -428,7 +258,7 @@
              SHA3Update(&cx, z2, n2);
              break;
            }
-@@ -685,17 +685,8 @@
+@@ -690,17 +690,8 @@
  }
  
  
@@ -447,7 +277,7 @@
    rc = sqlite3_create_function(db, "sha3", 1,
                        SQLITE_UTF8 | SQLITE_INNOCUOUS | SQLITE_DETERMINISTIC,
                        0, sha3Func, 0, 0);
-@@ -716,3 +707,18 @@
+@@ -721,3 +712,18 @@
    }
    return rc;
  }
@@ -637,7 +467,7 @@
  #include "sqlite3ext.h"
  SQLITE_EXTENSION_INIT1
  #include <stdio.h>
-@@ -2137,7 +2139,7 @@
+@@ -2139,7 +2141,7 @@
  /*
  ** Register the "zipfile" virtual table.
  */
@@ -646,7 +476,7 @@
    static sqlite3_module zipfileModule = {
      1,                         /* iVersion */
      zipfileConnect,            /* xCreate */
-@@ -2171,9 +2173,10 @@
+@@ -2173,9 +2175,10 @@
    return rc;
  }
  #else         /* SQLITE_OMIT_VIRTUALTABLE */
@@ -658,7 +488,7 @@
  #ifdef _WIN32
  __declspec(dllexport)
  #endif
-@@ -2184,5 +2187,8 @@
+@@ -2186,5 +2189,8 @@
  ){
    SQLITE_EXTENSION_INIT2(pApi);
    (void)pzErrMsg;  /* Unused parameter */
diff --git a/dev-db/sqlite/files/sqlite-3.35.0-build_2.1.patch b/dev-db/sqlite/files/sqlite-3.35.0-build_2.1.patch
new file mode 100644
index 0000000..383a493
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.35.0-build_2.1.patch
@@ -0,0 +1,292 @@
+Move some code to libsqlite3.so to avoid duplication.
+Link executables against libsqlite3.so.
+Increase timeout for fuzzcheck.
+Update list of optionally available functions.
+Fix building with dlopen() not available.
+
+SQLite revision: acd63062eb06748bfe9e4886639e4f2b54ea6a496a83f10716abbaba4115500b
+
+--- /Makefile.in
++++ /Makefile.in
+@@ -313,6 +313,9 @@
+ # Source code for extensions
+ #
+ SRC += \
++  $(TOP)/ext/expert/sqlite3expert.c \
++  $(TOP)/ext/expert/sqlite3expert.h
++SRC += \
+   $(TOP)/ext/fts1/fts1.c \
+   $(TOP)/ext/fts1/fts1.h \
+   $(TOP)/ext/fts1/fts1_hash.c \
+@@ -365,8 +368,29 @@
+   $(TOP)/ext/rbu/sqlite3rbu.h \
+   $(TOP)/ext/rbu/sqlite3rbu.c
+ SRC += \
++  $(TOP)/ext/misc/amatch.c \
++  $(TOP)/ext/misc/appendvfs.c \
++  $(TOP)/ext/misc/carray.c \
++  $(TOP)/ext/misc/completion.c \
++  $(TOP)/ext/misc/csv.c \
++  $(TOP)/ext/misc/dbdata.c \
++  $(TOP)/ext/misc/decimal.c \
++  $(TOP)/ext/misc/eval.c \
++  $(TOP)/ext/misc/fileio.c \
++  $(TOP)/ext/misc/ieee754.c \
+   $(TOP)/ext/misc/json1.c \
+-  $(TOP)/ext/misc/stmt.c
++  $(TOP)/ext/misc/nextchar.c \
++  $(TOP)/ext/misc/percentile.c \
++  $(TOP)/ext/misc/regexp.c \
++  $(TOP)/ext/misc/series.c \
++  $(TOP)/ext/misc/sha1.c \
++  $(TOP)/ext/misc/shathree.c \
++  $(TOP)/ext/misc/sqlar.c \
++  $(TOP)/ext/misc/stmt.c \
++  $(TOP)/ext/misc/totype.c \
++  $(TOP)/ext/misc/uint.c \
++  $(TOP)/ext/misc/uuid.c \
++  $(TOP)/ext/misc/zipfile.c
+ 
+ # Generated source code files
+ #
+@@ -437,36 +461,21 @@
+ # Statically linked extensions
+ #
+ TESTSRC += \
+-  $(TOP)/ext/expert/sqlite3expert.c \
+   $(TOP)/ext/expert/test_expert.c \
+-  $(TOP)/ext/misc/amatch.c \
+-  $(TOP)/ext/misc/appendvfs.c \
+-  $(TOP)/ext/misc/carray.c \
+   $(TOP)/ext/misc/cksumvfs.c \
+   $(TOP)/ext/misc/closure.c \
+-  $(TOP)/ext/misc/csv.c \
+-  $(TOP)/ext/misc/decimal.c \
+-  $(TOP)/ext/misc/eval.c \
+   $(TOP)/ext/misc/explain.c \
+-  $(TOP)/ext/misc/fileio.c \
+   $(TOP)/ext/misc/fuzzer.c \
+   $(TOP)/ext/fts5/fts5_tcl.c \
+   $(TOP)/ext/fts5/fts5_test_mi.c \
+   $(TOP)/ext/fts5/fts5_test_tok.c \
+-  $(TOP)/ext/misc/ieee754.c \
+   $(TOP)/ext/misc/mmapwarm.c \
+-  $(TOP)/ext/misc/nextchar.c \
+   $(TOP)/ext/misc/normalize.c \
+-  $(TOP)/ext/misc/percentile.c \
+   $(TOP)/ext/misc/prefixes.c \
+-  $(TOP)/ext/misc/regexp.c \
+   $(TOP)/ext/misc/remember.c \
+-  $(TOP)/ext/misc/series.c \
+   $(TOP)/ext/misc/spellfix.c \
+-  $(TOP)/ext/misc/totype.c \
+   $(TOP)/ext/misc/unionvtab.c \
+   $(TOP)/ext/misc/wholenumber.c \
+-  $(TOP)/ext/misc/zipfile.c \
+   $(TOP)/ext/userauth/userauth.c
+ 
+ # Source code to the library files needed by the test fixture
+@@ -648,25 +657,25 @@
+ 
+ libtclsqlite3.la:	tclsqlite.lo libsqlite3.la
+ 	$(LTLINK) -no-undefined -o $@ tclsqlite.lo \
+-		libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
++		libsqlite3.la @TCL_STUB_LIB_SPEC@ \
+ 		-rpath "$(TCLLIBDIR)" \
+ 		-version-info "8:6:8" \
+ 		-avoid-version
+ 
+-sqlite3$(TEXE):	shell.c sqlite3.c
+-	$(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
+-		shell.c sqlite3.c \
+-		$(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
++sqlite3$(TEXE):	shell.c libsqlite3.la
++	$(LTLINK) $(READLINE_FLAGS) -o $@ \
++		shell.c libsqlite3.la \
++		$(LIBREADLINE)
+ 
+-sqldiff$(TEXE):	$(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h
+-	$(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
++sqldiff$(TEXE):	$(TOP)/tool/sqldiff.c libsqlite3.la
++	$(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la
+ 
+-dbhash$(TEXE):	$(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
+-	$(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)
++dbhash$(TEXE):	$(TOP)/tool/dbhash.c libsqlite3.la
++	$(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la
+ 
+-scrub$(TEXE):	$(TOP)/ext/misc/scrub.c sqlite3.lo
++scrub$(TEXE):	$(TOP)/ext/misc/scrub.c libsqlite3.la
+ 	$(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \
+-		$(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS)
++		$(TOP)/ext/misc/scrub.c libsqlite3.la
+ 
+ srcck1$(BEXE):	$(TOP)/tool/srcck1.c
+ 	$(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
+@@ -777,7 +786,7 @@
+ # Rule to build the amalgamation
+ #
+ sqlite3.lo:	sqlite3.c
+-	$(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c
++	$(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c
+ 
+ # Rules to build the LEMON compiler generator
+ #
+@@ -1083,18 +1092,6 @@
+ # Source files that go into making shell.c
+ SHELL_SRC = \
+ 	$(TOP)/src/shell.c.in \
+-        $(TOP)/ext/misc/appendvfs.c \
+-	$(TOP)/ext/misc/completion.c \
+-        $(TOP)/ext/misc/decimal.c \
+-	$(TOP)/ext/misc/fileio.c \
+-        $(TOP)/ext/misc/ieee754.c \
+-        $(TOP)/ext/misc/series.c \
+-	$(TOP)/ext/misc/shathree.c \
+-	$(TOP)/ext/misc/sqlar.c \
+-        $(TOP)/ext/misc/uint.c \
+-	$(TOP)/ext/expert/sqlite3expert.c \
+-	$(TOP)/ext/expert/sqlite3expert.h \
+-	$(TOP)/ext/misc/zipfile.c \
+ 	$(TOP)/ext/misc/memtrace.c \
+         $(TOP)/src/test_windirent.c
+ 
+@@ -1264,11 +1261,11 @@
+ 
+ # Fuzz testing
+ fuzztest:	fuzzcheck$(TEXE) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
+-	./fuzzcheck$(TEXE) $(FUZZDATA)
++	./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA)
+ 	./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
+ 
+ valgrindfuzz:	fuzzcheck$(TEXT) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
+-	valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M $(FUZZDATA)
++	valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA)
+ 	valgrind ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
+ 
+ # The veryquick.test TCL tests.
+@@ -1302,24 +1299,23 @@
+ shelltest: $(TESTPROGS)
+ 	./testfixture$(TEXT) $(TOP)/test/permutations.test shell
+ 
+-sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
++sqlite3_analyzer.c:	$(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
+ 	$(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in >sqlite3_analyzer.c
+ 
+-sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
+-	$(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
++sqlite3_analyzer$(TEXE):	sqlite3_analyzer.c libsqlite3.la
++	$(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL)
+ 
+-sqltclsh.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl $(TOP)/ext/misc/appendvfs.c $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in
++sqltclsh.c:	$(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in
+ 	$(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in >sqltclsh.c
+ 
+-sqltclsh$(TEXE): sqltclsh.c
+-	$(LTLINK) sqltclsh.c -o $@ $(LIBTCL) $(TLIBS)
++sqltclsh$(TEXE):	sqltclsh.c libsqlite3.la
++	$(LTLINK) sqltclsh.c -o $@ libsqlite3.la $(LIBTCL)
+ 
+-sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c
+-	$(LTLINK)	$(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c -o sqlite3_expert $(TLIBS)
++sqlite3_expert$(TEXE):	$(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/expert.c libsqlite3.la
++	$(LTLINK) $(TOP)/ext/expert/expert.c -o sqlite3_expert libsqlite3.la
+ 
+ CHECKER_DEPS =\
+   $(TOP)/tool/mkccode.tcl \
+-  sqlite3.c \
+   $(TOP)/src/tclsqlite.c \
+   $(TOP)/ext/repair/sqlite3_checker.tcl \
+   $(TOP)/ext/repair/checkindex.c \
+@@ -1330,36 +1326,36 @@
+ sqlite3_checker.c:	$(CHECKER_DEPS)
+ 	$(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/ext/repair/sqlite3_checker.c.in >$@
+ 
+-sqlite3_checker$(TEXE):	sqlite3_checker.c
+-	$(LTLINK) sqlite3_checker.c -o $@ $(LIBTCL) $(TLIBS)
++sqlite3_checker$(TEXE):	sqlite3_checker.c libsqlite3.la
++	$(LTLINK) sqlite3_checker.c -o $@ libsqlite3.la $(LIBTCL)
+ 
+-dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c sqlite3.lo
++dbdump$(TEXE):	$(TOP)/ext/misc/dbdump.c libsqlite3.la
+ 	$(LTLINK) -DDBDUMP_STANDALONE -o $@ \
+-           $(TOP)/ext/misc/dbdump.c sqlite3.lo $(TLIBS)
++           $(TOP)/ext/misc/dbdump.c libsqlite3.la
+ 
+-dbtotxt$(TEXE): $(TOP)/tool/dbtotxt.c
+-	$(LTLINK)-o $@ $(TOP)/tool/dbtotxt.c
++dbtotxt$(TEXE):	$(TOP)/tool/dbtotxt.c
++	$(LTLINK) -o $@ $(TOP)/tool/dbtotxt.c
+ 
+-showdb$(TEXE):	$(TOP)/tool/showdb.c sqlite3.lo
+-	$(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
++showdb$(TEXE):	$(TOP)/tool/showdb.c libsqlite3.la
++	$(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la
+ 
+-showstat4$(TEXE):	$(TOP)/tool/showstat4.c sqlite3.lo
+-	$(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS)
++showstat4$(TEXE):	$(TOP)/tool/showstat4.c libsqlite3.la
++	$(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la
+ 
+-showjournal$(TEXE):	$(TOP)/tool/showjournal.c sqlite3.lo
+-	$(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS)
++showjournal$(TEXE):	$(TOP)/tool/showjournal.c
++	$(LTLINK) -o $@ $(TOP)/tool/showjournal.c
+ 
+-showwal$(TEXE):	$(TOP)/tool/showwal.c sqlite3.lo
+-	$(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS)
++showwal$(TEXE):	$(TOP)/tool/showwal.c
++	$(LTLINK) -o $@ $(TOP)/tool/showwal.c
+ 
+ showshm$(TEXE):	$(TOP)/tool/showshm.c
+ 	$(LTLINK) -o $@ $(TOP)/tool/showshm.c
+ 
+-index_usage$(TEXE): $(TOP)/tool/index_usage.c sqlite3.lo
+-	$(LTLINK) $(SHELL_OPT) -o $@ $(TOP)/tool/index_usage.c sqlite3.lo $(TLIBS)
++index_usage$(TEXE):	$(TOP)/tool/index_usage.c libsqlite3.la
++	$(LTLINK) -o $@ $(TOP)/tool/index_usage.c libsqlite3.la
+ 
+-changeset$(TEXE):	$(TOP)/ext/session/changeset.c sqlite3.lo
+-	$(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS)
++changeset$(TEXE):	$(TOP)/ext/session/changeset.c libsqlite3.la
++	$(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la
+ 
+ changesetfuzz$(TEXE):	$(TOP)/ext/session/changesetfuzz.c sqlite3.lo
+ 	$(LTLINK) -o $@ $(TOP)/ext/session/changesetfuzz.c sqlite3.lo $(TLIBS)
+@@ -1387,11 +1383,11 @@
+ kvtest$(TEXE):	$(TOP)/test/kvtest.c sqlite3.c
+ 	$(LTLINK) $(KV_OPT) -o $@ $(TOP)/test/kvtest.c sqlite3.c $(TLIBS)
+ 
+-rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
+-	$(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
++rbu$(EXE):	$(TOP)/ext/rbu/rbu.c libsqlite3.la
++	$(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la
+ 
+-loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
+-	$(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
++loadfts$(EXE):	$(TOP)/tool/loadfts.c libsqlite3.la
++	$(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@
+ 
+ # This target will fail if the SQLite amalgamation contains any exported
+ # symbols that do not begin with "sqlite3_". It is run as part of the
+--- /configure.ac
++++ /configure.ac
+@@ -108,7 +108,7 @@
+ #########
+ # Figure out whether or not we have these functions
+ #
+-AC_CHECK_FUNCS([fdatasync gmtime_r isnan localtime_r localtime_s malloc_usable_size strchrnul usleep utime pread pread64 pwrite pwrite64])
++AC_CHECK_FUNCS([fdatasync fullfsync gmtime_r isnan localtime_r localtime_s malloc_usable_size posix_fallocate pread pread64 pwrite pwrite64 strchrnul usleep utime])
+ 
+ #########
+ # By default, we use the amalgamation (this may be changed below...)
+@@ -587,6 +587,9 @@
+ if test "${enable_load_extension}" = "yes" ; then
+   OPT_FEATURE_FLAGS=""
+   AC_SEARCH_LIBS(dlopen, dl)
++  if test "${ac_cv_search_dlopen}" = "no" ; then
++    OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
++  fi
+ else
+   OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
+ fi
diff --git a/dev-db/sqlite/files/sqlite-3.35.0-build_2.2.patch b/dev-db/sqlite/files/sqlite-3.35.0-build_2.2.patch
new file mode 100644
index 0000000..99350c7
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.35.0-build_2.2.patch
@@ -0,0 +1,441 @@
+Move some code to libsqlite3.so to avoid duplication.
+Initialize some extensions in libsqlite3.so.
+Update test suite.
+
+SQLite revision: acd63062eb06748bfe9e4886639e4f2b54ea6a496a83f10716abbaba4115500b
+
+--- /ext/repair/sqlite3_checker.c.in
++++ /ext/repair/sqlite3_checker.c.in
+@@ -2,6 +2,7 @@
+ ** Read an SQLite database file and analyze its space utilization.  Generate
+ ** text on standard output.
+ */
++#define SQLITE_CORE 1
+ #define TCLSH_INIT_PROC sqlite3_checker_init_proc
+ #define SQLITE_ENABLE_DBPAGE_VTAB 1
+ #define SQLITE_ENABLE_JSON1 1
+@@ -14,7 +15,7 @@
+ #define SQLITE_OMIT_SHARED_CACHE 1
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+-INCLUDE sqlite3.c
++#include "sqlite3.h"
+ INCLUDE $ROOT/src/tclsqlite.c
+ INCLUDE $ROOT/ext/misc/btreeinfo.c
+ INCLUDE $ROOT/ext/repair/checkindex.c
+--- /src/main.c
++++ /src/main.c
+@@ -50,12 +50,36 @@
+ #ifdef SQLITE_ENABLE_FTS5
+ int sqlite3Fts5Init(sqlite3*);
+ #endif
++#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
++int sqlite3DbdataRegister(sqlite3*);
++#endif
+ #ifdef SQLITE_ENABLE_JSON1
+ int sqlite3Json1Init(sqlite3*);
+ #endif
+ #ifdef SQLITE_ENABLE_STMTVTAB
+ int sqlite3StmtVtabInit(sqlite3*);
+ #endif
++int sqlite3AmatchInit(sqlite3*);
++int sqlite3CarrayInit(sqlite3*);
++int sqlite3CompletionVtabInit(sqlite3*);
++int sqlite3CsvInit(sqlite3*);
++int sqlite3DecimalInit(sqlite3*);
++int sqlite3EvalInit(sqlite3*);
++int sqlite3FileioInit(sqlite3*);
++int sqlite3IeeeInit(sqlite3*);
++int sqlite3NextcharInit(sqlite3*);
++int sqlite3PercentileInit(sqlite3*);
++int sqlite3RegexpInit(sqlite3*);
++int sqlite3SeriesInit(sqlite3*);
++int sqlite3ShaInit(sqlite3*);
++int sqlite3ShathreeInit(sqlite3*);
++int sqlite3TotypeInit(sqlite3*);
++int sqlite3UintInit(sqlite3*);
++int sqlite3UuidInit(sqlite3*);
++#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_HAVE_ZLIB)
++int sqlite3ZipfileInit(sqlite3*);
++int sqlite3SqlarInit(sqlite3*);
++#endif
+ 
+ /*
+ ** An array of pointers to extension initializer functions for
+@@ -83,6 +107,9 @@
+ #ifdef SQLITE_ENABLE_DBPAGE_VTAB
+   sqlite3DbpageRegister,
+ #endif
++#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
++  sqlite3DbdataRegister,
++#endif
+ #ifdef SQLITE_ENABLE_DBSTAT_VTAB
+   sqlite3DbstatRegister,
+ #endif
+@@ -96,6 +123,27 @@
+ #ifdef SQLITE_ENABLE_BYTECODE_VTAB
+   sqlite3VdbeBytecodeVtabInit,
+ #endif
++  sqlite3AmatchInit,
++  sqlite3CarrayInit,
++  sqlite3CompletionVtabInit,
++  sqlite3CsvInit,
++  sqlite3DecimalInit,
++  sqlite3EvalInit,
++  sqlite3FileioInit,
++  sqlite3IeeeInit,
++  sqlite3NextcharInit,
++  sqlite3PercentileInit,
++  sqlite3RegexpInit,
++  sqlite3SeriesInit,
++  sqlite3ShaInit,
++  sqlite3ShathreeInit,
++  sqlite3TotypeInit,
++  sqlite3UintInit,
++  sqlite3UuidInit,
++#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_HAVE_ZLIB)
++  sqlite3ZipfileInit,
++  sqlite3SqlarInit,
++#endif
+ };
+ 
+ #ifndef SQLITE_AMALGAMATION
+--- /src/shell.c.in
++++ /src/shell.c.in
+@@ -69,6 +69,7 @@
+ #include <stdio.h>
+ #include <assert.h>
+ #include "sqlite3.h"
++#include "ext/expert/sqlite3expert.h"
+ typedef sqlite3_int64 i64;
+ typedef sqlite3_uint64 u64;
+ typedef unsigned char u8;
+@@ -135,6 +136,10 @@
+ # define SHELL_USE_LOCAL_GETLINE 1
+ #endif
+ 
++#ifdef SQLITE_HAVE_ZLIB
++#include <zlib.h>
++#endif
++
+ 
+ #if defined(_WIN32) || defined(WIN32)
+ # if SQLITE_OS_WINRT
+@@ -1018,25 +1023,7 @@
+ INCLUDE test_windirent.c
+ #define dirent DIRENT
+ #endif
+-INCLUDE ../ext/misc/shathree.c
+-INCLUDE ../ext/misc/fileio.c
+-INCLUDE ../ext/misc/completion.c
+-INCLUDE ../ext/misc/appendvfs.c
+ INCLUDE ../ext/misc/memtrace.c
+-INCLUDE ../ext/misc/uint.c
+-INCLUDE ../ext/misc/decimal.c
+-INCLUDE ../ext/misc/ieee754.c
+-INCLUDE ../ext/misc/series.c
+-#ifdef SQLITE_HAVE_ZLIB
+-INCLUDE ../ext/misc/zipfile.c
+-INCLUDE ../ext/misc/sqlar.c
+-#endif
+-INCLUDE ../ext/expert/sqlite3expert.h
+-INCLUDE ../ext/expert/sqlite3expert.c
+-
+-#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
+-INCLUDE ../ext/misc/dbdata.c
+-#endif
+ 
+ #if defined(SQLITE_ENABLE_SESSION)
+ /*
+@@ -4608,20 +4595,6 @@
+ #ifndef SQLITE_OMIT_LOAD_EXTENSION
+     sqlite3_enable_load_extension(p->db, 1);
+ #endif
+-    sqlite3_fileio_init(p->db, 0, 0);
+-    sqlite3_shathree_init(p->db, 0, 0);
+-    sqlite3_completion_init(p->db, 0, 0);
+-    sqlite3_uint_init(p->db, 0, 0);
+-    sqlite3_decimal_init(p->db, 0, 0);
+-    sqlite3_ieee_init(p->db, 0, 0);
+-    sqlite3_series_init(p->db, 0, 0);
+-#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
+-    sqlite3_dbdata_init(p->db, 0, 0);
+-#endif
+-#ifdef SQLITE_HAVE_ZLIB
+-    sqlite3_zipfile_init(p->db, 0, 0);
+-    sqlite3_sqlar_init(p->db, 0, 0);
+-#endif
+     sqlite3_create_function(p->db, "shell_add_schema", 3, SQLITE_UTF8, 0,
+                             shellAddSchemaName, 0, 0);
+     sqlite3_create_function(p->db, "shell_module_schema", 1, SQLITE_UTF8, 0,
+@@ -6644,8 +6617,6 @@
+         );
+         goto end_ar_command;
+       }
+-      sqlite3_fileio_init(cmd.db, 0, 0);
+-      sqlite3_sqlar_init(cmd.db, 0, 0);
+       sqlite3_create_function(cmd.db, "shell_putsnl", 1, SQLITE_UTF8, cmd.p,
+                               shellPutsFunc, 0, 0);
+ 
+@@ -11108,6 +11079,7 @@
+ #endif
+   }
+   data.out = stdout;
++  extern int sqlite3_appendvfs_init(sqlite3 *, char **, const sqlite3_api_routines *);
+   sqlite3_appendvfs_init(0,0,0);
+ 
+   /* Go ahead and open the database file if it already exists.  If the
+--- /src/test_config.c
++++ /src/test_config.c
+@@ -359,6 +359,8 @@
+   Tcl_SetVar2(interp, "sqlite_options", "datetime", "1", TCL_GLOBAL_ONLY);
+ #endif
+ 
++  Tcl_SetVar2(interp, "sqlite_options", "decimal", "1", TCL_GLOBAL_ONLY);
++
+ #ifdef SQLITE_OMIT_DECLTYPE
+   Tcl_SetVar2(interp, "sqlite_options", "decltype", "0", TCL_GLOBAL_ONLY);
+ #else
+@@ -546,6 +548,8 @@
+   Tcl_SetVar2(interp, "sqlite_options", "progress", "1", TCL_GLOBAL_ONLY);
+ #endif
+ 
++  Tcl_SetVar2(interp, "sqlite_options", "regexp", "1", TCL_GLOBAL_ONLY);
++
+ #ifdef SQLITE_OMIT_REINDEX
+   Tcl_SetVar2(interp, "sqlite_options", "reindex", "0", TCL_GLOBAL_ONLY);
+ #else
+@@ -668,6 +672,8 @@
+   Tcl_SetVar2(interp, "sqlite_options", "truncate_opt", "1", TCL_GLOBAL_ONLY);
+ #endif
+ 
++  Tcl_SetVar2(interp, "sqlite_options", "uint", "1", TCL_GLOBAL_ONLY);
++
+ #ifdef SQLITE_OMIT_UTF16
+   Tcl_SetVar2(interp, "sqlite_options", "utf16", "0", TCL_GLOBAL_ONLY);
+ #else
+--- /test/e_expr.test
++++ /test/e_expr.test
+@@ -1079,7 +1079,7 @@
+ #
+ #   There is a regexp function if ICU is enabled though.
+ #
+-ifcapable !icu {
++ifcapable !icu&&!regexp {
+   do_catchsql_test e_expr-18.1.1 { 
+     SELECT regexp('abc', 'def') 
+   } {1 {no such function: regexp}}
+--- /test/icu.test
++++ /test/icu.test
+@@ -41,7 +41,7 @@
+   #
+   test_expr icu-1.1 {i1='hello'} {i1 REGEXP 'hello'}  1
+   test_expr icu-1.2 {i1='hello'} {i1 REGEXP '.ello'}  1
+-  test_expr icu-1.3 {i1='hello'} {i1 REGEXP '.ell'}   0
++  test_expr icu-1.3 {i1='hello'} {i1 REGEXP '.ell$'}  0
+   test_expr icu-1.4 {i1='hello'} {i1 REGEXP '.ell.*'} 1
+   test_expr icu-1.5 {i1=NULL}    {i1 REGEXP '.ell.*'} {}
+ 
+--- /test/pragma.test
++++ /test/pragma.test
+@@ -1370,17 +1370,62 @@
+ } ;# ifcapable trigger
+ 
+ ifcapable schema_pragmas {
+-  do_test pragma-11.1 {
+-    execsql2 {
+-      pragma collation_list;
++  ifcapable decimal {
++    ifcapable uint {
++      do_test pragma-11.1 {
++        execsql2 {
++          pragma collation_list;
++        }
++      } {seq 0 name UINT seq 1 name decimal seq 2 name RTRIM seq 3 name NOCASE seq 4 name BINARY}
++      do_test pragma-11.2 {
++        db collate New_Collation blah...
++        execsql {
++          pragma collation_list;
++        }
++      } {0 New_Collation 1 UINT 2 decimal 3 RTRIM 4 NOCASE 5 BINARY}
+     }
+-  } {seq 0 name RTRIM seq 1 name NOCASE seq 2 name BINARY}
+-  do_test pragma-11.2 {
+-    db collate New_Collation blah...
+-    execsql {
+-      pragma collation_list;
++    ifcapable !uint {
++      do_test pragma-11.1 {
++        execsql2 {
++          pragma collation_list;
++        }
++      } {seq 0 name decimal seq 1 name RTRIM seq 2 name NOCASE seq 3 name BINARY}
++      do_test pragma-11.2 {
++        db collate New_Collation blah...
++        execsql {
++          pragma collation_list;
++        }
++      } {0 New_Collation 1 decimal 2 RTRIM 3 NOCASE 4 BINARY}
+     }
+-  } {0 New_Collation 1 RTRIM 2 NOCASE 3 BINARY}
++  }
++  ifcapable !decimal {
++    ifcapable uint {
++      do_test pragma-11.1 {
++        execsql2 {
++          pragma collation_list;
++        }
++      } {seq 0 name UINT seq 1 name RTRIM seq 2 name NOCASE seq 3 name BINARY}
++      do_test pragma-11.2 {
++        db collate New_Collation blah...
++        execsql {
++          pragma collation_list;
++        }
++      } {0 New_Collation 1 UINT 2 RTRIM 3 NOCASE 4 BINARY}
++    }
++    ifcapable !uint {
++      do_test pragma-11.1 {
++        execsql2 {
++          pragma collation_list;
++        }
++      } {seq 0 name RTRIM seq 1 name NOCASE seq 2 name BINARY}
++      do_test pragma-11.2 {
++        db collate New_Collation blah...
++        execsql {
++          pragma collation_list;
++        }
++      } {0 New_Collation 1 RTRIM 2 NOCASE 3 BINARY}
++    }
++  }
+ }
+ 
+ ifcapable schema_pragmas&&tempdb {
+--- /test/sessionfuzz.c
++++ /test/sessionfuzz.c
+@@ -698,49 +698,6 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <assert.h>
+-#ifndef OMIT_ZLIB
+-#include "zlib.h"
+-#endif
+-
+-/*
+-** Implementation of the "sqlar_uncompress(X,SZ)" SQL function
+-**
+-** Parameter SZ is interpreted as an integer. If it is less than or
+-** equal to zero, then this function returns a copy of X. Or, if
+-** SZ is equal to the size of X when interpreted as a blob, also
+-** return a copy of X. Otherwise, decompress blob X using zlib
+-** utility function uncompress() and return the results (another
+-** blob).
+-*/
+-static void sqlarUncompressFunc(
+-  sqlite3_context *context,
+-  int argc,
+-  sqlite3_value **argv
+-){
+-#ifdef OMIT_ZLIB
+-  sqlite3_result_value(context, argv[0]);
+-#else
+-  uLong nData;
+-  uLongf sz;
+-
+-  assert( argc==2 );
+-  sz = sqlite3_value_int(argv[1]);
+-
+-  if( sz<=0 || sz==(nData = sqlite3_value_bytes(argv[0])) ){
+-    sqlite3_result_value(context, argv[0]);
+-  }else{
+-    const Bytef *pData= sqlite3_value_blob(argv[0]);
+-    Bytef *pOut = sqlite3_malloc(sz);
+-    if( Z_OK!=uncompress(pOut, &sz, pData, nData) ){
+-      sqlite3_result_error(context, "error in uncompress()", -1);
+-    }else{
+-      sqlite3_result_blob(context, pOut, sz, SQLITE_TRANSIENT);
+-    }
+-    sqlite3_free(pOut);
+-  }
+-#endif
+-}
+-
+ 
+ /* Run a chunk of SQL.  If any errors happen, print an error message
+ ** and exit.
+--- /tool/mksqlite3c.tcl
++++ /tool/mksqlite3c.tcl
+@@ -129,6 +129,7 @@
+    rtree.h
+    sqlite3session.h
+    sqlite3.h
++   sqlite3expert.h
+    sqlite3ext.h
+    sqlite3rbu.h
+    sqliteicu.h
+@@ -416,6 +417,28 @@
+    sqlite3session.c
+    fts5.c
+    stmt.c
++   amatch.c
++   appendvfs.c
++   carray.c
++   completion.c
++   csv.c
++   dbdata.c
++   decimal.c
++   eval.c
++   fileio.c
++   ieee754.c
++   nextchar.c
++   percentile.c
++   regexp.c
++   series.c
++   sha1.c
++   shathree.c
++   sqlar.c
++   sqlite3expert.c
++   totype.c
++   uint.c
++   uuid.c
++   zipfile.c
+ } {
+   copy_file tsrc/$file
+ }
+--- /tool/sqlite3_analyzer.c.in
++++ /tool/sqlite3_analyzer.c.in
+@@ -14,9 +14,6 @@
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+ #define SQLITE_OMIT_LOAD_EXTENSION 1
+-#ifndef USE_EXTERNAL_SQLITE
+-INCLUDE sqlite3.c
+-#endif
+ INCLUDE $ROOT/src/tclsqlite.c
+ 
+ const char *sqlite3_analyzer_init_proc(Tcl_Interp *interp){
+--- /tool/sqltclsh.c.in
++++ /tool/sqltclsh.c.in
+@@ -27,21 +27,13 @@
+ #define SQLITE_OMIT_SHARED_CACHE 1
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+-INCLUDE sqlite3.c
+-INCLUDE $ROOT/ext/misc/appendvfs.c
+-#ifdef SQLITE_HAVE_ZLIB
+-INCLUDE $ROOT/ext/misc/zipfile.c
+-INCLUDE $ROOT/ext/misc/sqlar.c
+-#endif
++#include "sqlite3.h"
+ INCLUDE $ROOT/src/tclsqlite.c
+ 
+ const char *sqlite3_tclapp_init_proc(Tcl_Interp *interp){
+   (void)interp;
++  extern int sqlite3_appendvfs_init(sqlite3 *,char **, const sqlite3_api_routines *);
+   sqlite3_appendvfs_init(0,0,0);
+-#ifdef SQLITE_HAVE_ZLIB
+-  sqlite3_auto_extension((void(*)(void))sqlite3_sqlar_init);
+-  sqlite3_auto_extension((void(*)(void))sqlite3_zipfile_init);
+-#endif
+ 
+   return
+ BEGIN_STRING
diff --git a/dev-db/sqlite/metadata.xml b/dev-db/sqlite/metadata.xml
index c7b127a..67b1888 100644
--- a/dev-db/sqlite/metadata.xml
+++ b/dev-db/sqlite/metadata.xml
@@ -1,14 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
-	<maintainer type="person">
+	<maintainer type="person" proxied="yes">
 		<email>arfrever.fta@gmail.com</email>
 		<name>Arfrever Frehtes Taifersar Arahesis</name>
 	</maintainer>
-	<maintainer type="person">
+	<maintainer type="person" proxied="proxy">
 		<email>floppym@gentoo.org</email>
 		<name>Mike Gilbert</name>
-		<description>Proxy</description>
 	</maintainer>
 	<use>
 		<flag name="secure-delete">Enable overwriting of deleted content with zeros by default (http://sqlite.org/pragma.html#pragma_secure_delete), causing some performance penalty</flag>
diff --git a/dev-db/sqlite/sqlite-3.32.3-r2.ebuild b/dev-db/sqlite/sqlite-3.32.3-r2.ebuild
deleted file mode 120000
index 50c9052..0000000
--- a/dev-db/sqlite/sqlite-3.32.3-r2.ebuild
+++ /dev/null
@@ -1 +0,0 @@
-sqlite-3.32.3.ebuild
\ No newline at end of file
diff --git a/dev-db/sqlite/sqlite-3.32.3.ebuild b/dev-db/sqlite/sqlite-3.32.3.ebuild
deleted file mode 100644
index b81249d..0000000
--- a/dev-db/sqlite/sqlite-3.32.3.ebuild
+++ /dev/null
@@ -1,340 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-inherit autotools flag-o-matic multilib-minimal toolchain-funcs
-
-if [[ "${PV}" != "9999" ]]; then
-	SRC_PV="$(printf "%u%02u%02u%02u" $(ver_rs 1- " "))"
-	DOC_PV="${SRC_PV}"
-	# DOC_PV="$(printf "%u%02u%02u00" $(ver_rs 1-3 " "))"
-fi
-
-DESCRIPTION="SQL database engine"
-HOMEPAGE="https://sqlite.org/"
-if [[ "${PV}" == "9999" ]]; then
-	SRC_URI=""
-else
-	SRC_URI="https://sqlite.org/2020/${PN}-src-${SRC_PV}.zip
-		doc? ( https://sqlite.org/2020/${PN}-doc-${DOC_PV}.zip )"
-fi
-
-LICENSE="public-domain"
-SLOT="3"
-KEYWORDS="*"
-IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
-if [[ "${PV}" == "9999" ]]; then
-	PROPERTIES="live"
-fi
-RESTRICT="!test? ( test )"
-
-if [[ "${PV}" == "9999" ]]; then
-	BDEPEND=">=dev-lang/tcl-8.6:0
-		dev-vcs/fossil"
-else
-	BDEPEND="app-arch/unzip
-		>=dev-lang/tcl-8.6:0"
-fi
-RDEPEND="sys-libs/zlib:0=[${MULTILIB_USEDEP}]
-	icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
-	readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
-	tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
-	tools? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
-	test? ( >=dev-lang/tcl-8.6:0[${MULTILIB_USEDEP}] )"
-
-if [[ "${PV}" == "9999" ]]; then
-	S="${WORKDIR}/${PN}"
-else
-	S="${WORKDIR}/${PN}-src-${SRC_PV}"
-fi
-
-src_unpack() {
-	if [[ "${PV}" == "9999" ]]; then
-		local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}"
-		addwrite "${distdir}"
-		mkdir -p "${distdir}/fossil-src/${PN}" || die
-
-		mkdir "${WORKDIR}/${PN}" || die
-		pushd "${WORKDIR}/${PN}" > /dev/null || die
-		if [[ ! -f "${distdir}/fossil-src/${PN}/sqlite.fossil" ]]; then
-			einfo fossil clone --verbose https://sqlite.org/src sqlite.fossil
-			fossil clone --verbose https://sqlite.org/src sqlite.fossil || die
-			echo
-		else
-			cp -p "${distdir}/fossil-src/${PN}/sqlite.fossil" . || die
-			einfo fossil pull --repository sqlite.fossil --verbose https://sqlite.org/src
-			fossil pull --repository sqlite.fossil --verbose https://sqlite.org/src || die
-			echo
-		fi
-		cp -p sqlite.fossil "${distdir}/fossil-src/${PN}" || die
-		einfo fossil open --quiet sqlite.fossil
-		fossil open --quiet sqlite.fossil || die
-		echo
-		popd > /dev/null || die
-
-		if use doc; then
-			mkdir "${WORKDIR}/${PN}-doc" || die
-			pushd "${WORKDIR}/${PN}-doc" > /dev/null || die
-			if [[ ! -f "${distdir}/fossil-src/${PN}/sqlite-doc.fossil" ]]; then
-				einfo fossil clone --verbose https://sqlite.org/docsrc sqlite-doc.fossil
-				fossil clone --verbose https://sqlite.org/docsrc sqlite-doc.fossil || die
-				echo
-			else
-				cp -p "${distdir}/fossil-src/${PN}/sqlite-doc.fossil" . || die
-				einfo fossil pull --repository sqlite-doc.fossil --verbose https://sqlite.org/docsrc
-				fossil pull --repository sqlite-doc.fossil --verbose https://sqlite.org/docsrc || die
-				echo
-			fi
-			cp -p sqlite-doc.fossil "${distdir}/fossil-src/${PN}" || die
-			einfo fossil open --quiet sqlite-doc.fossil
-			fossil open --quiet sqlite-doc.fossil || die
-			echo
-			popd > /dev/null || die
-		fi
-	else
-		default
-	fi
-}
-
-src_prepare() {
-	eapply "${FILESDIR}/${PN}-3.32.1-full_archive-build_1.patch"
-	eapply "${FILESDIR}/${PN}-3.32.1-full_archive-build_2.patch"
-	eapply "${FILESDIR}/${PN}-3.32.3-security_fixes.patch"
-
-	eapply_user
-
-	# Fix AC_CHECK_FUNCS.
-	# https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
-	sed -e "s/AC_CHECK_FUNCS(.*)/AC_CHECK_FUNCS([fdatasync fullfsync gmtime_r isnan localtime_r localtime_s malloc_usable_size posix_fallocate pread pread64 pwrite pwrite64 strchrnul usleep utime])/" -i configure.ac || die "sed failed"
-
-	eautoreconf
-
-	multilib_copy_sources
-}
-
-multilib_src_configure() {
-	local -x CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}"
-	local options=()
-
-	options+=(
-		--enable-load-extension
-		--enable-threadsafe
-	)
-
-	# Support detection of misuse of SQLite API.
-	# https://sqlite.org/compile.html#enable_api_armor
-	append-cppflags -DSQLITE_ENABLE_API_ARMOR
-
-	# Support bytecode and tables_used virtual tables.
-	# https://sqlite.org/bytecodevtab.html
-	append-cppflags -DSQLITE_ENABLE_BYTECODE_VTAB
-
-	# Support column metadata functions.
-	# https://sqlite.org/c3ref/column_database_name.html
-	append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
-
-	# Support sqlite_dbpage virtual table.
-	# https://sqlite.org/dbpage.html
-	append-cppflags -DSQLITE_ENABLE_DBPAGE_VTAB
-
-	# Support dbstat virtual table.
-	# https://sqlite.org/dbstat.html
-	append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
-
-	# Support sqlite3_serialize() and sqlite3_deserialize() functions.
-	# https://sqlite.org/c3ref/serialize.html
-	# https://sqlite.org/c3ref/deserialize.html
-	append-cppflags -DSQLITE_ENABLE_DESERIALIZE
-
-	# Support comments in output of EXPLAIN.
-	# https://sqlite.org/compile.html#enable_explain_comments
-	append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
-
-	# Support Full-Text Search versions 3, 4 and 5.
-	# https://sqlite.org/fts3.html
-	# https://sqlite.org/fts5.html
-	append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
-	options+=(--enable-fts5)
-
-	# Support hidden columns.
-	append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
-
-	# Support JSON1 extension.
-	# https://sqlite.org/json1.html
-	append-cppflags -DSQLITE_ENABLE_JSON1
-
-	# Support memsys5 memory allocator.
-	# https://sqlite.org/malloc.html#memsys5
-	append-cppflags -DSQLITE_ENABLE_MEMSYS5
-
-	# Support sqlite3_normalized_sql() function.
-	# https://sqlite.org/c3ref/expanded_sql.html
-	append-cppflags -DSQLITE_ENABLE_NORMALIZE
-
-	# Support sqlite_offset() function.
-	# https://sqlite.org/lang_corefunc.html#sqlite_offset
-	append-cppflags -DSQLITE_ENABLE_OFFSET_SQL_FUNC
-
-	# Support pre-update hook functions.
-	# https://sqlite.org/c3ref/preupdate_count.html
-	append-cppflags -DSQLITE_ENABLE_PREUPDATE_HOOK
-
-	# Support Resumable Bulk Update extension.
-	# https://sqlite.org/rbu.html
-	append-cppflags -DSQLITE_ENABLE_RBU
-
-	# Support R*Trees.
-	# https://sqlite.org/rtree.html
-	# https://sqlite.org/geopoly.html
-	append-cppflags -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_GEOPOLY
-
-	# Support scan status functions.
-	# https://sqlite.org/c3ref/stmt_scanstatus.html
-	# https://sqlite.org/c3ref/stmt_scanstatus_reset.html
-	append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
-
-	# Support sqlite_stmt virtual table.
-	# https://sqlite.org/stmt.html
-	append-cppflags -DSQLITE_ENABLE_STMTVTAB
-
-	# Support Session extension.
-	# https://sqlite.org/sessionintro.html
-	options+=(--enable-session)
-
-	# Support unknown() function.
-	# https://sqlite.org/compile.html#enable_unknown_sql_function
-	append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
-
-	# Support unlock notification.
-	# https://sqlite.org/unlock_notify.html
-	append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
-
-	# Support LIMIT and ORDER BY clauses on DELETE and UPDATE statements.
-	# https://sqlite.org/lang_delete.html#optional_limit_and_order_by_clauses
-	# https://sqlite.org/lang_update.html#optional_limit_and_order_by_clauses
-	append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
-
-	# Support soundex() function.
-	# https://sqlite.org/lang_corefunc.html#soundex
-	append-cppflags -DSQLITE_SOUNDEX
-
-	# Support URI filenames.
-	# https://sqlite.org/uri.html
-	append-cppflags -DSQLITE_USE_URI
-
-	# debug USE flag.
-	options+=($(use_enable debug))
-
-	# icu USE flag.
-	if use icu; then
-		# Support ICU extension.
-		# https://sqlite.org/compile.html#enable_icu
-		append-cppflags -DSQLITE_ENABLE_ICU
-		sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
-	fi
-
-	# readline USE flag.
-	options+=(
-		--disable-editline
-		$(use_enable readline)
-	)
-	if use readline; then
-		options+=(--with-readline-inc="-I${ESYSROOT}/usr/include/readline")
-	fi
-
-	# secure-delete USE flag.
-	if use secure-delete; then
-		# Enable secure_delete pragma by default.
-		# https://sqlite.org/pragma.html#pragma_secure_delete
-		append-cppflags -DSQLITE_SECURE_DELETE
-	fi
-
-	# static-libs USE flag.
-	options+=($(use_enable static-libs static))
-
-	# tcl, test, tools USE flags.
-	options+=(--enable-tcl)
-
-	if [[ "${CHOST}" == *-mint* ]]; then
-		append-cppflags -DSQLITE_OMIT_WAL
-	fi
-
-	if [[ "${ABI}" == "x86" ]]; then
-		if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then
-			append-cflags -mfpmath=sse
-		else
-			append-cflags -ffloat-store
-		fi
-	fi
-
-	econf "${options[@]}"
-}
-
-multilib_src_compile() {
-	emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
-
-	if use tools && multilib_is_native_abi; then
-		emake changeset dbdump dbhash dbtotxt index_usage rbu scrub showdb showjournal showshm showstat4 showwal sqldiff sqlite3_analyzer sqlite3_checker sqlite3_expert sqltclsh
-	fi
-}
-
-multilib_src_test() {
-	if [[ "${EUID}" -eq 0 ]]; then
-		ewarn "Skipping tests due to root permissions"
-		return
-	fi
-
-	local -x SQLITE_HISTORY="${T}/sqlite_history_${ABI}"
-
-	emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
-}
-
-multilib_src_install() {
-	emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
-
-	if use tools && multilib_is_native_abi; then
-		install_tool() {
-			if [[ -f ".libs/${1}" ]]; then
-				newbin ".libs/${1}" "${2}"
-			else
-				newbin "${1}" "${2}"
-			fi
-		}
-
-		install_tool changeset sqlite3-changeset
-		install_tool dbdump sqlite3-db-dump
-		install_tool dbhash sqlite3-db-hash
-		install_tool dbtotxt sqlite3-db-to-txt
-		install_tool index_usage sqlite3-index-usage
-		install_tool rbu sqlite3-rbu
-		install_tool scrub sqlite3-scrub
-		install_tool showdb sqlite3-show-db
-		install_tool showjournal sqlite3-show-journal
-		install_tool showshm sqlite3-show-shm
-		install_tool showstat4 sqlite3-show-stat4
-		install_tool showwal sqlite3-show-wal
-		install_tool sqldiff sqlite3-diff
-		install_tool sqlite3_analyzer sqlite3-analyzer
-		install_tool sqlite3_checker sqlite3-checker
-		install_tool sqlite3_expert sqlite3-expert
-		install_tool sqltclsh sqlite3-tclsh
-
-		unset -f install_tool
-	fi
-}
-
-multilib_src_install_all() {
-	find "${D}" -name "*.la" -type f -delete || die
-
-	doman sqlite3.1
-
-	if use doc; then
-		rm "${WORKDIR}/${PN}-doc-${DOC_PV}/"*.{db,txt} || die
-		(
-			docinto html
-			dodoc -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"*
-		)
-	fi
-}
diff --git a/dev-db/sqlite/sqlite-3.34.1.ebuild b/dev-db/sqlite/sqlite-3.34.1.ebuild
new file mode 100644
index 0000000..e2730e4
--- /dev/null
+++ b/dev-db/sqlite/sqlite-3.34.1.ebuild
@@ -0,0 +1,434 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit autotools flag-o-matic multilib-minimal toolchain-funcs
+
+if [[ "${PV}" != "9999" ]]; then
+	SRC_PV="$(printf "%u%02u%02u%02u" $(ver_rs 1- " "))"
+	DOC_PV="${SRC_PV}"
+	# DOC_PV="$(printf "%u%02u%02u00" $(ver_rs 1-3 " "))"
+fi
+
+DESCRIPTION="SQL database engine"
+HOMEPAGE="https://sqlite.org/"
+if [[ "${PV}" == "9999" ]]; then
+	SRC_URI=""
+else
+	SRC_URI="https://sqlite.org/2021/${PN}-src-${SRC_PV}.zip
+		doc? ( https://sqlite.org/2021/${PN}-doc-${DOC_PV}.zip )"
+fi
+
+LICENSE="public-domain"
+SLOT="3"
+KEYWORDS="*"
+IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
+if [[ "${PV}" == "9999" ]]; then
+	PROPERTIES="live"
+fi
+RESTRICT="!test? ( test )"
+
+if [[ "${PV}" == "9999" ]]; then
+	BDEPEND=">=dev-lang/tcl-8.6:0
+		dev-vcs/fossil"
+else
+	BDEPEND="app-arch/unzip
+		>=dev-lang/tcl-8.6:0"
+fi
+RDEPEND="sys-libs/zlib:0=[${MULTILIB_USEDEP}]
+	icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
+	readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
+	tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
+	tools? ( dev-lang/tcl:0= )"
+DEPEND="${RDEPEND}
+	test? ( >=dev-lang/tcl-8.6:0[${MULTILIB_USEDEP}] )"
+
+if [[ "${PV}" == "9999" ]]; then
+	S="${WORKDIR}/${PN}"
+else
+	S="${WORKDIR}/${PN}-src-${SRC_PV}"
+fi
+
+_fossil_fetch() {
+	local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}"
+	local repo_id="${1}"
+	local repo_uri="${2}"
+
+	local -x FOSSIL_HOME="${HOME}"
+
+	mkdir -p "${T}/fossil/${repo_id}" || die
+	pushd "${T}/fossil/${repo_id}" > /dev/null || die
+
+	if [[ -n "${EVCS_OFFLINE}" ]]; then
+		if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then
+			die "Network activity disabled using EVCS_OFFLINE and clone of repository missing: \"${distdir}/fossil-src/${repo_id}/${repo_id}.fossil\""
+		fi
+	else
+		if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then
+			einfo fossil clone --verbose "${repo_uri}" "${repo_id}.fossil"
+			fossil clone --verbose "${repo_uri}" "${repo_id}.fossil" || die
+			echo
+		else
+			cp -p "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" . || die
+			einfo fossil pull --repository "${repo_id}.fossil" --verbose "${repo_uri}"
+			fossil pull --repository "${repo_id}.fossil" --verbose "${repo_uri}" || die
+			echo
+		fi
+
+		(
+			addwrite "${distdir}"
+			mkdir -p "${distdir}/fossil-src/${repo_id}" || die
+			cp -p "${repo_id}.fossil" "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" || die
+		)
+	fi
+
+	popd > /dev/null || die
+}
+
+_fossil_checkout() {
+	local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}"
+	local repo_id="${1}"
+	local branch_or_commit="${2}"
+	local target_directory="${3}"
+
+	local -x FOSSIL_HOME="${HOME}"
+
+	if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then
+		die "Clone of repository missing: \"${distdir}/fossil-src/${repo_id}/${repo_id}.fossil\""
+	fi
+
+	if [[ ! -f "${T}/fossil/${repo_id}/${repo_id}.fossil" ]]; then
+		mkdir -p "${T}/fossil/${repo_id}" || die
+		cp -p "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" "${T}/fossil/${repo_id}" || die
+	fi
+
+	mkdir "${target_directory}" || die
+	pushd "${target_directory}" > /dev/null || die
+
+	einfo fossil open --quiet "${T}/fossil/${repo_id}/${repo_id}.fossil" "${branch_or_commit}"
+	fossil open --quiet "${T}/fossil/${repo_id}/${repo_id}.fossil" "${branch_or_commit}" || die
+	echo
+
+	popd > /dev/null || die
+}
+
+fossil_fetch() {
+	local repo_id="${1}"
+	local repo_uri="${2}"
+	local target_directory="${3}"
+
+	local branch_or_commit="${EFOSSIL_COMMIT:-${EFOSSIL_BRANCH:-trunk}}"
+
+	_fossil_fetch "${repo_id}" "${repo_uri}"
+	_fossil_checkout "${repo_id}" "${branch_or_commit}" "${target_directory}"
+}
+
+src_unpack() {
+	if [[ "${PV}" == "9999" ]]; then
+		fossil_fetch sqlite https://sqlite.org/src "${WORKDIR}/${PN}"
+		if use doc; then
+			fossil_fetch sqlite-doc https://sqlite.org/docsrc "${WORKDIR}/${PN}-doc"
+		fi
+	else
+		default
+	fi
+}
+
+src_prepare() {
+	eapply "${FILESDIR}/"${PN}-3.34.1-build_{1.1,1.2,2.1,2.2}.patch
+
+	eapply_user
+
+	eautoreconf
+
+	multilib_copy_sources
+}
+
+multilib_src_configure() {
+	local -x CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}"
+	local options=()
+
+	options+=(
+		--enable-load-extension
+		--enable-threadsafe
+	)
+
+	# Support detection of misuse of SQLite API.
+	# https://sqlite.org/compile.html#enable_api_armor
+	append-cppflags -DSQLITE_ENABLE_API_ARMOR
+
+	# Support bytecode and tables_used virtual tables.
+	# https://sqlite.org/compile.html#enable_bytecode_vtab
+	# https://sqlite.org/bytecodevtab.html
+	append-cppflags -DSQLITE_ENABLE_BYTECODE_VTAB
+
+	# Support column metadata functions.
+	# https://sqlite.org/compile.html#enable_column_metadata
+	# https://sqlite.org/c3ref/column_database_name.html
+	append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
+
+	# Support sqlite_dbpage virtual table.
+	# https://sqlite.org/compile.html#enable_dbpage_vtab
+	# https://sqlite.org/dbpage.html
+	append-cppflags -DSQLITE_ENABLE_DBPAGE_VTAB
+
+	# Support dbstat virtual table.
+	# https://sqlite.org/compile.html#enable_dbstat_vtab
+	# https://sqlite.org/dbstat.html
+	append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
+
+	# Support sqlite3_serialize() and sqlite3_deserialize() functions.
+	# https://sqlite.org/compile.html#enable_deserialize
+	# https://sqlite.org/c3ref/serialize.html
+	# https://sqlite.org/c3ref/deserialize.html
+	append-cppflags -DSQLITE_ENABLE_DESERIALIZE
+
+	# Support comments in output of EXPLAIN.
+	# https://sqlite.org/compile.html#enable_explain_comments
+	append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
+
+	# Support Full-Text Search versions 3, 4 and 5.
+	# https://sqlite.org/compile.html#enable_fts3
+	# https://sqlite.org/compile.html#enable_fts3_parenthesis
+	# https://sqlite.org/compile.html#enable_fts4
+	# https://sqlite.org/compile.html#enable_fts5
+	# https://sqlite.org/fts3.html
+	# https://sqlite.org/fts5.html
+	append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
+	options+=(--enable-fts5)
+
+	# Support hidden columns.
+	append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
+
+	# Support JSON1 extension.
+	# https://sqlite.org/compile.html#enable_json1
+	# https://sqlite.org/json1.html
+	append-cppflags -DSQLITE_ENABLE_JSON1
+
+	# Support memsys5 memory allocator.
+	# https://sqlite.org/compile.html#enable_memsys5
+	# https://sqlite.org/malloc.html#memsys5
+	append-cppflags -DSQLITE_ENABLE_MEMSYS5
+
+	# Support sqlite3_normalized_sql() function.
+	# https://sqlite.org/c3ref/expanded_sql.html
+	append-cppflags -DSQLITE_ENABLE_NORMALIZE
+
+	# Support sqlite_offset() function.
+	# https://sqlite.org/compile.html#enable_offset_sql_func
+	# https://sqlite.org/lang_corefunc.html#sqlite_offset
+	append-cppflags -DSQLITE_ENABLE_OFFSET_SQL_FUNC
+
+	# Support pre-update hook functions.
+	# https://sqlite.org/compile.html#enable_preupdate_hook
+	# https://sqlite.org/c3ref/preupdate_count.html
+	append-cppflags -DSQLITE_ENABLE_PREUPDATE_HOOK
+
+	# Support Resumable Bulk Update extension.
+	# https://sqlite.org/compile.html#enable_rbu
+	# https://sqlite.org/rbu.html
+	append-cppflags -DSQLITE_ENABLE_RBU
+
+	# Support R*Trees.
+	# https://sqlite.org/compile.html#enable_rtree
+	# https://sqlite.org/compile.html#enable_geopoly
+	# https://sqlite.org/rtree.html
+	# https://sqlite.org/geopoly.html
+	append-cppflags -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_GEOPOLY
+
+	# Support Session extension.
+	# https://sqlite.org/compile.html#enable_session
+	# https://sqlite.org/sessionintro.html
+	append-cppflags -DSQLITE_ENABLE_SESSION
+
+	# Support scan status functions.
+	# https://sqlite.org/compile.html#enable_stmt_scanstatus
+	# https://sqlite.org/c3ref/stmt_scanstatus.html
+	# https://sqlite.org/c3ref/stmt_scanstatus_reset.html
+	append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
+
+	# Support sqlite_stmt virtual table.
+	# https://sqlite.org/compile.html#enable_stmtvtab
+	# https://sqlite.org/stmt.html
+	append-cppflags -DSQLITE_ENABLE_STMTVTAB
+
+	# Support unknown() function.
+	# https://sqlite.org/compile.html#enable_unknown_sql_function
+	append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
+
+	# Support unlock notification.
+	# https://sqlite.org/compile.html#enable_unlock_notify
+	# https://sqlite.org/c3ref/unlock_notify.html
+	# https://sqlite.org/unlock_notify.html
+	append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
+
+	# Support LIMIT and ORDER BY clauses on DELETE and UPDATE statements.
+	# https://sqlite.org/compile.html#enable_update_delete_limit
+	# https://sqlite.org/lang_delete.html#optional_limit_and_order_by_clauses
+	# https://sqlite.org/lang_update.html#optional_limit_and_order_by_clauses
+	append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
+
+	# Support soundex() function.
+	# https://sqlite.org/compile.html#soundex
+	# https://sqlite.org/lang_corefunc.html#soundex
+	append-cppflags -DSQLITE_SOUNDEX
+
+	# Support URI filenames.
+	# https://sqlite.org/compile.html#use_uri
+	# https://sqlite.org/uri.html
+	append-cppflags -DSQLITE_USE_URI
+
+	# debug USE flag.
+	options+=($(use_enable debug))
+
+	# icu USE flag.
+	if use icu; then
+		# Support ICU extension.
+		# https://sqlite.org/compile.html#enable_icu
+		append-cppflags -DSQLITE_ENABLE_ICU
+		sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+	fi
+
+	# readline USE flag.
+	options+=(
+		--disable-editline
+		$(use_enable readline)
+	)
+	if use readline; then
+		options+=(--with-readline-inc="-I${ESYSROOT}/usr/include/readline")
+	fi
+
+	# secure-delete USE flag.
+	if use secure-delete; then
+		# Enable secure_delete pragma by default.
+		# https://sqlite.org/compile.html#secure_delete
+		# https://sqlite.org/pragma.html#pragma_secure_delete
+		append-cppflags -DSQLITE_SECURE_DELETE
+	fi
+
+	# static-libs USE flag.
+	options+=($(use_enable static-libs static))
+
+	# tcl, test, tools USE flags.
+	if use tcl || use test || { use tools && multilib_is_native_abi; }; then
+		options+=(
+			--enable-tcl
+			--with-tcl="${ESYSROOT}/usr/$(get_libdir)"
+		)
+	else
+		options+=(--disable-tcl)
+	fi
+
+	if [[ "${CHOST}" == *-mint* ]]; then
+		# sys/mman.h not available in MiNTLib.
+		# https://sqlite.org/compile.html#omit_wal
+		append-cppflags -DSQLITE_OMIT_WAL
+	fi
+
+	if [[ "${ABI}" == "x86" ]]; then
+		if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then
+			append-cflags -mfpmath=sse
+		else
+			append-cflags -ffloat-store
+		fi
+	fi
+
+	econf "${options[@]}"
+}
+
+multilib_src_compile() {
+	emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
+
+	if use tools && multilib_is_native_abi; then
+		emake changeset dbdump dbhash dbtotxt index_usage rbu scrub showdb showjournal showshm showstat4 showwal sqldiff sqlite3_analyzer sqlite3_checker sqlite3_expert sqltclsh
+	fi
+
+	if [[ "${PV}" == "9999" ]] && use doc && multilib_is_native_abi; then
+		emake tclsqlite3.c
+
+		local build_directory="$(pwd)"
+		build_directory="${build_directory##*/}"
+
+		mkdir "${WORKDIR}/${PN}-doc-build" || die
+		pushd "${WORKDIR}/${PN}-doc-build" > /dev/null || die
+
+		emake -f "../${PN}-doc/Makefile" -j1 SRC="../${PN}" BLD="../${build_directory}" DOC="../${PN}-doc" CC="$(tc-getBUILD_CC)" TCLINC="" TCLFLAGS="$($(tc-getBUILD_PKG_CONFIG) --libs tcl) -ldl -lm" base doc
+		rmdir doc/matrix{/*,} || die
+
+		popd > /dev/null || die
+	fi
+}
+
+multilib_src_test() {
+	if [[ "${EUID}" -eq 0 ]]; then
+		ewarn "Skipping tests due to root permissions"
+		return
+	fi
+
+	local -x SQLITE_HISTORY="${T}/sqlite_history_${ABI}"
+
+	emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
+}
+
+multilib_src_install() {
+	emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
+
+	if use tools && multilib_is_native_abi; then
+		install_tool() {
+			if [[ -f ".libs/${1}" ]]; then
+				newbin ".libs/${1}" "${2}"
+			else
+				newbin "${1}" "${2}"
+			fi
+		}
+
+		install_tool changeset sqlite3-changeset
+		install_tool dbdump sqlite3-db-dump
+		install_tool dbhash sqlite3-db-hash
+		install_tool dbtotxt sqlite3-db-to-txt
+		install_tool index_usage sqlite3-index-usage
+		install_tool rbu sqlite3-rbu
+		install_tool scrub sqlite3-scrub
+		install_tool showdb sqlite3-show-db
+		install_tool showjournal sqlite3-show-journal
+		install_tool showshm sqlite3-show-shm
+		install_tool showstat4 sqlite3-show-stat4
+		install_tool showwal sqlite3-show-wal
+		install_tool sqldiff sqlite3-diff
+		install_tool sqlite3_analyzer sqlite3-analyzer
+		install_tool sqlite3_checker sqlite3-checker
+		install_tool sqlite3_expert sqlite3-expert
+		install_tool sqltclsh sqlite3-tclsh
+
+		unset -f install_tool
+	fi
+}
+
+multilib_src_install_all() {
+	find "${ED}" -name "*.la" -delete || die
+
+	doman sqlite3.1
+
+	if use doc; then
+		if [[ "${PV}" == "9999" ]]; then
+			pushd "${WORKDIR}/${PN}-doc-build/doc" > /dev/null || die
+		else
+			pushd "${WORKDIR}/${PN}-doc-${DOC_PV}" > /dev/null || die
+		fi
+
+		find "(" -name "*.db" -o -name "*.txt" ")" -delete || die
+		if [[ "${PV}" != "9999" ]]; then
+			rm search search.d/admin || die
+			rmdir search.d || die
+			find -name "*~" -delete || die
+		fi
+
+		(
+			docinto html
+			dodoc -r *
+		)
+
+		popd > /dev/null || die
+	fi
+}
diff --git a/dev-go/go-md2man/Manifest b/dev-go/go-md2man/Manifest
new file mode 100644
index 0000000..d5819c4
--- /dev/null
+++ b/dev-go/go-md2man/Manifest
@@ -0,0 +1 @@
+DIST go-md2man-2.0.0.tar.gz 52021 BLAKE2B d3df2300a28d972b6b7269172a734dda7a60df5c25d8b4a4d9a45a2c636f08286eea4873c32d22a9533ba4e333660e4ec2deabe8fbdb9af3db96c07884278d04 SHA512 22a6c950ca7e386246fadb15f05d0a60437a249df48a7c5f905bc4bd05034cede6318e1158bd2113e97b4fd2d1e838776680a00c6141ac2b3c8795aeee15a39d
diff --git a/dev-go/go-md2man/go-md2man-2.0.0.ebuild b/dev-go/go-md2man/go-md2man-2.0.0.ebuild
new file mode 100644
index 0000000..271ee42
--- /dev/null
+++ b/dev-go/go-md2man/go-md2man-2.0.0.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit go-module
+
+DESCRIPTION="A utility to convert markdown to man pages"
+	SRC_URI="https://github.com/cpuguy83/go-md2man/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+HOMEPAGE="https://github.com/cpuguy83/go-md2man"
+
+LICENSE="BSD-2 MIT"
+SLOT="0"
+KEYWORDS="*"
+
+# restrict tests because they need network-sandbox disabled
+# bug https://bugs.gentoo.org/715028
+RESTRICT+=" test"
+
+src_compile() {
+	emake BUILD_FLAGS="-mod=vendor" build
+}
+
+src_install() {
+	"${S}"/bin/go-md2man -in go-md2man.1.md -out go-md2man.1 ||
+		die "Unable to create man page"
+	dobin bin/go-md2man
+	doman go-md2man.1
+}
+
+src_test() {
+	emake test
+}
diff --git a/dev-go/go-md2man/metadata.xml b/dev-go/go-md2man/metadata.xml
new file mode 100644
index 0000000..18cf7d3
--- /dev/null
+++ b/dev-go/go-md2man/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>williamh@gentoo.org</email>
+		<name>William Hubbs</name>
+	</maintainer>
+	<upstream>
+		<remote-id type="github">cpuguy83/go-md2man</remote-id>
+	</upstream>
+</pkgmetadata>
diff --git a/dev-libs/elfutils/files/elfutils-0.183-CC-quote.patch b/dev-libs/elfutils/files/elfutils-0.183-CC-quote.patch
new file mode 100644
index 0000000..8dc59be
--- /dev/null
+++ b/dev-libs/elfutils/files/elfutils-0.183-CC-quote.patch
@@ -0,0 +1,40 @@
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -528,7 +528,7 @@ installed_TESTS_ENVIRONMENT = libdir=$(DESTDIR)$(libdir); \
+ 			      export LC_ALL; export LANG; export VALGRIND_CMD; \
+ 			      unset DEBUGINFOD_URLS; \
+ 			      NM=$(NM); export NM; \
+-			      CC=$(CC); export CC;
++			      CC="$(CC)"; export CC;
+ installed_LOG_COMPILER = $(abs_srcdir)/test-wrapper.sh \
+ 			 installed $(tests_rpath) \
+ 			 '$(program_transform_name)'
+@@ -540,7 +540,7 @@ TESTS_ENVIRONMENT = LC_ALL=C; LANG=C; VALGRIND_CMD=$(valgrind_cmd); \
+ 		    export LC_ALL; export LANG; export VALGRIND_CMD; \
+ 		    unset DEBUGINFOD_URLS; \
+ 		    NM=$(NM); export NM; \
+-		    CC=$(CC); export CC;
++		    CC="$(CC)"; export CC;
+ LOG_COMPILER = $(abs_srcdir)/test-wrapper.sh \
+ 	       $(abs_top_builddir)/libdw:$(abs_top_builddir)/backends:$(abs_top_builddir)/libelf:$(abs_top_builddir)/libasm:$(abs_top_builddir)/debuginfod
+ 
+--- a/tests/Makefile.in
++++ b/tests/Makefile.in
+@@ -1568,7 +1568,7 @@ installed_TESTS_ENVIRONMENT = libdir=$(DESTDIR)$(libdir); \
+ 			      export LC_ALL; export LANG; export VALGRIND_CMD; \
+ 			      unset DEBUGINFOD_URLS; \
+ 			      NM=$(NM); export NM; \
+-			      CC=$(CC); export CC;
++			      CC="$(CC)"; export CC;
+ 
+ installed_LOG_COMPILER = $(abs_srcdir)/test-wrapper.sh \
+ 			 installed $(tests_rpath) \
+@@ -1582,7 +1582,7 @@ TESTS_ENVIRONMENT = LC_ALL=C; LANG=C; VALGRIND_CMD=$(valgrind_cmd); \
+ 		    export LC_ALL; export LANG; export VALGRIND_CMD; \
+ 		    unset DEBUGINFOD_URLS; \
+ 		    NM=$(NM); export NM; \
+-		    CC=$(CC); export CC;
++		    CC="$(CC)"; export CC;
+ 
+ LOG_COMPILER = $(abs_srcdir)/test-wrapper.sh \
+ 	       $(abs_top_builddir)/libdw:$(abs_top_builddir)/backends:$(abs_top_builddir)/libelf:$(abs_top_builddir)/libasm:$(abs_top_builddir)/debuginfod
diff --git a/dev-libs/libevent/Manifest b/dev-libs/libevent/Manifest
new file mode 100644
index 0000000..1320c60
--- /dev/null
+++ b/dev-libs/libevent/Manifest
@@ -0,0 +1 @@
+DIST libevent-2.1.11.tar.gz 1082234 BLAKE2B c6721589834bff027a8149ee0076e1877fba000d1712a405e20030192d9c81b892d0930bc1a4774650bef4cb08c60ac81b5928dc17346492ae7e4ded2125579a SHA512 9d0517b117f128f4f196b19a810524814bab75fa967d533063aaa619d3cf2dca97b443edd5805b764da2993d8e37caa536dce39f68ffcc2a88d32a89204c2de3
diff --git a/dev-libs/libevent/libevent-2.1.11.ebuild b/dev-libs/libevent/libevent-2.1.11.ebuild
new file mode 100644
index 0000000..2cb506a
--- /dev/null
+++ b/dev-libs/libevent/libevent-2.1.11.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit multilib-minimal
+
+DESCRIPTION="Library to execute a function when a specific event occurs on a file descriptor"
+HOMEPAGE="
+	https://libevent.org/
+	https://github.com/libevent/libevent/
+"
+SRC_URI="
+	https://github.com/${PN}/${PN}/releases/download/release-${PV/_/-}-stable/${P/_/-}-stable.tar.gz -> ${P}.tar.gz
+"
+LICENSE="BSD"
+
+SLOT="0/2.1-7"
+KEYWORDS="*"
+IUSE="debug libressl +ssl static-libs test +threads"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+	ssl? (
+		!libressl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] )
+		libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
+	)
+"
+RDEPEND="
+	${DEPEND}
+	!<=dev-libs/9libs-1.0
+"
+MULTILIB_WRAPPED_HEADERS=(
+	/usr/include/event2/event-config.h
+)
+S=${WORKDIR}/${P/_/-}-stable
+
+multilib_src_configure() {
+	# fix out-of-source builds
+	mkdir -p test || die
+
+	ECONF_SOURCE="${S}" \
+	econf \
+		--disable-samples \
+		$(use_enable debug debug-mode) \
+		$(use_enable debug malloc-replacement) \
+		$(use_enable ssl openssl) \
+		$(use_enable static-libs static) \
+		$(use_enable test libevent-regress) \
+		$(use_enable threads thread-support)
+}
+
+src_test() {
+	# The test suite doesn't quite work (see bug #406801 for the latest
+	# installment in a riveting series of reports).
+	:
+	# emake -C test check | tee "${T}"/tests
+}
+
+DOCS=( ChangeLog{,-1.4,-2.0} )
+
+multilib_src_install_all() {
+	einstalldocs
+	find "${ED}" -name '*.la' -delete || die
+}
diff --git a/dev-libs/libevent/metadata.xml b/dev-libs/libevent/metadata.xml
new file mode 100644
index 0000000..78451cc
--- /dev/null
+++ b/dev-libs/libevent/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+<email>jer@gentoo.org</email>
+<name>Jeroen Roovers</name>
+</maintainer>
+<upstream>
+<remote-id type="cpe">cpe:/a:niels_provos:libevent</remote-id>
+<remote-id type="github">libevent/libevent</remote-id>
+<remote-id type="sourceforge">levent</remote-id>
+</upstream>
+<use>
+<flag name="clock-gettime">Disable use of clock_gettime even if it is available</flag>
+<flag name="debug">Support for running in debug mode</flag>
+<flag name="malloc-replacement">Support for replacing the memory management functions</flag>
+<flag name="mbedtls">Support for <pkg>net-libs/mbedtls</pkg> encryption</flag>
+<flag name="ssl">Support for <pkg>dev-libs/openssl</pkg> encryption</flag>
+<flag name="verbose-debug">Support for verbose debug logging</flag>
+</use>
+</pkgmetadata>
diff --git a/dev-libs/libgcrypt/Manifest b/dev-libs/libgcrypt/Manifest
index 6d39956..5894b3c 100644
--- a/dev-libs/libgcrypt/Manifest
+++ b/dev-libs/libgcrypt/Manifest
@@ -1 +1 @@
-DIST libgcrypt-1.8.5.tar.bz2 2991291 BLAKE2B 93276b4536f71c07bb103e10607592e02add413f633d96cc95513daa6e6b0e098fe803bb6a0e405a241fddc5ce0cfad61658d57c27bd724eecd32fd862af4c99 SHA512 b55e16e838d1b1208e7673366971ae7c0f9c1c79e042f41c03d14ed74c5e387fa69ea81d5414ffda3d2b4f82ea5467fe13b00115727e257db22808cf351bde89
+DIST libgcrypt-1.9.1.tar.bz2 3202683 BLAKE2B 102a61c855fb4a9e5c9433f52988ea87db7672de6586ed47f888526369d0ef8ad640752ca1ef144c2db73ce90464d6624cc3b12dbdeaf568d706222af3955672 SHA512 e8a028724cf5476fff0ca82c5c279a64b3bc5d1fd1472b784df4084b185266825baffc49e27b90db7453c8faef68cd0b8264f379abacee629bbdf6b11f2a28d6
diff --git a/dev-libs/libgcrypt/files/libgcrypt-1.9.1-fix-no-asm-on-amd64-x86.patch b/dev-libs/libgcrypt/files/libgcrypt-1.9.1-fix-no-asm-on-amd64-x86.patch
new file mode 100644
index 0000000..875c223
--- /dev/null
+++ b/dev-libs/libgcrypt/files/libgcrypt-1.9.1-fix-no-asm-on-amd64-x86.patch
@@ -0,0 +1,141 @@
+Broken in https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commitdiff;h=8d404a629167d67ed56e45de3e65d1e0b7cdeb24;hp=3b34bd6e178614d6021ee7d1140646f7c8ed7519
+https://dev.gnupg.org/T5277
+https://bugs.gentoo.org/767859
+
+This is a revert of that commit, as suggested by upstream in the linked bug.
+diff --git a/random/rand-internal.h b/random/rand-internal.h
+index 34221569..d99c6671 100644
+--- a/random/rand-internal.h
++++ b/random/rand-internal.h
+@@ -141,7 +141,7 @@ void _gcry_rndhw_poll_fast (void (*add)(const void*, size_t,
+                             enum random_origins origin);
+ size_t _gcry_rndhw_poll_slow (void (*add)(const void*, size_t,
+                                           enum random_origins),
+-                              enum random_origins origin, size_t req_length);
++                              enum random_origins origin);
+ 
+ 
+ 
+diff --git a/random/rndhw.c b/random/rndhw.c
+index 3cf9acc3..2829382c 100644
+--- a/random/rndhw.c
++++ b/random/rndhw.c
+@@ -198,33 +198,24 @@ _gcry_rndhw_poll_fast (void (*add)(const void*, size_t, enum random_origins),
+ 
+ 
+ /* Read 64 bytes from a hardware RNG and return the number of bytes
+-   actually read.  However hardware source is let account only
+-   for up to 50% (or 25% for RDRAND) of the requested bytes.  */
++   actually read.  */
+ size_t
+ _gcry_rndhw_poll_slow (void (*add)(const void*, size_t, enum random_origins),
+-                       enum random_origins origin, size_t req_length)
++                       enum random_origins origin)
+ {
+   size_t nbytes = 0;
+ 
+   (void)add;
+   (void)origin;
+ 
+-  req_length /= 2; /* Up to 50%. */
+-
+ #ifdef USE_DRNG
+   if ((_gcry_get_hw_features () & HWF_INTEL_RDRAND))
+-    {
+-      req_length /= 2; /* Up to 25%. */
+-      nbytes += poll_drng (add, origin, 0);
+-    }
++    nbytes += poll_drng (add, origin, 0);
+ #endif
+ #ifdef USE_PADLOCK
+   if ((_gcry_get_hw_features () & HWF_PADLOCK_RNG))
+     nbytes += poll_padlock (add, origin, 0);
+ #endif
+ 
+-  if (nbytes > req_length)
+-    nbytes = req_length;
+-
+   return nbytes;
+ }
+diff --git a/random/rndlinux.c b/random/rndlinux.c
+index a22db177..f378a549 100644
+--- a/random/rndlinux.c
++++ b/random/rndlinux.c
+@@ -190,10 +190,19 @@ _gcry_rndlinux_gather_random (void (*add)(const void*, size_t,
+     }
+ 
+ 
+-  /* First read from a hardware source.  Note that _gcry_rndhw_poll_slow lets
+-     it account only for up to 50% (or 25% for RDRAND) of the requested
+-     bytes.  */
+-  n_hw = _gcry_rndhw_poll_slow (add, origin, length);
++  /* First read from a hardware source.  However let it account only
++     for up to 50% (or 25% for RDRAND) of the requested bytes.  */
++  n_hw = _gcry_rndhw_poll_slow (add, origin);
++  if ((_gcry_get_hw_features () & HWF_INTEL_RDRAND))
++    {
++      if (n_hw > length/4)
++        n_hw = length/4;
++    }
++  else
++    {
++      if (n_hw > length/2)
++        n_hw = length/2;
++    }
+   if (length > 1)
+     length -= n_hw;
+ 
+diff --git a/src/g10lib.h b/src/g10lib.h
+index 243997eb..cba2e237 100644
+--- a/src/g10lib.h
++++ b/src/g10lib.h
+@@ -217,8 +217,6 @@ char **_gcry_strtokenize (const char *string, const char *delim);
+ 
+ 
+ /*-- src/hwfeatures.c --*/
+-#if defined(HAVE_CPU_ARCH_X86)
+-
+ #define HWF_PADLOCK_RNG         (1 << 0)
+ #define HWF_PADLOCK_AES         (1 << 1)
+ #define HWF_PADLOCK_SHA         (1 << 2)
+@@ -238,28 +236,20 @@ char **_gcry_strtokenize (const char *string, const char *delim);
+ #define HWF_INTEL_RDTSC         (1 << 15)
+ #define HWF_INTEL_SHAEXT        (1 << 16)
+ 
+-#elif defined(HAVE_CPU_ARCH_ARM)
+-
+-#define HWF_ARM_NEON            (1 << 0)
+-#define HWF_ARM_AES             (1 << 1)
+-#define HWF_ARM_SHA1            (1 << 2)
+-#define HWF_ARM_SHA2            (1 << 3)
+-#define HWF_ARM_PMULL           (1 << 4)
+-
+-#elif defined(HAVE_CPU_ARCH_PPC)
++#define HWF_ARM_NEON            (1 << 17)
++#define HWF_ARM_AES             (1 << 18)
++#define HWF_ARM_SHA1            (1 << 19)
++#define HWF_ARM_SHA2            (1 << 20)
++#define HWF_ARM_PMULL           (1 << 21)
+ 
+-#define HWF_PPC_VCRYPTO         (1 << 0)
+-#define HWF_PPC_ARCH_3_00       (1 << 1)
+-#define HWF_PPC_ARCH_2_07       (1 << 2)
++#define HWF_PPC_VCRYPTO         (1 << 22)
++#define HWF_PPC_ARCH_3_00       (1 << 23)
++#define HWF_PPC_ARCH_2_07       (1 << 24)
+ 
+-#elif defined(HAVE_CPU_ARCH_S390X)
+-
+-#define HWF_S390X_MSA           (1 << 0)
+-#define HWF_S390X_MSA_4         (1 << 1)
+-#define HWF_S390X_MSA_8         (1 << 2)
+-#define HWF_S390X_VX            (1 << 3)
+-
+-#endif
++#define HWF_S390X_MSA           (1 << 25)
++#define HWF_S390X_MSA_4         (1 << 26)
++#define HWF_S390X_MSA_8         (1 << 27)
++#define HWF_S390X_VX            (1 << 28)
+ 
+ gpg_err_code_t _gcry_disable_hw_feature (const char *name);
+ void _gcry_detect_hw_features (void);
diff --git a/dev-libs/libgcrypt/libgcrypt-1.8.5-r1.ebuild b/dev-libs/libgcrypt/libgcrypt-1.9.1-r1.ebuild
similarity index 69%
rename from dev-libs/libgcrypt/libgcrypt-1.8.5-r1.ebuild
rename to dev-libs/libgcrypt/libgcrypt-1.9.1-r1.ebuild
index 183d7c3..e44149d 100644
--- a/dev-libs/libgcrypt/libgcrypt-1.8.5-r1.ebuild
+++ b/dev-libs/libgcrypt/libgcrypt-1.9.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -12,7 +12,7 @@
 LICENSE="LGPL-2.1 MIT"
 SLOT="0/20" # subslot = soname major version
 KEYWORDS="*"
-IUSE="doc o-flag-munging static-libs"
+IUSE="+asm cpu_flags_arm_neon cpu_flags_x86_aes cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_padlock cpu_flags_x86_sha cpu_flags_x86_sse4_1 doc o-flag-munging static-libs"
 
 RDEPEND=">=dev-libs/libgpg-error-1.25[${MULTILIB_USEDEP}]"
 DEPEND="${RDEPEND}"
@@ -21,6 +21,7 @@
 PATCHES=(
 	"${FILESDIR}"/${PN}-1.6.1-uscore.patch
 	"${FILESDIR}"/${PN}-multilib-syspath.patch
+	"${FILESDIR}"/${PN}-1.9.1-fix-no-asm-on-amd64-x86.patch
 )
 
 MULTILIB_CHOST_TOOLS=(
@@ -41,9 +42,18 @@
 	fi
 	local myeconfargs=(
 		CC_FOR_BUILD="$(tc-getBUILD_CC)"
+
 		--enable-noexecstack
-		$(use_enable o-flag-munging O-flag-munging)
+		$(use_enable cpu_flags_arm_neon neon-support)
+		$(use_enable cpu_flags_x86_aes aesni-support)
+		$(use_enable cpu_flags_x86_avx avx-support)
+		$(use_enable cpu_flags_x86_avx2 avx2-support)
+		$(use_enable cpu_flags_x86_padlock padlock-support)
+		$(use_enable cpu_flags_x86_sha shaext-support)
+		$(use_enable cpu_flags_x86_sse4_1 sse41-support)
+		# required for sys-power/suspend[crypt], bug 751568
 		$(use_enable static-libs static)
+		$(use_enable o-flag-munging O-flag-munging)
 
 		# disabled due to various applications requiring privileges
 		# after libgcrypt drops them (bug #468616)
@@ -54,10 +64,12 @@
 		$([[ ${CHOST} == *86*-darwin* ]] && echo "--disable-asm")
 		$([[ ${CHOST} == sparcv9-*-solaris* ]] && echo "--disable-asm")
 
+		$(use asm || echo "--disable-asm")
+
 		GPG_ERROR_CONFIG="${EROOT}/usr/bin/${CHOST}-gpg-error-config"
 	)
 	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" \
-		$("${S}/configure" --help | grep -- '--without-.*-prefix' | sed -e 's/^ *\([^ ]*\) .*/\1/g')
+		$("${S}/configure" --help | grep -o -- '--without-.*-prefix')
 }
 
 multilib_src_compile() {
@@ -72,5 +84,5 @@
 
 multilib_src_install_all() {
 	default
-	find "${D}" -name '*.la' -delete || die
+	find "${ED}" -type f -name '*.la' -delete || die
 }
diff --git a/dev-libs/libyaml/Manifest b/dev-libs/libyaml/Manifest
index 11ddaac..7ea6967 100644
--- a/dev-libs/libyaml/Manifest
+++ b/dev-libs/libyaml/Manifest
@@ -1 +1 @@
-DIST yaml-0.1.4.tar.gz 471759 RMD160 5051545022ffa4c78e63fed6f3af30f90e931497 SHA1 e0e5e09192ab10a607e3da2970db492118f560f2 SHA256 7bf81554ae5ab2d9b6977da398ea789722e0db75b86bffdaeb4e66d961de6a37
+DIST libyaml-0.2.2.tar.gz 79465 BLAKE2B fd37cac256b40b0c5daa32584d271448e5e1c196a7fa7eeda753fb962c7d916b3c415425170d70db67c3f114b27d03fdd67fb4e380c04027198a601e1bd5a094 SHA512 455494591014a97c4371a1f372ad09f0d6e487e4f1d3419c98e9cd2f16d43a0cf9a0787d7250bebee8b8d400df4626f5acd81e90139e54fa574a66ec84964c06
diff --git a/dev-libs/libyaml/libyaml-0.1.4.ebuild b/dev-libs/libyaml/libyaml-0.1.4.ebuild
deleted file mode 100644
index a08813e..0000000
--- a/dev-libs/libyaml/libyaml-0.1.4.ebuild
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/libyaml/libyaml-0.1.4.ebuild,v 1.10 2012/07/27 12:36:56 grobian Exp $
-
-EAPI=4
-
-inherit eutils autotools-utils
-
-MY_P="${P/lib}"
-
-DESCRIPTION="YAML 1.1 parser and emitter written in C"
-HOMEPAGE="http://pyyaml.org/wiki/LibYAML"
-SRC_URI="http://pyyaml.org/download/${PN}/${MY_P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="*"
-IUSE="doc examples test static-libs"
-
-S="${WORKDIR}/${MY_P}"
-
-DOCS="README"
-
-src_prepare() {
-	# conditionally remove tests
-	if use test; then
-		sed -i -e 's: tests::g' Makefile*
-	fi
-}
-
-src_install() {
-	autotools-utils_src_install
-	use doc && dohtml -r doc/html/.
-	if use examples ; then
-		docompress -x /usr/share/doc/${PF}/examples
-		insinto /usr/share/doc/${PF}/examples
-		doins tests/example-*.c
-	fi
-}
diff --git a/dev-libs/libyaml/libyaml-0.2.2.ebuild b/dev-libs/libyaml/libyaml-0.2.2.ebuild
new file mode 100644
index 0000000..1ad09ff
--- /dev/null
+++ b/dev-libs/libyaml/libyaml-0.2.2.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools libtool
+
+DESCRIPTION="YAML 1.1 parser and emitter written in C"
+HOMEPAGE="https://github.com/yaml/libyaml"
+SRC_URI="https://github.com/yaml/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="*"
+IUSE="doc static-libs test"
+RESTRICT="!test? ( test )"
+
+DEPEND="doc? ( app-doc/doxygen )"
+
+src_prepare() {
+	default
+
+	# conditionally remove tests
+	if ! use test; then
+		sed -i -e 's: tests::g' Makefile* || die
+	fi
+
+	elibtoolize  # for FreeMiNT
+	eautoreconf
+}
+
+src_configure() {
+	econf $(use_enable static-libs static)
+}
+
+src_compile() {
+	emake
+	use doc && emake html
+}
+
+src_install() {
+	use doc && HTML_DOCS=( doc/html/. )
+	default
+	find "${D}" -name '*.la' -delete || die
+}
diff --git a/dev-libs/libyaml/metadata.xml b/dev-libs/libyaml/metadata.xml
index 15dcec1..cee379b 100644
--- a/dev-libs/libyaml/metadata.xml
+++ b/dev-libs/libyaml/metadata.xml
@@ -1,12 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
-	<maintainer>
-		<email>sbriesen@gentoo.org</email>
-		<name>Stefan Briesenick</name>
+	<maintainer type="person">
+		<email>chutzpah@gentoo.org</email>
+		<name>Patrick McLean</name>
 	</maintainer>
-	<longdescription lang="en">
-		LibYAML is a YAML 1.1 parser and emitter written in C.
-		It's in an early stage of development.
-	</longdescription>
 </pkgmetadata>
diff --git a/dev-python/awscli/Manifest b/dev-python/awscli/Manifest
new file mode 100644
index 0000000..778b05e
--- /dev/null
+++ b/dev-python/awscli/Manifest
@@ -0,0 +1 @@
+DIST awscli-1.18.142.tar.gz 1871785 BLAKE2B 50c5fbfb34ad6c4e1f229fb5394e9e3ecec6ee18fa64ddab908e883ec6e9e24338a4aaebc53069651c161386b59f7ef0c699530a57c51264c367feb1dd5a9c63 SHA512 4bb49ea8617f5f4c55bf7ef531a7023299580a2e8aed52981fbb5da199e73912082cad198e00a590cfd8208dacefa70a3dccf257d7186ce96d68b87b6723639a
diff --git a/dev-python/awscli/awscli-1.18.142.ebuild b/dev-python/awscli/awscli-1.18.142.ebuild
new file mode 100644
index 0000000..176feaa
--- /dev/null
+++ b/dev-python/awscli/awscli-1.18.142.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+PYTHON_COMPAT=( python3_{6,7,8,9} )
+
+inherit bash-completion-r1 distutils-r1
+
+DESCRIPTION="Universal Command Line Environment for AWS"
+HOMEPAGE="https://pypi.org/project/awscli/"
+#SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
+SRC_URI="https://github.com/aws/aws-cli/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="*"
+IUSE="test"
+
+# requires network access
+RESTRICT="test"
+
+RDEPEND="
+	=dev-python/botocore-1.18*[${PYTHON_USEDEP}]
+	<dev-python/colorama-0.4.4[${PYTHON_USEDEP}]
+	dev-python/docutils[${PYTHON_USEDEP}]
+	dev-python/rsa[${PYTHON_USEDEP}]
+	>=dev-python/s3transfer-0.3.0[${PYTHON_USEDEP}]
+	<dev-python/pyyaml-5.4.0[${PYTHON_USEDEP}]
+"
+DEPEND="${RDEPEND}"
+
+BDEPEND="
+	dev-python/setuptools[${PYTHON_USEDEP}]
+	test? (
+		dev-python/mock[${PYTHON_USEDEP}]
+		dev-python/nose[${PYTHON_USEDEP}]
+	)
+"
+
+S="${WORKDIR}/aws-cli-${PV}"
+
+python_test() {
+	nosetests -vv || die
+}
+
+python_install_all() {
+	newbashcomp bin/aws_bash_completer aws
+
+	insinto /usr/share/zsh/site-functions
+	newins bin/aws_zsh_completer.sh _aws
+
+	distutils-r1_python_install_all
+
+	rm "${ED}"/usr/bin/{aws.cmd,aws_bash_completer,aws_zsh_completer.sh} || die
+}
diff --git a/dev-python/awscli/metadata.xml b/dev-python/awscli/metadata.xml
new file mode 100644
index 0000000..f0f862e
--- /dev/null
+++ b/dev-python/awscli/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<email>slashbeast@gentoo.org</email>
+		<name>Piotr Karbowski</name>
+	</maintainer>
+	<maintainer type="person">
+		<email>patrick@gentoo.org</email>
+		<name>Patrick Lauer</name>
+	</maintainer>
+	<upstream>
+		<remote-id type="pypi">awscli</remote-id>
+	</upstream>
+</pkgmetadata>
diff --git a/dev-python/botocore/Manifest b/dev-python/botocore/Manifest
new file mode 100644
index 0000000..40ef9bd
--- /dev/null
+++ b/dev-python/botocore/Manifest
@@ -0,0 +1 @@
+DIST botocore-1.18.10.tar.gz 6899351 BLAKE2B 4de11277fd8df8436818cd50d946e7e53191fb698a3d7bab034112445e8d66aec74dc17ed6c93bce636f29f3e455d2b08cdc56bec3a3e794d9e12e7fd5e0ccee SHA512 4a9ceaf2a0380c804b066d4c13703d4cae598c87c1f7f14b3e967a79cf829ad2e5aac39e5182db3bfff93c3289ab60571774710eee7e4ba544e20b37feb7fcc3
diff --git a/dev-python/botocore/botocore-1.18.10.ebuild b/dev-python/botocore/botocore-1.18.10.ebuild
new file mode 100644
index 0000000..fdd5a25
--- /dev/null
+++ b/dev-python/botocore/botocore-1.18.10.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python3_{6..9} )
+
+inherit distutils-r1
+
+DESCRIPTION="Low-level, data-driven core of boto 3"
+HOMEPAGE="https://github.com/boto/botocore"
+LICENSE="Apache-2.0"
+SLOT="0"
+
+if [[ "${PV}" == "9999" ]]; then
+	EGIT_REPO_URI="https://github.com/boto/botocore"
+	inherit git-r3
+else
+	SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+	KEYWORDS="*"
+fi
+
+RDEPEND="
+	dev-python/six[${PYTHON_USEDEP}]
+	dev-python/jmespath[${PYTHON_USEDEP}]
+	dev-python/python-dateutil[${PYTHON_USEDEP}]
+	dev-python/urllib3[${PYTHON_USEDEP}]
+"
+BDEPEND="
+	test? (
+		dev-python/mock[${PYTHON_USEDEP}]
+		dev-python/jsonschema[${PYTHON_USEDEP}]
+	)
+"
+
+PATCHES=(
+	"${FILESDIR}/1.8.6-tests-pass-all-env-vars-to-cmd-runner.patch"
+)
+
+distutils_enable_sphinx docs/source \
+	'dev-python/guzzle_sphinx_theme'
+distutils_enable_tests nose
+
+src_prepare() {
+	# unpin deps
+	sed -i -e "s:>=.*':':" setup.py || die
+	# very unstable
+	sed -i -e 's:test_stress_test_token_bucket:_&:' \
+		tests/functional/retries/test_bucket.py || die
+	distutils-r1_src_prepare
+}
+
+python_test() {
+	# note: suites need to be run separately as one of the unit tests
+	# seems to be leaking mocks and breaking a few functional tests
+	nosetests -v tests/unit ||
+		die "unit tests failed under ${EPYTHON}"
+	nosetests -v tests/functional ||
+		die "functional tests failed under ${EPYTHON}"
+}
diff --git a/dev-python/botocore/files/1.8.6-tests-pass-all-env-vars-to-cmd-runner.patch b/dev-python/botocore/files/1.8.6-tests-pass-all-env-vars-to-cmd-runner.patch
new file mode 100644
index 0000000..49fd3ad
--- /dev/null
+++ b/dev-python/botocore/files/1.8.6-tests-pass-all-env-vars-to-cmd-runner.patch
@@ -0,0 +1,32 @@
+From 78077a5e80c9ad5f909037a48100481ddfedc6b2 Mon Sep 17 00:00:00 2001
+From: Andrey Utkin <andrey_utkin@gentoo.org>
+Date: Wed, 13 Dec 2017 01:50:03 +0000
+Subject: [PATCH] tests: pass all env vars to cmd-runner
+
+cmd-runner was started with no environment variables inherited.
+This breaks tests when run with custom PYTHONPATH, which is useful for
+testing botocore while not being installed in standard locations.
+
+One case when this is important is performing tests before installing
+the package in Gentoo Linux.
+
+Link: https://bugs.gentoo.org/640726
+---
+ tests/__init__.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/tests/__init__.py b/tests/__init__.py
+index 74a2e4de..fa0b819b 100644
+--- a/tests/__init__.py
++++ b/tests/__init__.py
+@@ -145,6 +145,7 @@ class BaseClientDriverTest(unittest.TestCase):
+         if self.INJECT_DUMMY_CREDS:
+             env = {'AWS_ACCESS_KEY_ID': 'foo',
+                    'AWS_SECRET_ACCESS_KEY': 'bar'}
++        env.update(os.environ)
+         self.driver.start(env=env)
+ 
+     def cmd(self, *args):
+-- 
+2.15.1
+
diff --git a/dev-python/botocore/files/botocore-1.16.7-unlock-deps.patch b/dev-python/botocore/files/botocore-1.16.7-unlock-deps.patch
new file mode 100644
index 0000000..1dbb890
--- /dev/null
+++ b/dev-python/botocore/files/botocore-1.16.7-unlock-deps.patch
@@ -0,0 +1,27 @@
+diff --git a/setup.py b/setup.py
+index edc35789..94545b8d 100644
+--- a/setup.py
++++ b/setup.py
+@@ -24,17 +24,17 @@ def find_version(*file_paths):
+ 
+ 
+ requires = [
+-    'jmespath>=0.7.1,<1.0.0',
+-    'docutils>=0.10,<0.16',
+-    'python-dateutil>=2.1,<3.0.0',
++    'jmespath',
++    'docutils',
++    'python-dateutil',
+ ]
+ 
+ 
+ if sys.version_info[:2] == (3, 4):
+     # urllib3 dropped support for python 3.4 in point release 1.25.8
+-    requires.append('urllib3>=1.20,<1.25.8')
++    requires.append('urllib3')
+ else:
+-    requires.append('urllib3>=1.20,<1.26')
++    requires.append('urllib3')
+ 
+ 
+ 
diff --git a/dev-python/botocore/metadata.xml b/dev-python/botocore/metadata.xml
new file mode 100644
index 0000000..e73c2fc
--- /dev/null
+++ b/dev-python/botocore/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<email>dolsen@gentoo.org</email>
+		<name>Brian Dolbec</name>
+	</maintainer>
+	<maintainer type="person">
+		<email>chutzpah@gentoo.org</email>
+		<name>Patrick McLean</name>
+	</maintainer>
+	<maintainer type="person">
+		<email>slashbeast@gentoo.org</email>
+		<name>Piotr Karbowski</name>
+	</maintainer>
+	<maintainer type="project">
+		<email>python@gentoo.org</email>
+		<name>Python</name>
+	</maintainer>
+	<stabilize-allarches/>
+	<upstream>
+		<remote-id type="github">boto/botocore</remote-id>
+		<remote-id type="pypi">botocore</remote-id>
+	</upstream>
+</pkgmetadata>
diff --git a/dev-python/jinja/jinja-2.11.3-r2.ebuild b/dev-python/jinja/jinja-2.11.3-r2.ebuild
new file mode 120000
index 0000000..a37e7d4
--- /dev/null
+++ b/dev-python/jinja/jinja-2.11.3-r2.ebuild
@@ -0,0 +1 @@
+jinja-2.11.3.ebuild
\ No newline at end of file
diff --git a/dev-python/jmespath/Manifest b/dev-python/jmespath/Manifest
new file mode 100644
index 0000000..f43fa68
--- /dev/null
+++ b/dev-python/jmespath/Manifest
@@ -0,0 +1 @@
+DIST jmespath.py-0.10.0.gh.tar.gz 81860 BLAKE2B a6181bde0189badcf3ec9a8cf2a913ddea27634b89e181c4b990a0c1eeb3bb777f6f3758ed6ca8acd061b06d853b9857ad33faf037201132bc73572c5d009f4d SHA512 84d787a9547bf0d33dfb4cf42514d6a7a1e69fb8867ccb9d84aa0555ea52b3064a9c6a49b3c51564090bb1d1d2d067fe1887105d744a0f25a991d9e9595c85c5
diff --git a/dev-python/jmespath/jmespath-0.10.0.ebuild b/dev-python/jmespath/jmespath-0.10.0.ebuild
new file mode 100644
index 0000000..f96fb80
--- /dev/null
+++ b/dev-python/jmespath/jmespath-0.10.0.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+PYTHON_COMPAT=( python3_{6..9} pypy3 )
+
+inherit distutils-r1
+
+MY_P=jmespath.py-${PV}
+DESCRIPTION="JSON Matching Expressions"
+HOMEPAGE="https://github.com/jmespath/jmespath.py
+	https://pypi.org/project/jmespath/"
+SRC_URI="
+	https://github.com/jmespath/jmespath.py/archive/${PV}.tar.gz
+		-> ${MY_P}.gh.tar.gz"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="*"
+
+distutils_enable_tests nose
diff --git a/dev-python/jmespath/metadata.xml b/dev-python/jmespath/metadata.xml
new file mode 100644
index 0000000..46ef8e0
--- /dev/null
+++ b/dev-python/jmespath/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+  <maintainer type="project">
+    <email>python@gentoo.org</email>
+    <name>Python</name>
+  </maintainer>
+  <stabilize-allarches/>
+  <upstream>
+    <remote-id type="pypi">jmespath</remote-id>
+    <remote-id type="github">jmespath/jmespath.py</remote-id>
+  </upstream>
+</pkgmetadata>
diff --git a/dev-python/s3transfer/Manifest b/dev-python/s3transfer/Manifest
new file mode 100644
index 0000000..5f15032
--- /dev/null
+++ b/dev-python/s3transfer/Manifest
@@ -0,0 +1 @@
+DIST s3transfer-0.3.3.tar.gz 118872 BLAKE2B a8e10a135052a29cbc5949bd8dc82d0b7f76840e6dbc6ba5ccdfe23757d363476f1dc330cee36ceb88e5c5287f644a27ed50b518a346f1b6b8ae38a9ca5576c9 SHA512 e258958b47812d8620ea6ef604dadb2a13beef9bbed005e8d38153039a291099786a3cec68511f2ff4372ff57f60440ca700b6783967484d8284b4ad0c1ae754
diff --git a/dev-python/s3transfer/files/s3transfer-0.3.3-py38.patch b/dev-python/s3transfer/files/s3transfer-0.3.3-py38.patch
new file mode 100644
index 0000000..89f3d4b
--- /dev/null
+++ b/dev-python/s3transfer/files/s3transfer-0.3.3-py38.patch
@@ -0,0 +1,32 @@
+From f211b9851698d07cf218e78ebb39a337c8751df8 Mon Sep 17 00:00:00 2001
+From: Christopher Baines <mail@cbaines.net>
+Date: Sat, 2 May 2020 15:19:58 +0100
+Subject: [PATCH] Fix test_download_futures_fail_triggers_shutdown with Python
+ 3.8
+
+The behaviour of set_exception for futures changed in Python 3.8, it'll now
+raise concurrent.futures.InvalidStateError if the future is already done [1],
+which is the case in this test because set_result has already been called on
+the future.
+
+1: https://bugs.python.org/issue33238
+
+Fix the test by not using the future from SequentialExecutor, and instead
+creating a future which doesn't have a result.
+---
+ tests/unit/test_s3transfer.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/unit/test_s3transfer.py b/tests/unit/test_s3transfer.py
+index a87b4dd..4715be2 100644
+--- a/tests/unit/test_s3transfer.py
++++ b/tests/unit/test_s3transfer.py
+@@ -465,7 +465,7 @@ def __init__(self, max_workers):
+                 self.is_first = True
+ 
+             def submit(self, function):
+-                future = super(FailedDownloadParts, self).submit(function)
++                future = futures.Future()
+                 if self.is_first:
+                     # This is the download_parts_thread.
+                     future.set_exception(
diff --git a/dev-python/s3transfer/metadata.xml b/dev-python/s3transfer/metadata.xml
new file mode 100644
index 0000000..fcbcd1b
--- /dev/null
+++ b/dev-python/s3transfer/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="person">
+		<email>chutzpah@gentoo.org</email>
+		<name>Patrick McLean</name>
+	</maintainer>
+	<maintainer type="project">
+		<email>python@gentoo.org</email>
+		<name>Python</name>
+	</maintainer>
+	<stabilize-allarches/>
+	<upstream>
+		<remote-id type="github">boto/s3transfer</remote-id>
+		<remote-id type="pypi">s3transfer</remote-id>
+	</upstream>
+</pkgmetadata>
diff --git a/dev-python/s3transfer/s3transfer-0.3.3.ebuild b/dev-python/s3transfer/s3transfer-0.3.3.ebuild
new file mode 100644
index 0000000..370dd8a
--- /dev/null
+++ b/dev-python/s3transfer/s3transfer-0.3.3.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6..9} )
+DISTUTILS_USE_SETUPTOOLS=bdepend
+
+inherit distutils-r1
+
+DESCRIPTION="An Amazon S3 Transfer Manager"
+HOMEPAGE="https://github.com/boto/s3transfer"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="*"
+
+RDEPEND="
+	dev-python/botocore[${PYTHON_USEDEP}]
+"
+BDEPEND="
+	test? (
+		dev-python/mock[${PYTHON_USEDEP}]
+	)
+"
+
+distutils_enable_tests nose
+
+PATCHES=(
+	"${FILESDIR}"/${P}-py38.patch
+)
+
+python_test() {
+	nosetests -v tests/unit/ tests/functional/ || die "tests failed under ${EPYTHON}"
+}
diff --git a/eclass/fcaps.eclass b/eclass/fcaps.eclass
index 8595caa..822114a 100644
--- a/eclass/fcaps.eclass
+++ b/eclass/fcaps.eclass
@@ -4,7 +4,6 @@
 
 # @ECLASS: fcaps.eclass
 # @MAINTAINER:
-# Constanze Hausner <constanze@gentoo.org>
 # base-system@gentoo.org
 # @BLURB: function to set POSIX file-based capabilities
 # @DESCRIPTION:
@@ -13,7 +12,7 @@
 # often via packages like libcap.
 #
 # Due to probable capability-loss on moving or copying, this happens in
-# pkg_postinst-phase (at least for now).
+# pkg_postinst phase (at least for now).
 #
 # @EXAMPLE:
 # You can manually set the caps on ping and ping6 by doing:
@@ -112,11 +111,12 @@
 		root=${EROOT:-${ROOT}}
 		;;
 	esac
+	root=${root%/}
 
 	# Process every file!
 	local file
 	for file ; do
-		[[ ${file} != /* ]] && file="${root}${file}"
+		[[ ${file} != /* ]] && file="${root}/${file}"
 
 		if use filecaps ; then
 			# Try to set capabilities.  Ignore errors when the
@@ -162,6 +162,9 @@
 						: $(( ++notfound ))
 						continue
 						;;
+					# ENOTSUP and EOPNOTSUPP might be the same value which means
+					# strerror() on them is unstable -- we can get both. #559608
+					*"Not supported"*|\
 					*"Operation not supported"*)
 						local fstype=$(stat -f -c %T "${file}")
 						ewarn "Could not set caps on '${file}' due to missing filesystem support:"
diff --git a/eclass/user-info.eclass b/eclass/user-info.eclass
new file mode 100644
index 0000000..15e9238
--- /dev/null
+++ b/eclass/user-info.eclass
@@ -0,0 +1,158 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: user-info.eclass
+# @MAINTAINER:
+# base-system@gentoo.org (Linux)
+# MichaÅ‚ Górny <mgorny@gentoo.org> (NetBSD)
+# @BLURB: Read-only access to user and group information
+
+if [[ -z ${_USER_INFO_ECLASS} ]]; then
+_USER_INFO_ECLASS=1
+
+# @FUNCTION: egetent
+# @USAGE: <database> <key>
+# @DESCRIPTION:
+# Small wrapper for getent (Linux), nidump (< Mac OS X 10.5),
+# dscl (Mac OS X 10.5), and pw (FreeBSD) used in enewuser()/enewgroup().
+#
+# Supported databases: group passwd
+egetent() {
+	local db=$1 key=$2
+
+	[[ $# -ge 3 ]] && die "usage: egetent <database> <key>"
+
+	case ${db} in
+	passwd|group) ;;
+	*) die "sorry, database '${db}' not yet supported; file a bug" ;;
+	esac
+
+	case ${CHOST} in
+	*-freebsd*|*-dragonfly*)
+		case ${db} in
+		passwd) db="user" ;;
+		*) ;;
+		esac
+
+		# lookup by uid/gid
+		local opts
+		if [[ ${key} == [[:digit:]]* ]] ; then
+			[[ ${db} == "user" ]] && opts="-u" || opts="-g"
+		fi
+
+		pw show ${db} ${opts} "${key}" -q
+		;;
+	*-openbsd*)
+		grep "${key}:\*:" /etc/${db}
+		;;
+	*)
+		# ignore nscd output if we're not running as root
+		type -p nscd >/dev/null && nscd -i "${db}" 2>/dev/null
+		getent "${db}" "${key}"
+		;;
+	esac
+}
+
+# @FUNCTION: egetusername
+# @USAGE: <uid>
+# @DESCRIPTION:
+# Gets the username for given UID.
+egetusername() {
+	[[ $# -eq 1 ]] || die "usage: egetusername <uid>"
+
+	egetent passwd "$1" | cut -d: -f1
+}
+
+# @FUNCTION: egetgroupname
+# @USAGE: <gid>
+# @DESCRIPTION:
+# Gets the group name for given GID.
+egetgroupname() {
+	[[ $# -eq 1 ]] || die "usage: egetgroupname <gid>"
+
+	egetent group "$1" | cut -d: -f1
+}
+
+# @FUNCTION: egethome
+# @USAGE: <user>
+# @DESCRIPTION:
+# Gets the home directory for the specified user.
+egethome() {
+	local pos
+
+	[[ $# -eq 1 ]] || die "usage: egethome <user>"
+
+	case ${CHOST} in
+	*-freebsd*|*-dragonfly*)
+		pos=9
+		;;
+	*)	# Linux, NetBSD, OpenBSD, etc...
+		pos=6
+		;;
+	esac
+
+	egetent passwd "$1" | cut -d: -f${pos}
+}
+
+# @FUNCTION: egetshell
+# @USAGE: <user>
+# @DESCRIPTION:
+# Gets the shell for the specified user.
+egetshell() {
+	local pos
+
+	[[ $# -eq 1 ]] || die "usage: egetshell <user>"
+
+	case ${CHOST} in
+	*-freebsd*|*-dragonfly*)
+		pos=10
+		;;
+	*)	# Linux, NetBSD, OpenBSD, etc...
+		pos=7
+		;;
+	esac
+
+	egetent passwd "$1" | cut -d: -f${pos}
+}
+
+# @FUNCTION: egetcomment
+# @USAGE: <user>
+# @DESCRIPTION:
+# Gets the comment field for the specified user.
+egetcomment() {
+	local pos
+
+	[[ $# -eq 1 ]] || die "usage: egetcomment <user>"
+
+	case ${CHOST} in
+	*-freebsd*|*-dragonfly*)
+		pos=8
+		;;
+	*)	# Linux, NetBSD, OpenBSD, etc...
+		pos=5
+		;;
+	esac
+
+	egetent passwd "$1" | cut -d: -f${pos}
+}
+
+# @FUNCTION: egetgroups
+# @USAGE: <user>
+# @DESCRIPTION:
+# Gets all the groups user belongs to.  The primary group is returned
+# first, then all supplementary groups.  Groups are ','-separated.
+egetgroups() {
+	[[ $# -eq 1 ]] || die "usage: egetgroups <user>"
+
+	local egroups_arr
+	read -r -a egroups_arr < <(id -G -n "$1")
+
+	local g groups=${egroups_arr[0]}
+	# sort supplementary groups to make comparison possible
+	while read -r g; do
+		[[ -n ${g} ]] && groups+=",${g}"
+	done < <(printf '%s\n' "${egroups_arr[@]:1}" | sort)
+	echo "${groups}"
+}
+
+fi
diff --git a/metadata/md5-cache/app-cdr/cdrtools-3.02_alpha06 b/metadata/md5-cache/app-cdr/cdrtools-3.02_alpha06
index a5f8688..35bc92e 100644
--- a/metadata/md5-cache/app-cdr/cdrtools-3.02_alpha06
+++ b/metadata/md5-cache/app-cdr/cdrtools-3.02_alpha06
@@ -9,5 +9,5 @@
 RDEPEND=acl? ( virtual/acl ) caps? ( sys-libs/libcap ) nls? ( virtual/libintl ) !app-cdr/cdrkit
 SLOT=0
 SRC_URI=mirror://sourceforge/cdrtools/alpha/cdrtools-3.02a06.tar.bz2
-_eclasses_=desktop	b1d22ac8bdd4679ab79c71aca235009d	epatch	ed88001f77c6dd0d5f09e45c1a5b480e	estack	686eaab303305a908fd57b2fd7617800	eutils	fcb2aa98e1948b835b5ae66ca52868c5	fcaps	eeefea88d5fef2853d4c1e3770340302	flag-o-matic	5d5921a298e95441da2f85be419894c0	gnuconfig	9200bfc8e0184357abfb86a08edd4fc3	ltprune	2729691420b6deeda2a90b1f1183fb55	multilib	2477ebe553d3e4d2c606191fe6c33602	preserve-libs	ef207dc62baddfddfd39a164d9797648	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb	vcs-clean	2a0f74a496fa2b1552c4f3398258b7bf
+_eclasses_=desktop	b1d22ac8bdd4679ab79c71aca235009d	epatch	ed88001f77c6dd0d5f09e45c1a5b480e	estack	686eaab303305a908fd57b2fd7617800	eutils	fcb2aa98e1948b835b5ae66ca52868c5	fcaps	4a09528c0754e152c1dbab8e9af16ea6	flag-o-matic	5d5921a298e95441da2f85be419894c0	gnuconfig	9200bfc8e0184357abfb86a08edd4fc3	ltprune	2729691420b6deeda2a90b1f1183fb55	multilib	2477ebe553d3e4d2c606191fe6c33602	preserve-libs	ef207dc62baddfddfd39a164d9797648	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb	vcs-clean	2a0f74a496fa2b1552c4f3398258b7bf
 _md5_=9cf7ca683632a06dd0ba18346bee59b7
diff --git a/metadata/md5-cache/app-emulation/qemu-5.2.0-r50 b/metadata/md5-cache/app-emulation/qemu-5.2.0-r50
index 7596be6..4486ad9 100644
--- a/metadata/md5-cache/app-emulation/qemu-5.2.0-r50
+++ b/metadata/md5-cache/app-emulation/qemu-5.2.0-r50
@@ -12,5 +12,5 @@
 RESTRICT=!test? ( test )
 SLOT=0
 SRC_URI=https://download.qemu.org/qemu-5.2.0.tar.xz
-_eclasses_=eutils	fcb2aa98e1948b835b5ae66ca52868c5	fcaps	eeefea88d5fef2853d4c1e3770340302	flag-o-matic	5d5921a298e95441da2f85be419894c0	l10n	97f2753e3f1f3753d53d856c7c0bbb0b	linux-info	327865b9921771330775d971263dc234	multibuild	40fe59465edacd730c644ec2bc197809	multilib	2477ebe553d3e4d2c606191fe6c33602	pax-utils	3551398d6ede2b572568832730cc2a45	python-r1	79e26ce8f853c9daebe9a4956e37cc1b	python-utils-r1	157a6a7a3e99c7dbdf81acc9dd4f57cd	readme.gentoo-r1	22ae82e140bdd95d17a34fd5fd733190	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb	udev	452708c3f55cf6e918b045adb949a9e6	xdg-utils	ff2ff954e6b17929574eee4efc5152ba
+_eclasses_=eutils	fcb2aa98e1948b835b5ae66ca52868c5	fcaps	4a09528c0754e152c1dbab8e9af16ea6	flag-o-matic	5d5921a298e95441da2f85be419894c0	l10n	97f2753e3f1f3753d53d856c7c0bbb0b	linux-info	327865b9921771330775d971263dc234	multibuild	40fe59465edacd730c644ec2bc197809	multilib	2477ebe553d3e4d2c606191fe6c33602	pax-utils	3551398d6ede2b572568832730cc2a45	python-r1	79e26ce8f853c9daebe9a4956e37cc1b	python-utils-r1	157a6a7a3e99c7dbdf81acc9dd4f57cd	readme.gentoo-r1	22ae82e140bdd95d17a34fd5fd733190	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb	udev	452708c3f55cf6e918b045adb949a9e6	xdg-utils	ff2ff954e6b17929574eee4efc5152ba
 _md5_=02f362beb782fd12c8878aa705293573
diff --git a/metadata/md5-cache/app-forensics/aide-0.16.2_p20200614 b/metadata/md5-cache/app-forensics/aide-0.16.2_p20200614
new file mode 100644
index 0000000..fbec32d
--- /dev/null
+++ b/metadata/md5-cache/app-forensics/aide-0.16.2_p20200614
@@ -0,0 +1,15 @@
+BDEPEND=sys-devel/bison sys-devel/flex virtual/pkgconfig prelink? ( sys-devel/prelink ) >=app-portage/elt-patches-20170815
+DEFINED_PHASES=configure install postinst prepare setup
+DEPEND=dev-libs/libpcre acl? ( virtual/acl ) audit? ( sys-process/audit ) curl? ( net-misc/curl ) e2fs? ( sys-fs/e2fsprogs ) !mhash? ( dev-libs/libgcrypt:0= dev-libs/libgpg-error ) mhash? ( app-crypt/mhash ) postgres? ( dev-db/postgresql:= ) prelink? ( dev-libs/elfutils ) selinux? ( sys-libs/libselinux ) xattr? ( sys-apps/attr ) zlib? ( sys-libs/zlib ) !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
+DESCRIPTION=AIDE (Advanced Intrusion Detection Environment) is a file integrity checker
+EAPI=7
+HOMEPAGE=https://aide.github.io/ https://github.com/aide/aide
+IUSE=acl audit curl e2fs mhash postgres prelink selinux xattr zlib
+KEYWORDS=*
+LICENSE=GPL-2
+RDEPEND=dev-libs/libpcre acl? ( virtual/acl ) audit? ( sys-process/audit ) curl? ( net-misc/curl ) e2fs? ( sys-fs/e2fsprogs ) !mhash? ( dev-libs/libgcrypt:0= dev-libs/libgpg-error ) mhash? ( app-crypt/mhash ) postgres? ( dev-db/postgresql:= ) prelink? ( dev-libs/elfutils ) selinux? ( sys-libs/libselinux ) xattr? ( sys-apps/attr ) zlib? ( sys-libs/zlib ) selinux? ( sec-policy/selinux-aide )
+REQUIRED_USE=postgres? ( !mhash )
+SLOT=0
+SRC_URI=https://github.com/aide/aide/archive/7949feff20501724a43929ee7894b005812ffb4f.tar.gz -> aide-0.16.2_p20200614.tar.gz
+_eclasses_=autotools	d0e5375d47f4c809f406eb892e531513	libtool	f143db5a74ccd9ca28c1234deffede96	multilib	2477ebe553d3e4d2c606191fe6c33602	readme.gentoo-r1	22ae82e140bdd95d17a34fd5fd733190	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb
+_md5_=e6d819078bf3e4ab39ac04ac2ac4596b
diff --git a/metadata/md5-cache/dev-db/sqlite-3.32.3-r2 b/metadata/md5-cache/dev-db/sqlite-3.32.3-r2
deleted file mode 100644
index 93173fe..0000000
--- a/metadata/md5-cache/dev-db/sqlite-3.32.3-r2
+++ /dev/null
@@ -1,15 +0,0 @@
-BDEPEND=app-arch/unzip >=dev-lang/tcl-8.6:0 >=app-portage/elt-patches-20170815
-DEFINED_PHASES=compile configure install prepare test unpack
-DEPEND=sys-libs/zlib:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] icu? ( dev-libs/icu:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) readline? ( sys-libs/readline:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) tcl? ( dev-lang/tcl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) tools? ( dev-lang/tcl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) test? ( >=dev-lang/tcl-8.6:0[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=SQL database engine
-EAPI=7
-HOMEPAGE=https://sqlite.org/
-IUSE=debug doc icu +readline secure-delete static-libs tcl test tools abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64 abi_arm_32 abi_arm_64
-KEYWORDS=*
-LICENSE=public-domain
-RDEPEND=sys-libs/zlib:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] icu? ( dev-libs/icu:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) readline? ( sys-libs/readline:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) tcl? ( dev-lang/tcl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) tools? ( dev-lang/tcl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] )
-RESTRICT=!test? ( test )
-SLOT=3
-SRC_URI=https://sqlite.org/2020/sqlite-src-3320300.zip doc? ( https://sqlite.org/2020/sqlite-doc-3320300.zip )
-_eclasses_=autotools	d0e5375d47f4c809f406eb892e531513	eutils	fcb2aa98e1948b835b5ae66ca52868c5	flag-o-matic	5d5921a298e95441da2f85be419894c0	libtool	f143db5a74ccd9ca28c1234deffede96	multibuild	40fe59465edacd730c644ec2bc197809	multilib	2477ebe553d3e4d2c606191fe6c33602	multilib-build	1979aa0ff4d356d32507ca4650d9f37d	multilib-minimal	8bddda43703ba94d8341f4e247f97566	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb
-_md5_=8d00e548b21f9a4ff66d6d7b03d2429f
diff --git a/metadata/md5-cache/dev-db/sqlite-3.32.3 b/metadata/md5-cache/dev-db/sqlite-3.34.1
similarity index 71%
rename from metadata/md5-cache/dev-db/sqlite-3.32.3
rename to metadata/md5-cache/dev-db/sqlite-3.34.1
index 93173fe..c5eb9e6 100644
--- a/metadata/md5-cache/dev-db/sqlite-3.32.3
+++ b/metadata/md5-cache/dev-db/sqlite-3.34.1
@@ -1,15 +1,15 @@
 BDEPEND=app-arch/unzip >=dev-lang/tcl-8.6:0 >=app-portage/elt-patches-20170815
 DEFINED_PHASES=compile configure install prepare test unpack
-DEPEND=sys-libs/zlib:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] icu? ( dev-libs/icu:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) readline? ( sys-libs/readline:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) tcl? ( dev-lang/tcl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) tools? ( dev-lang/tcl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) test? ( >=dev-lang/tcl-8.6:0[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
+DEPEND=sys-libs/zlib:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] icu? ( dev-libs/icu:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) readline? ( sys-libs/readline:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) tcl? ( dev-lang/tcl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) tools? ( dev-lang/tcl:0= ) test? ( >=dev-lang/tcl-8.6:0[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
 DESCRIPTION=SQL database engine
 EAPI=7
 HOMEPAGE=https://sqlite.org/
 IUSE=debug doc icu +readline secure-delete static-libs tcl test tools abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64 abi_arm_32 abi_arm_64
 KEYWORDS=*
 LICENSE=public-domain
-RDEPEND=sys-libs/zlib:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] icu? ( dev-libs/icu:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) readline? ( sys-libs/readline:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) tcl? ( dev-lang/tcl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) tools? ( dev-lang/tcl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] )
+RDEPEND=sys-libs/zlib:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] icu? ( dev-libs/icu:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) readline? ( sys-libs/readline:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) tcl? ( dev-lang/tcl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) tools? ( dev-lang/tcl:0= )
 RESTRICT=!test? ( test )
 SLOT=3
-SRC_URI=https://sqlite.org/2020/sqlite-src-3320300.zip doc? ( https://sqlite.org/2020/sqlite-doc-3320300.zip )
+SRC_URI=https://sqlite.org/2021/sqlite-src-3340100.zip doc? ( https://sqlite.org/2021/sqlite-doc-3340100.zip )
 _eclasses_=autotools	d0e5375d47f4c809f406eb892e531513	eutils	fcb2aa98e1948b835b5ae66ca52868c5	flag-o-matic	5d5921a298e95441da2f85be419894c0	libtool	f143db5a74ccd9ca28c1234deffede96	multibuild	40fe59465edacd730c644ec2bc197809	multilib	2477ebe553d3e4d2c606191fe6c33602	multilib-build	1979aa0ff4d356d32507ca4650d9f37d	multilib-minimal	8bddda43703ba94d8341f4e247f97566	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb
-_md5_=8d00e548b21f9a4ff66d6d7b03d2429f
+_md5_=5ec9b05a23b1cff374c9ac49f307773f
diff --git a/metadata/md5-cache/dev-go/go-md2man-2.0.0 b/metadata/md5-cache/dev-go/go-md2man-2.0.0
new file mode 100644
index 0000000..44c6360
--- /dev/null
+++ b/metadata/md5-cache/dev-go/go-md2man-2.0.0
@@ -0,0 +1,12 @@
+BDEPEND=>=dev-lang/go-1.12 app-arch/unzip
+DEFINED_PHASES=compile install postinst test unpack
+DESCRIPTION=A utility to convert markdown to man pages
+EAPI=7
+HOMEPAGE=https://github.com/cpuguy83/go-md2man
+KEYWORDS=*
+LICENSE=BSD-2 MIT
+RESTRICT=strip test
+SLOT=0
+SRC_URI=https://github.com/cpuguy83/go-md2man/archive/v2.0.0.tar.gz -> go-md2man-2.0.0.tar.gz
+_eclasses_=go-module	45394825d9260b479aa1cf252ea58e01
+_md5_=94a56d98d865643f1a23e80178551a06
diff --git a/metadata/md5-cache/dev-libs/libevent-2.1.11 b/metadata/md5-cache/dev-libs/libevent-2.1.11
new file mode 100644
index 0000000..879c65c
--- /dev/null
+++ b/metadata/md5-cache/dev-libs/libevent-2.1.11
@@ -0,0 +1,14 @@
+DEFINED_PHASES=compile configure install test
+DEPEND=ssl? ( !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) )
+DESCRIPTION=Library to execute a function when a specific event occurs on a file descriptor
+EAPI=7
+HOMEPAGE=https://libevent.org/ https://github.com/libevent/libevent/
+IUSE=debug libressl +ssl static-libs test +threads abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64 abi_arm_32 abi_arm_64
+KEYWORDS=*
+LICENSE=BSD
+RDEPEND=ssl? ( !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) ) !<=dev-libs/9libs-1.0
+RESTRICT=!test? ( test )
+SLOT=0/2.1-7
+SRC_URI=https://github.com/libevent/libevent/releases/download/release-2.1.11-stable/libevent-2.1.11-stable.tar.gz -> libevent-2.1.11.tar.gz
+_eclasses_=multibuild	40fe59465edacd730c644ec2bc197809	multilib	2477ebe553d3e4d2c606191fe6c33602	multilib-build	1979aa0ff4d356d32507ca4650d9f37d	multilib-minimal	8bddda43703ba94d8341f4e247f97566	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb
+_md5_=d4488e7a18ad52edd980c36c1748f2d9
diff --git a/metadata/md5-cache/dev-libs/libgcrypt-1.8.5-r1 b/metadata/md5-cache/dev-libs/libgcrypt-1.9.1-r1
similarity index 75%
rename from metadata/md5-cache/dev-libs/libgcrypt-1.8.5-r1
rename to metadata/md5-cache/dev-libs/libgcrypt-1.9.1-r1
index 19319c0..a06f504 100644
--- a/metadata/md5-cache/dev-libs/libgcrypt-1.8.5-r1
+++ b/metadata/md5-cache/dev-libs/libgcrypt-1.9.1-r1
@@ -4,11 +4,11 @@
 DESCRIPTION=General purpose crypto library based on the code used in GnuPG
 EAPI=7
 HOMEPAGE=http://www.gnupg.org/
-IUSE=doc o-flag-munging static-libs abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64 abi_arm_32 abi_arm_64
+IUSE=+asm cpu_flags_arm_neon cpu_flags_x86_aes cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_padlock cpu_flags_x86_sha cpu_flags_x86_sse4_1 doc o-flag-munging static-libs abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64 abi_arm_32 abi_arm_64
 KEYWORDS=*
 LICENSE=LGPL-2.1 MIT
 RDEPEND=>=dev-libs/libgpg-error-1.25[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?]
 SLOT=0/20
-SRC_URI=mirror://gnupg/libgcrypt/libgcrypt-1.8.5.tar.bz2
+SRC_URI=mirror://gnupg/libgcrypt/libgcrypt-1.9.1.tar.bz2
 _eclasses_=autotools	d0e5375d47f4c809f406eb892e531513	eutils	fcb2aa98e1948b835b5ae66ca52868c5	flag-o-matic	5d5921a298e95441da2f85be419894c0	libtool	f143db5a74ccd9ca28c1234deffede96	multibuild	40fe59465edacd730c644ec2bc197809	multilib	2477ebe553d3e4d2c606191fe6c33602	multilib-build	1979aa0ff4d356d32507ca4650d9f37d	multilib-minimal	8bddda43703ba94d8341f4e247f97566	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb
-_md5_=6e04145f5e46788bb7ccccc321a7dbfc
+_md5_=661e3369fc5ebf06632d7474234506c5
diff --git a/metadata/md5-cache/dev-libs/libyaml-0.1.4 b/metadata/md5-cache/dev-libs/libyaml-0.1.4
deleted file mode 100644
index 8dc5ea5..0000000
--- a/metadata/md5-cache/dev-libs/libyaml-0.1.4
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=>=app-portage/elt-patches-20170815
-DESCRIPTION=YAML 1.1 parser and emitter written in C
-EAPI=4
-HOMEPAGE=http://pyyaml.org/wiki/LibYAML
-IUSE=doc examples test static-libs
-KEYWORDS=*
-LICENSE=MIT
-SLOT=0
-SRC_URI=http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
-_eclasses_=autotools	d0e5375d47f4c809f406eb892e531513	autotools-utils	95db0904ad0f62535e18e5ccb67cce5e	desktop	b1d22ac8bdd4679ab79c71aca235009d	epatch	ed88001f77c6dd0d5f09e45c1a5b480e	estack	686eaab303305a908fd57b2fd7617800	eutils	fcb2aa98e1948b835b5ae66ca52868c5	libtool	f143db5a74ccd9ca28c1234deffede96	ltprune	2729691420b6deeda2a90b1f1183fb55	multilib	2477ebe553d3e4d2c606191fe6c33602	preserve-libs	ef207dc62baddfddfd39a164d9797648	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb	vcs-clean	2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=b4910c7eba5c4be42bb3301a4ed97c4a
diff --git a/metadata/md5-cache/dev-libs/libyaml-0.2.2 b/metadata/md5-cache/dev-libs/libyaml-0.2.2
new file mode 100644
index 0000000..817f312
--- /dev/null
+++ b/metadata/md5-cache/dev-libs/libyaml-0.2.2
@@ -0,0 +1,14 @@
+BDEPEND=>=app-portage/elt-patches-20170815
+DEFINED_PHASES=compile configure install prepare
+DEPEND=doc? ( app-doc/doxygen ) !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
+DESCRIPTION=YAML 1.1 parser and emitter written in C
+EAPI=7
+HOMEPAGE=https://github.com/yaml/libyaml
+IUSE=doc static-libs test
+KEYWORDS=*
+LICENSE=MIT
+RESTRICT=!test? ( test )
+SLOT=0
+SRC_URI=https://github.com/yaml/libyaml/archive/0.2.2.tar.gz -> libyaml-0.2.2.tar.gz
+_eclasses_=autotools	d0e5375d47f4c809f406eb892e531513	libtool	f143db5a74ccd9ca28c1234deffede96	multilib	2477ebe553d3e4d2c606191fe6c33602	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb
+_md5_=4813101fc2bbab4a1d68db053f3e7a5a
diff --git a/metadata/md5-cache/dev-python/awscli-1.18.142 b/metadata/md5-cache/dev-python/awscli-1.18.142
new file mode 100644
index 0000000..c749cb2
--- /dev/null
+++ b/metadata/md5-cache/dev-python/awscli-1.18.142
@@ -0,0 +1,16 @@
+BDEPEND=dev-python/setuptools[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] test? ( dev-python/mock[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] dev-python/nose[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] ) python_targets_python3_6? ( dev-lang/python:3.6 ) python_targets_python3_7? ( dev-lang/python:3.7 ) python_targets_python3_8? ( dev-lang/python:3.8 ) python_targets_python3_9? ( dev-lang/python:3.9 ) >=dev-lang/python-exec-2:=[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] dev-python/setuptools[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)]
+DEFINED_PHASES=compile configure install prepare test
+DEPEND==dev-python/botocore-1.18*[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] <dev-python/colorama-0.4.4[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] dev-python/docutils[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] dev-python/rsa[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] >=dev-python/s3transfer-0.3.0[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] <dev-python/pyyaml-5.4.0[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)]
+DESCRIPTION=Universal Command Line Environment for AWS
+EAPI=7
+HOMEPAGE=https://pypi.org/project/awscli/
+IUSE=test python_targets_python3_6 python_targets_python3_7 python_targets_python3_8 python_targets_python3_9
+KEYWORDS=*
+LICENSE=Apache-2.0
+RDEPEND==dev-python/botocore-1.18*[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] <dev-python/colorama-0.4.4[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] dev-python/docutils[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] dev-python/rsa[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] >=dev-python/s3transfer-0.3.0[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] <dev-python/pyyaml-5.4.0[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] python_targets_python3_6? ( dev-lang/python:3.6 ) python_targets_python3_7? ( dev-lang/python:3.7 ) python_targets_python3_8? ( dev-lang/python:3.8 ) python_targets_python3_9? ( dev-lang/python:3.9 ) >=dev-lang/python-exec-2:=[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)]
+REQUIRED_USE=|| ( python_targets_python3_6 python_targets_python3_7 python_targets_python3_8 python_targets_python3_9 )
+RESTRICT=test
+SLOT=0
+SRC_URI=https://github.com/aws/aws-cli/archive/1.18.142.tar.gz -> awscli-1.18.142.tar.gz
+_eclasses_=bash-completion-r1	47a7402d95930413ce25ba8d857339bb	distutils-r1	198e3b9ddb55ae36b2a50b07ca2877ef	multibuild	40fe59465edacd730c644ec2bc197809	multilib	2477ebe553d3e4d2c606191fe6c33602	multiprocessing	c3cf317581e5bd068a4b851f03dd8cba	python-r1	79e26ce8f853c9daebe9a4956e37cc1b	python-utils-r1	157a6a7a3e99c7dbdf81acc9dd4f57cd	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb
+_md5_=3901f9e4621dccb6a6b2d98f0c4cc65e
diff --git a/metadata/md5-cache/dev-python/botocore-1.18.10 b/metadata/md5-cache/dev-python/botocore-1.18.10
new file mode 100644
index 0000000..0683eb6
--- /dev/null
+++ b/metadata/md5-cache/dev-python/botocore-1.18.10
@@ -0,0 +1,15 @@
+BDEPEND=test? ( dev-python/mock[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] dev-python/jsonschema[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] ) doc? ( || ( ( dev-lang/python:3.9 dev-python/sphinx[python_targets_python3_9(-),python_single_target_python3_9(+)] dev-python/guzzle_sphinx_theme[python_targets_python3_9(-),python_single_target_python3_9(+)] ) ( dev-lang/python:3.8 dev-python/sphinx[python_targets_python3_8(-),python_single_target_python3_8(+)] dev-python/guzzle_sphinx_theme[python_targets_python3_8(-),python_single_target_python3_8(+)] ) ( dev-lang/python:3.7 dev-python/sphinx[python_targets_python3_7(-),python_single_target_python3_7(+)] dev-python/guzzle_sphinx_theme[python_targets_python3_7(-),python_single_target_python3_7(+)] ) ( dev-lang/python:3.6 dev-python/sphinx[python_targets_python3_6(-),python_single_target_python3_6(+)] dev-python/guzzle_sphinx_theme[python_targets_python3_6(-),python_single_target_python3_6(+)] ) ) ) test? ( dev-python/nose[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] dev-python/six[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] dev-python/jmespath[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] dev-python/python-dateutil[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] dev-python/urllib3[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] ) python_targets_python3_6? ( dev-lang/python:3.6 ) python_targets_python3_7? ( dev-lang/python:3.7 ) python_targets_python3_8? ( dev-lang/python:3.8 ) python_targets_python3_9? ( dev-lang/python:3.9 ) >=dev-lang/python-exec-2:=[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] dev-python/setuptools[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)]
+DEFINED_PHASES=compile configure install prepare test
+DESCRIPTION=Low-level, data-driven core of boto 3
+EAPI=7
+HOMEPAGE=https://github.com/boto/botocore
+IUSE=doc test python_targets_python3_6 python_targets_python3_7 python_targets_python3_8 python_targets_python3_9
+KEYWORDS=*
+LICENSE=Apache-2.0
+RDEPEND=dev-python/six[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] dev-python/jmespath[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] dev-python/python-dateutil[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] dev-python/urllib3[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] python_targets_python3_6? ( dev-lang/python:3.6 ) python_targets_python3_7? ( dev-lang/python:3.7 ) python_targets_python3_8? ( dev-lang/python:3.8 ) python_targets_python3_9? ( dev-lang/python:3.9 ) >=dev-lang/python-exec-2:=[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)]
+REQUIRED_USE=|| ( python_targets_python3_6 python_targets_python3_7 python_targets_python3_8 python_targets_python3_9 )
+RESTRICT=!test? ( test )
+SLOT=0
+SRC_URI=mirror://pypi/b/botocore/botocore-1.18.10.tar.gz
+_eclasses_=distutils-r1	198e3b9ddb55ae36b2a50b07ca2877ef	multibuild	40fe59465edacd730c644ec2bc197809	multilib	2477ebe553d3e4d2c606191fe6c33602	multiprocessing	c3cf317581e5bd068a4b851f03dd8cba	python-r1	79e26ce8f853c9daebe9a4956e37cc1b	python-utils-r1	157a6a7a3e99c7dbdf81acc9dd4f57cd	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb
+_md5_=d8ad34d4db9d3b8d72b4f8c94a0b4dd5
diff --git a/metadata/md5-cache/dev-python/jinja-2.11.3-r2 b/metadata/md5-cache/dev-python/jinja-2.11.3-r2
new file mode 100644
index 0000000..92460bf
--- /dev/null
+++ b/metadata/md5-cache/dev-python/jinja-2.11.3-r2
@@ -0,0 +1,15 @@
+BDEPEND=doc? ( || ( ( dev-lang/python:3.9[threads(+)] dev-python/sphinx[python_targets_python3_9(-),python_single_target_python3_9(+)] dev-python/sphinx-issues[python_targets_python3_9(-),python_single_target_python3_9(+)] dev-python/pallets-sphinx-themes[python_targets_python3_9(-),python_single_target_python3_9(+)] ) ( dev-lang/python:3.8[threads(+)] dev-python/sphinx[python_targets_python3_8(-),python_single_target_python3_8(+)] dev-python/sphinx-issues[python_targets_python3_8(-),python_single_target_python3_8(+)] dev-python/pallets-sphinx-themes[python_targets_python3_8(-),python_single_target_python3_8(+)] ) ( dev-lang/python:3.7[threads(+)] dev-python/sphinx[python_targets_python3_7(-),python_single_target_python3_7(+)] dev-python/sphinx-issues[python_targets_python3_7(-),python_single_target_python3_7(+)] dev-python/pallets-sphinx-themes[python_targets_python3_7(-),python_single_target_python3_7(+)] ) ( dev-lang/python:3.6[threads(+)] dev-python/sphinx[python_targets_python3_6(-),python_single_target_python3_6(+)] dev-python/sphinx-issues[python_targets_python3_6(-),python_single_target_python3_6(+)] dev-python/pallets-sphinx-themes[python_targets_python3_6(-),python_single_target_python3_6(+)] ) ( >=dev-lang/python-2.7.5-r2:2.7[threads(+)] dev-python/sphinx[python_targets_python2_7(-),python_single_target_python2_7(+)] dev-python/sphinx-issues[python_targets_python2_7(-),python_single_target_python2_7(+)] dev-python/pallets-sphinx-themes[python_targets_python2_7(-),python_single_target_python2_7(+)] ) ( >=dev-python/pypy3-7.3.0:0[threads(+)] dev-python/sphinx[python_targets_pypy3(-),python_single_target_pypy3(+)] dev-python/sphinx-issues[python_targets_pypy3(-),python_single_target_pypy3(+)] dev-python/pallets-sphinx-themes[python_targets_pypy3(-),python_single_target_pypy3(+)] ) ) ) test? ( dev-python/pytest[python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] dev-python/markupsafe[python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] !dev-python/jinja:compat ) python_targets_pypy3? ( >=dev-python/pypy3-7.3.0:0=[threads(+)] ) python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7[threads(+)] ) python_targets_python3_6? ( dev-lang/python:3.6[threads(+)] ) python_targets_python3_7? ( dev-lang/python:3.7[threads(+)] ) python_targets_python3_8? ( dev-lang/python:3.8[threads(+)] ) python_targets_python3_9? ( dev-lang/python:3.9[threads(+)] ) >=dev-lang/python-exec-2:=[python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] dev-python/setuptools[python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)]
+DEFINED_PHASES=compile configure install postinst prepare test
+DESCRIPTION=A full-featured template engine for Python
+EAPI=7
+HOMEPAGE=https://jinja.palletsprojects.com/ https://pypi.org/project/Jinja2/
+IUSE=examples doc test python_targets_pypy3 python_targets_python2_7 python_targets_python3_6 python_targets_python3_7 python_targets_python3_8 python_targets_python3_9
+KEYWORDS=*
+LICENSE=BSD
+RDEPEND=dev-python/markupsafe[python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] !dev-python/jinja:compat python_targets_pypy3? ( >=dev-python/pypy3-7.3.0:0=[threads(+)] ) python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7[threads(+)] ) python_targets_python3_6? ( dev-lang/python:3.6[threads(+)] ) python_targets_python3_7? ( dev-lang/python:3.7[threads(+)] ) python_targets_python3_8? ( dev-lang/python:3.8[threads(+)] ) python_targets_python3_9? ( dev-lang/python:3.9[threads(+)] ) >=dev-lang/python-exec-2:=[python_targets_pypy3(-)?,python_targets_python2_7(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)]
+REQUIRED_USE=|| ( python_targets_pypy3 python_targets_python2_7 python_targets_python3_6 python_targets_python3_7 python_targets_python3_8 python_targets_python3_9 )
+RESTRICT=!test? ( test )
+SLOT=0
+SRC_URI=https://github.com/pallets/jinja/archive/2.11.3.tar.gz -> jinja-2.11.3.tar.gz
+_eclasses_=distutils-r1	198e3b9ddb55ae36b2a50b07ca2877ef	multibuild	40fe59465edacd730c644ec2bc197809	multilib	2477ebe553d3e4d2c606191fe6c33602	multiprocessing	c3cf317581e5bd068a4b851f03dd8cba	python-r1	79e26ce8f853c9daebe9a4956e37cc1b	python-utils-r1	157a6a7a3e99c7dbdf81acc9dd4f57cd	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb
+_md5_=e895f1abfea438e8ec0e99a419cc4038
diff --git a/metadata/md5-cache/dev-python/jmespath-0.10.0 b/metadata/md5-cache/dev-python/jmespath-0.10.0
new file mode 100644
index 0000000..3d2209d
--- /dev/null
+++ b/metadata/md5-cache/dev-python/jmespath-0.10.0
@@ -0,0 +1,15 @@
+BDEPEND=test? ( dev-python/nose[python_targets_pypy3(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_pypy3(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] ) python_targets_pypy3? ( >=dev-python/pypy3-7.3.0:0= ) python_targets_python3_6? ( dev-lang/python:3.6 ) python_targets_python3_7? ( dev-lang/python:3.7 ) python_targets_python3_8? ( dev-lang/python:3.8 ) python_targets_python3_9? ( dev-lang/python:3.9 ) >=dev-lang/python-exec-2:=[python_targets_pypy3(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_pypy3(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] dev-python/setuptools[python_targets_pypy3(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_pypy3(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)]
+DEFINED_PHASES=compile configure install prepare test
+DESCRIPTION=JSON Matching Expressions
+EAPI=7
+HOMEPAGE=https://github.com/jmespath/jmespath.py https://pypi.org/project/jmespath/
+IUSE=test python_targets_pypy3 python_targets_python3_6 python_targets_python3_7 python_targets_python3_8 python_targets_python3_9
+KEYWORDS=*
+LICENSE=MIT
+RDEPEND=python_targets_pypy3? ( >=dev-python/pypy3-7.3.0:0= ) python_targets_python3_6? ( dev-lang/python:3.6 ) python_targets_python3_7? ( dev-lang/python:3.7 ) python_targets_python3_8? ( dev-lang/python:3.8 ) python_targets_python3_9? ( dev-lang/python:3.9 ) >=dev-lang/python-exec-2:=[python_targets_pypy3(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_pypy3(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)]
+REQUIRED_USE=|| ( python_targets_pypy3 python_targets_python3_6 python_targets_python3_7 python_targets_python3_8 python_targets_python3_9 )
+RESTRICT=!test? ( test )
+SLOT=0
+SRC_URI=https://github.com/jmespath/jmespath.py/archive/0.10.0.tar.gz -> jmespath.py-0.10.0.gh.tar.gz
+_eclasses_=distutils-r1	198e3b9ddb55ae36b2a50b07ca2877ef	multibuild	40fe59465edacd730c644ec2bc197809	multilib	2477ebe553d3e4d2c606191fe6c33602	multiprocessing	c3cf317581e5bd068a4b851f03dd8cba	python-r1	79e26ce8f853c9daebe9a4956e37cc1b	python-utils-r1	157a6a7a3e99c7dbdf81acc9dd4f57cd	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb
+_md5_=a08dd17733cced3df4f1fe671a4cdbe6
diff --git a/metadata/md5-cache/dev-python/s3transfer-0.3.3 b/metadata/md5-cache/dev-python/s3transfer-0.3.3
new file mode 100644
index 0000000..ec51188
--- /dev/null
+++ b/metadata/md5-cache/dev-python/s3transfer-0.3.3
@@ -0,0 +1,15 @@
+BDEPEND=test? ( dev-python/mock[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] ) test? ( dev-python/nose[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] dev-python/botocore[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] ) python_targets_python3_6? ( dev-lang/python:3.6 ) python_targets_python3_7? ( dev-lang/python:3.7 ) python_targets_python3_8? ( dev-lang/python:3.8 ) python_targets_python3_9? ( dev-lang/python:3.9 ) >=dev-lang/python-exec-2:=[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] dev-python/setuptools[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)]
+DEFINED_PHASES=compile configure install prepare test
+DESCRIPTION=An Amazon S3 Transfer Manager
+EAPI=7
+HOMEPAGE=https://github.com/boto/s3transfer
+IUSE=test python_targets_python3_6 python_targets_python3_7 python_targets_python3_8 python_targets_python3_9
+KEYWORDS=*
+LICENSE=Apache-2.0
+RDEPEND=dev-python/botocore[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] python_targets_python3_6? ( dev-lang/python:3.6 ) python_targets_python3_7? ( dev-lang/python:3.7 ) python_targets_python3_8? ( dev-lang/python:3.8 ) python_targets_python3_9? ( dev-lang/python:3.9 ) >=dev-lang/python-exec-2:=[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)]
+REQUIRED_USE=|| ( python_targets_python3_6 python_targets_python3_7 python_targets_python3_8 python_targets_python3_9 )
+RESTRICT=!test? ( test )
+SLOT=0
+SRC_URI=mirror://pypi/s/s3transfer/s3transfer-0.3.3.tar.gz
+_eclasses_=distutils-r1	198e3b9ddb55ae36b2a50b07ca2877ef	multibuild	40fe59465edacd730c644ec2bc197809	multilib	2477ebe553d3e4d2c606191fe6c33602	multiprocessing	c3cf317581e5bd068a4b851f03dd8cba	python-r1	79e26ce8f853c9daebe9a4956e37cc1b	python-utils-r1	157a6a7a3e99c7dbdf81acc9dd4f57cd	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb
+_md5_=24d570f769a23b4636e4e017b44b19e4
diff --git a/metadata/md5-cache/net-firewall/iptables-1.8.5-r1 b/metadata/md5-cache/net-firewall/iptables-1.8.5-r1
new file mode 100644
index 0000000..14c5ef7
--- /dev/null
+++ b/metadata/md5-cache/net-firewall/iptables-1.8.5-r1
@@ -0,0 +1,14 @@
+BDEPEND=>=app-eselect/eselect-iptables-20200508 app-eselect/eselect-iptables virtual/pkgconfig nftables? ( sys-devel/flex virtual/yacc ) virtual/pkgconfig >=app-portage/elt-patches-20170815
+DEFINED_PHASES=compile configure install postinst prepare prerm
+DEPEND=conntrack? ( >=net-libs/libnetfilter_conntrack-1.0.6 ) netlink? ( net-libs/libnfnetlink ) nftables? ( >=net-libs/libmnl-1.0:0= >=net-libs/libnftnl-1.1.6:0= ) pcap? ( net-libs/libpcap ) virtual/os-headers >=sys-kernel/linux-headers-4.4:0 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
+DESCRIPTION=Linux kernel (2.4+) firewall, NAT and packet mangling tools
+EAPI=7
+HOMEPAGE=https://www.netfilter.org/projects/iptables/
+IUSE=conntrack ipv6 netlink nftables pcap static-libs split-usr
+KEYWORDS=*
+LICENSE=GPL-2
+RDEPEND=conntrack? ( >=net-libs/libnetfilter_conntrack-1.0.6 ) netlink? ( net-libs/libnfnetlink ) nftables? ( >=net-libs/libmnl-1.0:0= >=net-libs/libnftnl-1.1.6:0= ) pcap? ( net-libs/libpcap ) >=app-eselect/eselect-iptables-20200508 nftables? ( net-misc/ethertypes ) !<net-firewall/ebtables-2.0.11-r1 !<net-firewall/arptables-0.0.5-r1
+SLOT=0/1.8.3
+SRC_URI=https://www.netfilter.org/projects/iptables/files/iptables-1.8.5.tar.bz2
+_eclasses_=autotools	d0e5375d47f4c809f406eb892e531513	eutils	fcb2aa98e1948b835b5ae66ca52868c5	flag-o-matic	5d5921a298e95441da2f85be419894c0	libtool	f143db5a74ccd9ca28c1234deffede96	multilib	2477ebe553d3e4d2c606191fe6c33602	systemd	71fd8d2065d102753fb9e4d20eaf3e9f	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb	usr-ldscript	766f0a506b45f02361ad1b8ca205b7e1
+_md5_=85e950a818b48e5b17a2a8d35d51e89e
diff --git a/metadata/md5-cache/net-fs/autofs-5.1.4 b/metadata/md5-cache/net-fs/autofs-5.1.4
index 4b76099..6a3cf02 100644
--- a/metadata/md5-cache/net-fs/autofs-5.1.4
+++ b/metadata/md5-cache/net-fs/autofs-5.1.4
@@ -1,4 +1,4 @@
-DEFINED_PHASES=configure install postinst prepare setup
+DEFINED_PHASES=compile configure install postinst prepare setup
 DEPEND=>=sys-apps/util-linux-2.20 dmalloc? ( dev-libs/dmalloc[threads] ) ldap? ( >=net-nds/openldap-2.0 sasl? ( dev-libs/cyrus-sasl dev-libs/libxml2 virtual/krb5 ) ) libtirpc? ( net-libs/libtirpc ) !libtirpc? ( elibc_glibc? ( sys-libs/glibc[rpc(-)] ) ) sys-devel/flex virtual/yacc libtirpc? ( net-libs/rpcsvc-proto ) virtual/pkgconfig
 DESCRIPTION=Kernel based automounter
 EAPI=6
@@ -11,4 +11,4 @@
 SLOT=0
 SRC_URI=mirror://kernel/linux/daemons/autofs/v5/autofs-5.1.4.tar.xz
 _eclasses_=eapi7-ver	756b3f27d8e46131d5cf3c51bd876446	linux-info	327865b9921771330775d971263dc234	multilib	2477ebe553d3e4d2c606191fe6c33602	systemd	71fd8d2065d102753fb9e4d20eaf3e9f	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb
-_md5_=89a70959daa13024d2e60cd54a9e66e8
+_md5_=c6631c3039e8dd6479b7d6dc53d4f699
diff --git a/metadata/md5-cache/net-fs/autofs-5.1.4-r1 b/metadata/md5-cache/net-fs/autofs-5.1.4-r1
new file mode 100644
index 0000000..6a3cf02
--- /dev/null
+++ b/metadata/md5-cache/net-fs/autofs-5.1.4-r1
@@ -0,0 +1,14 @@
+DEFINED_PHASES=compile configure install postinst prepare setup
+DEPEND=>=sys-apps/util-linux-2.20 dmalloc? ( dev-libs/dmalloc[threads] ) ldap? ( >=net-nds/openldap-2.0 sasl? ( dev-libs/cyrus-sasl dev-libs/libxml2 virtual/krb5 ) ) libtirpc? ( net-libs/libtirpc ) !libtirpc? ( elibc_glibc? ( sys-libs/glibc[rpc(-)] ) ) sys-devel/flex virtual/yacc libtirpc? ( net-libs/rpcsvc-proto ) virtual/pkgconfig
+DESCRIPTION=Kernel based automounter
+EAPI=6
+HOMEPAGE=http://www.linux-consulting.com/Amd_AutoFS/autofs.html
+IUSE=-dmalloc ldap +libtirpc mount-locking sasl kernel_linux
+KEYWORDS=*
+LICENSE=GPL-2
+RDEPEND=>=sys-apps/util-linux-2.20 dmalloc? ( dev-libs/dmalloc[threads] ) ldap? ( >=net-nds/openldap-2.0 sasl? ( dev-libs/cyrus-sasl dev-libs/libxml2 virtual/krb5 ) ) libtirpc? ( net-libs/libtirpc ) !libtirpc? ( elibc_glibc? ( sys-libs/glibc[rpc(-)] ) )
+REQUIRED_USE=sasl? ( ldap )
+SLOT=0
+SRC_URI=mirror://kernel/linux/daemons/autofs/v5/autofs-5.1.4.tar.xz
+_eclasses_=eapi7-ver	756b3f27d8e46131d5cf3c51bd876446	linux-info	327865b9921771330775d971263dc234	multilib	2477ebe553d3e4d2c606191fe6c33602	systemd	71fd8d2065d102753fb9e4d20eaf3e9f	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb
+_md5_=c6631c3039e8dd6479b7d6dc53d4f699
diff --git a/metadata/md5-cache/net-fs/cifs-utils-6.1-r1 b/metadata/md5-cache/net-fs/cifs-utils-6.1-r1
deleted file mode 100644
index 69126f7..0000000
--- a/metadata/md5-cache/net-fs/cifs-utils-6.1-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=configure install postinst prepare setup
-DEPEND=!net-fs/mount-cifs !<net-fs/samba-3.6_rc1 ads? ( sys-apps/keyutils sys-libs/talloc virtual/krb5 ) caps? ( !caps-ng? ( sys-libs/libcap ) ) caps? ( caps-ng? ( sys-libs/libcap-ng ) ) creds? ( sys-apps/keyutils )
-DESCRIPTION=Tools for Managing Linux CIFS Client Filesystems
-EAPI=5
-HOMEPAGE=http://wiki.samba.org/index.php/LinuxCIFS_utils
-IUSE=+acl +ads +caps +caps-ng creds kernel_linux
-KEYWORDS=*
-LICENSE=GPL-3
-PDEPEND=!net-fs/mount-cifs !<net-fs/samba-3.6_rc1 ads? ( sys-apps/keyutils sys-libs/talloc virtual/krb5 ) caps? ( !caps-ng? ( sys-libs/libcap ) ) caps? ( caps-ng? ( sys-libs/libcap-ng ) ) creds? ( sys-apps/keyutils ) acl? ( || ( =net-fs/samba-3.6*[winbind] >=net-fs/samba-4.0.0_alpha1 ) )
-REQUIRED_USE=acl? ( ads )
-SLOT=0
-SRC_URI=ftp://ftp.samba.org/pub/linux-cifs/cifs-utils/cifs-utils-6.1.tar.bz2
-_eclasses_=desktop	b1d22ac8bdd4679ab79c71aca235009d	eapi7-ver	756b3f27d8e46131d5cf3c51bd876446	epatch	ed88001f77c6dd0d5f09e45c1a5b480e	estack	686eaab303305a908fd57b2fd7617800	eutils	fcb2aa98e1948b835b5ae66ca52868c5	linux-info	327865b9921771330775d971263dc234	ltprune	2729691420b6deeda2a90b1f1183fb55	multilib	2477ebe553d3e4d2c606191fe6c33602	preserve-libs	ef207dc62baddfddfd39a164d9797648	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb	vcs-clean	2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=41d6e6515198389a5d86588e85a2257c
diff --git a/metadata/md5-cache/net-fs/cifs-utils-6.11-r1 b/metadata/md5-cache/net-fs/cifs-utils-6.11-r1
new file mode 100644
index 0000000..1404314
--- /dev/null
+++ b/metadata/md5-cache/net-fs/cifs-utils-6.11-r1
@@ -0,0 +1,16 @@
+BDEPEND=dev-python/docutils >=app-portage/elt-patches-20170815
+DEFINED_PHASES=configure install postinst prepare setup
+DEPEND=!net-fs/mount-cifs sys-apps/keyutils:= ads? ( sys-libs/talloc virtual/krb5 ) caps? ( sys-libs/libcap-ng ) pam? ( sys-libs/pam ) !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
+DESCRIPTION=Tools for Managing Linux CIFS Client Filesystems
+EAPI=7
+HOMEPAGE=https://wiki.samba.org/index.php/LinuxCIFS_utils
+IUSE=+acl +ads +caps creds pam systemd kernel_linux
+KEYWORDS=*
+LICENSE=GPL-3
+PDEPEND=acl? ( >=net-fs/samba-4.0.0_alpha1 )
+RDEPEND=!net-fs/mount-cifs sys-apps/keyutils:= ads? ( sys-libs/talloc virtual/krb5 ) caps? ( sys-libs/libcap-ng ) pam? ( sys-libs/pam )
+REQUIRED_USE=acl? ( ads )
+SLOT=0
+SRC_URI=https://ftp.samba.org/pub/linux-cifs/cifs-utils/cifs-utils-6.11.tar.bz2
+_eclasses_=autotools	d0e5375d47f4c809f406eb892e531513	bash-completion-r1	47a7402d95930413ce25ba8d857339bb	eutils	fcb2aa98e1948b835b5ae66ca52868c5	flag-o-matic	5d5921a298e95441da2f85be419894c0	libtool	f143db5a74ccd9ca28c1234deffede96	linux-info	327865b9921771330775d971263dc234	multilib	2477ebe553d3e4d2c606191fe6c33602	pam	3f746974e1cc47cabe3bd488c08cdc8e	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb
+_md5_=856668ac82d0df7e9cfdab0991c3bad9
diff --git a/metadata/md5-cache/net-misc/iputils-20171016_pre b/metadata/md5-cache/net-misc/iputils-20171016_pre
index b3648b1..28d5056 100644
--- a/metadata/md5-cache/net-misc/iputils-20171016_pre
+++ b/metadata/md5-cache/net-misc/iputils-20171016_pre
@@ -10,5 +10,5 @@
 REQUIRED_USE=ipv6? ( ssl? ( ^^ ( gcrypt nettle openssl ) ) )
 SLOT=0
 SRC_URI=https://github.com/iputils/iputils/archive/67e7d0daf1f231cc708217e6aec2f8d5ce7aeacf.tar.gz -> iputils-20171016_pre.tar.gz https://dev.gentoo.org/~whissi/dist/iputils/iputils-manpages-20171016_pre.tar.xz
-_eclasses_=desktop	b1d22ac8bdd4679ab79c71aca235009d	epatch	ed88001f77c6dd0d5f09e45c1a5b480e	estack	686eaab303305a908fd57b2fd7617800	eutils	fcb2aa98e1948b835b5ae66ca52868c5	fcaps	eeefea88d5fef2853d4c1e3770340302	flag-o-matic	5d5921a298e95441da2f85be419894c0	ltprune	2729691420b6deeda2a90b1f1183fb55	multilib	2477ebe553d3e4d2c606191fe6c33602	preserve-libs	ef207dc62baddfddfd39a164d9797648	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb	vcs-clean	2a0f74a496fa2b1552c4f3398258b7bf
+_eclasses_=desktop	b1d22ac8bdd4679ab79c71aca235009d	epatch	ed88001f77c6dd0d5f09e45c1a5b480e	estack	686eaab303305a908fd57b2fd7617800	eutils	fcb2aa98e1948b835b5ae66ca52868c5	fcaps	4a09528c0754e152c1dbab8e9af16ea6	flag-o-matic	5d5921a298e95441da2f85be419894c0	ltprune	2729691420b6deeda2a90b1f1183fb55	multilib	2477ebe553d3e4d2c606191fe6c33602	preserve-libs	ef207dc62baddfddfd39a164d9797648	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb	vcs-clean	2a0f74a496fa2b1552c4f3398258b7bf
 _md5_=f3b074f32eb8854c2202e398273f15ed
diff --git a/metadata/md5-cache/net-misc/openssh-8.1_p1-r5 b/metadata/md5-cache/net-misc/openssh-8.1_p1-r5
deleted file mode 100644
index 8bccdbf..0000000
--- a/metadata/md5-cache/net-misc/openssh-8.1_p1-r5
+++ /dev/null
@@ -1,16 +0,0 @@
-BDEPEND=virtual/pkgconfig sys-devel/autoconf >=app-portage/elt-patches-20170815 virtual/pkgconfig
-DEFINED_PHASES=configure install postinst preinst prepare pretend test
-DEPEND=!static? ( audit? ( sys-process/audit ) ldns? ( net-libs/ldns !bindist? ( net-libs/ldns[ecdsa,ssl(+)] ) bindist? ( net-libs/ldns[-ecdsa,ssl(+)] ) ) libedit? ( dev-libs/libedit:= ) sctp? ( net-misc/lksctp-tools ) selinux? ( >=sys-libs/libselinux-1.28 ) ssl? ( !libressl? ( || ( ( >=dev-libs/openssl-1.0.1:0[bindist=] <dev-libs/openssl-1.1.0:0[bindist=] ) >=dev-libs/openssl-1.1.0g:0[bindist=] ) dev-libs/openssl:0= ) libressl? ( dev-libs/libressl:0= ) ) virtual/libcrypt:= >=sys-libs/zlib-1.2.3:= ) pam? ( sys-libs/pam ) kerberos? ( virtual/krb5 ) virtual/os-headers static? ( audit? ( sys-process/audit[static-libs(+)] ) ldns? ( net-libs/ldns[static-libs(+)] !bindist? ( net-libs/ldns[ecdsa,ssl(+)] ) bindist? ( net-libs/ldns[-ecdsa,ssl(+)] ) ) libedit? ( dev-libs/libedit:=[static-libs(+)] ) sctp? ( net-misc/lksctp-tools[static-libs(+)] ) selinux? ( >=sys-libs/libselinux-1.28[static-libs(+)] ) ssl? ( !libressl? ( || ( ( >=dev-libs/openssl-1.0.1:0[bindist=] <dev-libs/openssl-1.1.0:0[bindist=] ) >=dev-libs/openssl-1.1.0g:0[bindist=] ) dev-libs/openssl:0=[static-libs(+)] ) libressl? ( dev-libs/libressl:0=[static-libs(+)] ) ) virtual/libcrypt:=[static-libs(+)] >=sys-libs/zlib-1.2.3:=[static-libs(+)] ) sys-apps/baselayout !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=Port of OpenBSD's free SSH release
-EAPI=7
-HOMEPAGE=https://www.openssh.com/
-IUSE=abi_mips_n32 audit bindist debug hpn kerberos kernel_linux ldns libedit libressl livecd pam +pie sctp selinux +ssl static test X X509 xmss
-KEYWORDS=*
-LICENSE=BSD GPL-2
-RDEPEND=!static? ( audit? ( sys-process/audit ) ldns? ( net-libs/ldns !bindist? ( net-libs/ldns[ecdsa,ssl(+)] ) bindist? ( net-libs/ldns[-ecdsa,ssl(+)] ) ) libedit? ( dev-libs/libedit:= ) sctp? ( net-misc/lksctp-tools ) selinux? ( >=sys-libs/libselinux-1.28 ) ssl? ( !libressl? ( || ( ( >=dev-libs/openssl-1.0.1:0[bindist=] <dev-libs/openssl-1.1.0:0[bindist=] ) >=dev-libs/openssl-1.1.0g:0[bindist=] ) dev-libs/openssl:0= ) libressl? ( dev-libs/libressl:0= ) ) virtual/libcrypt:= >=sys-libs/zlib-1.2.3:= ) pam? ( sys-libs/pam ) kerberos? ( virtual/krb5 ) pam? ( >=sys-auth/pambase-20081028 ) userland_GNU? ( !prefix? ( sys-apps/shadow ) ) X? ( x11-apps/xauth ) sys-apps/baselayout
-REQUIRED_USE=ldns? ( ssl ) pie? ( !static ) static? ( !kerberos !pam ) X509? ( !sctp ssl ) test? ( ssl )
-RESTRICT=!test? ( test )
-SLOT=0
-SRC_URI=mirror://openbsd/OpenSSH/portable/openssh-8.1p1.tar.gz https://dev.gentoo.org/~chutzpah/dist/openssh/openssh-8.1_p1-glibc-2.31-patches.tar.xz sctp? ( https://dev.gentoo.org/~chutzpah/dist/openssh/openssh-8.1p1-sctp-1.2.patch.xz ) hpn? ( mirror://sourceforge/hpnssh/HPN-SSH%2014v20%208.1p1/openssh-8_1_P1-hpn-DynWinNoneSwitch-14.20.diff mirror://sourceforge/hpnssh/HPN-SSH%2014v20%208.1p1/openssh-8_1_P1-hpn-AES-CTR-14.20.diff mirror://sourceforge/hpnssh/HPN-SSH%2014v20%208.1p1/openssh-8_1_P1-hpn-PeakTput-14.20.diff ) X509? ( https://roumenpetrov.info/openssh/x509-12.3/openssh-8.1p1+x509-12.3.diff.gz )
-_eclasses_=autotools	d0e5375d47f4c809f406eb892e531513	eutils	fcb2aa98e1948b835b5ae66ca52868c5	flag-o-matic	5d5921a298e95441da2f85be419894c0	libtool	f143db5a74ccd9ca28c1234deffede96	multilib	2477ebe553d3e4d2c606191fe6c33602	pam	3f746974e1cc47cabe3bd488c08cdc8e	systemd	71fd8d2065d102753fb9e4d20eaf3e9f	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb	user	7c566af8c48023219fd63246e88d6621
-_md5_=6485b52d6d5db3875ce1fdeebe5f9525
diff --git a/metadata/md5-cache/net-misc/openssh-8.5_p1 b/metadata/md5-cache/net-misc/openssh-8.5_p1
new file mode 100644
index 0000000..746bcf3
--- /dev/null
+++ b/metadata/md5-cache/net-misc/openssh-8.5_p1
@@ -0,0 +1,16 @@
+BDEPEND=virtual/pkgconfig sys-devel/autoconf >=app-portage/elt-patches-20170815 virtual/pkgconfig
+DEFINED_PHASES=configure install postinst preinst prepare pretend test
+DEPEND=acct-group/sshd acct-user/sshd !static? ( audit? ( sys-process/audit ) ldns? ( net-libs/ldns !bindist? ( net-libs/ldns[ecdsa,ssl(+)] ) bindist? ( net-libs/ldns[-ecdsa,ssl(+)] ) ) libedit? ( dev-libs/libedit:= ) sctp? ( net-misc/lksctp-tools ) security-key? ( >=dev-libs/libfido2-1.5.0:= ) selinux? ( >=sys-libs/libselinux-1.28 ) ssl? ( !libressl? ( || ( ( >=dev-libs/openssl-1.0.1:0[bindist=] <dev-libs/openssl-1.1.0:0[bindist=] ) >=dev-libs/openssl-1.1.0g:0[bindist=] ) dev-libs/openssl:0= ) libressl? ( dev-libs/libressl:0= ) ) virtual/libcrypt:= >=sys-libs/zlib-1.2.3:= ) pam? ( sys-libs/pam ) kerberos? ( virtual/krb5 ) virtual/os-headers kernel_linux? ( !prefix-guest? ( sys-kernel/linux-headers ) ) static? ( audit? ( sys-process/audit[static-libs(+)] ) ldns? ( net-libs/ldns[static-libs(+)] !bindist? ( net-libs/ldns[ecdsa,ssl(+)] ) bindist? ( net-libs/ldns[-ecdsa,ssl(+)] ) ) libedit? ( dev-libs/libedit:=[static-libs(+)] ) sctp? ( net-misc/lksctp-tools[static-libs(+)] ) security-key? ( >=dev-libs/libfido2-1.5.0:=[static-libs(+)] ) selinux? ( >=sys-libs/libselinux-1.28[static-libs(+)] ) ssl? ( !libressl? ( || ( ( >=dev-libs/openssl-1.0.1:0[bindist=] <dev-libs/openssl-1.1.0:0[bindist=] ) >=dev-libs/openssl-1.1.0g:0[bindist=] ) dev-libs/openssl:0=[static-libs(+)] ) libressl? ( dev-libs/libressl:0=[static-libs(+)] ) ) virtual/libcrypt:=[static-libs(+)] >=sys-libs/zlib-1.2.3:=[static-libs(+)] ) !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
+DESCRIPTION=Port of OpenBSD's free SSH release
+EAPI=7
+HOMEPAGE=https://www.openssh.com/
+IUSE=abi_mips_n32 audit bindist debug hpn kerberos kernel_linux ldns libedit libressl livecd pam +pie +scp sctp security-key selinux +ssl static test X X509 xmss
+KEYWORDS=*
+LICENSE=BSD GPL-2
+RDEPEND=acct-group/sshd acct-user/sshd !static? ( audit? ( sys-process/audit ) ldns? ( net-libs/ldns !bindist? ( net-libs/ldns[ecdsa,ssl(+)] ) bindist? ( net-libs/ldns[-ecdsa,ssl(+)] ) ) libedit? ( dev-libs/libedit:= ) sctp? ( net-misc/lksctp-tools ) security-key? ( >=dev-libs/libfido2-1.5.0:= ) selinux? ( >=sys-libs/libselinux-1.28 ) ssl? ( !libressl? ( || ( ( >=dev-libs/openssl-1.0.1:0[bindist=] <dev-libs/openssl-1.1.0:0[bindist=] ) >=dev-libs/openssl-1.1.0g:0[bindist=] ) dev-libs/openssl:0= ) libressl? ( dev-libs/libressl:0= ) ) virtual/libcrypt:= >=sys-libs/zlib-1.2.3:= ) pam? ( sys-libs/pam ) kerberos? ( virtual/krb5 ) pam? ( >=sys-auth/pambase-20081028 ) userland_GNU? ( !prefix? ( sys-apps/shadow ) ) X? ( x11-apps/xauth )
+REQUIRED_USE=ldns? ( ssl ) pie? ( !static ) static? ( !kerberos !pam ) X509? ( !sctp !security-key ssl !xmss ) xmss? ( || ( ssl libressl ) ) test? ( ssl )
+RESTRICT=!test? ( test )
+SLOT=0
+SRC_URI=mirror://openbsd/OpenSSH/portable/openssh-8.5p1.tar.gz sctp? ( https://dev.gentoo.org/~chutzpah/dist/openssh/openssh-8.5p1-sctp-1.2.patch.xz ) hpn? ( mirror://sourceforge/project/hpnssh/Patches/HPN-SSH%2015v1%208.4p1/openssh-8_4_P1-hpn-DynWinNoneSwitch-15.1.diff mirror://sourceforge/project/hpnssh/Patches/HPN-SSH%2015v1%208.4p1/openssh-8_4_P1-hpn-AES-CTR-15.1.diff mirror://sourceforge/project/hpnssh/Patches/HPN-SSH%2015v1%208.4p1/openssh-8_4_P1-hpn-PeakTput-15.1.diff ) X509? ( https://roumenpetrov.info/openssh/x509-13.0/openssh-8.5p1+x509-13.0.diff.gz )
+_eclasses_=autotools	d0e5375d47f4c809f406eb892e531513	eutils	fcb2aa98e1948b835b5ae66ca52868c5	flag-o-matic	5d5921a298e95441da2f85be419894c0	libtool	f143db5a74ccd9ca28c1234deffede96	multilib	2477ebe553d3e4d2c606191fe6c33602	pam	3f746974e1cc47cabe3bd488c08cdc8e	systemd	71fd8d2065d102753fb9e4d20eaf3e9f	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb	user-info	a2abd4e2f4c3b9b06d64bf1329359a02
+_md5_=34b27dc88eea576b07b11113b4ab15ad
diff --git a/metadata/md5-cache/net-nds/rpcbind-1.2.5 b/metadata/md5-cache/net-nds/rpcbind-1.2.5
new file mode 100644
index 0000000..ecbee0c
--- /dev/null
+++ b/metadata/md5-cache/net-nds/rpcbind-1.2.5
@@ -0,0 +1,14 @@
+DEFINED_PHASES=configure install prepare
+DEPEND=>=net-libs/libtirpc-0.2.3:= systemd? ( sys-apps/systemd:= ) tcpd? ( sys-apps/tcp-wrappers ) virtual/pkgconfig virtual/pkgconfig
+DESCRIPTION=portmap replacement which supports RPC over various protocols
+EAPI=6
+HOMEPAGE=https://sourceforge.net/projects/rpcbind/
+IUSE=debug remotecalls selinux systemd tcpd warmstarts
+KEYWORDS=*
+LICENSE=BSD
+RDEPEND=>=net-libs/libtirpc-0.2.3:= systemd? ( sys-apps/systemd:= ) tcpd? ( sys-apps/tcp-wrappers ) selinux? ( sec-policy/selinux-rpcbind )
+REQUIRED_USE=systemd? ( warmstarts )
+SLOT=0
+SRC_URI=mirror://sourceforge/rpcbind/rpcbind-1.2.5.tar.bz2
+_eclasses_=multilib	2477ebe553d3e4d2c606191fe6c33602	systemd	71fd8d2065d102753fb9e4d20eaf3e9f	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb
+_md5_=9502f806dd134d737842c71f12797b07
diff --git a/metadata/md5-cache/sys-auth/passwdqc-1.4.0-r1 b/metadata/md5-cache/sys-auth/passwdqc-1.4.0-r1
new file mode 100644
index 0000000..c613510
--- /dev/null
+++ b/metadata/md5-cache/sys-auth/passwdqc-1.4.0-r1
@@ -0,0 +1,12 @@
+DEFINED_PHASES=compile install prepare setup
+DEPEND=sys-libs/pam
+DESCRIPTION=Password strength checking library (and PAM module)
+EAPI=7
+HOMEPAGE=http://www.openwall.com/passwdqc/
+KEYWORDS=*
+LICENSE=Openwall BSD public-domain
+RDEPEND=sys-libs/pam
+SLOT=0
+SRC_URI=http://www.openwall.com/passwdqc/passwdqc-1.4.0.tar.gz
+_eclasses_=eutils	fcb2aa98e1948b835b5ae66ca52868c5	flag-o-matic	5d5921a298e95441da2f85be419894c0	multilib	2477ebe553d3e4d2c606191fe6c33602	pam	3f746974e1cc47cabe3bd488c08cdc8e	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb
+_md5_=5804007d308f53d82f3add460eeaa322
diff --git a/metadata/md5-cache/sys-boot/gnu-efi-3.0.12 b/metadata/md5-cache/sys-boot/gnu-efi-3.0.12
index a131222..a23a6e8 100644
--- a/metadata/md5-cache/sys-boot/gnu-efi-3.0.12
+++ b/metadata/md5-cache/sys-boot/gnu-efi-3.0.12
@@ -9,4 +9,4 @@
 SLOT=0
 SRC_URI=mirror://sourceforge/gnu-efi/gnu-efi-3.0.12.tar.bz2
 _eclasses_=eutils	fcb2aa98e1948b835b5ae66ca52868c5	flag-o-matic	5d5921a298e95441da2f85be419894c0	multilib	2477ebe553d3e4d2c606191fe6c33602	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb
-_md5_=840ad49858f73dc428fd5da03b7a9b51
+_md5_=d72ab025d6c8b8f191a00b7053820a35
diff --git a/metadata/md5-cache/sys-fs/e2fsprogs-1.45.6 b/metadata/md5-cache/sys-fs/e2fsprogs-1.46.2
similarity index 75%
rename from metadata/md5-cache/sys-fs/e2fsprogs-1.45.6
rename to metadata/md5-cache/sys-fs/e2fsprogs-1.46.2
index cbe7975..2fe4bb2 100644
--- a/metadata/md5-cache/sys-fs/e2fsprogs-1.45.6
+++ b/metadata/md5-cache/sys-fs/e2fsprogs-1.46.2
@@ -1,14 +1,14 @@
 BDEPEND=nls? ( sys-devel/gettext ) virtual/pkgconfig sys-apps/texinfo virtual/pkgconfig virtual/pkgconfig
 DEFINED_PHASES=compile configure install prepare
-DEPEND=~sys-libs/e2fsprogs-libs-1.45.6 >=sys-apps/util-linux-2.16 cron? ( sys-fs/lvm2[-device-mapper-only(-)] ) fuse? ( sys-fs/fuse:0 ) nls? ( virtual/libintl )
+DEPEND=~sys-libs/e2fsprogs-libs-1.46.2 >=sys-apps/util-linux-2.16 cron? ( sys-fs/lvm2[-device-mapper-only(-)] ) fuse? ( sys-fs/fuse:0 ) nls? ( virtual/libintl )
 DESCRIPTION=Standard EXT2/EXT3/EXT4 filesystem utilities
 EAPI=7
 HOMEPAGE=http://e2fsprogs.sourceforge.net/
-IUSE=cron fuse nls static-libs elibc_FreeBSD split-usr
+IUSE=cron fuse lto nls static-libs +threads elibc_FreeBSD split-usr
 KEYWORDS=*
 LICENSE=GPL-2 BSD
-RDEPEND=~sys-libs/e2fsprogs-libs-1.45.6 >=sys-apps/util-linux-2.16 cron? ( sys-fs/lvm2[-device-mapper-only(-)] ) fuse? ( sys-fs/fuse:0 ) nls? ( virtual/libintl )
+RDEPEND=~sys-libs/e2fsprogs-libs-1.46.2 >=sys-apps/util-linux-2.16 cron? ( sys-fs/lvm2[-device-mapper-only(-)] ) fuse? ( sys-fs/fuse:0 ) nls? ( virtual/libintl )
 SLOT=0
-SRC_URI=https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v1.45.6/e2fsprogs-1.45.6.tar.xz elibc_mintlib? ( mirror://gentoo/e2fsprogs-1.42.9-mint-r1.patch.xz )
+SRC_URI=https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v1.46.2/e2fsprogs-1.46.2.tar.xz elibc_mintlib? ( mirror://gentoo/e2fsprogs-1.42.9-mint-r1.patch.xz )
 _eclasses_=eutils	fcb2aa98e1948b835b5ae66ca52868c5	flag-o-matic	5d5921a298e95441da2f85be419894c0	multilib	2477ebe553d3e4d2c606191fe6c33602	systemd	71fd8d2065d102753fb9e4d20eaf3e9f	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb	udev	452708c3f55cf6e918b045adb949a9e6	usr-ldscript	766f0a506b45f02361ad1b8ca205b7e1
-_md5_=a7fcff8ac3e032570f7d69ad3ca2e65d
+_md5_=d60856104a33ba3fe287703a24b05655
diff --git a/metadata/md5-cache/sys-libs/e2fsprogs-libs-1.45.6 b/metadata/md5-cache/sys-libs/e2fsprogs-libs-1.46.2
similarity index 95%
rename from metadata/md5-cache/sys-libs/e2fsprogs-libs-1.45.6
rename to metadata/md5-cache/sys-libs/e2fsprogs-libs-1.46.2
index ce2c30b..747028f 100644
--- a/metadata/md5-cache/sys-libs/e2fsprogs-libs-1.45.6
+++ b/metadata/md5-cache/sys-libs/e2fsprogs-libs-1.46.2
@@ -8,6 +8,6 @@
 LICENSE=GPL-2
 RDEPEND=!sys-libs/com_err !sys-libs/ss !<sys-fs/e2fsprogs-1.41.8
 SLOT=0
-SRC_URI=https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v1.45.6/e2fsprogs-1.45.6.tar.xz
+SRC_URI=https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v1.46.2/e2fsprogs-1.46.2.tar.xz
 _eclasses_=multibuild	40fe59465edacd730c644ec2bc197809	multilib	2477ebe553d3e4d2c606191fe6c33602	multilib-build	1979aa0ff4d356d32507ca4650d9f37d	multilib-minimal	8bddda43703ba94d8341f4e247f97566	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb	usr-ldscript	766f0a506b45f02361ad1b8ca205b7e1
 _md5_=cb4aacd7fa8642056d4cc9b16139aed7
diff --git a/metadata/md5-cache/sys-libs/pam-1.3.1-r2 b/metadata/md5-cache/sys-libs/pam-1.3.1-r2
deleted file mode 100644
index afa7886..0000000
--- a/metadata/md5-cache/sys-libs/pam-1.3.1-r2
+++ /dev/null
@@ -1,15 +0,0 @@
-BDEPEND=app-text/docbook-xml-dtd:4.1.2 app-text/docbook-xml-dtd:4.3 app-text/docbook-xml-dtd:4.4 app-text/docbook-xml-dtd:4.5 dev-libs/libxslt sys-devel/flex virtual/pkgconfig[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] nls? ( sys-devel/gettext ) >=app-portage/elt-patches-20170815
-DEFINED_PHASES=compile configure install postinst prepare test
-DEPEND=audit? ( >=sys-process/audit-2.2.2[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) berkdb? ( >=sys-libs/db-4.8.30-r1:=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) cracklib? ( >=sys-libs/cracklib-2.9.1-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) selinux? ( >=sys-libs/libselinux-2.2.2-r4[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) nis? ( >=net-libs/libtirpc-0.2.4-r2[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) nls? ( >=virtual/libintl-0-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 filecaps? ( sys-libs/libcap )
-DESCRIPTION=Linux-PAM (Pluggable Authentication Modules)
-EAPI=7
-HOMEPAGE=https://github.com/linux-pam/linux-pam
-IUSE=audit berkdb +cracklib debug nis nls +pie selinux static-libs +filecaps abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64 abi_arm_32 abi_arm_64 split-usr
-KEYWORDS=*
-LICENSE=|| ( BSD GPL-2 )
-PDEPEND=sys-auth/pambase
-RDEPEND=audit? ( >=sys-process/audit-2.2.2[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) berkdb? ( >=sys-libs/db-4.8.30-r1:=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) cracklib? ( >=sys-libs/cracklib-2.9.1-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) selinux? ( >=sys-libs/libselinux-2.2.2-r4[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) nis? ( >=net-libs/libtirpc-0.2.4-r2[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) nls? ( >=virtual/libintl-0-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] )
-SLOT=0
-SRC_URI=https://github.com/linux-pam/linux-pam/archive/v1.3.1.tar.gz -> pam-1.3.1.tar.gz
-_eclasses_=autotools	d0e5375d47f4c809f406eb892e531513	db-use	9879c16e695a6adb640e428a40dfd26e	fcaps	eeefea88d5fef2853d4c1e3770340302	libtool	f143db5a74ccd9ca28c1234deffede96	multibuild	40fe59465edacd730c644ec2bc197809	multilib	2477ebe553d3e4d2c606191fe6c33602	multilib-build	1979aa0ff4d356d32507ca4650d9f37d	multilib-minimal	8bddda43703ba94d8341f4e247f97566	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb	usr-ldscript	766f0a506b45f02361ad1b8ca205b7e1
-_md5_=6e05dc5f1d76bb0d2184ecec1a54d7bc
diff --git a/metadata/md5-cache/sys-libs/pam-1.5.1 b/metadata/md5-cache/sys-libs/pam-1.5.1
new file mode 100644
index 0000000..fb4939a
--- /dev/null
+++ b/metadata/md5-cache/sys-libs/pam-1.5.1
@@ -0,0 +1,15 @@
+BDEPEND=dev-libs/libxslt sys-devel/flex sys-devel/gettext virtual/pkgconfig virtual/yacc >=app-portage/elt-patches-20170815
+DEFINED_PHASES=compile configure install postinst prepare test
+DEPEND=virtual/libcrypt:=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] >=virtual/libintl-0-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] audit? ( >=sys-process/audit-2.2.2[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) berkdb? ( >=sys-libs/db-4.8.30-r1:=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) selinux? ( >=sys-libs/libselinux-2.2.2-r4[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) nis? ( net-libs/libnsl[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] >=net-libs/libtirpc-0.2.4-r2[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 filecaps? ( sys-libs/libcap )
+DESCRIPTION=Linux-PAM (Pluggable Authentication Modules)
+EAPI=7
+HOMEPAGE=https://github.com/linux-pam/linux-pam
+IUSE=audit berkdb debug nis selinux +filecaps split-usr abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64 abi_arm_32 abi_arm_64
+KEYWORDS=*
+LICENSE=|| ( BSD GPL-2 )
+PDEPEND=>=sys-auth/pambase-20200616
+RDEPEND=virtual/libcrypt:=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] >=virtual/libintl-0-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] audit? ( >=sys-process/audit-2.2.2[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) berkdb? ( >=sys-libs/db-4.8.30-r1:=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) selinux? ( >=sys-libs/libselinux-2.2.2-r4[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] ) nis? ( net-libs/libnsl[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] >=net-libs/libtirpc-0.2.4-r2[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,abi_arm_32(-)?,abi_arm_64(-)?] )
+SLOT=0
+SRC_URI=https://github.com/linux-pam/linux-pam/releases/download/v1.5.1/Linux-PAM-1.5.1.tar.xz https://github.com/linux-pam/linux-pam/releases/download/v1.5.1/Linux-PAM-1.5.1-docs.tar.xz
+_eclasses_=autotools	d0e5375d47f4c809f406eb892e531513	db-use	9879c16e695a6adb640e428a40dfd26e	fcaps	4a09528c0754e152c1dbab8e9af16ea6	libtool	f143db5a74ccd9ca28c1234deffede96	multibuild	40fe59465edacd730c644ec2bc197809	multilib	2477ebe553d3e4d2c606191fe6c33602	multilib-build	1979aa0ff4d356d32507ca4650d9f37d	multilib-minimal	8bddda43703ba94d8341f4e247f97566	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb	usr-ldscript	766f0a506b45f02361ad1b8ca205b7e1
+_md5_=3c82bd2b9c11c056f6c2b68d0bca9079
diff --git a/net-firewall/iptables/iptables-1.8.5-r1.ebuild b/net-firewall/iptables/iptables-1.8.5-r1.ebuild
new file mode 120000
index 0000000..f782658
--- /dev/null
+++ b/net-firewall/iptables/iptables-1.8.5-r1.ebuild
@@ -0,0 +1 @@
+iptables-1.8.5.ebuild
\ No newline at end of file
diff --git a/net-fs/autofs/autofs-5.1.4-r1.ebuild b/net-fs/autofs/autofs-5.1.4-r1.ebuild
new file mode 120000
index 0000000..865b8e5
--- /dev/null
+++ b/net-fs/autofs/autofs-5.1.4-r1.ebuild
@@ -0,0 +1 @@
+autofs-5.1.4.ebuild
\ No newline at end of file
diff --git a/net-fs/autofs/autofs-5.1.4.ebuild b/net-fs/autofs/autofs-5.1.4.ebuild
index 8911e20..6a156e4 100644
--- a/net-fs/autofs/autofs-5.1.4.ebuild
+++ b/net-fs/autofs/autofs-5.1.4.ebuild
@@ -80,6 +80,11 @@
 	econf "${myeconfargs[@]}"
 }
 
+src_compile() {
+	export DONTSTRIP=1
+	default
+}
+
 src_install() {
 	default
 
diff --git a/net-fs/cifs-utils/Manifest b/net-fs/cifs-utils/Manifest
index 72c8683..90318cc 100644
--- a/net-fs/cifs-utils/Manifest
+++ b/net-fs/cifs-utils/Manifest
@@ -1 +1 @@
-DIST cifs-utils-6.1.tar.bz2 390958 SHA256 381f1e9caccdafdcdb0efa32a4cceb77c1a96b0b58702394e4b86dac4825f3b5 SHA512 6427b74edbf56b865dee38a610c74ac5483cdc13096082cfc1e9d225a048c9b5ee0c7afb30e625a615a0e8e9f3767e33765220e27148e2c2a29d12d4129b01fd WHIRLPOOL a800a02a0729996035a331b460cb28ae5463ddecaf205d88173dc08efd7a2bee577995ebba97b36977858c8435ac3b7ec9c7ce5d193f8b30d0602f9546fed5b1
+DIST cifs-utils-6.11.tar.bz2 408903 BLAKE2B 5ee7cd87b54a266750bf938396ee90b3f20c2a3446aca295ccb58cb667fbfb68be9aa0e2bbc20aa5e18ffd7f1fcd5fbb0aef3bc25fd13bb96abc5a57a0b45b4b SHA512 064c0ac75572fb44908390508462e4fdfe0686751149fd8b656a209dd961a5a24a7d9774c38c0e72fa5f9875b43aea7bf2de038c4e4a63a11664e71d9003100e
diff --git a/net-fs/cifs-utils/cifs-utils-6.1-r1.ebuild b/net-fs/cifs-utils/cifs-utils-6.11-r1.ebuild
similarity index 60%
rename from net-fs/cifs-utils/cifs-utils-6.1-r1.ebuild
rename to net-fs/cifs-utils/cifs-utils-6.11-r1.ebuild
index 2ede7eb..97b3afb 100644
--- a/net-fs/cifs-utils/cifs-utils-6.1-r1.ebuild
+++ b/net-fs/cifs-utils/cifs-utils-6.11-r1.ebuild
@@ -1,41 +1,41 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-fs/cifs-utils/cifs-utils-6.1-r1.ebuild,v 1.15 2015/02/20 13:08:25 armin76 Exp $
 
-EAPI=5
+EAPI=7
 
-inherit eutils linux-info multilib
+inherit autotools bash-completion-r1 linux-info multilib pam
 
 DESCRIPTION="Tools for Managing Linux CIFS Client Filesystems"
-HOMEPAGE="http://wiki.samba.org/index.php/LinuxCIFS_utils"
-SRC_URI="ftp://ftp.samba.org/pub/linux-cifs/${PN}/${P}.tar.bz2"
+HOMEPAGE="https://wiki.samba.org/index.php/LinuxCIFS_utils"
+SRC_URI="https://ftp.samba.org/pub/linux-cifs/${PN}/${P}.tar.bz2"
 
 LICENSE="GPL-3"
 SLOT="0"
 KEYWORDS="*"
-IUSE="+acl +ads +caps +caps-ng creds"
+IUSE="+acl +ads +caps creds pam systemd"
 
-DEPEND="!net-fs/mount-cifs
-	!<net-fs/samba-3.6_rc1
+RDEPEND="
+	!net-fs/mount-cifs
+	sys-apps/keyutils:=
 	ads? (
-		sys-apps/keyutils
 		sys-libs/talloc
 		virtual/krb5
 	)
-	caps? ( !caps-ng? ( sys-libs/libcap ) )
-	caps? ( caps-ng? ( sys-libs/libcap-ng ) )
-	creds? ( sys-apps/keyutils )"
-PDEPEND="${DEPEND}
-	acl? ( || (
-		=net-fs/samba-3.6*[winbind]
-		>=net-fs/samba-4.0.0_alpha1
-	) )
+	caps? ( sys-libs/libcap-ng )
+	pam? ( sys-libs/pam )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="dev-python/docutils"
+PDEPEND="
+	acl? ( >=net-fs/samba-4.0.0_alpha1 )
 "
 
 REQUIRED_USE="acl? ( ads )"
 
 DOCS="doc/linux-cifs-client-guide.odt"
 
+PATCHES=( "${FILESDIR}/${PN}-6.10-ln_in_destdir.patch" )
+
 pkg_setup() {
 	linux-info_pkg_setup
 
@@ -52,30 +52,42 @@
 }
 
 src_prepare() {
-	# Do not rely on hardcoded path to systemd-ask-password, bug #478538
-	epatch "${FILESDIR}/${P}-hardcoded-path.patch"
+	default
+
+	if has_version app-crypt/heimdal ; then
+		# https://bugs.gentoo.org/612584
+		eapply "${FILESDIR}/${PN}-6.7-heimdal.patch"
+	fi
+
+	eautoreconf
 }
 
 src_configure() {
-	ROOTSBINDIR="${EPREFIX}"/sbin \
-	econf \
-		$(use_enable acl cifsacl cifsidmap) \
-		$(use_enable ads cifsupcall) \
-		$(use caps && use_with !caps-ng libcap || echo --without-libcap) \
-		$(use caps && use_with caps-ng libcap-ng || echo --without-libcap-ng) \
+	local myeconfargs=(
+		--enable-man
+		--enable-smbinfo
+		$(use_enable acl cifsacl cifsidmap)
+		$(use_enable ads cifsupcall)
+		$(use_with caps libcap)
 		$(use_enable creds cifscreds)
+		$(use_enable pam)
+		$(use_with pam pamdir $(getpam_mod_dir))
+		# mount.cifs can get passwords from systemd
+		$(use_enable systemd)
+	)
+	ROOTSBINDIR="${EPREFIX}"/sbin \
+	econf "${myeconfargs[@]}"
 }
 
 src_install() {
 	default
 
 	# remove empty directories
-	find "${ED}" -type d -print0 | xargs --null rmdir \
-		--ignore-fail-on-non-empty &>/dev/null
+	find "${ED}" -type d -empty -delete || die
 
 	if use acl ; then
 		dodir /etc/cifs-utils
-		dosym /usr/$(get_libdir)/cifs-utils/idmapwb.so \
+		dosym ../../usr/$(get_libdir)/cifs-utils/idmapwb.so \
 			/etc/cifs-utils/idmap-plugin
 		dodir /etc/request-key.d
 		echo 'create cifs.idmap * * /usr/sbin/cifs.idmap %k' \
@@ -86,7 +98,11 @@
 		dodir /etc/request-key.d
 		echo 'create dns_resolver * * /usr/sbin/cifs.upcall %k' \
 			> "${ED}/etc/request-key.d/cifs.upcall.conf"
+		echo 'create cifs.spnego * * /usr/sbin/cifs.upcall %k' \
+			> "${ED}/etc/request-key.d/cifs.spnego.conf"
 	fi
+
+	dobashcomp bash-completion/smbinfo
 }
 
 pkg_postinst() {
diff --git a/net-fs/cifs-utils/files/cifs-utils-5.5-initialize_rc_var_properly.patch b/net-fs/cifs-utils/files/cifs-utils-5.5-initialize_rc_var_properly.patch
deleted file mode 100644
index 2faa853..0000000
--- a/net-fs/cifs-utils/files/cifs-utils-5.5-initialize_rc_var_properly.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 0eb3daa4b17ee64b464594f1a5d413ecb364957c Mon Sep 17 00:00:00 2001
-From: Jeff Layton <jlayton@samba.org>
-Date: Thu, 14 Jun 2012 10:59:18 -0400
-Subject: [PATCH 1/1] mount.cifs: set rc to 0 in libcap toggle_dac_capability
-
-Thus spake Jochen:
-
-The mount.cifs program from the cifs-utils package 5.5 did not work on
-my Linux system. It just exited without an error message and did not
-mount anything.
-
-[...]
-
-I think, when this variable rc is now used in this function, it has also
-to be properly initialized there.
-
-Reported-by: Jochen Roderburg <roderburg@uni-koeln.de>
-Signed-off-by: Jeff Layton <jlayton@samba.org>
----
- mount.cifs.c |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/mount.cifs.c b/mount.cifs.c
-index a1b0454..6f3f382 100644
---- a/mount.cifs.c
-+++ b/mount.cifs.c
-@@ -495,7 +495,7 @@ free_caps:
- static int
- toggle_dac_capability(int writable, int enable)
- {
--	int rc;
-+	int rc = 0;
- 	cap_t caps;
- 	cap_value_t capability = writable ? CAP_DAC_OVERRIDE : CAP_DAC_READ_SEARCH;
- 
--- 
-1.7.0.4
-
diff --git a/net-fs/cifs-utils/files/cifs-utils-5.9-set-parsed_info-got_user-when-a-cred-file.patch b/net-fs/cifs-utils/files/cifs-utils-5.9-set-parsed_info-got_user-when-a-cred-file.patch
deleted file mode 100644
index d06ae01..0000000
--- a/net-fs/cifs-utils/files/cifs-utils-5.9-set-parsed_info-got_user-when-a-cred-file.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From: Jeff Layton <jlayton@samba.org>
-Date: Sun, 13 Jan 2013 03:02:01 +0000 (-0500)
-Subject: mount.cifs: set parsed_info->got_user when a cred file supplies a username
-X-Git-Url: https://gitweb.samba.org/?p=cifs-utils.git;a=commitdiff_plain;h=1a01f7c4b90695211d12291d7a24bec05b1f2922
-
-mount.cifs: set parsed_info->got_user when a cred file supplies a username
-
-commit 85d18a1ed introduced a regression when using a credentials file.
-It set the username in the parsed mount info properly, but didn't set
-the "got_user" flag in it.
-
-Also, fix an incorrect strlcpy length specifier in open_cred_file.
-
-Reported-by: "Mantas M." <grawity@gmail.com>
-Signed-off-by: Jeff Layton <jlayton@samba.org>
----
-
-diff --git a/mount.cifs.c b/mount.cifs.c
-index c7c3055..40b77e9 100644
---- a/mount.cifs.c
-+++ b/mount.cifs.c
-@@ -581,7 +581,8 @@ static int open_cred_file(char *file_name,
- 		switch (parse_cred_line(line_buf + i, &temp_val)) {
- 		case CRED_USER:
- 			strlcpy(parsed_info->username, temp_val,
--				sizeof(parsed_info->domain));
-+				sizeof(parsed_info->username));
-+			parsed_info->got_user = 1;
- 			break;
- 		case CRED_PASS:
- 			i = set_password(parsed_info, temp_val);
diff --git a/net-fs/cifs-utils/files/cifs-utils-6.1-hardcoded-path.patch b/net-fs/cifs-utils/files/cifs-utils-6.1-hardcoded-path.patch
deleted file mode 100644
index c2e2ea2..0000000
--- a/net-fs/cifs-utils/files/cifs-utils-6.1-hardcoded-path.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 4e315f6a02a4edb259b33bcf0665eba259fee2f2 Mon Sep 17 00:00:00 2001
-From: =?utf8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Tue, 30 Jul 2013 10:00:26 +0200
-Subject: [PATCH] Do not rely on hardcoded path to systemd-ask-password.
-MIME-Version: 1.0
-Content-Type: text/plain; charset=utf8
-Content-Transfer-Encoding: 8bit
-
-Relying on hardcoded /bin/systemd-ask-password path breaks systemd that
-install systemd-ask-password in /usr/bin. Since both paths are supposed
-to be in ${PATH} and popen() passes the command to shell, just pass
-'systemd-ask-password' and let the shell find it.
-
-Fixes: https://bugzilla.samba.org/show_bug.cgi?id=10054
-Signed-off-by: MichaÅ‚ Górny <mgorny@gentoo.org>
----
- mount.cifs.c |    4 ++--
- 1 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/mount.cifs.c b/mount.cifs.c
-index e76beee..7206dcb 100644
---- a/mount.cifs.c
-+++ b/mount.cifs.c
-@@ -1626,7 +1626,7 @@ drop_child_privs(void)
- }
- 
- /*
-- * If systemd is running and /bin/systemd-ask-password --
-+ * If systemd is running and systemd-ask-password --
-  * is available, then use that else fallback on getpass(..)
-  *
-  * Returns: @input or NULL on error
-@@ -1649,7 +1649,7 @@ get_password(const char *prompt, char *input, int capacity)
- 		FILE *ask_pass_fp = NULL;
- 
- 		cmd = ret = NULL;
--		if (asprintf(&cmd, "/bin/systemd-ask-password \"%s\"", prompt) >= 0) {
-+		if (asprintf(&cmd, "systemd-ask-password \"%s\"", prompt) >= 0) {
- 			ask_pass_fp = popen (cmd, "re");
- 			free (cmd);
- 		}
--- 
-1.7.0.4
-
diff --git a/net-fs/cifs-utils/files/cifs-utils-6.10-ln_in_destdir.patch b/net-fs/cifs-utils/files/cifs-utils-6.10-ln_in_destdir.patch
new file mode 100644
index 0000000..6952d72
--- /dev/null
+++ b/net-fs/cifs-utils/files/cifs-utils-6.10-ln_in_destdir.patch
@@ -0,0 +1,26 @@
+Fix sandbox violation caused by calling ln in /sbin instead of $(DESTDIR)/sbin
+
+Also fixed an inverted race condition when installing with MAKEOPTS="-j1"
+
+jer found this:
+  install-root_sbinPROGRAMS is called from install-data-am but
+  install-exec-hook is called from install-exec-am
+
+So moving the failing ln call into install-data-hook for now...
+
+--- cifs-utils-6.10/Makefile.am
++++ cifs-utils-6.10/Makefile.am
+@@ -118,11 +118,9 @@
+ 
+ SUBDIRS = contrib
+ 
+-install-exec-hook:
+-	(cd $(ROOTSBINDIR) && ln -sf mount.cifs mount.smb3)
+-
+ install-data-hook:
+-	(cd $(man8dir) && ln -sf mount.cifs.8 mount.smb3.8)
++	(cd $(DESTDIR)$(ROOTSBINDIR) && ln -sf mount.cifs mount.smb3)
++	(cd $(DESTDIR)$(man8dir) && ln -sf mount.cifs.8 mount.smb3.8)
+ 
+ uninstall-hook:
+ 	(cd $(ROOTSBINDIR) && rm -f $(ROOTSBINDIR)/mount.smb3)
diff --git a/net-fs/cifs-utils/files/cifs-utils-6.12-ln_in_destdir.patch b/net-fs/cifs-utils/files/cifs-utils-6.12-ln_in_destdir.patch
new file mode 100644
index 0000000..a5f7be6
--- /dev/null
+++ b/net-fs/cifs-utils/files/cifs-utils-6.12-ln_in_destdir.patch
@@ -0,0 +1,22 @@
+Fixed an inverted race condition when installing with MAKEOPTS="-j1"
+
+jer found this:
+  install-root_sbinPROGRAMS is called from install-data-am but
+  install-exec-hook is called from install-exec-am
+
+So moving the failing ln call into install-data-hook for now...
+
+--- cifs-utils-6.12/Makefile.am
++++ cifs-utils-6.12/Makefile.am
+@@ -117,10 +117,8 @@
+ 
+ SUBDIRS = contrib
+ 
+-install-exec-hook: install-sbinPROGRAMS
++install-data-hook: install-sbinPROGRAMS
+ 	(cd $(DESTDIR)$(ROOTSBINDIR) && ln -sf mount.cifs mount.smb3)
+-
+-install-data-hook:
+ if CONFIG_MAN
+ 	( cd $(DESTDIR)$(man8dir) && ln -sf mount.cifs.8 mount.smb3.8)
+ endif
diff --git a/net-fs/cifs-utils/files/cifs-utils-6.7-heimdal.patch b/net-fs/cifs-utils/files/cifs-utils-6.7-heimdal.patch
new file mode 100644
index 0000000..f8fea48
--- /dev/null
+++ b/net-fs/cifs-utils/files/cifs-utils-6.7-heimdal.patch
@@ -0,0 +1,27 @@
+https://bugs.gentoo.org/612584
+
+--- cifs-utils-6.7/cifs.upcall.c
++++ cifs-utils-6.7/cifs.upcall.c
+@@ -75,11 +75,13 @@
+ #define KRB5_KEY_LENGTH(k)      ((k)->keyvalue.length)
+ #define KRB5_KEY_DATA(k)        ((k)->keyvalue.data)
+ #define KRB5_KEY_DATA_CAST      void
++#define KRB5_FREE_STRING(c,k)   krb5_xfree(k)
+ #else /* MIT */
+ #define KRB5_KEY_TYPE(k)        ((k)->enctype)
+ #define KRB5_KEY_LENGTH(k)      ((k)->length)
+ #define KRB5_KEY_DATA(k)        ((k)->contents)
+ #define KRB5_KEY_DATA_CAST      krb5_octet
++#define KRB5_FREE_STRING(c,k)   krb5_free_string(c,k)
+ #endif
+ 
+ #ifdef HAVE_LIBCAP_NG
+@@ -358,7 +360,7 @@
+ 		syslog(LOG_DEBUG, "%s: krb5_cc_get_full_name failed: %d\n", __func__, ret);
+ 	} else {
+ 		syslog(LOG_DEBUG, "%s: default ccache is %s\n", __func__, cachename);
+-		krb5_free_string(context, cachename);
++		KRB5_FREE_STRING(context, cachename);
+ 	}
+ 
+ 	if (!get_tgt_time(cc)) {
diff --git a/net-fs/cifs-utils/metadata.xml b/net-fs/cifs-utils/metadata.xml
index a31a339..712fea2 100644
--- a/net-fs/cifs-utils/metadata.xml
+++ b/net-fs/cifs-utils/metadata.xml
@@ -1,16 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
-	<herd>samba</herd>
-	<maintainer>
+	<maintainer type="project">
 		<email>samba@gentoo.org</email>
 		<name>Samba Team</name>
 	</maintainer>
-	<longdescription>The in-kernel CIFS filesystem relies on a set of user-space tools. That package of tools is called cifs-utils. Although not really part of Samba proper, these tools were originally part of the Samba package. For several reasons, shipping these tools as part of Samba was problematic and it was deemed better to split them off into their own package</longdescription>
+	<longdescription>
+		The in-kernel CIFS filesystem relies on a set of user-space
+		tools. That package of tools is called cifs-utils. Although not
+		really part of Samba proper, these tools were originally part of
+		the Samba package. For several reasons, shipping these tools as
+		part of Samba was problematic and it was deemed better to split
+		them off into their own package
+	</longdescription>
 	<use>
 		<flag name="ads">Enable Active Directory support and create cifs.idmap binary - idmap support</flag>
-		<flag name="caps">libcap support</flag>
-		<flag name="caps-ng">libcap-ng support</flag>
+		<flag name="caps">Enable <pkg>sys-libs/libcap-ng</pkg> support</flag>
 		<flag name="creds">cifs credentials support</flag>
 	</use>
 </pkgmetadata>
diff --git a/net-misc/openssh/Manifest b/net-misc/openssh/Manifest
index 9d50c1d..adff194 100644
--- a/net-misc/openssh/Manifest
+++ b/net-misc/openssh/Manifest
@@ -1,7 +1,6 @@
-DIST openssh-8.1_p1-glibc-2.31-patches.tar.xz 1752 BLAKE2B ccab53069c0058be7ba787281f5a1775d169a9dcda6f78742eb8cb3cce4ebe3a4c506c75a8ac142700669cf04b7475e35f6a06a4499d3d076e4e88e4fc59f3e6 SHA512 270d532fc7f4ec10c5ee56677f8280dec47a96e73f8032713b212cfad64a58ef142a7f49b7981dca80cbf0dd99753ef7a93b6af164cad9492fa224d546c27f14
-DIST openssh-8.1p1+x509-12.3.diff.gz 689934 BLAKE2B 57a302a25bec1d630b9c36f74ab490e11c97f9bcbaf8f527e46ae7fd5bade19feb3d8853079870b5c08b70a55e289cf4bf7981c11983973fa588841aeb21e650 SHA512 8d7c321423940f5a78a51a25ad5373f5db17a4a8ca7e85041e503998e0823ad22068bc652e907e9f5787858d45ce438a4bba18240fa72e088eb10b903e96b192
-DIST openssh-8.1p1-sctp-1.2.patch.xz 7672 BLAKE2B f1aa0713fcb114d8774bd8d524d106401a9d7c2c73a05fbde200ccbdd2562b3636ddd2d0bc3eae9f04b4d7c729c3dafd814ae8c530a76c4a0190fae71d1edcd2 SHA512 2bffab0bbae5a4c1875e0cc229bfd83d8565bd831309158cd489d8b877556c69b936243888a181bd9ff302e19f2c174156781574294d260b6384c464d003d566
-DIST openssh-8.1p1.tar.gz 1625894 BLAKE2B d525be921a6f49420a58df5ac434d43a0c85e0f6bf8428ecebf04117c50f473185933e6e4485e506ac614f71887a513b9962d7b47969ba785da8e3a38f767322 SHA512 b987ea4ffd4ab0c94110723860273b06ed8ffb4d21cbd99ca144a4722dc55f4bf86f6253d500386b6bee7af50f066e2aa2dd095d50746509a10e11221d39d925
-DIST openssh-8_1_P1-hpn-AES-CTR-14.20.diff 29935 BLAKE2B 79101c43601e41306c957481c0680a63357d93bededdf12a32229d50acd9c1f46a386cbb91282e9e7d7bb26a9f276f5a675fd2de7662b7cbd073322b172d3bca SHA512 94f011b7e654630e968a378375aa54fa1fde087b4426d0f2225813262e6667a1073814d6a83e9005f97b371c536e462e614bfe726b092ffed8229791592ca221
-DIST openssh-8_1_P1-hpn-DynWinNoneSwitch-14.20.diff 42696 BLAKE2B d8ac7fa1a4e4d1877acdedeaee80172da469b5a62d0aaa43d6ed46c578e7893577b9d563835d89ca2044867fc561ad3f562bf504c025cf4c78421cf3d24397e9 SHA512 768db7cca8839df4441afcb08457d13d32625b31859da527c3d7f1a92d17a4ec81d6987db00879c394bbe59589e57b10bfd98899a167ffed65ab367b1fd08739
-DIST openssh-8_1_P1-hpn-PeakTput-14.20.diff 2012 BLAKE2B e42c43128f1d82b4de1517e6a9219947da03cecb607f1bc45f0728547f17601a6ce2ec819b6434890efd19ceaf4d20cb98183596ab5ee79e104a52cda7db9cdc SHA512 238f9419efd3be80bd700f6ae7e210e522d747c363c4e670364f5191f144ae3aa8d1b1539c0bf87b3de36743aa73e8101c53c0ef1c6472d209569be389e7814d
+DIST openssh-8.5p1+x509-13.0.diff.gz 996872 BLAKE2B 136937e4e65e5e73d1d1b596ae6188f359daa8e95aafd57fab8cf947b59fde573ff4e6259781d1a0fd89718d14469ca4aed01bae6f37cc16df109c673fa2c73c SHA512 2276b0ac577162f7f6a56115637636a6eaaa8b3cc06e5ef053ec06e00a7c3459efe8de8dbc5f55c9f6a192534e2f7c8c7064fcdbf56d28b628bb301c5072802c
+DIST openssh-8.5p1-sctp-1.2.patch.xz 7692 BLAKE2B 298bf5e2004fd864bdbb6d6f354d1fbcb7052a9caaf8e39863b840a7af8e31f87790f6aa10ae84df177d450bb34a43c4a3aa87d7472e2505d727757c016ce92b SHA512 84990f95e22c90dbc4d04d47ea88b761ff1d0101018661ff2376ac2a726b5fca43f1b5f5d926ccbe1c8d0143ac36b104616bd1a6b5dcdba4addf48a5dd196e2b
+DIST openssh-8.5p1.tar.gz 1779733 BLAKE2B f4e4bd39e2dd275d4811e06ca994f2239ad27c804b003c74cc26f9dffae28f1b4006fc618580f0dc9c45f0b7361c24728c23688b45f41cb8a15cf6206c3f15c3 SHA512 af9c34d89170a30fc92a63973e32c766ed4a6d254bb210e317c000d46913e78d0c60c7befe62d993d659be000b828b9d4d3832fc40df1c3d33850aaa6293846f
+DIST openssh-8_4_P1-hpn-AES-CTR-15.1.diff 29966 BLAKE2B 79dea4e16ffdda329131eb48a3c3dd40e167e5c6fa4dd2beb6c67e7e4f17a45c6645e84dcdc97baae90215a802cd1d723dfd88c981b1db826f61fca0a4e92ae1 SHA512 cdb7aa5737a1527d83ffa747d17ae997a64b7bc16e198d0721b690e5932446d30ba4129c122be2a457f261be7a11d944ef49ba2450ce90f552daab508b0c980b
+DIST openssh-8_4_P1-hpn-DynWinNoneSwitch-15.1.diff 51327 BLAKE2B 6879df5bfb4c07c44b41620bd49433591711edb08ad6b5c09af8a5f754ca09f3ff6a066ffac3210fdad6dee47710221dca0a3dc47b919498ec6939b42a073418 SHA512 1e6471e88783acf764186577a767ea7c2071bcab1b803c18288f70166d87471703b332dae3bdcaf4318039089caebfba46e5b6da218912eff1103bd03d736a60
+DIST openssh-8_4_P1-hpn-PeakTput-15.1.diff 2429 BLAKE2B fc2140f4036ef57b7093696680b6e157c78bb431af9bc9e75f223c2b13693f0ec2ad214fbf6b2ba0059cbf3690a93235559f07b46dabd056d65ae1fc9d7418f0 SHA512 99801a743da8f108dcf883bc216f2abd3fc3071617566b83eb07b6627ed657cccf0ea93ea2a70eff1050a34a0e635e732665c5583e8aa35968fdeb839f837b63
diff --git a/net-misc/openssh/OWNERS b/net-misc/openssh/OWNERS
deleted file mode 100644
index 0300dc1..0000000
--- a/net-misc/openssh/OWNERS
+++ /dev/null
@@ -1 +0,0 @@
-include chromiumos/overlays/chromiumos-overlay:/OWNERS.security
diff --git a/net-misc/openssh/files/openssh-8.0_p1-hpn-X509-glue.patch b/net-misc/openssh/files/openssh-8.0_p1-hpn-X509-glue.patch
deleted file mode 100644
index 2a9d3bd..0000000
--- a/net-misc/openssh/files/openssh-8.0_p1-hpn-X509-glue.patch
+++ /dev/null
@@ -1,114 +0,0 @@
---- a/openssh-7_8_P1-hpn-DynWinNoneSwitch-14.16.diff	2019-04-18 17:07:59.413376785 -0700
-+++ b/openssh-7_8_P1-hpn-DynWinNoneSwitch-14.16.diff	2019-04-18 20:05:12.622588051 -0700
-@@ -382,7 +382,7 @@
- @@ -822,6 +822,10 @@ kex_choose_conf(struct ssh *ssh)
-  	int nenc, nmac, ncomp;
-  	u_int mode, ctos, need, dh_need, authlen;
-- 	int r, first_kex_follows;
-+ 	int r, first_kex_follows = 0;
- +	int auth_flag;
- +
- +	auth_flag = packet_authentication_state(ssh);
-@@ -441,6 +441,39 @@
-  int	 ssh_packet_get_state(struct ssh *, struct sshbuf *);
-  int	 ssh_packet_set_state(struct ssh *, struct sshbuf *);
-  
-+diff --git a/packet.c b/packet.c
-+index dcf35e6..9433f08 100644
-+--- a/packet.c
-++++ b/packet.c
-+@@ -920,6 +920,14 @@ ssh_set_newkeys(struct ssh *ssh, int mode)
-+ 	return 0;
-+ }
-+ 
-++/* this supports the forced rekeying required for the NONE cipher */
-++int rekey_requested = 0;
-++void
-++packet_request_rekeying(void)
-++{
-++        rekey_requested = 1;
-++}
-++
-+ #define MAX_PACKETS	(1U<<31)
-+ static int
-+ ssh_packet_need_rekeying(struct ssh *ssh, u_int outbound_packet_len)
-+@@ -946,6 +954,13 @@ ssh_packet_need_rekeying(struct ssh *ssh, u_int outbound_packet_len)
-+ 	if (state->p_send.packets == 0 && state->p_read.packets == 0)
-+ 		return 0;
-+ 
-++        /* used to force rekeying when called for by the none
-++         * cipher switch and aes-mt-ctr methods -cjr */
-++        if (rekey_requested == 1) {
-++                rekey_requested = 0;
-++                return 1;
-++        }
-++	
-+ 	/* Time-based rekeying */
-+ 	if (state->rekey_interval != 0 &&
-+ 	    (int64_t)state->rekey_time + state->rekey_interval <= monotime())
- diff --git a/readconf.c b/readconf.c
- index db5f2d5..33f18c9 100644
- --- a/readconf.c
-@@ -453,10 +486,9 @@
-  
-  /* Format of the configuration file:
-  
--@@ -166,6 +167,8 @@ typedef enum {
-+@@ -166,5 +167,7 @@ typedef enum {
-  	oTunnel, oTunnelDevice,
-  	oLocalCommand, oPermitLocalCommand, oRemoteCommand,
-- 	oDisableMTAES,
- +	oTcpRcvBufPoll, oTcpRcvBuf, oHPNDisabled, oHPNBufferSize,
- +	oNoneEnabled, oNoneSwitch,
-  	oVisualHostKey,
-@@ -592,10 +624,9 @@
-  	int	ip_qos_interactive;	/* IP ToS/DSCP/class for interactive */
-  	int	ip_qos_bulk;		/* IP ToS/DSCP/class for bulk traffic */
-  	SyslogFacility log_facility;	/* Facility for system logging. */
--@@ -111,7 +115,10 @@ typedef struct {
-+@@ -111,6 +115,9 @@ typedef struct {
-  	int	enable_ssh_keysign;
-  	int64_t rekey_limit;
-- 	int     disable_multithreaded; /*disable multithreaded aes-ctr*/
- +	int     none_switch;    /* Use none cipher */
- +	int     none_enabled;   /* Allow none to be used */
-  	int	rekey_interval;
-@@ -650,10 +681,8 @@
-  
-  	/* Portable-specific options */
-  	if (options->use_pam == -1)
--@@ -391,6 +400,43 @@ fill_default_server_options(ServerOptions *options)
-+@@ -391,4 +400,41 @@ fill_default_server_options(ServerOptions *options)
-  		options->permit_tun = SSH_TUNMODE_NO;
-- 	if (options->disable_multithreaded == -1)
-- 		options->disable_multithreaded = 0;
- +	if (options->none_enabled == -1)
- +		options->none_enabled = 0;
- +	if (options->hpn_disabled == -1)
-@@ -1095,9 +1124,9 @@
- +			fprintf(stderr, "NONE cipher switch disabled when a TTY is allocated\n");
- +		}
- +	}
-+ 	debug("Authentication succeeded (%s).", authctxt.method->name);
-+ }
-  
-- #ifdef WITH_OPENSSL
-- 	if (options.disable_multithreaded == 0) {
- diff --git a/sshd.c b/sshd.c
- index a738c3a..b32dbe0 100644
- --- a/sshd.c
-@@ -1181,14 +1210,3 @@
-  # Example of overriding settings on a per-user basis
-  #Match User anoncvs
-  #	X11Forwarding no
--diff --git a/version.h b/version.h
--index f1bbf00..21a70c2 100644
----- a/version.h
--+++ b/version.h
--@@ -3,4 +3,5 @@
-- #define SSH_VERSION	"OpenSSH_7.8"
-- 
-- #define SSH_PORTABLE	"p1"
---#define SSH_RELEASE	SSH_VERSION SSH_PORTABLE
--+#define SSH_RELEASE	SSH_VERSION SSH_PORTABLE SSH_HPN
--+ 
diff --git a/net-misc/openssh/files/openssh-8.1_p1-Add-POLLOUT-when-connecting-in-non-blocking-mode.patch b/net-misc/openssh/files/openssh-8.1_p1-Add-POLLOUT-when-connecting-in-non-blocking-mode.patch
deleted file mode 100644
index ac8c130..0000000
--- a/net-misc/openssh/files/openssh-8.1_p1-Add-POLLOUT-when-connecting-in-non-blocking-mode.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-From: Mattias Nissler <mnissler@chromium.org>
-To: openssh-unix-dev@mindrot.org
-Subject: [PATCH] Add POLLOUT when connect()ing in non-blocking mode.
-Date: Thu, 21 Nov 2019 00:34:50 +0100
-
-With the current POLLIN as the only requested event, there won't be a
-poll event reported when the TCP connection has been established
-successfully, but only after receiving data from the other side. This
-is a problem when connecting to servers that don't send their
-identification string immediately, e.g. the sslh multiplexer waits for
-the first client packet to identify the requested service. To make
-this work better and be consistent with blocking connect(), also
-request POLLOUT events such that poll() returns once the TCP
-connection has come up.
----
- misc.c | 20 +++++++++++++++-----
- 1 file changed, 15 insertions(+), 5 deletions(-)
-
- Here is a reproduction of the issue:
-
-  (cr) mnissler@toroa ~ $ uname -r
-  4.19.67-2rodete2-amd64
-  (cr) mnissler@toroa ~ $ /usr/sbin/sslh -V
-  sslh-fork v1.18
-  (cr) mnissler@toroa ~ $ ssh -V
-  OpenSSH_8.1p1-hpn14v16, OpenSSL 1.0.2t  10 Sep 2019
-
-  Start sslh with a timeout of 2 seconds:
-
-  (cr) mnissler@toroa ~ $ /usr/sbin/sslh -p localhost:2222 -t 2 --ssh localhost:22 -f &
-  [1] 251851
-  sslh-fork v1.18 started
-
-  When passing ConnectTimeout=2, the client doesn't notice the TCP
-  connection coming up so the connection times out after 2 seconds:
-
-  (cr) mnissler@toroa ~ $ ssh -v -o ConnectTimeout=2 -p 2222 localhost
-  OpenSSH_8.1p1-hpn14v16, OpenSSL 1.0.2t  10 Sep 2019
-  debug1: Reading configuration data /home/mnissler/.ssh/config
-  debug1: Reading configuration data /etc/ssh/ssh_config
-  debug1: Connecting to localhost [::1] port 2222.
-  debug1: connect to address ::1 port 2222: Connection timed out
-  debug1: Connecting to localhost [127.0.0.1] port 2222.
-  debug1: connect to address 127.0.0.1 port 2222: Connection timed out
-  ssh: connect to host localhost port 2222: Connection timed out
-  ssh:connection from localhost:37766 to localhost:2222 forwarded from localhost:41614 to localhost:ssh
-
-  Increasing ConnectTimeout to 3, the connection comes up
-  successfully, but only after the sslh timeout expires, which causes
-  unnecessary delay:
-
-  (cr) mnissler@toroa ~ $ ssh -v -o ConnectTimeout=3 -p 2222 localhost
-  OpenSSH_8.1p1-hpn14v16, OpenSSL 1.0.2t  10 Sep 2019
-  debug1: Reading configuration data /home/mnissler/.ssh/config
-  debug1: Reading configuration data /etc/ssh/ssh_config
-  debug1: Connecting to localhost [::1] port 2222.
-  <<< hangs for 2 seconds here >>>
-  debug1: fd 3 clearing O_NONBLOCK
-  debug1: Connection established.
-
---- a/misc.c
-+++ b/misc.c
-@@ -238,12 +238,12 @@ set_rdomain(int fd, const char *name)
- }
- 
- /*
-- * Wait up to *timeoutp milliseconds for fd to be readable. Updates
-+ * Wait up to *timeoutp milliseconds for events on fd. Updates
-  * *timeoutp with time remaining.
-  * Returns 0 if fd ready or -1 on timeout or error (see errno).
-  */
--int
--waitrfd(int fd, int *timeoutp)
-+static int
-+waitfd(int fd, int *timeoutp, short events)
- {
- 	struct pollfd pfd;
- 	struct timeval t_start;
-@@ -251,7 +251,7 @@ waitrfd(int fd, int *timeoutp)
- 
- 	monotime_tv(&t_start);
- 	pfd.fd = fd;
--	pfd.events = POLLIN;
-+	pfd.events = events;
- 	for (; *timeoutp >= 0;) {
- 		r = poll(&pfd, 1, *timeoutp);
- 		oerrno = errno;
-@@ -269,6 +269,16 @@ waitrfd(int fd, int *timeoutp)
- 	return -1;
- }
- 
-+/*
-+ * Wait up to *timeoutp milliseconds for fd to be readable. Updates
-+ * *timeoutp with time remaining.
-+ * Returns 0 if fd ready or -1 on timeout or error (see errno).
-+ */
-+int
-+waitrfd(int fd, int *timeoutp) {
-+	return waitfd(fd, timeoutp, POLLIN);
-+}
-+
- /*
-  * Attempt a non-blocking connect(2) to the specified address, waiting up to
-  * *timeoutp milliseconds for the connection to complete. If the timeout is
-@@ -295,7 +305,7 @@ timeout_connect(int sockfd, const struct sockaddr *serv_addr,
- 	} else if (errno != EINPROGRESS)
- 		return -1;
- 
--	if (waitrfd(sockfd, timeoutp) == -1)
-+	if (waitfd(sockfd, timeoutp, POLLIN | POLLOUT) == -1)
- 		return -1;
- 
- 	/* Completed or failed */
--- 
-2.24.0.432.g9d3f5f5b63-goog
diff --git a/net-misc/openssh/files/openssh-8.1_p1-X509-12.3-tests.patch b/net-misc/openssh/files/openssh-8.1_p1-X509-12.3-tests.patch
deleted file mode 100644
index 67a93fe..0000000
--- a/net-misc/openssh/files/openssh-8.1_p1-X509-12.3-tests.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/openbsd-compat/regress/Makefile.in	2019-06-17 10:59:01.210601434 -0700
-+++ b/openbsd-compat/regress/Makefile.in	2019-06-17 10:59:18.753485852 -0700
-@@ -7,7 +7,7 @@
- CC=@CC@
- LD=@LD@
- CFLAGS=@CFLAGS@
--CPPFLAGS=-I. -I.. -I$(srcdir) -I$(srcdir)/.. @CPPFLAGS@ @DEFS@
-+CPPFLAGS=-I. -I.. -I../.. -I$(srcdir) -I$(srcdir)/.. @CPPFLAGS@ @DEFS@
- EXEEXT=@EXEEXT@
- LIBCOMPAT=../libopenbsd-compat.a
- LIBS=@LIBS@
diff --git a/net-misc/openssh/files/openssh-8.1_p1-X509-glue-12.3.patch b/net-misc/openssh/files/openssh-8.1_p1-X509-glue-12.3.patch
deleted file mode 100644
index 48cce79..0000000
--- a/net-misc/openssh/files/openssh-8.1_p1-X509-glue-12.3.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Only in b: .openssh-8.1p1+x509-12.3.diff.un~
-diff -ur a/openssh-8.1p1+x509-12.3.diff b/openssh-8.1p1+x509-12.3.diff
---- a/openssh-8.1p1+x509-12.3.diff	2019-10-14 11:33:45.796485604 -0700
-+++ b/openssh-8.1p1+x509-12.3.diff	2019-10-14 11:39:44.960312587 -0700
-@@ -35343,12 +35343,11 @@
-  
-  install: $(CONFIGFILES) $(MANPAGES) $(TARGETS) install-files install-sysconf host-key check-config
-  install-nokeys: $(CONFIGFILES) $(MANPAGES) $(TARGETS) install-files install-sysconf
--@@ -339,6 +360,8 @@
-+@@ -339,6 +360,7 @@
-  	$(MKDIR_P) $(DESTDIR)$(mandir)/$(mansubdir)5
-  	$(MKDIR_P) $(DESTDIR)$(mandir)/$(mansubdir)8
-  	$(MKDIR_P) $(DESTDIR)$(libexecdir)
- +	$(MKDIR_P) $(DESTDIR)$(sshcadir)
--+	$(MKDIR_P) $(DESTDIR)$(piddir)
-  	$(MKDIR_P) -m 0755 $(DESTDIR)$(PRIVSEP_PATH)
-  	$(INSTALL) -m 0755 $(STRIP_OPT) ssh$(EXEEXT) $(DESTDIR)$(bindir)/ssh$(EXEEXT)
-  	$(INSTALL) -m 0755 $(STRIP_OPT) scp$(EXEEXT) $(DESTDIR)$(bindir)/scp$(EXEEXT)
-@@ -83536,16 +83535,6 @@
- +	return mbtowc(NULL, s, n);
- +}
- +#endif
--diff -ruN openssh-8.1p1/version.h openssh-8.1p1+x509-12.3/version.h
----- openssh-8.1p1/version.h	2019-10-09 03:31:03.000000000 +0300
--+++ openssh-8.1p1+x509-12.3/version.h	2019-10-13 09:07:00.000000000 +0300
--@@ -2,5 +2,4 @@
-- 
-- #define SSH_VERSION	"OpenSSH_8.1"
-- 
---#define SSH_PORTABLE	"p1"
---#define SSH_RELEASE	SSH_VERSION SSH_PORTABLE
--+#define SSH_RELEASE	PACKAGE_STRING ", " SSH_VERSION "p1"
- diff -ruN openssh-8.1p1/version.m4 openssh-8.1p1+x509-12.3/version.m4
- --- openssh-8.1p1/version.m4	1970-01-01 02:00:00.000000000 +0200
- +++ openssh-8.1p1+x509-12.3/version.m4	2019-10-13 09:07:00.000000000 +0300
diff --git a/net-misc/openssh/files/openssh-8.1_p1-GSSAPI-dns.patch b/net-misc/openssh/files/openssh-8.2_p1-GSSAPI-dns.patch
similarity index 93%
rename from net-misc/openssh/files/openssh-8.1_p1-GSSAPI-dns.patch
rename to net-misc/openssh/files/openssh-8.2_p1-GSSAPI-dns.patch
index 6aba6f2..d4db77b 100644
--- a/net-misc/openssh/files/openssh-8.1_p1-GSSAPI-dns.patch
+++ b/net-misc/openssh/files/openssh-8.2_p1-GSSAPI-dns.patch
@@ -1,8 +1,8 @@
 diff --git a/auth.c b/auth.c
-index ca450f4e..2994a4e4 100644
+index 086b8ebb..a267353c 100644
 --- a/auth.c
 +++ b/auth.c
-@@ -723,120 +723,6 @@ fakepw(void)
+@@ -724,120 +724,6 @@ fakepw(void)
  	return (&fake);
  }
  
@@ -31,7 +31,7 @@
 -	if (getpeername(ssh_packet_get_connection_in(ssh),
 -	    (struct sockaddr *)&from, &fromlen) == -1) {
 -		debug("getpeername failed: %.100s", strerror(errno));
--		return strdup(ntop);
+-		return xstrdup(ntop);
 -	}
 -
 -	ipv64_normalise_mapped(&from, &fromlen);
@@ -43,7 +43,7 @@
 -	if (getnameinfo((struct sockaddr *)&from, fromlen, name, sizeof(name),
 -	    NULL, 0, NI_NAMEREQD) != 0) {
 -		/* Host name not found.  Use ip address. */
--		return strdup(ntop);
+-		return xstrdup(ntop);
 -	}
 -
 -	/*
@@ -58,7 +58,7 @@
 -		logit("Nasty PTR record \"%s\" is set up for %s, ignoring",
 -		    name, ntop);
 -		freeaddrinfo(ai);
--		return strdup(ntop);
+-		return xstrdup(ntop);
 -	}
 -
 -	/* Names are stored in lowercase. */
@@ -79,7 +79,7 @@
 -	if (getaddrinfo(name, NULL, &hints, &aitop) != 0) {
 -		logit("reverse mapping checking getaddrinfo for %.700s "
 -		    "[%s] failed.", name, ntop);
--		return strdup(ntop);
+-		return xstrdup(ntop);
 -	}
 -	/* Look for the address from the list of addresses. */
 -	for (ai = aitop; ai; ai = ai->ai_next) {
@@ -94,9 +94,9 @@
 -		/* Address not found for the host name. */
 -		logit("Address %.100s maps to %.600s, but this does not "
 -		    "map back to the address.", ntop, name);
--		return strdup(ntop);
+-		return xstrdup(ntop);
 -	}
--	return strdup(name);
+-	return xstrdup(name);
 -}
 -
 -/*
@@ -246,10 +246,10 @@
 +	}
 +}
 diff --git a/readconf.c b/readconf.c
-index f78b4d6f..747287f7 100644
+index f3cac6b3..adfd7a4e 100644
 --- a/readconf.c
 +++ b/readconf.c
-@@ -162,6 +162,7 @@ typedef enum {
+@@ -160,6 +160,7 @@ typedef enum {
  	oClearAllForwardings, oNoHostAuthenticationForLocalhost,
  	oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout,
  	oAddressFamily, oGssAuthentication, oGssDelegateCreds,
@@ -257,7 +257,7 @@
  	oServerAliveInterval, oServerAliveCountMax, oIdentitiesOnly,
  	oSendEnv, oSetEnv, oControlPath, oControlMaster, oControlPersist,
  	oHashKnownHosts,
-@@ -203,9 +204,11 @@ static struct {
+@@ -205,9 +206,11 @@ static struct {
  #if defined(GSSAPI)
  	{ "gssapiauthentication", oGssAuthentication },
  	{ "gssapidelegatecredentials", oGssDelegateCreds },
@@ -269,7 +269,7 @@
  #endif
  #ifdef ENABLE_PKCS11
  	{ "pkcs11provider", oPKCS11Provider },
-@@ -992,6 +995,10 @@ parse_time:
+@@ -1033,6 +1036,10 @@ parse_time:
  		intptr = &options->gss_deleg_creds;
  		goto parse_flag;
  
@@ -280,7 +280,7 @@
  	case oBatchMode:
  		intptr = &options->batch_mode;
  		goto parse_flag;
-@@ -1864,6 +1871,7 @@ initialize_options(Options * options)
+@@ -1912,6 +1919,7 @@ initialize_options(Options * options)
  	options->challenge_response_authentication = -1;
  	options->gss_authentication = -1;
  	options->gss_deleg_creds = -1;
@@ -288,7 +288,7 @@
  	options->password_authentication = -1;
  	options->kbd_interactive_authentication = -1;
  	options->kbd_interactive_devices = NULL;
-@@ -2011,6 +2019,8 @@ fill_default_options(Options * options)
+@@ -2061,6 +2069,8 @@ fill_default_options(Options * options)
  		options->gss_authentication = 0;
  	if (options->gss_deleg_creds == -1)
  		options->gss_deleg_creds = 0;
@@ -298,10 +298,10 @@
  		options->password_authentication = 1;
  	if (options->kbd_interactive_authentication == -1)
 diff --git a/readconf.h b/readconf.h
-index 8e36bf32..c9e4718d 100644
+index feedb3d2..c7139c1b 100644
 --- a/readconf.h
 +++ b/readconf.h
-@@ -41,6 +41,7 @@ typedef struct {
+@@ -42,6 +42,7 @@ typedef struct {
  					/* Try S/Key or TIS, authentication. */
  	int     gss_authentication;	/* Try GSS authentication */
  	int     gss_deleg_creds;	/* Delegate GSS credentials */
@@ -310,10 +310,10 @@
  						 * authentication. */
  	int     kbd_interactive_authentication; /* Try keyboard-interactive auth. */
 diff --git a/ssh_config.5 b/ssh_config.5
-index 02a87892..95de538b 100644
+index 06a32d31..6871ff36 100644
 --- a/ssh_config.5
 +++ b/ssh_config.5
-@@ -762,6 +762,16 @@ The default is
+@@ -770,6 +770,16 @@ The default is
  Forward (delegate) credentials to the server.
  The default is
  .Cm no .
@@ -331,10 +331,10 @@
  Indicates that
  .Xr ssh 1
 diff --git a/sshconnect2.c b/sshconnect2.c
-index 87fa70a4..a6ffdc96 100644
+index af00fb30..652463c5 100644
 --- a/sshconnect2.c
 +++ b/sshconnect2.c
-@@ -697,6 +697,13 @@ userauth_gssapi(struct ssh *ssh)
+@@ -716,6 +716,13 @@ userauth_gssapi(struct ssh *ssh)
  	OM_uint32 min;
  	int r, ok = 0;
  	gss_OID mech = NULL;
@@ -348,7 +348,7 @@
  
  	/* Try one GSSAPI method at a time, rather than sending them all at
  	 * once. */
-@@ -711,7 +718,7 @@ userauth_gssapi(struct ssh *ssh)
+@@ -730,7 +737,7 @@ userauth_gssapi(struct ssh *ssh)
  		    elements[authctxt->mech_tried];
  		/* My DER encoding requires length<128 */
  		if (mech->length < 128 && ssh_gssapi_check_mechanism(&gssctxt,
diff --git a/net-misc/openssh/files/openssh-8.3_p1-sha2-include.patch b/net-misc/openssh/files/openssh-8.3_p1-sha2-include.patch
new file mode 100644
index 0000000..6bd7166
--- /dev/null
+++ b/net-misc/openssh/files/openssh-8.3_p1-sha2-include.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile.in b/Makefile.in
+index c9e4294d..2dbfac24 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -44,7 +44,7 @@ CC=@CC@
+ LD=@LD@
+ CFLAGS=@CFLAGS@
+ CFLAGS_NOPIE=@CFLAGS_NOPIE@
+-CPPFLAGS=-I. -I$(srcdir) @CPPFLAGS@ $(PATHS) @DEFS@
++CPPFLAGS=-I. -I$(srcdir) -I$(srcdir)/openbsd-compat @CPPFLAGS@ $(PATHS) @DEFS@
+ PICFLAG=@PICFLAG@
+ LIBS=@LIBS@
+ K5LIBS=@K5LIBS@
diff --git a/net-misc/openssh/files/openssh-8.4_p1-X509-glue-12.6.patch b/net-misc/openssh/files/openssh-8.4_p1-X509-glue-12.6.patch
new file mode 100644
index 0000000..f12a309
--- /dev/null
+++ b/net-misc/openssh/files/openssh-8.4_p1-X509-glue-12.6.patch
@@ -0,0 +1,34 @@
+diff -u a/openssh-8.4p1+x509-12.6.diff b/openssh-8.4p1+x509-12.6.diff
+--- a/openssh-8.4p1+x509-12.6.diff	2020-10-04 10:58:16.980495330 -0700
++++ b/openssh-8.4p1+x509-12.6.diff	2020-10-04 11:02:31.951966223 -0700
+@@ -39348,12 +39348,11 @@
+  
+  install-files:
+  	$(MKDIR_P) $(DESTDIR)$(bindir)
+-@@ -384,6 +365,8 @@
++@@ -384,6 +365,7 @@
+  	$(MKDIR_P) $(DESTDIR)$(mandir)/$(mansubdir)5
+  	$(MKDIR_P) $(DESTDIR)$(mandir)/$(mansubdir)8
+  	$(MKDIR_P) $(DESTDIR)$(libexecdir)
+ +	$(MKDIR_P) $(DESTDIR)$(sshcadir)
+-+	$(MKDIR_P) $(DESTDIR)$(piddir)
+  	$(MKDIR_P) -m 0755 $(DESTDIR)$(PRIVSEP_PATH)
+  	$(INSTALL) -m 0755 $(STRIP_OPT) ssh$(EXEEXT) $(DESTDIR)$(bindir)/ssh$(EXEEXT)
+  	$(INSTALL) -m 0755 $(STRIP_OPT) scp$(EXEEXT) $(DESTDIR)$(bindir)/scp$(EXEEXT)
+@@ -103950,16 +103949,6 @@
+ +int	 asnmprintf(char **, size_t, int *, const char *, ...)
+  	     __attribute__((format(printf, 4, 5)));
+  void	 msetlocale(void);
+-diff -ruN openssh-8.4p1/version.h openssh-8.4p1+x509-12.6/version.h
+---- openssh-8.4p1/version.h	2020-09-27 10:25:01.000000000 +0300
+-+++ openssh-8.4p1+x509-12.6/version.h	2020-10-03 10:07:00.000000000 +0300
+-@@ -2,5 +2,4 @@
+- 
+- #define SSH_VERSION	"OpenSSH_8.4"
+- 
+--#define SSH_PORTABLE	"p1"
+--#define SSH_RELEASE	SSH_VERSION SSH_PORTABLE
+-+#define SSH_RELEASE	PACKAGE_STRING ", " SSH_VERSION "p1"
+ diff -ruN openssh-8.4p1/version.m4 openssh-8.4p1+x509-12.6/version.m4
+ --- openssh-8.4p1/version.m4	1970-01-01 02:00:00.000000000 +0200
+ +++ openssh-8.4p1+x509-12.6/version.m4	2020-10-03 10:07:00.000000000 +0300
diff --git a/net-misc/openssh/files/openssh-8.4_p1-fix-ssh-copy-id.patch b/net-misc/openssh/files/openssh-8.4_p1-fix-ssh-copy-id.patch
new file mode 100644
index 0000000..32713d4
--- /dev/null
+++ b/net-misc/openssh/files/openssh-8.4_p1-fix-ssh-copy-id.patch
@@ -0,0 +1,30 @@
+From d9e727dcc04a52caaac87543ea1d230e9e6b5604 Mon Sep 17 00:00:00 2001
+From: Oleg <Fallmay@users.noreply.github.com>
+Date: Thu, 1 Oct 2020 12:09:08 +0300
+Subject: [PATCH] Fix `EOF: command not found` error in ssh-copy-id
+
+---
+ contrib/ssh-copy-id | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/contrib/ssh-copy-id b/contrib/ssh-copy-id
+index 392f64f94..a76907717 100644
+--- a/contrib/ssh-copy-id
++++ b/contrib/ssh-copy-id
+@@ -247,7 +247,7 @@ installkeys_sh() {
+   #    the -z `tail ...` checks for a trailing newline. The echo adds one if was missing
+   #    the cat adds the keys we're getting via STDIN
+   #    and if available restorecon is used to restore the SELinux context
+-  INSTALLKEYS_SH=$(tr '\t\n' ' ' <<-EOF)
++  INSTALLKEYS_SH=$(tr '\t\n' ' ' <<-EOF
+ 	cd;
+ 	umask 077;
+ 	mkdir -p $(dirname "${AUTH_KEY_FILE}") &&
+@@ -258,6 +258,7 @@ installkeys_sh() {
+ 	  restorecon -F .ssh ${AUTH_KEY_FILE};
+ 	fi
+ EOF
++  )
+ 
+   # to defend against quirky remote shells: use 'exec sh -c' to get POSIX;
+   printf "exec sh -c '%s'" "${INSTALLKEYS_SH}"
diff --git a/net-misc/openssh/files/openssh-8.4_p1-hpn-14.22-X509-glue.patch b/net-misc/openssh/files/openssh-8.4_p1-hpn-14.22-X509-glue.patch
new file mode 100644
index 0000000..9bd600b
--- /dev/null
+++ b/net-misc/openssh/files/openssh-8.4_p1-hpn-14.22-X509-glue.patch
@@ -0,0 +1,129 @@
+diff -u a/openssh-8_3_P1-hpn-AES-CTR-14.22.diff b/openssh-8_3_P1-hpn-AES-CTR-14.22.diff
+--- a/openssh-8_3_P1-hpn-AES-CTR-14.22.diff	2020-10-04 11:04:44.495171346 -0700
++++ b/openssh-8_3_P1-hpn-AES-CTR-14.22.diff	2020-10-04 11:48:05.099637206 -0700
+@@ -3,9 +3,9 @@
+ --- a/Makefile.in
+ +++ b/Makefile.in
+ @@ -46,7 +46,7 @@ CFLAGS=@CFLAGS@
+- CFLAGS_NOPIE=@CFLAGS_NOPIE@
+- CPPFLAGS=-I. -I$(srcdir) @CPPFLAGS@ $(PATHS) @DEFS@
+- PICFLAG=@PICFLAG@
++ LD=@LD@
++ CFLAGS=@CFLAGS@ $(CFLAGS_EXTRA)
++ CPPFLAGS=-I. -I$(srcdir) @CPPFLAGS@ @LDAP_CPPFLAGS@ $(PATHS) @DEFS@
+ -LIBS=@LIBS@
+ +LIBS=@LIBS@ -lpthread
+  K5LIBS=@K5LIBS@
+@@ -803,7 +803,7 @@
+  ssh_packet_set_connection(struct ssh *ssh, int fd_in, int fd_out)
+  {
+  	struct session_state *state;
+--	const struct sshcipher *none = cipher_by_name("none");
++-	const struct sshcipher *none = cipher_none();
+ +	struct sshcipher *none = cipher_by_name("none");
+  	int r;
+  
+@@ -901,17 +901,18 @@
+  }
+  
+  /*
+-@@ -2203,6 +2210,10 @@ fill_default_options(Options * options)
++@@ -2203,5 +2210,10 @@ fill_default_options(Options * options)
+  	if (options->sk_provider == NULL)
+  		options->sk_provider = xstrdup("$SSH_SK_PROVIDER");
+- #endif
++ 
+ +	if (options->update_hostkeys == -1)
+ +		options->update_hostkeys = 0;
+ +	if (options->disable_multithreaded == -1)
+ +		options->disable_multithreaded = 0;
+- 
+- 	/* Expand KEX name lists */
+- 	all_cipher = cipher_alg_list(',', 0);
+++
++ 	/* expand KEX and etc. name lists */
++ {	char *all;
++ #define ASSEMBLE(what, defaults, all) \
+ diff --git a/readconf.h b/readconf.h
+ index e143a108..1383a3cd 100644
+ --- a/readconf.h
+@@ -950,9 +951,9 @@
+  	/* Portable-specific options */
+  	sUsePAM,
+ +	sDisableMTAES,
+- 	/* Standard Options */
+- 	sPort, sHostKeyFile, sLoginGraceTime,
+- 	sPermitRootLogin, sLogFacility, sLogLevel,
++ 	/* X.509 Standard Options */
++ 	sHostbasedAlgorithms,
++ 	sPubkeyAlgorithms,
+ @@ -679,6 +683,7 @@ static struct {
+  	{ "authorizedprincipalsfile", sAuthorizedPrincipalsFile, SSHCFG_ALL },
+  	{ "kexalgorithms", sKexAlgorithms, SSHCFG_GLOBAL },
+diff -u a/openssh-8_3_P1-hpn-DynWinNoneSwitch-14.22.diff b/openssh-8_3_P1-hpn-DynWinNoneSwitch-14.22.diff
+--- a/openssh-8_3_P1-hpn-DynWinNoneSwitch-14.22.diff	2020-10-04 11:04:37.441213650 -0700
++++ b/openssh-8_3_P1-hpn-DynWinNoneSwitch-14.22.diff	2020-10-04 11:50:55.865616716 -0700
+@@ -382,7 +382,7 @@
+ @@ -888,6 +888,10 @@ kex_choose_conf(struct ssh *ssh)
+  	int nenc, nmac, ncomp;
+  	u_int mode, ctos, need, dh_need, authlen;
+- 	int r, first_kex_follows;
++ 	int r, first_kex_follows = 0;
+ +	int auth_flag;
+ +
+ +	auth_flag = packet_authentication_state(ssh);
+@@ -1193,14 +1193,3 @@
+  # Example of overriding settings on a per-user basis
+  #Match User anoncvs
+  #	X11Forwarding no
+-diff --git a/version.h b/version.h
+-index a2eca3ec..ff654fc3 100644
+---- a/version.h
+-+++ b/version.h
+-@@ -3,4 +3,5 @@
+- #define SSH_VERSION	"OpenSSH_8.3"
+- 
+- #define SSH_PORTABLE	"p1"
+--#define SSH_RELEASE	SSH_VERSION SSH_PORTABLE
+-+#define SSH_HPN         "-hpn14v22"
+-+#define SSH_RELEASE	SSH_VERSION SSH_PORTABLE SSH_HPN
+diff -u a/openssh-8_3_P1-hpn-PeakTput-14.22.diff b/openssh-8_3_P1-hpn-PeakTput-14.22.diff
+--- a/openssh-8_3_P1-hpn-PeakTput-14.22.diff	2020-10-04 11:51:46.409313155 -0700
++++ b/openssh-8_3_P1-hpn-PeakTput-14.22.diff	2020-10-04 11:56:57.407445258 -0700
+@@ -12,9 +12,9 @@
+  static long stalled;		/* how long we have been stalled */
+  static int bytes_per_second;	/* current speed in bytes per second */
+ @@ -127,6 +129,7 @@ refresh_progress_meter(int force_update)
++ 	off_t bytes_left;
+  	int cur_speed;
+- 	int hours, minutes, seconds;
+- 	int file_len;
++ 	int len;
+ +	off_t delta_pos;
+  
+  	if ((!force_update && !alarm_fired && !win_resized) || !can_output())
+@@ -30,15 +30,17 @@
+  	if (bytes_left > 0)
+  		elapsed = now - last_update;
+  	else {
+-@@ -166,7 +173,7 @@ refresh_progress_meter(int force_update)
++@@ -166,8 +173,8 @@ refresh_progress_meter(int force_update)
++ 	buf[1] = '\0';
+  
+  	/* filename */
+- 	buf[0] = '\0';
+--	file_len = win_size - 36;
+-+	file_len = win_size - 45;
+- 	if (file_len > 0) {
+- 		buf[0] = '\r';
+- 		snmprintf(buf+1, sizeof(buf)-1, &file_len, "%-*s",
++-	if (win_size > 36) {
++-		int file_len = win_size - 36;
+++	if (win_size > 45) {
+++		int file_len = win_size - 45;
++ 		snmprintf(buf+1, sizeof(buf)-1, &file_len, "%-*s ",
++ 		    file_len, file);
++ 	}
+ @@ -191,6 +198,15 @@ refresh_progress_meter(int force_update)
+  	    (off_t)bytes_per_second);
+  	strlcat(buf, "/s ", win_size);
diff --git a/net-misc/openssh/files/openssh-8.4_p1-hpn-14.22-glue.patch b/net-misc/openssh/files/openssh-8.4_p1-hpn-14.22-glue.patch
new file mode 100644
index 0000000..884063c
--- /dev/null
+++ b/net-misc/openssh/files/openssh-8.4_p1-hpn-14.22-glue.patch
@@ -0,0 +1,94 @@
+diff -ur a/openssh-8_3_P1-hpn-DynWinNoneSwitch-14.22.diff b/openssh-8_3_P1-hpn-DynWinNoneSwitch-14.22.diff
+--- a/openssh-8_3_P1-hpn-DynWinNoneSwitch-14.22.diff	2020-09-28 13:15:17.780747192 -0700
++++ b/openssh-8_3_P1-hpn-DynWinNoneSwitch-14.22.diff	2020-09-28 13:34:03.576552219 -0700
+@@ -409,18 +409,10 @@
+ index e7abb341..c23276d4 100644
+ --- a/packet.c
+ +++ b/packet.c
+-@@ -961,6 +961,24 @@ ssh_set_newkeys(struct ssh *ssh, int mode)
++@@ -961,6 +961,16 @@ ssh_set_newkeys(struct ssh *ssh, int mode)
+  	return 0;
+  }
+  
+-+/* this supports the forced rekeying required for the NONE cipher */
+-+int rekey_requested = 0;
+-+void
+-+packet_request_rekeying(void)
+-+{
+-+	rekey_requested = 1;
+-+}
+-+
+ +/* used to determine if pre or post auth when rekeying for aes-ctr
+ + * and none cipher switch */
+ +int
+@@ -434,20 +426,6 @@
+  #define MAX_PACKETS	(1U<<31)
+  static int
+  ssh_packet_need_rekeying(struct ssh *ssh, u_int outbound_packet_len)
+-@@ -987,6 +1005,13 @@ ssh_packet_need_rekeying(struct ssh *ssh, u_int outbound_packet_len)
+- 	if (state->p_send.packets == 0 && state->p_read.packets == 0)
+- 		return 0;
+- 
+-+	/* used to force rekeying when called for by the none
+-+         * cipher switch methods -cjr */
+-+        if (rekey_requested == 1) {
+-+                rekey_requested = 0;
+-+                return 1;
+-+        }
+-+
+- 	/* Time-based rekeying */
+- 	if (state->rekey_interval != 0 &&
+- 	    (int64_t)state->rekey_time + state->rekey_interval <= monotime())
+ diff --git a/packet.h b/packet.h
+ index c2544bd9..ebd85c88 100644
+ --- a/packet.h
+@@ -481,9 +459,9 @@
+  	oLocalCommand, oPermitLocalCommand, oRemoteCommand,
+ +	oTcpRcvBufPoll, oTcpRcvBuf, oHPNDisabled, oHPNBufferSize,
+ +	oNoneEnabled, oNoneSwitch,
++ 	oDisableMTAES,
+  	oVisualHostKey,
+  	oKexAlgorithms, oIPQoS, oRequestTTY, oIgnoreUnknown, oProxyUseFdpass,
+- 	oCanonicalDomains, oCanonicalizeHostname, oCanonicalizeMaxDots,
+ @@ -294,6 +297,8 @@ static struct {
+  	{ "kexalgorithms", oKexAlgorithms },
+  	{ "ipqos", oIPQoS },
+@@ -615,9 +593,9 @@
+  	int	ip_qos_bulk;		/* IP ToS/DSCP/class for bulk traffic */
+  	SyslogFacility log_facility;	/* Facility for system logging. */
+ @@ -114,7 +118,10 @@ typedef struct {
+- 
+  	int	enable_ssh_keysign;
+  	int64_t rekey_limit;
++ 	int     disable_multithreaded; /*disable multithreaded aes-ctr*/
+ +	int     none_switch;    /* Use none cipher */
+ +	int     none_enabled;   /* Allow none to be used */
+  	int	rekey_interval;
+@@ -700,9 +678,9 @@
+ +			options->hpn_buffer_size = CHAN_TCP_WINDOW_DEFAULT;
+ +	}
+ +
++ 	if (options->disable_multithreaded == -1)
++ 		options->disable_multithreaded = 0;
+  	if (options->ip_qos_interactive == -1)
+- 		options->ip_qos_interactive = IPTOS_DSCP_AF21;
+- 	if (options->ip_qos_bulk == -1)
+ @@ -519,6 +565,8 @@ typedef enum {
+  	sPasswordAuthentication, sKbdInteractiveAuthentication,
+  	sListenAddress, sAddressFamily,
+@@ -1081,11 +1059,11 @@
+  	xxx_host = host;
+  	xxx_hostaddr = hostaddr;
+  
+-@@ -435,6 +446,28 @@ ssh_userauth2(struct ssh *ssh, const char *local_user,
++@@ -435,7 +446,28 @@ ssh_userauth2(struct ssh *ssh, const char *local_user,
++ 		}
++ 	}
++ #endif
+  
+- 	if (!authctxt.success)
+- 		fatal("Authentication failed.");
+-+
+ +	/*
+ +	 * If the user wants to use the none cipher, do it post authentication
+ +	 * and only if the right conditions are met -- both of the NONE commands
diff --git a/net-misc/openssh/files/openssh-8.4_p1-hpn-14.22-libressl.patch b/net-misc/openssh/files/openssh-8.4_p1-hpn-14.22-libressl.patch
new file mode 100644
index 0000000..79cc3e5
--- /dev/null
+++ b/net-misc/openssh/files/openssh-8.4_p1-hpn-14.22-libressl.patch
@@ -0,0 +1,20 @@
+--- a/openssh-8_3_P1-hpn-AES-CTR-14.22.diff	2020-04-17 10:31:37.392120799 -0700
++++ b/openssh-8_3_P1-hpn-AES-CTR-14.22.diff	2020-04-17 10:32:46.143684424 -0700
+@@ -672,7 +672,7 @@
+ +const EVP_CIPHER *
+ +evp_aes_ctr_mt(void)
+ +{
+-+# if OPENSSL_VERSION_NUMBER >= 0x10100000UL
+++# if (OPENSSL_VERSION_NUMBER >= 0x10100000UL || defined(HAVE_OPAQUE_STRUCTS)) && !defined(LIBRESSL_VERSION_NUMBER)
+ +	static EVP_CIPHER *aes_ctr;
+ +	aes_ctr = EVP_CIPHER_meth_new(NID_undef, 16/*block*/, 16/*key*/);
+ +	EVP_CIPHER_meth_set_iv_length(aes_ctr, AES_BLOCK_SIZE);
+@@ -701,7 +701,7 @@
+ +		EVP_CIPH_ALWAYS_CALL_INIT | EVP_CIPH_CUSTOM_IV;
+ +#  endif /*SSH_OLD_EVP*/
+ +        return &aes_ctr;
+-+# endif /*OPENSSH_VERSION_NUMBER*/
+++# endif /*OPENSSL_VERSION_NUMBER*/
+ +}
+ +
+ +#endif /* defined(WITH_OPENSSL) */
diff --git a/net-misc/openssh/files/openssh-8.4_p1-hpn-14.22-sctp-glue.patch b/net-misc/openssh/files/openssh-8.4_p1-hpn-14.22-sctp-glue.patch
new file mode 100644
index 0000000..52ec42e
--- /dev/null
+++ b/net-misc/openssh/files/openssh-8.4_p1-hpn-14.22-sctp-glue.patch
@@ -0,0 +1,18 @@
+diff -ur a/openssh-8_3_P1-hpn-DynWinNoneSwitch-14.22.diff b/openssh-8_3_P1-hpn-DynWinNoneSwitch-14.22.diff
+--- a/openssh-8_3_P1-hpn-DynWinNoneSwitch-14.22.diff	2020-09-28 16:42:34.168386903 -0700
++++ b/openssh-8_3_P1-hpn-DynWinNoneSwitch-14.22.diff	2020-09-28 16:42:43.806325434 -0700
+@@ -1171,14 +1171,3 @@
+  # Example of overriding settings on a per-user basis
+  #Match User anoncvs
+  #	X11Forwarding no
+-diff --git a/version.h b/version.h
+-index a2eca3ec..ff654fc3 100644
+---- a/version.h
+-+++ b/version.h
+-@@ -3,4 +3,5 @@
+- #define SSH_VERSION	"OpenSSH_8.3"
+- 
+- #define SSH_PORTABLE	"p1"
+--#define SSH_RELEASE	SSH_VERSION SSH_PORTABLE
+-+#define SSH_HPN         "-hpn14v22"
+-+#define SSH_RELEASE	SSH_VERSION SSH_PORTABLE SSH_HPN
diff --git a/net-misc/openssh/files/openssh-8.1_p1-GSSAPI-dns.patch b/net-misc/openssh/files/openssh-8.5_p1-GSSAPI-dns.patch
similarity index 89%
copy from net-misc/openssh/files/openssh-8.1_p1-GSSAPI-dns.patch
copy to net-misc/openssh/files/openssh-8.5_p1-GSSAPI-dns.patch
index 6aba6f2..eec66ad 100644
--- a/net-misc/openssh/files/openssh-8.1_p1-GSSAPI-dns.patch
+++ b/net-misc/openssh/files/openssh-8.5_p1-GSSAPI-dns.patch
@@ -1,8 +1,6 @@
-diff --git a/auth.c b/auth.c
-index ca450f4e..2994a4e4 100644
---- a/auth.c
-+++ b/auth.c
-@@ -723,120 +723,6 @@ fakepw(void)
+--- a/auth.c	2021-03-02 04:31:47.000000000 -0600
++++ b/auth.c	2021-03-04 11:22:44.590041696 -0600
+@@ -727,119 +727,6 @@ fakepw(void)
  	return (&fake);
  }
  
@@ -31,7 +29,7 @@
 -	if (getpeername(ssh_packet_get_connection_in(ssh),
 -	    (struct sockaddr *)&from, &fromlen) == -1) {
 -		debug("getpeername failed: %.100s", strerror(errno));
--		return strdup(ntop);
+-		return xstrdup(ntop);
 -	}
 -
 -	ipv64_normalise_mapped(&from, &fromlen);
@@ -43,7 +41,7 @@
 -	if (getnameinfo((struct sockaddr *)&from, fromlen, name, sizeof(name),
 -	    NULL, 0, NI_NAMEREQD) != 0) {
 -		/* Host name not found.  Use ip address. */
--		return strdup(ntop);
+-		return xstrdup(ntop);
 -	}
 -
 -	/*
@@ -58,7 +56,7 @@
 -		logit("Nasty PTR record \"%s\" is set up for %s, ignoring",
 -		    name, ntop);
 -		freeaddrinfo(ai);
--		return strdup(ntop);
+-		return xstrdup(ntop);
 -	}
 -
 -	/* Names are stored in lowercase. */
@@ -79,7 +77,7 @@
 -	if (getaddrinfo(name, NULL, &hints, &aitop) != 0) {
 -		logit("reverse mapping checking getaddrinfo for %.700s "
 -		    "[%s] failed.", name, ntop);
--		return strdup(ntop);
+-		return xstrdup(ntop);
 -	}
 -	/* Look for the address from the list of addresses. */
 -	for (ai = aitop; ai; ai = ai->ai_next) {
@@ -94,9 +92,9 @@
 -		/* Address not found for the host name. */
 -		logit("Address %.100s maps to %.600s, but this does not "
 -		    "map back to the address.", ntop, name);
--		return strdup(ntop);
+-		return xstrdup(ntop);
 -	}
--	return strdup(name);
+-	return xstrdup(name);
 -}
 -
 -/*
@@ -119,14 +117,11 @@
 -		return dnsname;
 -	}
 -}
--
- /*
-  * Runs command in a subprocess with a minimal environment.
-  * Returns pid on success, 0 on failure.
-diff --git a/canohost.c b/canohost.c
-index abea9c6e..4f4524d2 100644
---- a/canohost.c
-+++ b/canohost.c
+ 
+ /* These functions link key/cert options to the auth framework */
+ 
+--- a/canohost.c	2021-03-02 04:31:47.000000000 -0600
++++ b/canohost.c	2021-03-04 11:22:54.854211183 -0600
 @@ -202,3 +202,117 @@ get_local_port(int sock)
  {
  	return get_sock_port(sock, 1);
@@ -155,9 +150,9 @@
 +	fromlen = sizeof(from);
 +	memset(&from, 0, sizeof(from));
 +	if (getpeername(ssh_packet_get_connection_in(ssh),
-+	    (struct sockaddr *)&from, &fromlen) < 0) {
++	    (struct sockaddr *)&from, &fromlen) == -1) {
 +		debug("getpeername failed: %.100s", strerror(errno));
-+		return strdup(ntop);
++		return xstrdup(ntop);
 +	}
 +
 +	ipv64_normalise_mapped(&from, &fromlen);
@@ -169,7 +164,7 @@
 +	if (getnameinfo((struct sockaddr *)&from, fromlen, name, sizeof(name),
 +	    NULL, 0, NI_NAMEREQD) != 0) {
 +		/* Host name not found.  Use ip address. */
-+		return strdup(ntop);
++		return xstrdup(ntop);
 +	}
 +
 +	/*
@@ -184,7 +179,7 @@
 +		logit("Nasty PTR record \"%s\" is set up for %s, ignoring",
 +		    name, ntop);
 +		freeaddrinfo(ai);
-+		return strdup(ntop);
++		return xstrdup(ntop);
 +	}
 +
 +	/* Names are stored in lowercase. */
@@ -205,7 +200,7 @@
 +	if (getaddrinfo(name, NULL, &hints, &aitop) != 0) {
 +		logit("reverse mapping checking getaddrinfo for %.700s "
 +		    "[%s] failed.", name, ntop);
-+		return strdup(ntop);
++		return xstrdup(ntop);
 +	}
 +	/* Look for the address from the list of addresses. */
 +	for (ai = aitop; ai; ai = ai->ai_next) {
@@ -220,9 +215,9 @@
 +		/* Address not found for the host name. */
 +		logit("Address %.100s maps to %.600s, but this does not "
 +		    "map back to the address.", ntop, name);
-+		return strdup(ntop);
++		return xstrdup(ntop);
 +	}
-+	return strdup(name);
++	return xstrdup(name);
 +}
 +
 +/*
@@ -246,10 +241,10 @@
 +	}
 +}
 diff --git a/readconf.c b/readconf.c
-index f78b4d6f..747287f7 100644
+index 724974b7..97a1ffd8 100644
 --- a/readconf.c
 +++ b/readconf.c
-@@ -162,6 +162,7 @@ typedef enum {
+@@ -161,6 +161,7 @@ typedef enum {
  	oClearAllForwardings, oNoHostAuthenticationForLocalhost,
  	oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout,
  	oAddressFamily, oGssAuthentication, oGssDelegateCreds,
@@ -257,7 +252,7 @@
  	oServerAliveInterval, oServerAliveCountMax, oIdentitiesOnly,
  	oSendEnv, oSetEnv, oControlPath, oControlMaster, oControlPersist,
  	oHashKnownHosts,
-@@ -203,9 +204,11 @@ static struct {
+@@ -206,9 +207,11 @@ static struct {
  #if defined(GSSAPI)
  	{ "gssapiauthentication", oGssAuthentication },
  	{ "gssapidelegatecredentials", oGssDelegateCreds },
@@ -269,7 +264,7 @@
  #endif
  #ifdef ENABLE_PKCS11
  	{ "pkcs11provider", oPKCS11Provider },
-@@ -992,6 +995,10 @@ parse_time:
+@@ -1083,6 +1086,10 @@ parse_time:
  		intptr = &options->gss_deleg_creds;
  		goto parse_flag;
  
@@ -280,7 +275,7 @@
  	case oBatchMode:
  		intptr = &options->batch_mode;
  		goto parse_flag;
-@@ -1864,6 +1871,7 @@ initialize_options(Options * options)
+@@ -2183,6 +2190,7 @@ initialize_options(Options * options)
  	options->challenge_response_authentication = -1;
  	options->gss_authentication = -1;
  	options->gss_deleg_creds = -1;
@@ -288,7 +283,7 @@
  	options->password_authentication = -1;
  	options->kbd_interactive_authentication = -1;
  	options->kbd_interactive_devices = NULL;
-@@ -2011,6 +2019,8 @@ fill_default_options(Options * options)
+@@ -2340,6 +2348,8 @@ fill_default_options(Options * options)
  		options->gss_authentication = 0;
  	if (options->gss_deleg_creds == -1)
  		options->gss_deleg_creds = 0;
@@ -298,10 +293,10 @@
  		options->password_authentication = 1;
  	if (options->kbd_interactive_authentication == -1)
 diff --git a/readconf.h b/readconf.h
-index 8e36bf32..c9e4718d 100644
+index 2fba866e..da3ce87a 100644
 --- a/readconf.h
 +++ b/readconf.h
-@@ -41,6 +41,7 @@ typedef struct {
+@@ -42,6 +42,7 @@ typedef struct {
  					/* Try S/Key or TIS, authentication. */
  	int     gss_authentication;	/* Try GSS authentication */
  	int     gss_deleg_creds;	/* Delegate GSS credentials */
@@ -310,10 +305,10 @@
  						 * authentication. */
  	int     kbd_interactive_authentication; /* Try keyboard-interactive auth. */
 diff --git a/ssh_config.5 b/ssh_config.5
-index 02a87892..95de538b 100644
+index f8119189..e0fd0d76 100644
 --- a/ssh_config.5
 +++ b/ssh_config.5
-@@ -762,6 +762,16 @@ The default is
+@@ -783,6 +783,16 @@ The default is
  Forward (delegate) credentials to the server.
  The default is
  .Cm no .
@@ -331,10 +326,10 @@
  Indicates that
  .Xr ssh 1
 diff --git a/sshconnect2.c b/sshconnect2.c
-index 87fa70a4..a6ffdc96 100644
+index 059c9480..ab6f6832 100644
 --- a/sshconnect2.c
 +++ b/sshconnect2.c
-@@ -697,6 +697,13 @@ userauth_gssapi(struct ssh *ssh)
+@@ -770,6 +770,13 @@ userauth_gssapi(struct ssh *ssh)
  	OM_uint32 min;
  	int r, ok = 0;
  	gss_OID mech = NULL;
@@ -348,7 +343,7 @@
  
  	/* Try one GSSAPI method at a time, rather than sending them all at
  	 * once. */
-@@ -711,7 +718,7 @@ userauth_gssapi(struct ssh *ssh)
+@@ -784,7 +791,7 @@ userauth_gssapi(struct ssh *ssh)
  		    elements[authctxt->mech_tried];
  		/* My DER encoding requires length<128 */
  		if (mech->length < 128 && ssh_gssapi_check_mechanism(&gssctxt,
diff --git a/net-misc/openssh/files/openssh-8.5_p1-X509-glue-13.0.patch b/net-misc/openssh/files/openssh-8.5_p1-X509-glue-13.0.patch
new file mode 100644
index 0000000..71b27f2
--- /dev/null
+++ b/net-misc/openssh/files/openssh-8.5_p1-X509-glue-13.0.patch
@@ -0,0 +1,73 @@
+diff -ur a/openssh-8.5p1+x509-13.0.diff b/openssh-8.5p1+x509-13.0.diff
+--- a/openssh-8.5p1+x509-13.0.diff	2021-03-03 12:26:21.021212996 -0800
++++ b/openssh-8.5p1+x509-13.0.diff	2021-03-03 18:20:06.476490271 -0800
+@@ -46675,12 +46675,11 @@
+  
+  install-files:
+  	$(MKDIR_P) $(DESTDIR)$(bindir)
+-@@ -380,6 +364,8 @@
++@@ -380,6 +364,7 @@
+  	$(MKDIR_P) $(DESTDIR)$(mandir)/$(mansubdir)5
+  	$(MKDIR_P) $(DESTDIR)$(mandir)/$(mansubdir)8
+  	$(MKDIR_P) $(DESTDIR)$(libexecdir)
+ +	$(MKDIR_P) $(DESTDIR)$(sshcadir)
+-+	$(MKDIR_P) $(DESTDIR)$(piddir)
+  	$(MKDIR_P) -m 0755 $(DESTDIR)$(PRIVSEP_PATH)
+  	$(INSTALL) -m 0755 $(STRIP_OPT) ssh$(EXEEXT) $(DESTDIR)$(bindir)/ssh$(EXEEXT)
+  	$(INSTALL) -m 0755 $(STRIP_OPT) scp$(EXEEXT) $(DESTDIR)$(bindir)/scp$(EXEEXT)
+@@ -63967,7 +63966,7 @@
+ -	echo "putty interop tests not enabled"
+ -	exit 0
+ -fi
+-+$REGRESS_INTEROP_PUTTY || { echo "putty interop tests are not enabled" >&1;  exit 1; }
+++$REGRESS_INTEROP_PUTTY || { echo "putty interop tests are not enabled" >&1;  exit 0; }
+  
+  for c in aes 3des aes128-ctr aes192-ctr aes256-ctr chacha20 ; do
+  	verbose "$tid: cipher $c"
+@@ -63982,7 +63981,7 @@
+ -	echo "putty interop tests not enabled"
+ -	exit 0
+ -fi
+-+$REGRESS_INTEROP_PUTTY || { echo "putty interop tests are not enabled" >&1;  exit 1; }
+++$REGRESS_INTEROP_PUTTY || { echo "putty interop tests are not enabled" >&1;  exit 0; }
+  
+  for k in dh-gex-sha1 dh-group1-sha1 dh-group14-sha1 ecdh ; do
+  	verbose "$tid: kex $k"
+@@ -63997,7 +63996,7 @@
+ -	echo "putty interop tests not enabled"
+ -	exit 0
+ -fi
+-+$REGRESS_INTEROP_PUTTY || { echo "putty interop tests are not enabled" >&1;  exit 1; }
+++$REGRESS_INTEROP_PUTTY || { echo "putty interop tests are not enabled" >&1;  exit 0; }
+  
+  if [ "`${SSH} -Q compression`" = "none" ]; then
+  	comp="0"
+@@ -64129,9 +64128,9 @@
+  
+ +# cross-project configuration
+ +if test "$sshd_type" = "pkix" ; then
+-+  unset_arg=''
+++  unset_arg=
+ +else
+-+  unset_arg=none
+++  unset_arg=
+ +fi
+ +
+  cat > $OBJ/sshd_config.i << _EOF
+@@ -122238,16 +122237,6 @@
+ +int	 asnmprintf(char **, size_t, int *, const char *, ...)
+  	     __attribute__((format(printf, 4, 5)));
+  void	 msetlocale(void);
+-diff -ruN openssh-8.5p1/version.h openssh-8.5p1+x509-13.0/version.h
+---- openssh-8.5p1/version.h	2021-03-02 12:31:47.000000000 +0200
+-+++ openssh-8.5p1+x509-13.0/version.h	2021-03-03 19:07:00.000000000 +0200
+-@@ -2,5 +2,4 @@
+- 
+- #define SSH_VERSION	"OpenSSH_8.5"
+- 
+--#define SSH_PORTABLE	"p1"
+--#define SSH_RELEASE	SSH_VERSION SSH_PORTABLE
+-+#define SSH_RELEASE	PACKAGE_STRING ", " SSH_VERSION "p1"
+ diff -ruN openssh-8.5p1/version.m4 openssh-8.5p1+x509-13.0/version.m4
+ --- openssh-8.5p1/version.m4	1970-01-01 02:00:00.000000000 +0200
+ +++ openssh-8.5p1+x509-13.0/version.m4	2021-03-03 19:07:00.000000000 +0200
diff --git a/net-misc/openssh/files/openssh-8.5_p1-hpn-15.1-X509-glue.patch b/net-misc/openssh/files/openssh-8.5_p1-hpn-15.1-X509-glue.patch
new file mode 100644
index 0000000..e2d4ce8
--- /dev/null
+++ b/net-misc/openssh/files/openssh-8.5_p1-hpn-15.1-X509-glue.patch
@@ -0,0 +1,325 @@
+diff -ur a/openssh-8_4_P1-hpn-AES-CTR-15.1.diff b/openssh-8_4_P1-hpn-AES-CTR-15.1.diff
+--- a/openssh-8_4_P1-hpn-AES-CTR-15.1.diff	2021-03-03 12:57:01.975827879 -0800
++++ b/openssh-8_4_P1-hpn-AES-CTR-15.1.diff	2021-03-03 18:25:21.929305944 -0800
+@@ -3,9 +3,9 @@
+ --- a/Makefile.in
+ +++ b/Makefile.in
+ @@ -46,7 +46,7 @@ CFLAGS=@CFLAGS@
+- CFLAGS_NOPIE=@CFLAGS_NOPIE@
+- CPPFLAGS=-I. -I$(srcdir) @CPPFLAGS@ $(PATHS) @DEFS@
+- PICFLAG=@PICFLAG@
++ LD=@LD@
++ CFLAGS=@CFLAGS@ $(CFLAGS_EXTRA)
++ CPPFLAGS=-I. -I$(srcdir) @CPPFLAGS@ @LDAP_CPPFLAGS@ $(PATHS) @DEFS@
+ -LIBS=@LIBS@
+ +LIBS=@LIBS@ -lpthread
+  K5LIBS=@K5LIBS@
+@@ -803,8 +803,8 @@
+  ssh_packet_set_connection(struct ssh *ssh, int fd_in, int fd_out)
+  {
+  	struct session_state *state;
+--	const struct sshcipher *none = cipher_by_name("none");
+-+	struct sshcipher *none = cipher_by_name("none");
++-	const struct sshcipher *none = cipher_none();
+++	struct sshcipher *none = cipher_none();
+  	int r;
+  
+  	if (none == NULL) {
+@@ -894,24 +894,24 @@
+  		intptr = &options->compression;
+  		multistate_ptr = multistate_compression;
+ @@ -2062,6 +2068,7 @@ initialize_options(Options * options)
+- 	options->hostbased_accepted_algos = NULL;
+- 	options->pubkey_accepted_algos = NULL;
+- 	options->known_hosts_command = NULL;
++ 	options->revoked_host_keys = NULL;
++ 	options->fingerprint_hash = -1;
++ 	options->update_hostkeys = -1;
+ +	options->disable_multithreaded = -1;
+  }
+  
+  /*
+ @@ -2247,6 +2254,10 @@ fill_default_options(Options * options)
++ 		options->update_hostkeys = 0;
+  	if (options->sk_provider == NULL)
+  		options->sk_provider = xstrdup("$SSH_SK_PROVIDER");
+- #endif
+ +	if (options->update_hostkeys == -1)
+ +		options->update_hostkeys = 0;
+ +	if (options->disable_multithreaded == -1)
+ +		options->disable_multithreaded = 0;
+  
+- 	/* Expand KEX name lists */
+- 	all_cipher = cipher_alg_list(',', 0);
++ 	/* expand KEX and etc. name lists */
++ {	char *all;
+ diff --git a/readconf.h b/readconf.h
+ index d6a15550..d2d20548 100644
+ --- a/readconf.h
+@@ -950,9 +950,9 @@
+  	/* Portable-specific options */
+  	sUsePAM,
+ +	sDisableMTAES,
+- 	/* Standard Options */
+- 	sPort, sHostKeyFile, sLoginGraceTime,
+- 	sPermitRootLogin, sLogFacility, sLogLevel,
++ 	/* X.509 Standard Options */
++ 	sHostbasedAlgorithms,
++ 	sPubkeyAlgorithms,
+ @@ -672,6 +676,7 @@ static struct {
+  	{ "authorizedprincipalsfile", sAuthorizedPrincipalsFile, SSHCFG_ALL },
+  	{ "kexalgorithms", sKexAlgorithms, SSHCFG_GLOBAL },
+diff -ur a/openssh-8_4_P1-hpn-DynWinNoneSwitch-15.1.diff b/openssh-8_4_P1-hpn-DynWinNoneSwitch-15.1.diff
+--- a/openssh-8_4_P1-hpn-DynWinNoneSwitch-15.1.diff	2021-03-03 19:05:28.942903961 -0800
++++ b/openssh-8_4_P1-hpn-DynWinNoneSwitch-15.1.diff	2021-03-03 20:36:34.702362020 -0800
+@@ -157,6 +157,36 @@
+ +	 Allan Jude provided the code for the NoneMac and buffer normalization.
+ +         This work was financed, in part, by Cisco System, Inc., the National
+ +         Library of Medicine, and the National Science Foundation.
++diff --git a/auth2.c b/auth2.c
++--- a/auth2.c	2021-03-03 20:34:51.312051369 -0800
+++++ b/auth2.c	2021-03-03 20:35:15.797888115 -0800
++@@ -229,16 +229,17 @@
++ 	double delay;
++ 
++ 	digest_alg = ssh_digest_maxbytes();
++-	len = ssh_digest_bytes(digest_alg);
++-	hash = xmalloc(len);
+++	if (len = ssh_digest_bytes(digest_alg) > 0) {
+++		hash = xmalloc(len);
++ 
++-	(void)snprintf(b, sizeof b, "%llu%s",
++-	     (unsigned long long)options.timing_secret, user);
++-	if (ssh_digest_memory(digest_alg, b, strlen(b), hash, len) != 0)
++-		fatal_f("ssh_digest_memory");
++-	/* 0-4.2 ms of delay */
++-	delay = (double)PEEK_U32(hash) / 1000 / 1000 / 1000 / 1000;
++-	freezero(hash, len);
+++		(void)snprintf(b, sizeof b, "%llu%s",
+++			(unsigned long long)options.timing_secret, user);
+++		if (ssh_digest_memory(digest_alg, b, strlen(b), hash, len) != 0)
+++			fatal_f("ssh_digest_memory");
+++		/* 0-4.2 ms of delay */
+++		delay = (double)PEEK_U32(hash) / 1000 / 1000 / 1000 / 1000;
+++		freezero(hash, len);
+++	}
++ 	debug3_f("user specific delay %0.3lfms", delay/1000);
++ 	return MIN_FAIL_DELAY_SECONDS + delay;
++ }
+ diff --git a/channels.c b/channels.c
+ index e4917f3c..e0db582e 100644
+ --- a/channels.c
+@@ -209,14 +239,14 @@
+  static void
+  channel_pre_open(struct ssh *ssh, Channel *c,
+      fd_set *readset, fd_set *writeset)
+-@@ -2179,22 +2206,31 @@ channel_check_window(struct ssh *ssh, Channel *c)
++@@ -2179,21 +2206,31 @@ channel_check_window(struct ssh *ssh, Channel *c)
+  
+  	if (c->type == SSH_CHANNEL_OPEN &&
+  	    !(c->flags & (CHAN_CLOSE_SENT|CHAN_CLOSE_RCVD)) &&
+ -	    ((c->local_window_max - c->local_window >
+ -	    c->local_maxpacket*3) ||
+-+            ((ssh_packet_is_interactive(ssh) &&
+-+            c->local_window_max - c->local_window > c->local_maxpacket*3) ||
+++	    ((ssh_packet_is_interactive(ssh) &&
+++	    c->local_window_max - c->local_window > c->local_maxpacket*3) ||
+  	    c->local_window < c->local_window_max/2) &&
+  	    c->local_consumed > 0) {
+ +		u_int addition = 0;
+@@ -234,10 +264,12 @@
+  		    SSH2_MSG_CHANNEL_WINDOW_ADJUST)) != 0 ||
+  		    (r = sshpkt_put_u32(ssh, c->remote_id)) != 0 ||
+ -		    (r = sshpkt_put_u32(ssh, c->local_consumed)) != 0 ||
++-		    (r = sshpkt_send(ssh)) != 0)
++-			fatal_fr(r, "channel %d", c->self);
+ +		    (r = sshpkt_put_u32(ssh, c->local_consumed + addition)) != 0 ||
+- 		    (r = sshpkt_send(ssh)) != 0) {
+- 			fatal_fr(r, "channel %i", c->self);
+- 		}
+++		    (r = sshpkt_send(ssh)) != 0) {
+++			fatal_fr(r, "channel %i", c->self);
+++		}
+  		debug2("channel %d: window %d sent adjust %d", c->self,
+ -		    c->local_window, c->local_consumed);
+ -		c->local_window += c->local_consumed;
+@@ -384,20 +416,38 @@
+ index dec8e7e9..3c11558e 100644
+ --- a/compat.c
+ +++ b/compat.c
+-@@ -150,6 +150,13 @@ compat_banner(struct ssh *ssh, const char *version)
+- 			debug_f("match: %s pat %s compat 0x%08x",
++@@ -43,7 +43,7 @@
++ static u_int
++ compat_datafellows(const char *version)
++ {
++-	int i;
+++	int i, bugs = 0;
++ 	static struct {
++ 		char	*pat;
++ 		int	bugs;
++@@ -147,11 +147,19 @@
++ 		if (match_pattern_list(version, check[i].pat, 0) == 1) {
++ 			debug("match: %s pat %s compat 0x%08x",
+  			    version, check[i].pat, check[i].bugs);
+- 			ssh->compat = check[i].bugs;
+-+			/* Check to see if the remote side is OpenSSH and not HPN */
+-+			if (strstr(version, "OpenSSH") != NULL) {
+-+				if (strstr(version, "hpn") == NULL) {
+-+					ssh->compat |= SSH_BUG_LARGEWINDOW;
+-+					debug("Remote is NON-HPN aware");
+-+				}
+-+			}
+- 			return;
++-			return check[i].bugs;
+++			bugs |= check[i].bugs;
+  		}
+  	}
++-	debug("no match: %s", version);
++-	return 0;
+++	/* Check to see if the remote side is OpenSSH and not HPN */
+++	if (strstr(version, "OpenSSH") != NULL) {
+++		if (strstr(version, "hpn") == NULL) {
+++			bugs |= SSH_BUG_LARGEWINDOW;
+++			debug("Remote is NON-HPN aware");
+++		}
+++	}
+++	if (bugs == 0)
+++		debug("no match: %s", version);
+++	return bugs;
++ }
++ 
++ char *
+ diff --git a/compat.h b/compat.h
+ index 66db42cc..d4e811e4 100644
+ --- a/compat.h
+@@ -456,7 +506,7 @@
+ @@ -888,6 +888,10 @@ kex_choose_conf(struct ssh *ssh)
+  	int nenc, nmac, ncomp;
+  	u_int mode, ctos, need, dh_need, authlen;
+- 	int r, first_kex_follows;
++ 	int r, first_kex_follows = 0;
+ +	int auth_flag = 0;
+ +
+ +	auth_flag = packet_authentication_state(ssh);
+@@ -1033,19 +1083,6 @@
+  
+  /* File to read commands from */
+  FILE* infile;
+-diff --git a/ssh-keygen.c b/ssh-keygen.c
+-index a12b79a5..8b839219 100644
+---- a/ssh-keygen.c
+-+++ b/ssh-keygen.c
+-@@ -2999,7 +2999,7 @@ do_download_sk(const char *skprovider, const char *device)
+- 			freezero(pin, strlen(pin));
+- 		error("Unable to load resident keys: %s", ssh_err(r));
+- 		return -1;
+--	}
+-+ 	}
+- 	if (nkeys == 0)
+- 		logit("No keys to download");
+- 	if (pin != NULL)
+ diff --git a/ssh.c b/ssh.c
+ index f34ca0d7..d7d134f7 100644
+ --- a/ssh.c
+@@ -1091,7 +1128,7 @@
+ +	else
+ +		options.hpn_buffer_size = 2 * 1024 * 1024;
+ +
+-+	if (ssh->compat & SSH_BUG_LARGEWINDOW) {
+++	if (ssh_compat_fellows(ssh, SSH_BUG_LARGEWINDOW)) {
+ +		debug("HPN to Non-HPN Connection");
+ +	} else {
+ +		int sock, socksize;
+@@ -1331,6 +1368,26 @@
+  		/* Bind the socket to the desired port. */
+  		if (bind(listen_sock, ai->ai_addr, ai->ai_addrlen) == -1) {
+  			error("Bind to port %s on %s failed: %.200s.",
++@@ -1625,12 +1625,13 @@
++ 		if (ssh_digest_update(ctx, sshbuf_ptr(server_cfg),
++ 		    sshbuf_len(server_cfg)) != 0)
++ 			fatal_f("ssh_digest_update");
++-		len = ssh_digest_bytes(digest_alg);
++-		hash = xmalloc(len);
++-		if (ssh_digest_final(ctx, hash, len) != 0)
++-			fatal_f("ssh_digest_final");
++-		options.timing_secret = PEEK_U64(hash);
++-		freezero(hash, len);
+++		if (len = ssh_digest_bytes(digest_alg) > 0) {
+++			hash = xmalloc(len);
+++			if (ssh_digest_final(ctx, hash, len) != 0)
+++				fatal_f("ssh_digest_final");
+++			options.timing_secret = PEEK_U64(hash);
+++			freezero(hash, len);
+++		}
++ 		ssh_digest_free(ctx);
++ 		ctx = NULL;
++ 		return;
+ @@ -1746,6 +1753,19 @@ main(int ac, char **av)
+  	/* Fill in default values for those options not explicitly set. */
+  	fill_default_server_options(&options);
+@@ -1401,14 +1458,3 @@
+  # Example of overriding settings on a per-user basis
+  #Match User anoncvs
+  #	X11Forwarding no
+-diff --git a/version.h b/version.h
+-index c2f9c55b..f2e7fa80 100644
+---- a/version.h
+-+++ b/version.h
+-@@ -3,4 +3,5 @@
+- #define SSH_VERSION	"OpenSSH_8.4"
+- 
+- #define SSH_PORTABLE	"p1"
+--#define SSH_RELEASE	SSH_VERSION SSH_PORTABLE
+-+#define SSH_HPN         "-hpn15v1"
+-+#define SSH_RELEASE	SSH_VERSION SSH_PORTABLE SSH_HPN
+diff -ur a/openssh-8_4_P1-hpn-PeakTput-15.1.diff b/openssh-8_4_P1-hpn-PeakTput-15.1.diff
+--- a/openssh-8_4_P1-hpn-PeakTput-15.1.diff	2021-03-03 12:57:01.975827879 -0800
++++ b/openssh-8_4_P1-hpn-PeakTput-15.1.diff	2021-03-03 18:25:21.930305937 -0800
+@@ -12,9 +12,9 @@
+  static long stalled;		/* how long we have been stalled */
+  static int bytes_per_second;	/* current speed in bytes per second */
+ @@ -127,6 +129,7 @@ refresh_progress_meter(int force_update)
++ 	off_t bytes_left;
+  	int cur_speed;
+- 	int hours, minutes, seconds;
+- 	int file_len;
++ 	int len;
+ +	off_t delta_pos;
+  
+  	if ((!force_update && !alarm_fired && !win_resized) || !can_output())
+@@ -33,12 +33,12 @@
+ @@ -166,7 +173,7 @@ refresh_progress_meter(int force_update)
+  
+  	/* filename */
+- 	buf[0] = '\0';
+--	file_len = win_size - 36;
+-+	file_len = win_size - 45;
+- 	if (file_len > 0) {
+- 		buf[0] = '\r';
+- 		snmprintf(buf+1, sizeof(buf)-1, &file_len, "%-*s",
++ 	if (win_size > 36) {
++-		int file_len = win_size - 36;
+++		int file_len = win_size - 45;
++ 		snmprintf(buf+1, sizeof(buf)-1, &file_len, "%-*s ",
++ 		    file_len, file);
++ 	}
+ @@ -191,6 +198,15 @@ refresh_progress_meter(int force_update)
+  	    (off_t)bytes_per_second);
+  	strlcat(buf, "/s ", win_size);
+@@ -63,15 +63,3 @@
+  }
+  
+  /*ARGSUSED*/
+-diff --git a/ssh-keygen.c b/ssh-keygen.c
+-index a12b79a5..76b22338 100644
+---- a/ssh-keygen.c
+-+++ b/ssh-keygen.c
+-@@ -2987,7 +2987,6 @@ do_download_sk(const char *skprovider, const char *device)
+- 
+- 	if (skprovider == NULL)
+- 		fatal("Cannot download keys without provider");
+--
+- 	pin = read_passphrase("Enter PIN for authenticator: ", RP_ALLOW_STDIN);
+- 	if (!quiet) {
+- 		printf("You may need to touch your authenticator "
diff --git a/net-misc/openssh/files/openssh-8.5_p1-hpn-15.1-glue.patch b/net-misc/openssh/files/openssh-8.5_p1-hpn-15.1-glue.patch
new file mode 100644
index 0000000..ec6e687
--- /dev/null
+++ b/net-misc/openssh/files/openssh-8.5_p1-hpn-15.1-glue.patch
@@ -0,0 +1,242 @@
+diff -ur a/openssh-8_4_P1-hpn-AES-CTR-15.1.diff b/openssh-8_4_P1-hpn-AES-CTR-15.1.diff
+--- a/openssh-8_4_P1-hpn-AES-CTR-15.1.diff	2021-03-03 11:08:18.300474672 -0800
++++ b/openssh-8_4_P1-hpn-AES-CTR-15.1.diff	2021-03-03 11:18:42.408298903 -0800
+@@ -894,9 +894,9 @@
+  		intptr = &options->compression;
+  		multistate_ptr = multistate_compression;
+ @@ -2062,6 +2068,7 @@ initialize_options(Options * options)
+- 	options->update_hostkeys = -1;
+- 	options->hostbased_key_types = NULL;
+- 	options->pubkey_key_types = NULL;
++ 	options->hostbased_accepted_algos = NULL;
++ 	options->pubkey_accepted_algos = NULL;
++ 	options->known_hosts_command = NULL;
+ +	options->disable_multithreaded = -1;
+  }
+  
+diff -ur a/openssh-8_4_P1-hpn-DynWinNoneSwitch-15.1.diff b/openssh-8_4_P1-hpn-DynWinNoneSwitch-15.1.diff
+--- a/openssh-8_4_P1-hpn-DynWinNoneSwitch-15.1.diff	2021-03-03 11:08:18.300474672 -0800
++++ b/openssh-8_4_P1-hpn-DynWinNoneSwitch-15.1.diff	2021-03-03 12:53:24.117319233 -0800
+@@ -209,7 +209,7 @@
+  static void
+  channel_pre_open(struct ssh *ssh, Channel *c,
+      fd_set *readset, fd_set *writeset)
+-@@ -2179,25 +2206,34 @@ channel_check_window(struct ssh *ssh, Channel *c)
++@@ -2179,22 +2206,31 @@ channel_check_window(struct ssh *ssh, Channel *c)
+  
+  	if (c->type == SSH_CHANNEL_OPEN &&
+  	    !(c->flags & (CHAN_CLOSE_SENT|CHAN_CLOSE_RCVD)) &&
+@@ -229,22 +229,19 @@
+ +			debug("Channel: Window growth to %d by %d bytes", c->local_window_max, addition);
+ +		}
+  		if (!c->have_remote_id)
+- 			fatal(":%s: channel %d: no remote id",
+- 			    __func__, c->self);
++ 			fatal_f("channel %d: no remote id", c->self);
+  		if ((r = sshpkt_start(ssh,
+  		    SSH2_MSG_CHANNEL_WINDOW_ADJUST)) != 0 ||
+  		    (r = sshpkt_put_u32(ssh, c->remote_id)) != 0 ||
+ -		    (r = sshpkt_put_u32(ssh, c->local_consumed)) != 0 ||
+ +		    (r = sshpkt_put_u32(ssh, c->local_consumed + addition)) != 0 ||
+  		    (r = sshpkt_send(ssh)) != 0) {
+- 			fatal("%s: channel %i: %s", __func__,
+- 			    c->self, ssh_err(r));
++ 			fatal_fr(r, "channel %i", c->self);
+  		}
+- 		debug2("channel %d: window %d sent adjust %d",
+- 		    c->self, c->local_window,
+--		    c->local_consumed);
++ 		debug2("channel %d: window %d sent adjust %d", c->self,
++-		    c->local_window, c->local_consumed);
+ -		c->local_window += c->local_consumed;
+-+		    c->local_consumed + addition);
+++		    c->local_window, c->local_consumed + addition);
+ +		c->local_window += c->local_consumed + addition;
+  		c->local_consumed = 0;
+  	}
+@@ -387,18 +384,18 @@
+ index dec8e7e9..3c11558e 100644
+ --- a/compat.c
+ +++ b/compat.c
+-@@ -150,6 +150,13 @@ compat_datafellows(const char *version)
+- 			debug("match: %s pat %s compat 0x%08x",
++@@ -150,6 +150,13 @@ compat_banner(struct ssh *ssh, const char *version)
++ 			debug_f("match: %s pat %s compat 0x%08x",
+  			    version, check[i].pat, check[i].bugs);
+- 			datafellows = check[i].bugs;	/* XXX for now */
++ 			ssh->compat = check[i].bugs;
+ +			/* Check to see if the remote side is OpenSSH and not HPN */
+ +			if (strstr(version, "OpenSSH") != NULL) {
+ +				if (strstr(version, "hpn") == NULL) {
+-+					datafellows |= SSH_BUG_LARGEWINDOW;
+++					ssh->compat |= SSH_BUG_LARGEWINDOW;
+ +					debug("Remote is NON-HPN aware");
+ +				}
+ +			}
+- 			return check[i].bugs;
++ 			return;
+  		}
+  	}
+ diff --git a/compat.h b/compat.h
+@@ -431,9 +428,9 @@
+ --- a/digest-openssl.c
+ +++ b/digest-openssl.c
+ @@ -61,6 +61,7 @@ const struct ssh_digest digests[] = {
+- 	{ SSH_DIGEST_SHA256,	"SHA256", 	32,	EVP_sha256 },
++ 	{ SSH_DIGEST_SHA256,	"SHA256",	32,	EVP_sha256 },
+  	{ SSH_DIGEST_SHA384,	"SHA384",	48,	EVP_sha384 },
+- 	{ SSH_DIGEST_SHA512,	"SHA512", 	64,	EVP_sha512 },
++ 	{ SSH_DIGEST_SHA512,	"SHA512",	64,	EVP_sha512 },
+ +	{ SSH_DIGEST_NULL,      "NONEMAC",       0,     EVP_md_null},
+  	{ -1,			NULL,		0,	NULL },
+  };
+@@ -536,18 +533,10 @@
+  	if (state->rekey_limit)
+  		*max_blocks = MINIMUM(*max_blocks,
+  		    state->rekey_limit / enc->block_size);
+-@@ -966,6 +975,24 @@ ssh_set_newkeys(struct ssh *ssh, int mode)
++@@ -966,6 +975,16 @@ ssh_set_newkeys(struct ssh *ssh, int mode)
+  	return 0;
+  }
+  
+-+/* this supports the forced rekeying required for the NONE cipher */
+-+int rekey_requested = 0;
+-+void
+-+packet_request_rekeying(void)
+-+{
+-+	rekey_requested = 1;
+-+}
+-+
+ +/* used to determine if pre or post auth when rekeying for aes-ctr
+ + * and none cipher switch */
+ +int
+@@ -561,20 +550,6 @@
+  #define MAX_PACKETS	(1U<<31)
+  static int
+  ssh_packet_need_rekeying(struct ssh *ssh, u_int outbound_packet_len)
+-@@ -992,6 +1019,13 @@ ssh_packet_need_rekeying(struct ssh *ssh, u_int outbound_packet_len)
+- 	if (state->p_send.packets == 0 && state->p_read.packets == 0)
+- 		return 0;
+- 
+-+	/* used to force rekeying when called for by the none
+-+         * cipher switch methods -cjr */
+-+        if (rekey_requested == 1) {
+-+                rekey_requested = 0;
+-+                return 1;
+-+        }
+-+
+- 	/* Time-based rekeying */
+- 	if (state->rekey_interval != 0 &&
+- 	    (int64_t)state->rekey_time + state->rekey_interval <= monotime())
+ @@ -1330,7 +1364,7 @@ ssh_packet_read_seqnr(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
+  	struct session_state *state = ssh->state;
+  	int len, r, ms_remain;
+@@ -622,9 +597,9 @@
+  /* Format of the configuration file:
+  
+ @@ -165,6 +166,8 @@ typedef enum {
+- 	oHashKnownHosts,
+  	oTunnel, oTunnelDevice,
+  	oLocalCommand, oPermitLocalCommand, oRemoteCommand,
++ 	oDisableMTAES,
+ +	oTcpRcvBufPoll, oTcpRcvBuf, oHPNDisabled, oHPNBufferSize,
+ +	oNoneEnabled, oNoneMacEnabled, oNoneSwitch,
+  	oVisualHostKey,
+@@ -778,9 +753,9 @@
+  	int	ip_qos_bulk;		/* IP ToS/DSCP/class for bulk traffic */
+  	SyslogFacility log_facility;	/* Facility for system logging. */
+ @@ -115,7 +119,11 @@ typedef struct {
+- 
+  	int	enable_ssh_keysign;
+  	int64_t rekey_limit;
++ 	int     disable_multithreaded; /*disable multithreaded aes-ctr*/
+ +	int     none_switch;    /* Use none cipher */
+ +	int     none_enabled;   /* Allow none cipher to be used */
+ +  	int     nonemac_enabled;   /* Allow none MAC to be used */
+@@ -888,9 +863,9 @@
+ +			options->hpn_buffer_size = CHAN_TCP_WINDOW_DEFAULT;
+ +	}
+ +
++ 	if (options->disable_multithreaded == -1)
++ 		options->disable_multithreaded = 0;
+  	if (options->ip_qos_interactive == -1)
+- 		options->ip_qos_interactive = IPTOS_DSCP_AF21;
+- 	if (options->ip_qos_bulk == -1)
+ @@ -511,6 +564,8 @@ typedef enum {
+  	sPasswordAuthentication, sKbdInteractiveAuthentication,
+  	sListenAddress, sAddressFamily,
+@@ -1091,7 +1066,7 @@
+  }
+  
+ +static void
+-+hpn_options_init(void)
+++hpn_options_init(struct ssh *ssh)
+ +{
+ +	/*
+ +	 * We need to check to see if what they want to do about buffer
+@@ -1116,7 +1091,7 @@
+ +	else
+ +		options.hpn_buffer_size = 2 * 1024 * 1024;
+ +
+-+	if (datafellows & SSH_BUG_LARGEWINDOW) {
+++	if (ssh->compat & SSH_BUG_LARGEWINDOW) {
+ +		debug("HPN to Non-HPN Connection");
+ +	} else {
+ +		int sock, socksize;
+@@ -1186,7 +1161,7 @@
+ +		c->dynamic_window = 1;
+ +		debug("Enabled Dynamic Window Scaling");
+ +	}
+- 	debug3("%s: channel_new: %d", __func__, c->self);
++ 	debug3_f("channel_new: %d", c->self);
+  
+  	channel_send_open(ssh, c->self);
+ @@ -2078,6 +2160,13 @@ ssh_session2(struct ssh *ssh, struct passwd *pw)
+@@ -1198,7 +1173,7 @@
+ +	 * might open channels that use the hpn buffer sizes.  We can't send a
+ +	 * window of -1 (the default) to the server as it breaks things.
+ +	 */
+-+	hpn_options_init();
+++	hpn_options_init(ssh);
+ +
+  	/* XXX should be pre-session */
+  	if (!options.control_persist)
+@@ -1297,11 +1272,10 @@
+  	xxx_host = host;
+  	xxx_hostaddr = hostaddr;
+  
+-@@ -482,6 +493,34 @@ ssh_userauth2(struct ssh *ssh, const char *local_user,
+- 
++@@ -482,6 +493,33 @@ ssh_userauth2(struct ssh *ssh, const char *local_user,
+  	if (!authctxt.success)
+  		fatal("Authentication failed.");
+-+
++ 
+ +	/*
+ +	 * If the user wants to use the none cipher, do it post authentication
+ +	 * and only if the right conditions are met -- both of the NONE commands
+@@ -1329,9 +1303,9 @@
+ +		}
+ +	}
+ +
+- 	debug("Authentication succeeded (%s).", authctxt.method->name);
+- }
+- 
++ #ifdef WITH_OPENSSL
++ 	if (options.disable_multithreaded == 0) {
++ 		/* if we are using aes-ctr there can be issues in either a fork or sandbox
+ diff --git a/sshd.c b/sshd.c
+ index 8aa7f3df..d0e3f1b0 100644
+ --- a/sshd.c
+@@ -1397,9 +1371,9 @@
+ +	if (options.nonemac_enabled == 1)
+ +		debug("WARNING: None MAC enabled");
+ +	
+- 	myproposal[PROPOSAL_KEX_ALGS] = compat_kex_proposal(
++ 	myproposal[PROPOSAL_KEX_ALGS] = compat_kex_proposal(ssh,
+  	    options.kex_algorithms);
+- 	myproposal[PROPOSAL_ENC_ALGS_CTOS] = compat_cipher_proposal(
++ 	myproposal[PROPOSAL_ENC_ALGS_CTOS] = compat_cipher_proposal(ssh,
+ diff --git a/sshd_config b/sshd_config
+ index 19b7c91a..cdd889b2 100644
+ --- a/sshd_config
diff --git a/net-misc/openssh/files/openssh-8.5_p1-hpn-15.1-sctp-glue.patch b/net-misc/openssh/files/openssh-8.5_p1-hpn-15.1-sctp-glue.patch
new file mode 100644
index 0000000..d4835d1
--- /dev/null
+++ b/net-misc/openssh/files/openssh-8.5_p1-hpn-15.1-sctp-glue.patch
@@ -0,0 +1,18 @@
+diff -ur a/openssh-8_4_P1-hpn-DynWinNoneSwitch-15.1.diff b/openssh-8_4_P1-hpn-DynWinNoneSwitch-15.1.diff
+--- a/openssh-8_4_P1-hpn-DynWinNoneSwitch-15.1.diff	2021-03-03 15:36:29.211246123 -0800
++++ b/openssh-8_4_P1-hpn-DynWinNoneSwitch-15.1.diff	2021-03-03 15:36:53.607089097 -0800
+@@ -1401,14 +1401,3 @@
+  # Example of overriding settings on a per-user basis
+  #Match User anoncvs
+  #	X11Forwarding no
+-diff --git a/version.h b/version.h
+-index c2f9c55b..f2e7fa80 100644
+---- a/version.h
+-+++ b/version.h
+-@@ -3,4 +3,5 @@
+- #define SSH_VERSION	"OpenSSH_8.4"
+- 
+- #define SSH_PORTABLE	"p1"
+--#define SSH_RELEASE	SSH_VERSION SSH_PORTABLE
+-+#define SSH_HPN         "-hpn15v1"
+-+#define SSH_RELEASE	SSH_VERSION SSH_PORTABLE SSH_HPN
diff --git a/net-misc/openssh/files/sshd.confd b/net-misc/openssh/files/sshd.confd
deleted file mode 100644
index 28952b4..0000000
--- a/net-misc/openssh/files/sshd.confd
+++ /dev/null
@@ -1,21 +0,0 @@
-# /etc/conf.d/sshd: config file for /etc/init.d/sshd
-
-# Where is your sshd_config file stored?
-
-SSHD_CONFDIR="/etc/ssh"
-
-
-# Any random options you want to pass to sshd.
-# See the sshd(8) manpage for more info.
-
-SSHD_OPTS=""
-
-
-# Pid file to use (needs to be absolute path).
-
-#SSHD_PIDFILE="/var/run/sshd.pid"
-
-
-# Path to the sshd binary (needs to be absolute path).
-
-#SSHD_BINARY="/usr/sbin/sshd"
diff --git a/net-misc/openssh/files/sshd.initd b/net-misc/openssh/files/sshd.initd
deleted file mode 100644
index c5df469..0000000
--- a/net-misc/openssh/files/sshd.initd
+++ /dev/null
@@ -1,89 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-extra_commands="checkconfig"
-extra_started_commands="reload"
-
-: ${SSHD_CONFDIR:=${RC_PREFIX%/}/etc/ssh}
-: ${SSHD_CONFIG:=${SSHD_CONFDIR}/sshd_config}
-: ${SSHD_PIDFILE:=${RC_PREFIX%/}/run/${SVCNAME}.pid}
-: ${SSHD_BINARY:=${RC_PREFIX%/}/usr/sbin/sshd}
-: ${SSHD_KEYGEN_BINARY:=${RC_PREFIX%/}/usr/bin/ssh-keygen}
-
-command="${SSHD_BINARY}"
-pidfile="${SSHD_PIDFILE}"
-command_args="${SSHD_OPTS} -o PidFile=${pidfile} -f ${SSHD_CONFIG}"
-
-# Wait one second (length chosen arbitrarily) to see if sshd actually
-# creates a PID file, or if it crashes for some reason like not being
-# able to bind to the address in ListenAddress (bug 617596).
-: ${SSHD_SSD_OPTS:=--wait 1000}
-start_stop_daemon_args="${SSHD_SSD_OPTS}"
-
-depend() {
-	# Entropy can be used by ssh-keygen, among other things, but
-	# is not strictly required (bug 470020).
-	use logger dns entropy
-	if [ "${rc_need+set}" = "set" ] ; then
-		: # Do nothing, the user has explicitly set rc_need
-	else
-		local x warn_addr
-		for x in $(awk '/^ListenAddress/{ print $2 }' "$SSHD_CONFIG" 2>/dev/null) ; do
-			case "${x}" in
-				0.0.0.0|0.0.0.0:*) ;;
-				::|\[::\]*) ;;
-				*) warn_addr="${warn_addr} ${x}" ;;
-			esac
-		done
-		if [ -n "${warn_addr}" ] ; then
-			need net
-			ewarn "You are binding an interface in ListenAddress statement in your sshd_config!"
-			ewarn "You must add rc_need=\"net.FOO\" to your ${RC_PREFIX%/}/etc/conf.d/sshd"
-			ewarn "where FOO is the interface(s) providing the following address(es):"
-			ewarn "${warn_addr}"
-		fi
-	fi
-}
-
-checkconfig() {
-	checkpath --mode 0755 --directory "${RC_PREFIX%/}/var/empty"
-
-	if [ ! -e "${SSHD_CONFIG}" ] ; then
-		eerror "You need an ${SSHD_CONFIG} file to run sshd"
-		eerror "There is a sample file in /usr/share/doc/openssh"
-		return 1
-	fi
-
-	${SSHD_KEYGEN_BINARY} -A || return 2
-
-	"${command}" -t ${command_args} || return 3
-}
-
-start_pre() {
-	# If this isn't a restart, make sure that the user's config isn't
-	# busted before we try to start the daemon (this will produce
-	# better error messages than if we just try to start it blindly).
-	#
-	# If, on the other hand, this *is* a restart, then the stop_pre
-	# action will have ensured that the config is usable and we don't
-	# need to do that again.
-	if [ "${RC_CMD}" != "restart" ] ; then
-		checkconfig || return $?
-	fi
-}
-
-stop_pre() {
-	# If this is a restart, check to make sure the user's config
-	# isn't busted before we stop the running daemon.
-	if [ "${RC_CMD}" = "restart" ] ; then
-		checkconfig || return $?
-	fi
-}
-
-reload() {
-	checkconfig || return $?
-	ebegin "Reloading ${SVCNAME}"
-	start-stop-daemon --signal HUP --pidfile "${pidfile}"
-	eend $?
-}
diff --git a/net-misc/openssh/files/sshd.rc6.4 b/net-misc/openssh/files/sshd.rc6.4
deleted file mode 100644
index 5e30142..0000000
--- a/net-misc/openssh/files/sshd.rc6.4
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-extra_commands="checkconfig"
-extra_started_commands="reload"
-
-: ${SSHD_CONFDIR:=/etc/ssh}
-: ${SSHD_CONFIG:=${SSHD_CONFDIR}/sshd_config}
-: ${SSHD_PIDFILE:=/var/run/${SVCNAME}.pid}
-: ${SSHD_BINARY:=/usr/sbin/sshd}
-
-depend() {
-	use logger dns
-	if [ "${rc_need+set}" = "set" ] ; then
-		: # Do nothing, the user has explicitly set rc_need
-	else
-		local x warn_addr
-		for x in $(awk '/^ListenAddress/{ print $2 }' "$SSHD_CONFIG" 2>/dev/null) ; do
-			case "${x}" in
-				0.0.0.0|0.0.0.0:*) ;;
-				::|\[::\]*) ;;
-				*) warn_addr="${warn_addr} ${x}" ;;
-			esac
-		done
-		if [ -n "${warn_addr}" ] ; then
-			need net
-			ewarn "You are binding an interface in ListenAddress statement in your sshd_config!"
-			ewarn "You must add rc_need=\"net.FOO\" to your /etc/conf.d/sshd"
-			ewarn "where FOO is the interface(s) providing the following address(es):"
-			ewarn "${warn_addr}"
-		fi
-	fi
-}
-
-checkconfig() {
-	if [ ! -d /var/empty ] ; then
-		mkdir -p /var/empty || return 1
-	fi
-
-	if [ ! -e "${SSHD_CONFIG}" ] ; then
-		eerror "You need an ${SSHD_CONFIG} file to run sshd"
-		eerror "There is a sample file in /usr/share/doc/openssh"
-		return 1
-	fi
-
-	ssh-keygen -A || return 1
-
-	[ "${SSHD_PIDFILE}" != "/var/run/sshd.pid" ] \
-		&& SSHD_OPTS="${SSHD_OPTS} -o PidFile=${SSHD_PIDFILE}"
-	[ "${SSHD_CONFIG}" != "/etc/ssh/sshd_config" ] \
-		&& SSHD_OPTS="${SSHD_OPTS} -f ${SSHD_CONFIG}"
-
-	"${SSHD_BINARY}" -t ${SSHD_OPTS} || return 1
-}
-
-start() {
-	checkconfig || return 1
-
-	ebegin "Starting ${SVCNAME}"
-	start-stop-daemon --start --exec "${SSHD_BINARY}" \
-	    --pidfile "${SSHD_PIDFILE}" \
-	    -- ${SSHD_OPTS}
-	eend $?
-}
-
-stop() {
-	if [ "${RC_CMD}" = "restart" ] ; then
-		checkconfig || return 1
-	fi
-
-	ebegin "Stopping ${SVCNAME}"
-	start-stop-daemon --stop --exec "${SSHD_BINARY}" \
-	    --pidfile "${SSHD_PIDFILE}" --quiet
-	eend $?
-}
-
-reload() {
-	checkconfig || return 1
-	ebegin "Reloading ${SVCNAME}"
-	start-stop-daemon --signal HUP \
-	    --exec "${SSHD_BINARY}" --pidfile "${SSHD_PIDFILE}"
-	eend $?
-}
diff --git a/net-misc/openssh/files/sshd.service b/net-misc/openssh/files/sshd.service
index b5e96b3..6b4da91 100644
--- a/net-misc/openssh/files/sshd.service
+++ b/net-misc/openssh/files/sshd.service
@@ -6,6 +6,7 @@
 ExecStartPre=/usr/bin/ssh-keygen -A
 ExecStart=/usr/sbin/sshd -D -e
 ExecReload=/bin/kill -HUP $MAINPID
+KillMode=process
 
 [Install]
 WantedBy=multi-user.target
diff --git a/net-misc/openssh/files/sshd_at.service b/net-misc/openssh/files/sshd_at.service
index 2645ad0..ec2907b 100644
--- a/net-misc/openssh/files/sshd_at.service
+++ b/net-misc/openssh/files/sshd_at.service
@@ -5,4 +5,4 @@
 [Service]
 ExecStart=-/usr/sbin/sshd -i -e
 StandardInput=socket
-StandardError=syslog
+StandardError=journal
diff --git a/net-misc/openssh/metadata.xml b/net-misc/openssh/metadata.xml
index 71bcb7d..9ce34e6 100644
--- a/net-misc/openssh/metadata.xml
+++ b/net-misc/openssh/metadata.xml
@@ -21,11 +21,11 @@
 </longdescription>
   <use>
     <flag name="bindist">Disable EC/RC5 algorithms in OpenSSL for patent reasons.</flag>
+    <flag name="scp">Enable scp command with known security problems. See bug 733802</flag>
     <flag name="hpn">Enable high performance ssh</flag>
-    <flag name="ldap">Add support for storing SSH public keys in LDAP</flag>
     <flag name="ldns">Use LDNS for DNSSEC/SSHFP validation.</flag>
     <flag name="livecd">Enable root password logins for live-cd environment.</flag>
-    <flag name="ssh1">Support the legacy/weak SSH1 protocol</flag>
+    <flag name="security-key">Include builtin U2F/FIDO support</flag>
     <flag name="ssl">Enable additional crypto algorithms via OpenSSL</flag>
     <flag name="X509">Adds support for X.509 certificate authentication</flag>
     <flag name="xmss">Enable XMSS post-quantum authentication algorithm</flag>
diff --git a/net-misc/openssh/openssh-8.1_p1-r5.ebuild b/net-misc/openssh/openssh-8.5_p1.ebuild
similarity index 73%
rename from net-misc/openssh/openssh-8.1_p1-r5.ebuild
rename to net-misc/openssh/openssh-8.5_p1.ebuild
index 152cded..4450212 100644
--- a/net-misc/openssh/openssh-8.1_p1-r5.ebuild
+++ b/net-misc/openssh/openssh-8.5_p1.ebuild
@@ -3,14 +3,17 @@
 
 EAPI=7
 
-inherit user flag-o-matic multilib autotools pam systemd toolchain-funcs
+inherit user-info flag-o-matic multilib autotools pam systemd toolchain-funcs
 
 # Make it more portable between straight releases
 # and _p? releases.
 PARCH=${P/_}
-HPN_PV="${PV^^}"
 
-HPN_VER="14.20"
+# PV to USE for HPN patches
+#HPN_PV="${PV^^}"
+HPN_PV="8.4_P1"
+
+HPN_VER="15.1"
 HPN_PATCHES=(
 	${PN}-${HPN_PV/./_}-hpn-DynWinNoneSwitch-${HPN_VER}.diff
 	${PN}-${HPN_PV/./_}-hpn-AES-CTR-${HPN_VER}.diff
@@ -18,16 +21,13 @@
 )
 
 SCTP_VER="1.2" SCTP_PATCH="${PARCH}-sctp-${SCTP_VER}.patch.xz"
-X509_VER="12.3" X509_PATCH="${PARCH}+x509-${X509_VER}.diff.gz"
-
-PATCH_SET="openssh-7.9p1-patches-1.0"
+X509_VER="13.0" X509_PATCH="${PARCH}+x509-${X509_VER}.diff.gz"
 
 DESCRIPTION="Port of OpenBSD's free SSH release"
 HOMEPAGE="https://www.openssh.com/"
 SRC_URI="mirror://openbsd/OpenSSH/portable/${PARCH}.tar.gz
-	https://dev.gentoo.org/~chutzpah/dist/openssh/${P}-glibc-2.31-patches.tar.xz
 	${SCTP_PATCH:+sctp? ( https://dev.gentoo.org/~chutzpah/dist/openssh/${SCTP_PATCH} )}
-	${HPN_VER:+hpn? ( $(printf "mirror://sourceforge/hpnssh/HPN-SSH%%20${HPN_VER/./v}%%20${HPN_PV/_P/p}/%s\n" "${HPN_PATCHES[@]}") )}
+	${HPN_VER:+hpn? ( $(printf "mirror://sourceforge/project/hpnssh/Patches/HPN-SSH%%20${HPN_VER/./v}%%20${HPN_PV/_P/p}/%s\n" "${HPN_PATCHES[@]}") )}
 	${X509_PATCH:+X509? ( https://roumenpetrov.info/openssh/x509-${X509_VER}/${X509_PATCH} )}
 "
 S="${WORKDIR}/${PARCH}"
@@ -36,7 +36,7 @@
 SLOT="0"
 KEYWORDS="*"
 # Probably want to drop ssl defaulting to on in a future version.
-IUSE="abi_mips_n32 audit bindist debug hpn kerberos kernel_linux ldns libedit libressl livecd pam +pie sctp selinux +ssl static test X X509 xmss"
+IUSE="abi_mips_n32 audit bindist debug hpn kerberos kernel_linux ldns libedit libressl livecd pam +pie +scp sctp security-key selinux +ssl static test X X509 xmss"
 
 RESTRICT="!test? ( test )"
 
@@ -44,7 +44,8 @@
 	ldns? ( ssl )
 	pie? ( !static )
 	static? ( !kerberos !pam )
-	X509? ( !sctp ssl )
+	X509? ( !sctp !security-key ssl !xmss )
+	xmss? ( || ( ssl libressl ) )
 	test? ( ssl )
 "
 
@@ -57,6 +58,7 @@
 	)
 	libedit? ( dev-libs/libedit:=[static-libs(+)] )
 	sctp? ( net-misc/lksctp-tools[static-libs(+)] )
+	security-key? ( >=dev-libs/libfido2-1.5.0:=[static-libs(+)] )
 	selinux? ( >=sys-libs/libselinux-1.28[static-libs(+)] )
 	ssl? (
 		!libressl? (
@@ -75,12 +77,15 @@
 	>=sys-libs/zlib-1.2.3:=[static-libs(+)]
 "
 RDEPEND="
+	acct-group/sshd
+	acct-user/sshd
 	!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
 	pam? ( sys-libs/pam )
 	kerberos? ( virtual/krb5 )
 "
 DEPEND="${RDEPEND}
 	virtual/os-headers
+	kernel_linux? ( !prefix-guest? ( sys-kernel/linux-headers ) )
 	static? ( ${LIB_DEPEND} )
 "
 RDEPEND="${RDEPEND}
@@ -127,13 +132,14 @@
 	sed -i '/^AuthorizedKeysFile/s:^:#:' sshd_config || die
 
 	eapply "${FILESDIR}"/${PN}-7.9_p1-include-stdlib.patch
-	eapply "${FILESDIR}"/${PN}-8.1_p1-GSSAPI-dns.patch #165444 integrated into gsskex
+	eapply "${FILESDIR}"/${PN}-8.5_p1-GSSAPI-dns.patch #165444 integrated into gsskex
 	eapply "${FILESDIR}"/${PN}-6.7_p1-openssl-ignore-status.patch
 	eapply "${FILESDIR}"/${PN}-7.5_p1-disable-conch-interop-tests.patch
 	eapply "${FILESDIR}"/${PN}-8.0_p1-fix-putty-tests.patch
 	eapply "${FILESDIR}"/${PN}-8.0_p1-deny-shmget-shmat-shmdt-in-preauth-privsep-child.patch
-	eapply "${FILESDIR}"/${PN}-8.1_p1-tests-2020.patch
-	eapply "${FILESDIR}"/${PN}-8.1_p1-Add-POLLOUT-when-connecting-in-non-blocking-mode.patch
+
+	# workaround for https://bugs.gentoo.org/734984
+	use X509 || eapply "${FILESDIR}"/${PN}-8.3_p1-sha2-include.patch
 
 	[[ -d ${WORKDIR}/patches ]] && eapply "${WORKDIR}"/patches
 
@@ -145,7 +151,6 @@
 		popd &>/dev/null || die
 
 		eapply "${WORKDIR}"/${X509_PATCH%.*}
-		eapply "${FILESDIR}"/${P}-X509-$(ver_cut 1-2 ${X509_VER})-tests.patch
 
 		# We need to patch package version or any X.509 sshd will reject our ssh client
 		# with "userauth_pubkey: could not parse key: string is too large [preauth]"
@@ -182,14 +187,9 @@
 		mkdir "${hpn_patchdir}" || die
 		cp $(printf -- "${DISTDIR}/%s\n" "${HPN_PATCHES[@]}") "${hpn_patchdir}" || die
 		pushd "${hpn_patchdir}" &>/dev/null || die
-		eapply "${FILESDIR}"/${PN}-8.1_p1-hpn-${HPN_VER}-glue.patch
-		if use X509; then
-		#	einfo "Will disable MT AES cipher due to incompatbility caused by X509 patch set"
-		#	# X509 and AES-CTR-MT don't get along, let's just drop it
-		#	rm openssh-${HPN_PV//./_}-hpn-AES-CTR-${HPN_VER}.diff || die
-			eapply "${FILESDIR}"/${PN}-8.0_p1-hpn-${HPN_VER}-X509-glue.patch
-		fi
-		use sctp && eapply "${FILESDIR}"/${PN}-8.1_p1-hpn-${HPN_VER}-sctp-glue.patch
+		eapply "${FILESDIR}"/${P}-hpn-${HPN_VER}-glue.patch
+		use X509 && eapply "${FILESDIR}"/${PN}-8.5_p1-hpn-${HPN_VER}-X509-glue.patch
+		use sctp && eapply "${FILESDIR}"/${PN}-8.5_p1-hpn-${HPN_VER}-sctp-glue.patch
 		popd &>/dev/null || die
 
 		eapply "${hpn_patchdir}"
@@ -249,6 +249,10 @@
 
 	eapply_user #473004
 
+	# These tests are currently incompatible with PORTAGE_TMPDIR/sandbox
+	sed -e '/\t\tpercent \\/ d' \
+		-i regress/Makefile || die
+
 	tc-export PKG_CONFIG
 	local sed_args=(
 		-e "s:-lcrypto:$(${PKG_CONFIG} --libs openssl):"
@@ -279,6 +283,16 @@
 	use static && append-ldflags -static
 	use xmss && append-cflags -DWITH_XMSS
 
+	if [[ ${CHOST} == *-solaris* ]] ; then
+		# Solaris' glob.h doesn't have things like GLOB_TILDE, configure
+		# doesn't check for this, so force the replacement to be put in
+		# place
+		append-cppflags -DBROKEN_GLOB
+	fi
+
+	# use replacement, RPF_ECHO_ON doesn't exist here
+	[[ ${CHOST} == *-darwin* ]] && export ac_cv_func_readpassphrase=no
+
 	local myconf=(
 		--with-ldflags="${LDFLAGS}"
 		--disable-strip
@@ -298,14 +312,23 @@
 		$(use_with pam)
 		$(use_with pie)
 		$(use_with selinux)
+		$(usex X509 '' "$(use_with security-key security-key-builtin)")
 		$(use_with ssl openssl)
 		$(use_with ssl md5-passwords)
 		$(use_with ssl ssl-engine)
 		$(use_with !elibc_Cygwin hardening) #659210
 	)
 
-	# stackprotect is broken on musl x86 and ppc
-	use elibc_musl && ( use x86 || use ppc ) && myconf+=( --without-stackprotect )
+	if use elibc_musl; then
+		# stackprotect is broken on musl x86 and ppc
+		if use x86 || use ppc; then
+			myconf+=( --without-stackprotect )
+		fi
+
+		# musl defines bogus values for UTMP_FILE and WTMP_FILE
+		# https://bugs.gentoo.org/753230
+		myconf+=( --disable-utmp --disable-wtmp )
+	fi
 
 	# The seccomp sandbox is broken on x32, so use the older method for now. #553748
 	use amd64 && [[ ${ABI} == "x32" ]] && myconf+=( --with-sandbox=rlimit )
@@ -331,10 +354,12 @@
 	mkdir -p "${sshhome}"/.ssh
 	for t in "${tests[@]}" ; do
 		# Some tests read from stdin ...
-		HOMEDIR="${sshhome}" HOME="${sshhome}" SUDO="" \
-		emake -k -j1 ${t} </dev/null \
-			&& passed+=( "${t}" ) \
-			|| failed+=( "${t}" )
+		HOMEDIR="${sshhome}" HOME="${sshhome}" TMPDIR="${T}" \
+			SUDO="" SSH_SK_PROVIDER="" \
+			TEST_SSH_UNSAFE_PERMISSIONS=1 \
+			emake -k -j1 ${t} </dev/null \
+				&& passed+=( "${t}" ) \
+				|| failed+=( "${t}" )
 	done
 
 	einfo "Passed tests: ${passed[*]}"
@@ -411,50 +436,65 @@
 	diropts -m 0700
 	dodir /etc/skel/.ssh
 
-	keepdir /var/empty
+	# https://bugs.gentoo.org/733802
+	if ! use scp; then
+		rm -f "${ED}"/usr/{bin/scp,share/man/man1/scp.1} \
+			|| die "failed to remove scp"
+	fi
+
 
 	systemd_dounit "${FILESDIR}"/sshd.{service,socket}
 	systemd_newunit "${FILESDIR}"/sshd_at.service 'sshd@.service'
 }
 
 pkg_preinst() {
-	enewgroup sshd 22
-	enewuser sshd 22 -1 /var/empty sshd
+	if ! use ssl && has_version "${CATEGORY}/${PN}[ssl]"; then
+		show_ssl_warning=1
+	fi
 }
 
 pkg_postinst() {
-	if has_version "<${CATEGORY}/${PN}-5.8_p1" ; then
-		elog "Starting with openssh-5.8p1, the server will default to a newer key"
-		elog "algorithm (ECDSA).  You are encouraged to manually update your stored"
-		elog "keys list as servers update theirs.  See ssh-keyscan(1) for more info."
-	fi
-	if has_version "<${CATEGORY}/${PN}-7.0_p1" ; then
-		elog "Starting with openssh-6.7, support for USE=tcpd has been dropped by upstream."
-		elog "Make sure to update any configs that you might have.  Note that xinetd might"
-		elog "be an alternative for you as it supports USE=tcpd."
-	fi
-	if has_version "<${CATEGORY}/${PN}-7.1_p1" ; then #557388 #555518
-		elog "Starting with openssh-7.0, support for ssh-dss keys were disabled due to their"
-		elog "weak sizes.  If you rely on these key types, you can re-enable the key types by"
-		elog "adding to your sshd_config or ~/.ssh/config files:"
-		elog "	PubkeyAcceptedKeyTypes=+ssh-dss"
-		elog "You should however generate new keys using rsa or ed25519."
+	local old_ver
+	for old_ver in ${REPLACING_VERSIONS}; do
+		if ver_test "${old_ver}" -lt "5.8_p1"; then
+			elog "Starting with openssh-5.8p1, the server will default to a newer key"
+			elog "algorithm (ECDSA).  You are encouraged to manually update your stored"
+			elog "keys list as servers update theirs.  See ssh-keyscan(1) for more info."
+		fi
+		if ver_test "${old_ver}" -lt "7.0_p1"; then
+			elog "Starting with openssh-6.7, support for USE=tcpd has been dropped by upstream."
+			elog "Make sure to update any configs that you might have.  Note that xinetd might"
+			elog "be an alternative for you as it supports USE=tcpd."
+		fi
+		if ver_test "${old_ver}" -lt "7.1_p1"; then #557388 #555518
+			elog "Starting with openssh-7.0, support for ssh-dss keys were disabled due to their"
+			elog "weak sizes.  If you rely on these key types, you can re-enable the key types by"
+			elog "adding to your sshd_config or ~/.ssh/config files:"
+			elog "	PubkeyAcceptedKeyTypes=+ssh-dss"
+			elog "You should however generate new keys using rsa or ed25519."
 
-		elog "Starting with openssh-7.0, the default for PermitRootLogin changed from 'yes'"
-		elog "to 'prohibit-password'.  That means password auth for root users no longer works"
-		elog "out of the box.  If you need this, please update your sshd_config explicitly."
-	fi
-	if has_version "<${CATEGORY}/${PN}-7.6_p1" ; then
-		elog "Starting with openssh-7.6p1, openssh upstream has removed ssh1 support entirely."
-		elog "Furthermore, rsa keys with less than 1024 bits will be refused."
-	fi
-	if has_version "<${CATEGORY}/${PN}-7.7_p1" ; then
-		elog "Starting with openssh-7.7p1, we no longer patch openssh to provide LDAP functionality."
-		elog "Install sys-auth/ssh-ldap-pubkey and use OpenSSH's \"AuthorizedKeysCommand\" option"
-		elog "if you need to authenticate against LDAP."
-		elog "See https://wiki.gentoo.org/wiki/SSH/LDAP_migration for more details."
-	fi
-	if ! use ssl && has_version "${CATEGORY}/${PN}[ssl]" ; then
+			elog "Starting with openssh-7.0, the default for PermitRootLogin changed from 'yes'"
+			elog "to 'prohibit-password'.  That means password auth for root users no longer works"
+			elog "out of the box.  If you need this, please update your sshd_config explicitly."
+		fi
+		if ver_test "${old_ver}" -lt "7.6_p1"; then
+			elog "Starting with openssh-7.6p1, openssh upstream has removed ssh1 support entirely."
+			elog "Furthermore, rsa keys with less than 1024 bits will be refused."
+		fi
+		if ver_test "${old_ver}" -lt "7.7_p1"; then
+			elog "Starting with openssh-7.7p1, we no longer patch openssh to provide LDAP functionality."
+			elog "Install sys-auth/ssh-ldap-pubkey and use OpenSSH's \"AuthorizedKeysCommand\" option"
+			elog "if you need to authenticate against LDAP."
+			elog "See https://wiki.gentoo.org/wiki/SSH/LDAP_migration for more details."
+		fi
+		if ver_test "${old_ver}" -lt "8.2_p1"; then
+			ewarn "After upgrading to openssh-8.2p1 please restart sshd, otherwise you"
+			ewarn "will not be able to establish new sessions. Restarting sshd over a ssh"
+			ewarn "connection is generally safe."
+		fi
+	done
+
+	if [[ -n ${show_ssl_warning} ]]; then
 		elog "Be aware that by disabling openssl support in openssh, the server and clients"
 		elog "no longer support dss/rsa/ecdsa keys.  You will need to generate ed25519 keys"
 		elog "and update all clients/servers that utilize them."
diff --git a/net-nds/rpcbind/Manifest b/net-nds/rpcbind/Manifest
new file mode 100644
index 0000000..1e114d6
--- /dev/null
+++ b/net-nds/rpcbind/Manifest
@@ -0,0 +1 @@
+DIST rpcbind-1.2.5.tar.bz2 123502 BLAKE2B de0d10406aeffd75195c1fa1d0179b2c7c0ba54c3f3ac58ce9d7e9448d1dbe91a296ad69c45dee115e0a739aa9cfec53b750d3a5ca405e16605a92bbb2006859 SHA512 e884c4757950ccead0f9a07f50625a63e6f18f9bfae9fcfffa3e5fa4b7a66c3a99d9fa303061848fe8211509d5456f24ff26e4579af6e161a35522268f3ef3e4
diff --git a/net-nds/rpcbind/files/rpcbind.confd b/net-nds/rpcbind/files/rpcbind.confd
new file mode 100644
index 0000000..ddc0917
--- /dev/null
+++ b/net-nds/rpcbind/files/rpcbind.confd
@@ -0,0 +1,4 @@
+# /etc/conf.d/rpcbind
+ 
+# Options for `rpcbind`.
+#RPCBIND_OPTS="-l"
diff --git a/net-nds/rpcbind/files/rpcbind.initd b/net-nds/rpcbind/files/rpcbind.initd
new file mode 100644
index 0000000..1832977
--- /dev/null
+++ b/net-nds/rpcbind/files/rpcbind.initd
@@ -0,0 +1,21 @@
+#!/sbin/openrc-run
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+	use net
+	before inetd xinetd
+	provide portmap
+}
+
+start() {
+	ebegin "Starting rpcbind"
+	start-stop-daemon --start --quiet --exec /sbin/rpcbind -- ${RPCBIND_OPTS}
+	eend $?
+}
+
+stop() {
+	ebegin "Stopping rpcbind"
+	start-stop-daemon --stop --quiet --exec /sbin/rpcbind
+	eend $?
+}
diff --git a/net-nds/rpcbind/metadata.xml b/net-nds/rpcbind/metadata.xml
new file mode 100644
index 0000000..8b85a22
--- /dev/null
+++ b/net-nds/rpcbind/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="project">
+		<email>base-system@gentoo.org</email>
+	</maintainer>
+	<use>
+		<flag name="remotecalls">Enable remote calls</flag>
+		<flag name="warmstarts">Enables rpcbind to cache configuration for warm restarts</flag>
+	</use>
+	<upstream>
+		<remote-id type="sourceforge">rpcbind</remote-id>
+	</upstream>
+</pkgmetadata>
diff --git a/net-nds/rpcbind/rpcbind-1.2.5.ebuild b/net-nds/rpcbind/rpcbind-1.2.5.ebuild
new file mode 100644
index 0000000..52e7405
--- /dev/null
+++ b/net-nds/rpcbind/rpcbind-1.2.5.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit systemd
+
+if [[ ${PV} == "9999" ]] ; then
+	EGIT_REPO_URI="git://linux-nfs.org/~steved/rpcbind.git"
+	inherit autotools git-r3
+else
+	SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+	KEYWORDS="*"
+fi
+
+DESCRIPTION="portmap replacement which supports RPC over various protocols"
+HOMEPAGE="https://sourceforge.net/projects/rpcbind/"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE="debug remotecalls selinux systemd tcpd warmstarts"
+REQUIRED_USE="systemd? ( warmstarts )"
+
+CDEPEND=">=net-libs/libtirpc-0.2.3:=
+	systemd? ( sys-apps/systemd:= )
+	tcpd? ( sys-apps/tcp-wrappers )"
+DEPEND="${CDEPEND}
+	virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+	selinux? ( sec-policy/selinux-rpcbind )"
+
+src_prepare() {
+	default
+	[[ ${PV} == "9999" ]] && eautoreconf
+}
+
+src_configure() {
+	local myeconfargs=(
+		--bindir="${EPREFIX}"/sbin
+		--sbindir="${EPREFIX}"/sbin
+		--with-statedir="${EPREFIX}"/run/${PN}
+		--with-systemdsystemunitdir=$(usex systemd "$(systemd_get_systemunitdir)" "no")
+		$(use_enable debug)
+		$(use_enable remotecalls rmtcalls)
+		$(use_enable warmstarts)
+		$(use_enable tcpd libwrap)
+	)
+
+	# Avoid using rpcsvc headers
+	# https://bugs.gentoo.org/705224
+	export ac_cv_header_rpcsvc_mount_h=no
+
+	econf "${myeconfargs[@]}"
+}
+
+src_install() {
+	default
+
+	newinitd "${FILESDIR}"/${PN}.initd ${PN}
+	newconfd "${FILESDIR}"/${PN}.confd ${PN}
+}
diff --git a/profiles/categories b/profiles/categories
index 4558958..0ca9b9d 100644
--- a/profiles/categories
+++ b/profiles/categories
@@ -1,4 +1,5 @@
 acct-group
+acct-user
 app-accessibility
 app-admin
 app-antivirus
@@ -33,6 +34,7 @@
 dev-dotnet
 dev-embedded
 dev-games
+dev-go
 dev-haskell
 dev-java
 dev-lang
@@ -142,6 +144,7 @@
 sys-libs
 sys-power
 sys-process
+virtual
 www-apache
 www-apps
 www-client
@@ -159,5 +162,4 @@
 x11-themes
 x11-wm
 xfce-base
-xfce-extra
-virtual
+xfce-extra
\ No newline at end of file
diff --git a/sys-auth/passwdqc/Manifest b/sys-auth/passwdqc/Manifest
new file mode 100644
index 0000000..dba9939
--- /dev/null
+++ b/sys-auth/passwdqc/Manifest
@@ -0,0 +1 @@
+DIST passwdqc-1.4.0.tar.gz 55219 BLAKE2B 3f96a2d219ee23f11db2ad8ba433eaa56b97a263ad1a49159e0356b779cb4486ec9aa74cd7002fdd6d273e5a7bae4fe1b94e02f60256d331e5afc30d63e81360 SHA512 b9be6632688a1d7d929ec546679a366a67d44e7841e106c7f739a8e0656842866125160c87b04c8e0b3189a3e85eb182aa789196f68925b2f8ec71cd6a479800
diff --git a/sys-auth/passwdqc/metadata.xml b/sys-auth/passwdqc/metadata.xml
new file mode 100644
index 0000000..203fa55
--- /dev/null
+++ b/sys-auth/passwdqc/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="person">
+	<email>zlogene@gentoo.org</email>
+	<name>Mikle Kolyada</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-auth/passwdqc/passwdqc-1.4.0-r1.ebuild b/sys-auth/passwdqc/passwdqc-1.4.0-r1.ebuild
new file mode 100644
index 0000000..3e0c6ec
--- /dev/null
+++ b/sys-auth/passwdqc/passwdqc-1.4.0-r1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit pam toolchain-funcs
+
+DESCRIPTION="Password strength checking library (and PAM module)"
+HOMEPAGE="http://www.openwall.com/passwdqc/"
+SRC_URI="http://www.openwall.com/${PN}/${P}.tar.gz"
+
+LICENSE="Openwall BSD public-domain"
+SLOT="0"
+KEYWORDS="*"
+
+RDEPEND="sys-libs/pam"
+DEPEND="${RDEPEND}"
+
+pkg_setup() {
+	QA_FLAGS_IGNORED="/$(get_libdir)/security/pam_passwdqc.so
+		 /usr/$(get_libdir)/libpasswdqc.so.0"
+}
+
+src_prepare() {
+	default
+	sed -i -e 's:`uname -s`:Linux:' Makefile || die
+
+	# ship our own default settings
+	cat <<- EOF > "${S}/passwdqc.conf"
+		min=8,8,8,8,8
+		max=40
+		passphrase=3
+		match=4
+		similar=deny
+		random=47
+		enforce=everyone
+		retry=3
+	EOF
+
+}
+
+_emake() {
+	emake -j1 \
+		SHARED_LIBDIR="/usr/$(get_libdir)" \
+		SECUREDIR="$(getpam_mod_dir)" \
+		CONFDIR="/etc/security" \
+		CFLAGS="${CFLAGS} ${CPPFLAGS}" \
+		LDFLAGS="${LDFLAGS}" \
+		CC="$(tc-getCC)" \
+		LD="$(tc-getCC)" \
+		"$@"
+}
+
+src_compile() {
+	_emake pam utils
+}
+
+src_install() {
+	_emake DESTDIR="${ED}" install_lib install_pam install_utils
+	dodoc README PLATFORMS INTERNALS
+}
diff --git a/sys-boot/gnu-efi/Manifest b/sys-boot/gnu-efi/Manifest
index 8a3d7d4..ddbbfe7 100644
--- a/sys-boot/gnu-efi/Manifest
+++ b/sys-boot/gnu-efi/Manifest
@@ -1,2 +1 @@
-DIST gnu-efi-3.0.11.tar.bz2 154456 BLAKE2B dd8d5100ee65e2f94d6b67f0d2236674c7c2b6f553ac0b2d8fdc83e49c69bec0dce1e2e8730705f70b3b7b0a61e4f065773667945ffc92a6f40eba381fcf6723 SHA512 1a6b06b69eb95e03c00fb1c476bf346ab2cb0ecca9a44e163f52f2aa4b9837d3dd2d3ed8b4ce77aaf32a66e49f826ea5b43a97c8c7c56aaa030bc20b3415122a
 DIST gnu-efi-3.0.12.tar.bz2 154575 BLAKE2B 264e04351cf1ef74956e65d209c00514c0f56c18427a87a894132e5a5b0b09b3ca992475a2f95aac42c8a26ff4977ec837ff473d76c1c766049e903f03bd9fff SHA512 cbec6f6e37271c22c71e3ce44d3579e48e7f3b797ec3946f56eb843ed3e472722763c566fc3b749f0c692ab6cb26e8909bb258cd164771a5b1eeff5c7cd51368
diff --git a/sys-boot/gnu-efi/gnu-efi-3.0.12.ebuild b/sys-boot/gnu-efi/gnu-efi-3.0.12.ebuild
index 8b12925..a46ff52 100644
--- a/sys-boot/gnu-efi/gnu-efi-3.0.12.ebuild
+++ b/sys-boot/gnu-efi/gnu-efi-3.0.12.ebuild
@@ -29,6 +29,8 @@
 src_prepare() {
 	default
 	sed -i -e "s/-Werror//" Make.defaults || die
+	# make chromeiumos license checker happy
+	cp -f README.efilib LICENSE
 }
 
 efimake() {
diff --git a/sys-fs/e2fsprogs/Manifest b/sys-fs/e2fsprogs/Manifest
index c98705b..d9b14b3 100644
--- a/sys-fs/e2fsprogs/Manifest
+++ b/sys-fs/e2fsprogs/Manifest
@@ -1,2 +1,2 @@
 DIST e2fsprogs-1.42.9-mint-r1.patch.xz 9012 BLAKE2B ae6421587c3cca2f9b26805c5f8d236d3fecde78cc7df3776ae9c23c7f254d7240e06507568fdd2154a16113c47609a8143535ab9cb2925426d3c578d077ce26 SHA512 591a7c80d65082eebcdc455028be6ade05c9aae96c94f654106be0facef330a8875dae82891e6e3ad2b48dece2b4e1c1940dbc47cd3eba3e6eea3b5ddba9a8fc
-DIST e2fsprogs-1.45.6.tar.xz 5572144 BLAKE2B 24a44d27a02a1fa178083d5ee6034b20fedcac9faf7cf7f5cfcd4e4cee6d38775bc78949b9b00823cbbdacfab783e8e1e739579b9a7236c5425f51b27600743b SHA512 f3abfb6fe7ef632bb81152e2127d601cadd3fa93162178576a1d5ed82c2286627184b207b85a5b2a1793db0addf0885dfc3b9523bb340443224caf9c6d613b84
+DIST e2fsprogs-1.46.2.tar.xz 7020552 BLAKE2B 0eda7428862c13dfd02308f0321d22c134679197bad5b247baa6f0ca386433db6749b97529709d43934afa73d8d0801379bb342456a0fd3dab7df01f5a90fd31 SHA512 5297a4d7bf944806d8ee77227eac596b5e5efed2c665561d40094c40b9f321616c60975a2716f1499a9f72243df6e3b6e2267b98ec1fdc1dfd646d7be887fc4d
diff --git a/sys-fs/e2fsprogs/e2fsprogs-1.45.6.ebuild b/sys-fs/e2fsprogs/e2fsprogs-1.46.2.ebuild
similarity index 96%
rename from sys-fs/e2fsprogs/e2fsprogs-1.45.6.ebuild
rename to sys-fs/e2fsprogs/e2fsprogs-1.46.2.ebuild
index 520c6b9..1b3b161 100644
--- a/sys-fs/e2fsprogs/e2fsprogs-1.45.6.ebuild
+++ b/sys-fs/e2fsprogs/e2fsprogs-1.46.2.ebuild
@@ -13,7 +13,7 @@
 LICENSE="GPL-2 BSD"
 SLOT="0"
 KEYWORDS="*"
-IUSE="cron fuse nls static-libs elibc_FreeBSD"
+IUSE="cron fuse lto nls static-libs +threads elibc_FreeBSD"
 
 RDEPEND="~sys-libs/${PN}-libs-${PV}
 	>=sys-apps/util-linux-2.16
@@ -77,13 +77,14 @@
 		--enable-symlink-install
 		--enable-elf-shlibs
 		$(tc-has-tls || echo --disable-tls)
-		--without-included-gettext
 		$(use_enable fuse fuse2fs)
 		$(use_enable nls)
 		--disable-libblkid
 		--disable-libuuid
 		--disable-fsck
 		--disable-uuidd
+		$(use_enable lto)
+		$(use_with threads pthread)
 	)
 	ac_cv_path_LDCONFIG=: econf "${myeconfargs[@]}"
 
diff --git a/sys-fs/e2fsprogs/metadata.xml b/sys-fs/e2fsprogs/metadata.xml
index fd22991..88556ac 100644
--- a/sys-fs/e2fsprogs/metadata.xml
+++ b/sys-fs/e2fsprogs/metadata.xml
@@ -7,7 +7,8 @@
 </maintainer>
 <use>
 	<flag name="cron">Install e2scrub_all cron script</flag>
-	<flag name='fuse'>Build fuse2fs, a FUSE file system client for ext2/ext3/ext4 file systems</flag>
+	<flag name="fuse">Build fuse2fs, a FUSE file system client for ext2/ext3/ext4 file systems</flag>
+	<flag name="lto">Build with link time optimization (LTO)</flag>
 </use>
 <upstream>
 	<remote-id type="cpe">cpe:/a:e2fsprogs_project:e2fsprogs</remote-id>
diff --git a/sys-libs/e2fsprogs-libs/Manifest b/sys-libs/e2fsprogs-libs/Manifest
index 938225b..41b7d29 100644
--- a/sys-libs/e2fsprogs-libs/Manifest
+++ b/sys-libs/e2fsprogs-libs/Manifest
@@ -1 +1 @@
-DIST e2fsprogs-1.45.6.tar.xz 5572144 BLAKE2B 24a44d27a02a1fa178083d5ee6034b20fedcac9faf7cf7f5cfcd4e4cee6d38775bc78949b9b00823cbbdacfab783e8e1e739579b9a7236c5425f51b27600743b SHA512 f3abfb6fe7ef632bb81152e2127d601cadd3fa93162178576a1d5ed82c2286627184b207b85a5b2a1793db0addf0885dfc3b9523bb340443224caf9c6d613b84
+DIST e2fsprogs-1.46.2.tar.xz 7020552 BLAKE2B 0eda7428862c13dfd02308f0321d22c134679197bad5b247baa6f0ca386433db6749b97529709d43934afa73d8d0801379bb342456a0fd3dab7df01f5a90fd31 SHA512 5297a4d7bf944806d8ee77227eac596b5e5efed2c665561d40094c40b9f321616c60975a2716f1499a9f72243df6e3b6e2267b98ec1fdc1dfd646d7be887fc4d
diff --git a/sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.45.6.ebuild b/sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.46.2.ebuild
similarity index 100%
rename from sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.45.6.ebuild
rename to sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.46.2.ebuild
diff --git a/sys-libs/pam/Manifest b/sys-libs/pam/Manifest
index 64d7748..72cc79c 100644
--- a/sys-libs/pam/Manifest
+++ b/sys-libs/pam/Manifest
@@ -1 +1,2 @@
-DIST pam-1.3.1.tar.gz 749997 BLAKE2B 3b44c41daaa5810c53e3e2baeac1ab58463768fde433f874b9bd09c7c28cfd55e0f227c9a0c318e66444a3adb23c112a2db32d5c7211b07c84c2d4600a47ca5c SHA512 0c5019493b2ac42180ee9c4974a51329a2395a44f5f892c1ca567ec9b43cc3a9bce0212861d4dfb82eb236c5eaa682b27189ce672ed6cafa37d8801d059a944d
+DIST Linux-PAM-1.5.1-docs.tar.xz 441632 BLAKE2B 1b3ad1b5167936b8c38977b5328ee11c7d280eb905a0f444e555d24f9d5332583f7e0ce0a758242292ff1244bc082b73d661935647e583e2ebcd8d5058df413e SHA512 95f0b0225e96386f06f5f869203163a201af3ac5c1a4fa8bd30779b9f55290e1a5b63fa49e2efafa1a51476bad1acf258b1f37f56a4bdc3935f9fe5928cbc1f7
+DIST Linux-PAM-1.5.1.tar.xz 972964 BLAKE2B a1714569587a383fa8211b23765c66b08b18dc2808c1521a904171dc2886cced56e9afa27408e8a9d5eec6226b31390dc8f14434071370f4e1147c77ce8b36ac SHA512 1db091fc43b934dde220f1b85f35937fbaa0a3feec699b2e597e2cdf0c3ce11c17d36d2286d479c9eed24e8ca3ca6233214e4dff256db47249e358c01d424837
diff --git a/sys-libs/pam/files/pam-remove-browsers.patch b/sys-libs/pam/files/pam-remove-browsers.patch
deleted file mode 100644
index 7e3ae99..0000000
--- a/sys-libs/pam/files/pam-remove-browsers.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From baadfdc644fcb88170c358c449a731520e1747a5 Mon Sep 17 00:00:00 2001
-From: Mikle Kolyada <zlogene@gentoo.org>
-Date: Mon, 1 Oct 2018 23:12:08 +0300
-Subject: [PATCH] configure.ac remobe browser logic for DocBook
-
----
- configure.ac | 11 -----------
- 1 file changed, 11 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 3012ceb..e7e7dac 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -554,17 +554,6 @@ JH_CHECK_XML_CATALOG([-//OASIS//DTD DocBook XML V4.4//EN],
- JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl],
-                 [DocBook XSL Stylesheets], [], enable_docu=no)
- 
--AC_PATH_PROG([BROWSER], [w3m])
--if test ! -z "$BROWSER"; then
--     BROWSER="$BROWSER -T text/html -dump"
--else
--     AC_PATH_PROG([BROWSER], [elinks])
--     if test ! -z "$BROWSER"; then
--          BROWSER="$BROWSER -no-numbering -no-references -dump"
--     else
--          enable_docu=no
--     fi
--fi
- 
- AC_PATH_PROG([FO2PDF], [fop])
- 
--- 
-2.16.4
-
diff --git a/sys-libs/pam/metadata.xml b/sys-libs/pam/metadata.xml
index c172b5d..22ede6e 100644
--- a/sys-libs/pam/metadata.xml
+++ b/sys-libs/pam/metadata.xml
@@ -13,16 +13,6 @@
 		provided by <pkg>sys-libs/db</pkg>) installed in /usr/lib and
 		will thus not work for boot-critical services authentication.
 	</flag>
-
-	<flag name="cracklib">
-		Build the pam_cracklib module, that allows to verify the chosen
-		passwords' strength through the use of
-		<pkg>sys-libs/cracklib</pkg>. Please note that simply enabling
-		the USE flag on this package will not make use of pam_cracklib
-		by default, you should also enable it in
-		<pkg>sys-auth/pambase</pkg> as well as update your configuration
-		files.
-		</flag>
 		</use>
 <upstream>
 	<remote-id type="cpe">cpe:/a:kernel:linux-pam</remote-id>
diff --git a/sys-libs/pam/pam-1.3.1-r2.ebuild b/sys-libs/pam/pam-1.5.1.ebuild
similarity index 60%
rename from sys-libs/pam/pam-1.3.1-r2.ebuild
rename to sys-libs/pam/pam-1.5.1.ebuild
index 2448b76..82da5ff 100644
--- a/sys-libs/pam/pam-1.3.1-r2.ebuild
+++ b/sys-libs/pam/pam-1.5.1.ebuild
@@ -3,43 +3,46 @@
 
 EAPI=7
 
-inherit autotools db-use fcaps multilib-minimal toolchain-funcs usr-ldscript
+MY_P="Linux-${PN^^}-${PV}"
+
+inherit autotools db-use fcaps toolchain-funcs usr-ldscript multilib-minimal
 
 DESCRIPTION="Linux-PAM (Pluggable Authentication Modules)"
 HOMEPAGE="https://github.com/linux-pam/linux-pam"
-SRC_URI="https://github.com/linux-pam/linux-pam/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+SRC_URI="https://github.com/linux-pam/linux-pam/releases/download/v${PV}/${MY_P}.tar.xz
+	https://github.com/linux-pam/linux-pam/releases/download/v${PV}/${MY_P}-docs.tar.xz"
 
 LICENSE="|| ( BSD GPL-2 )"
 SLOT="0"
 KEYWORDS="*"
-IUSE="audit berkdb +cracklib debug nis nls +pie selinux static-libs"
+IUSE="audit berkdb debug nis selinux"
 
-BDEPEND="app-text/docbook-xml-dtd:4.1.2
-	app-text/docbook-xml-dtd:4.3
-	app-text/docbook-xml-dtd:4.4
-	app-text/docbook-xml-dtd:4.5
+BDEPEND="
 	dev-libs/libxslt
 	sys-devel/flex
-	virtual/pkgconfig[${MULTILIB_USEDEP}]
-	nls? ( sys-devel/gettext )"
+	sys-devel/gettext
+	virtual/pkgconfig
+	virtual/yacc
+"
 
 DEPEND="
+	virtual/libcrypt:=[${MULTILIB_USEDEP}]
+	>=virtual/libintl-0-r1[${MULTILIB_USEDEP}]
 	audit? ( >=sys-process/audit-2.2.2[${MULTILIB_USEDEP}] )
 	berkdb? ( >=sys-libs/db-4.8.30-r1:=[${MULTILIB_USEDEP}] )
-	cracklib? ( >=sys-libs/cracklib-2.9.1-r1[${MULTILIB_USEDEP}] )
 	selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] )
-	nis? ( >=net-libs/libtirpc-0.2.4-r2[${MULTILIB_USEDEP}] )
-	nls? ( >=virtual/libintl-0-r1[${MULTILIB_USEDEP}] )"
+	nis? ( net-libs/libnsl[${MULTILIB_USEDEP}]
+	>=net-libs/libtirpc-0.2.4-r2[${MULTILIB_USEDEP}] )"
 
 RDEPEND="${DEPEND}"
 
-PDEPEND="sys-auth/pambase"
+PDEPEND=">=sys-auth/pambase-20200616"
 
-S="${WORKDIR}/linux-${P}"
+S="${WORKDIR}/${MY_P}"
 
 src_prepare() {
 	default
-	eapply "${FILESDIR}/${PN}-remove-browsers.patch"
 	touch ChangeLog || die
 	eautoreconf
 }
@@ -57,21 +60,26 @@
 	local myconf=(
 		CC_FOR_BUILD="$(tc-getBUILD_CC)"
 		--with-db-uniquename=-$(db_findver sys-libs/db)
+		--with-xml-catalog="${EPREFIX}"/etc/xml/catalog
 		--enable-securedir="${EPREFIX}"/$(get_libdir)/security
-		--libdir=/usr/$(get_libdir)
+		--includedir="${EPREFIX}"/usr/include/security
+		--libdir="${EPREFIX}"/usr/$(get_libdir)
+		--exec-prefix="${EPREFIX}"
+		--enable-pie
+		--enable-unix
 		--disable-prelude
+		--disable-doc
+		--disable-regenerate-docu
+		--disable-static
+		--disable-Werror
 		$(use_enable audit)
 		$(use_enable berkdb db)
-		$(use_enable cracklib)
 		$(use_enable debug)
 		$(use_enable nis)
-		$(use_enable nls)
-		$(use_enable pie)
 		$(use_enable selinux)
-		$(use_enable static-libs static)
 		--enable-isadir='.' #464016
 		)
-	ECONF_SOURCE="${S}" econf ${myconf[@]}
+	ECONF_SOURCE="${S}" econf "${myconf[@]}"
 }
 
 multilib_src_compile() {
@@ -88,12 +96,23 @@
 multilib_src_install_all() {
 	find "${ED}" -type f -name '*.la' -delete || die
 
-	if use selinux; then
-		dodir /usr/lib/tmpfiles.d
-		cat - > "${D}"/usr/lib/tmpfiles.d/${CATEGORY}:${PN}:${SLOT}.conf <<EOF
-d /run/sepermit 0755 root root
-EOF
-	fi
+	# tmpfiles.eclass is impossible to use because
+	# there is the pam -> tmpfiles -> systemd -> pam dependency loop
+
+	dodir /usr/lib/tmpfiles.d
+
+	cat ->>  "${D}"/usr/lib/tmpfiles.d/${CATEGORY}-${PN}.conf <<-_EOF_
+		d /run/faillock 0755 root root
+	_EOF_
+	use selinux && cat ->>  "${D}"/usr/lib/tmpfiles.d/${CATEGORY}-${PN}-selinux.conf <<-_EOF_
+		d /run/sepermit 0755 root root
+	_EOF_
+
+	local page
+
+	for page in doc/man/*.{3,5,8} modules/*/*.{5,8} ; do
+		doman ${page}
+	done
 }
 
 pkg_postinst() {
@@ -110,5 +129,5 @@
 
 	# The pam_unix module needs to check the password of the user which requires
 	# read access to /etc/shadow only.
-	fcaps cap_dac_override "${EROOT}/sbin/unix_chkpwd"
+	fcaps cap_dac_override sbin/unix_chkpwd
 }