From 0dabac6c12c87e8d11afa9fa6daa4f8d3ba42956 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Sun, 30 Jan 2022 20:30:00 +0100 Subject: [PATCH] curl: install completion scripts --- srcpkgs/curl/template | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/srcpkgs/curl/template b/srcpkgs/curl/template index 50fb520bf6..eaac2afb98 100644 --- a/srcpkgs/curl/template +++ b/srcpkgs/curl/template @@ -1,7 +1,7 @@ # Template file for 'curl' pkgname=curl version=7.81.0 -revision=1 +revision=2 build_style=gnu-configure configure_args="ac_cv_sizeof_off_t=8 --enable-threaded-resolver --enable-ipv6 $(vopt_with rtmp) $(vopt_with gssapi) $(vopt_enable ldap) $(vopt_with gnutls) @@ -29,6 +29,10 @@ build_options="gnutls gssapi ldap rtmp ssh ssl zstd" build_options_default="ssh ssl zstd" vopt_conflict ssl gnutls +if [ "$CROSS_BUILD" ]; then + hostmakedepends+=" curl" +fi + pre_configure() { export CFLAGS="${CFLAGS/-D_FORTIFY_SOURCE=2/}" export CFLAGS="${CFLAGS/-I${XBPS_CROSS_BASE}\/usr\/include/}" @@ -40,6 +44,16 @@ pre_check() { } post_install() { + if [ "$CROSS_BUILD" ]; then + # Copy hostmakedepends' version + vcompletion /usr/share/zsh/site-functions/_curl zsh + vcompletion /usr/share/fish/vendor_completions.d/curl.fish fish + else + make -C scripts + vcompletion scripts/_curl zsh + vcompletion scripts/curl.fish fish + fi + # Fix linker search paths when necessary if [ -n "$XBPS_CROSS_BASE" ]; then # Leave $XBPS_CROSS_BASE in --configure to reflect how it was built