summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc')
-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() {