summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2016-06-08 19:14:09 -0400
committerAnthony G. Basile <blueness@gentoo.org>2016-06-08 19:14:31 -0400
commit4008e710e89f83f54d4b63a14ff301fe57f7b857 (patch)
treeb4902fe028923bf9ab38fc5542bc829c852c04bf /net-misc/curl
parentnet-nntp/nzbget: remove old (diff)
downloadgentoo-4008e710e89f83f54d4b63a14ff301fe57f7b857.tar.gz
gentoo-4008e710e89f83f54d4b63a14ff301fe57f7b857.tar.bz2
gentoo-4008e710e89f83f54d4b63a14ff301fe57f7b857.zip
net-misc/curl: make static build more robust
See https://github.com/curl/curl/issues/864 Package-Manager: portage-2.2.28
Diffstat (limited to 'net-misc/curl')
-rw-r--r--net-misc/curl/curl-7.49.1.ebuild21
1 files changed, 21 insertions, 0 deletions
diff --git a/net-misc/curl/curl-7.49.1.ebuild b/net-misc/curl/curl-7.49.1.ebuild
index ccdbbd43521e..7f122a3700cf 100644
--- a/net-misc/curl/curl-7.49.1.ebuild
+++ b/net-misc/curl/curl-7.49.1.ebuild
@@ -223,6 +223,27 @@ multilib_src_configure() {
sed -i -e '/SUBDIRS/s:src::' Makefile || die
sed -i -e '/SUBDIRS/s:scripts::' Makefile || die
fi
+
+ # Fix up the pkg-config file to be more robust.
+ # https://github.com/curl/curl/issues/864
+ local priv=() libs=()
+ # We always enable zlib.
+ libs+=( "-lz" )
+ priv+=( "zlib" )
+ if use http2; then
+ libs+=( "-lnghttp2" )
+ priv+=( "libnghttp2" )
+ fi
+ if use curl_ssl_openssl; then
+ libs+=( "-lssl" "-lcrypto" )
+ priv+=( "openssl" )
+ fi
+ grep -q Requires.private libcurl.pc && die "need to update ebuild"
+ libs=$(printf '|%s' "${libs[@]}")
+ sed -i -r \
+ -e "/^Libs.private/s:(${libs#|})( |$)::g" \
+ libcurl.pc || die
+ echo "Requires.private: ${priv[*]}" >> libcurl.pc
}
multilib_src_install_all() {