--- /dev/null
+From eb2aefb01868e91f2e1252ddd1bcdb9c075e5b49 Mon Sep 17 00:00:00 2001
+From: Lars Wendler <polynomial-c@gentoo.org>
+Date: Sun, 8 Mar 2020 21:46:15 +0100
+Subject: [PATCH] Don't run ldconfig by default
+
+Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
+---
+ Makefile.am | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 979ad1b1..5bc6f6ce 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -75,7 +75,3 @@ fuzz-coverage: clean clean-lcov
+ check-local:
+ $(AM_V_at)$(MAKE) -s syntax-check >/dev/null
+ $(AM_V_at)$(srcdir)/contrib/check_options $(srcdir)/docs/wget2.md $(builddir)/src/wget2$(EXEEXT)
+-
+-# ppl often forget to run ldconfig after an install, so let's do it here
+-install-exec-hook:
+- $(AM_V_at)$(LDCONFIG) || :
+--
+2.25.1
+
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>polynomial-c@gentoo.org</email>
+ <name>Lars Wendler</name>
+ </maintainer>
+ <use>
+ <flag name="brotli">Enable support for brotli compression</flag>
+ <flag name="gpgme">Build gpgme backend</flag>
+ <flag name="http2">Enable HTTP/2.0 support</flag>
+ <flag name="openssl">Enable crypto support via dev-libs/openssl</flag>
+ <flag name="psl">Use public suffix list via media-libs/libnspsl</flag>
+ <flag name="valgrind">Depend on dev-util/vagrind for test suite</flag>
+ </use>
+</pkgmetadata>
--- /dev/null
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools
+
+DESCRIPTION="GNU Wget2 is a file and recursive website downloader"
+HOMEPAGE="https://gitlab.com/gnuwget/wget2"
+SRC_URI="mirror://gnu/wget/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0/0" # subslot = libwget.so version
+KEYWORDS="~amd64 ~x86"
+
+IUSE="brotli bzip2 doc +gnutls gpgme +http2 idn libressl lzma openssl pcre psl +ssl test valgrind xattr zlib"
+
+REQUIRED_USE="valgrind? ( test )"
+
+RDEPEND="
+ brotli? ( app-arch/brotli )
+ bzip2? ( app-arch/bzip2 )
+ !gnutls? ( dev-libs/libgcrypt:= )
+ ssl? (
+ gnutls? ( net-libs/gnutls )
+ !gnutls? (
+ libressl? ( dev-libs/libressl:0= )
+ !libressl? ( dev-libs/openssl:0= )
+ )
+ )
+ gpgme? (
+ app-crypt/gpgme
+ dev-libs/libassuan
+ dev-libs/libgpg-error
+ )
+ http2? ( net-libs/nghttp2 )
+ idn? ( net-dns/libidn2:= )
+ lzma? ( app-arch/xz-utils )
+ pcre? ( dev-libs/libpcre2 )
+ psl? ( net-libs/libpsl )
+ xattr? ( sys-apps/attr )
+ zlib? ( sys-libs/zlib )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )
+ valgrind? ( dev-util/valgrind )
+"
+
+PATCHES=(
+ # Upstream attempts to be "smart" by calling ldconfig in
+ # install-exec-hook
+ "${FILESDIR}"/${PN}-1.99.2-remove_ldconfig_call.patch
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ --with-plugin-support
+ --with-ssl="$(usex ssl $(usex gnutls gnutls openssl) none)"
+ --without-libidn
+ --without-libmicrohttpd
+ $(use_enable doc)
+ $(use_enable valgrind valgrind-tests)
+ $(use_enable xattr)
+ $(use_with brotli brotlidec)
+ $(use_with bzip2)
+ $(use_with gpgme)
+ $(use_with http2 libnghttp2)
+ $(use_with idn libidn2)
+ $(use_with lzma)
+ $(use_with pcre libpcre2)
+ $(use_with psl libpsl)
+ $(use_with zlib)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ default
+
+ doman docs/man/man{1/*.1,3/*.3}
+
+ find "${ED}" -type f \( -name "*.a" -o -name "*.la" \) -delete || die
+ rm "${ED}"/usr/bin/${PN}_noinstall || die
+}