commit:     3fd08a36194c8b81f46d51876211f7f3cc0ae3ce
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Jul  1 14:31:07 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jul  1 14:34:20 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3fd08a36

net-misc/curl: install zsh, fish completions

Noticed after Alpine fixed theirs (thanks!)

Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-misc/curl/curl-9999.ebuild | 25 ++++++++++++++++++++++---
 1 file changed, 22 insertions(+), 3 deletions(-)

diff --git a/net-misc/curl/curl-9999.ebuild b/net-misc/curl/curl-9999.ebuild
index 770410045476..a0aa3e608fd7 100644
--- a/net-misc/curl/curl-9999.ebuild
+++ b/net-misc/curl/curl-9999.ebuild
@@ -4,7 +4,7 @@
 EAPI=8
 
 
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/danielstenberg.asc
-inherit autotools multilib-minimal multiprocessing prefix verify-sig
+inherit autotools multilib-minimal multiprocessing prefix toolchain-funcs 
verify-sig
 
 DESCRIPTION="A Client that groks URLs"
 HOMEPAGE="https://curl.se/";
@@ -137,7 +137,7 @@ multilib_src_configure() {
        local myconf=()
 
        myconf+=( --without-ca-fallback 
--with-ca-bundle="${EPREFIX}"/etc/ssl/certs/ca-certificates.crt  )
-       if use ssl ; then
+       if use ssl; then
                myconf+=( --without-gnutls --without-mbedtls --without-nss 
--without-rustls )
 
                if use gnutls; then
@@ -241,7 +241,7 @@ multilib_src_configure() {
                --without-amissl
                --without-bearssl
                $(use_with brotli)
-               --without-fish-functions-dir
+               
--with-fish-functions-dir="${EPREFIX}"/usr/share/fish/vendor_completions.d
                $(use_with http2 nghttp2)
                --without-hyper
                $(use_with idn libidn2)
@@ -263,6 +263,7 @@ multilib_src_configure() {
                --without-wolfssl
                --with-zlib
                $(use_with zstd)
+               
--with-zsh-functions-dir="${EPREFIX}"/usr/share/zsh/site-functions
        )
 
        if use test && multilib_is_native_abi && ( use http2 || use nghttp3 ); 
then
@@ -305,6 +306,15 @@ multilib_src_configure() {
        echo "Requires.private: ${priv[*]}" >> libcurl.pc || die
 }
 
+multilib_src_compile() {
+       default
+
+       if multilib_is_native_abi; then
+               # Shell completions
+               ! tc-is-cross-compiler && emake -C scripts
+       fi
+}
+
 # There is also a pytest harness that tests for bugs in some very specific
 # situations; we can rely on upstream for this rather than adding additional 
test deps.
 multilib_src_test() {
@@ -324,6 +334,15 @@ multilib_src_test() {
        multilib_is_native_abi && emake test TFLAGS="-n -v -a -k -am -p 
-j$((7*$(makeopts_jobs))) !241 !1083"
 }
 
+multilib_src_install() {
+       emake DESTDIR="${D}" install
+
+       if multilib_is_native_abi; then
+               # Shell completions
+               ! tc-is-cross-compiler && emake -C scripts DESTDIR="${D}" 
install
+       fi
+}
+
 multilib_src_install_all() {
        einstalldocs
        find "${ED}" -type f -name '*.la' -delete || die

Reply via email to