From 4008e710e89f83f54d4b63a14ff301fe57f7b857 Mon Sep 17 00:00:00 2001 From: "Anthony G. Basile" Date: Wed, 8 Jun 2016 19:14:09 -0400 Subject: net-misc/curl: make static build more robust See https://github.com/curl/curl/issues/864 Package-Manager: portage-2.2.28 --- net-misc/curl/curl-7.49.1.ebuild | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'net-misc') 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() { -- cgit v1.2.3-65-gdbad