commit: 4008e710e89f83f54d4b63a14ff301fe57f7b857 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> AuthorDate: Wed Jun 8 23:14:09 2016 +0000 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> CommitDate: Wed Jun 8 23:14:31 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4008e710
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(+) diff --git a/net-misc/curl/curl-7.49.1.ebuild b/net-misc/curl/curl-7.49.1.ebuild index ccdbbd4..7f122a3 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() {
