aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2016-10-17 02:46:14 +0800
committerbapt <bapt@FreeBSD.org>2016-10-17 02:46:14 +0800
commit5723eed69ca7b547afdc353686a59c6778ba556f (patch)
treebab11898adb69b90163b238537e8b0542478b213
parente3b6f46a57797e197eba0d5c9b570c41583840d4 (diff)
downloadfreebsd-ports-gnome-5723eed69ca7b547afdc353686a59c6778ba556f.tar.gz
freebsd-ports-gnome-5723eed69ca7b547afdc353686a59c6778ba556f.tar.zst
freebsd-ports-gnome-5723eed69ca7b547afdc353686a59c6778ba556f.zip
Fix make and gmake completion
Submitted by: Daniel Shahaf (on zsh mailing list) Reported by: Guilherme Salazar (on zsh mailing list)
-rw-r--r--shells/zsh/Makefile2
-rw-r--r--shells/zsh/files/patch-Completion_Unix_Command___make31
2 files changed, 32 insertions, 1 deletions
diff --git a/shells/zsh/Makefile b/shells/zsh/Makefile
index 3f387855b368..a7ec337fcf0e 100644
--- a/shells/zsh/Makefile
+++ b/shells/zsh/Makefile
@@ -3,7 +3,7 @@
PORTNAME= zsh
DISTVERSION= 5.2
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= shells
MASTER_SITES= http://www.zsh.org/pub/ \
SF \
diff --git a/shells/zsh/files/patch-Completion_Unix_Command___make b/shells/zsh/files/patch-Completion_Unix_Command___make
new file mode 100644
index 000000000000..32bab6449f04
--- /dev/null
+++ b/shells/zsh/files/patch-Completion_Unix_Command___make
@@ -0,0 +1,31 @@
+--- Completion/Unix/Command/_make.orig 2016-10-16 18:41:19 UTC
++++ Completion/Unix/Command/_make
+@@ -262,17 +262,20 @@ _make() {
+
+ if [[ -n "$file" ]]
+ then
+- if [[ $is_gnu == gnu ]] && zstyle -t ":completion:${curcontext}:targets" call-command
++ if [[ $is_gnu == gnu ]]
+ then
+- _make-parseMakefile $PWD < <(_call_program targets "$words[1]" -nsp --no-print-directory -f "$file" .PHONY 2> /dev/null)
++ if zstyle -t ":completion:${curcontext}:targets" call-command; then
++ _make-parseMakefile $PWD < <(_call_program targets "$words[1]" -nsp --no-print-directory -f "$file" .PHONY 2> /dev/null)
++ else
++ _make-parseMakefile $PWD < $file
++ fi
+ else
+- case "$OSTYPE" in
+- freebsd*)
+- _make-parseMakefile $PWD < <(_call_program targets "$words[1]" -nsp -f "$file" .PHONY 2> /dev/null)
+- ;;
+- *)
++ if [[ $OSTYPE == (freebsd|dragonfly|netbsd)* || /$words[1] == */bmake* ]]; then
++ TARGETS+=(${=${(f)"$(_call_program targets "$words[1]" -s -f "$file" -V.ALLTARGETS 2> /dev/null)"}})
++ _make-parseMakefile $PWD < <(_call_program targets "$words[1]" -nsdg1Fstdout -f "$file" .PHONY 2> /dev/null)
++ else
+ _make-parseMakefile $PWD < $file
+- esac
++ fi
+ fi
+ fi
+