Ticket #51348: bash-completion.patch
File bash-completion.patch, 13.4 KB (added by xeron (Ivan Larionov), 9 years ago) |
---|
-
sysutils/bash-completion/Portfile
diff --git a/sysutils/bash-completion/Portfile b/sysutils/bash-completion/Portfile index df6f087..1a76a2b 100644
a b 1 # $Id : Portfile 142194 2015-11-06 13:39:12Z raimue@macports.org$1 # $Id$ 2 2 3 3 PortSystem 1.0 4 PortGroup github 1.0 5 6 github.setup scop bash-completion 2.3 7 epoch 2 4 8 5 name bash-completion6 conflicts bash-completion-devel7 epoch 18 version 2.19 revision 1010 9 categories sysutils 11 10 platforms darwin 12 11 supported_archs noarch … … long_description \ 17 16 Programmable completion library for bash. This port requires bash >=4.1 and \ 18 17 is meant to be used together with the bash port. 19 18 20 homepage http://bash-completion.alioth.debian.org/ 21 master_sites http://bash-completion.alioth.debian.org/files/ 22 checksums md5 4e2a9f11a4042a38ee79ddcd048e8b9e \ 23 rmd160 5e019214ee2c7788ef7d80179e30594047b23a37 \ 24 sha256 2b606804a7d5f823380a882e0f7b6c8a37b0e768e72c3d4107c51fbe8a46ae4f 25 use_bzip2 yes 19 homepage https://github.com/scop/bash-completion 20 21 checksums rmd160 42491a6210af0a67bea246c22724a8edbfe830cc \ 22 sha256 eaf238d12187364affb2f70fd127060a4fd889900054fe30e2abf69ed5e48cb9 26 23 27 24 depends_run port:bash 28 25 29 26 patchfiles patch-vpnc.diff \ 30 patch-make.diff \31 patch-_known_hosts_real.diff \32 patch-compat-dont-return.diff \33 patch-words-bad-array-subscript.diff \34 27 patch-fix-quote-readline-by-ref.diff \ 35 28 patch-perldoc-pod.diff \ 36 29 patch-remove-pkgutil.diff 37 30 31 use_autoreconf yes 32 38 33 post-patch { 39 34 reinplace "s:/etc/bash_completion:${prefix}/etc/bash_completion:g" \ 40 35 ${worksrcpath}/bash_completion … … if {${os.platform} eq "darwin" && ${os.subplatform} eq "macosx"} { 72 67 will be available. 73 68 " 74 69 } 75 76 livecheck.type regex77 livecheck.url ${homepage}78 livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"79 80 subport bash-completion-devel {81 epoch 082 conflicts bash-completion83 84 # nothing special at the moment85 } -
deleted file sysutils/bash-completion/files/patch-_known_hosts_real.diff
diff --git a/sysutils/bash-completion/files/patch-_known_hosts_real.diff b/sysutils/bash-completion/files/patch-_known_hosts_real.diff deleted file mode 100644 index 68f8aa6..0000000
+ - 1 Upstream: http://alioth.debian.org/tracker/index.php?func=detail&aid=314393&group_id=100114&atid=4130952 --- bash_completion3 +++ bash_completion4 @@ -1533,7 +1533,7 @@ _known_hosts_real()5 6 # append any available aliases from config files7 if [[ ${#config[@]} -gt 0 && -n "$aliases" ]]; then8 - local hosts=$( sed -ne 's/^[ \t]*[Hh][Oo][Ss][Tt]\([Nn][Aa][Mm][Ee]\)\{0,1\}['"$'\t '"']\{1,\}\([^#*?]*\)\(#.*\)\{0,1\}$/\2/p' "${config[@]}" )9 + local hosts=$( sed -ne 's/^['$'\t '']*[Hh][Oo][Ss][Tt]\([Nn][Aa][Mm][Ee]\)\{0,1\}['$'\t '']\{1,\}\([^#*?]*\)\(#.*\)\{0,1\}$/\2/p' "${config[@]}" )10 COMPREPLY+=( $( compgen -P "$prefix$user" \11 -S "$suffix" -W "$hosts" -- "$cur" ) )12 fi -
deleted file sysutils/bash-completion/files/patch-compat-dont-return.diff
diff --git a/sysutils/bash-completion/files/patch-compat-dont-return.diff b/sysutils/bash-completion/files/patch-compat-dont-return.diff deleted file mode 100644 index 3db636e..0000000
+ - 1 From: Ville Skyttä <ville.skytta@iki.fi>2 Subject: don't return from sourced script3 Origin: upstream, http://anonscm.debian.org/gitweb/?p=bash-completion/bash-completion.git;a=commitdiff;h=867282a4 Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=7416575 Forwarded: not-needed6 7 ---8 bash_completion.sh.in | 4 +++-9 1 file changed, 3 insertions(+), 1 deletion(-)10 11 --- bash_completion.sh.in12 +++ bash_completion.sh.in13 @@ -1,5 +1,5 @@14 # Check for interactive bash and that we haven't already been sourced.15 -[ -z "$BASH_VERSION" -o -z "$PS1" -o -n "$BASH_COMPLETION_COMPAT_DIR" ] && return16 +if [ -n "$BASH_VERSION" -a -n "$PS1" -a -z "$BASH_COMPLETION_COMPAT_DIR" ]; then17 18 # Check for recent enough version of bash.19 bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.}20 @@ -12,3 +12,5 @@ if [ $bmajor -gt 4 ] || [ $bmajor -eq 421 fi22 fi23 unset bash bmajor bminor24 +25 +fi -
sysutils/bash-completion/files/patch-fix-quote-readline-by-ref.diff
diff --git a/sysutils/bash-completion/files/patch-fix-quote-readline-by-ref.diff b/sysutils/bash-completion/files/patch-fix-quote-readline-by-ref.diff index 5240978..a4476c2 100644
a b Forwarded: yes, <5328F418.100@canonical.com> 15 15 16 16 --- bash_completion 17 17 +++ bash_completion 18 @@ -53 6,13 +536,24 @@ __ltrim_colon_completions()18 @@ -537,13 +537,24 @@ __ltrim_colon_completions() 19 19 # @param $2 Name of variable to return result to 20 20 _quote_readline_by_ref() 21 21 { -
deleted file sysutils/bash-completion/files/patch-make.diff
diff --git a/sysutils/bash-completion/files/patch-make.diff b/sysutils/bash-completion/files/patch-make.diff deleted file mode 100644 index 48bf19d..0000000
+ - 1 Upstream: https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=314345&group_id=1001142 --- completions/make3 +++ completions/make4 @@ -20,9 +20,9 @@ function _make_target_extract_script()5 fi6 7 cat <<EOF8 - /^# Make data base/,/^# Files/d # skip until files section9 - /^# Not a target/,/^$/ d # skip not target blocks10 - /^${prefix_pat}/,/^$/! d # skip anything user dont want11 + /^# Make data base/,/^# Files/d; # skip until files section12 + /^# Not a target/,/^$/ d; # skip not target blocks13 + /^${prefix_pat}/,/^$/! d; # skip anything user dont want14 15 # The stuff above here describes lines that are not16 # explicit targets or not targets other than special ones17 @@ -30,41 +30,42 @@ function _make_target_extract_script()18 # should be output.19 20 /^# File is an intermediate prerequisite/ {21 - s/^.*$//;x # unhold target22 - d # delete line23 + s/^.*$//;x; # unhold target24 + d; # delete line25 }26 27 /^$/ { # end of target block28 - x # unhold target29 - /^$/d # dont print blanks30 - s,^(.{${dirname_len}})(.{${#basename}}[^:/]*/?)[^:]*:.*$,${output},p31 - d # hide any bugs32 + x; # unhold target33 + /^$/d; # dont print blanks34 + s|^\(.\{${dirname_len}\}\)\(.\{${#basename}\}[^:/]*/\{0,1\}\)[^:]*:.*$|${output}|p;35 + d; # hide any bugs36 }37 38 - /^[^#\t:%]+:/ { # found target block39 -40 - /^\.PHONY:/ d # special target41 - /^\.SUFFIXES:/ d # special target42 - /^\.DEFAULT:/ d # special target43 - /^\.PRECIOUS:/ d # special target44 - /^\.INTERMEDIATE:/ d # special target45 - /^\.SECONDARY:/ d # special target46 - /^\.SECONDEXPANSION:/ d # special target47 - /^\.DELETE_ON_ERROR:/ d # special target48 - /^\.IGNORE:/ d # special target49 - /^\.LOW_RESOLUTION_TIME:/ d # special target50 - /^\.SILENT:/ d # special target51 - /^\.EXPORT_ALL_VARIABLES:/ d # special target52 - /^\.NOTPARALLEL:/ d # special target53 - /^\.ONESHELL:/ d # special target54 - /^\.POSIX:/ d # special target55 - /^\.NOEXPORT:/ d # special target56 - /^\.MAKE:/ d # special target57 -58 - /^[^a-zA-Z0-9]/ d # convention for hidden tgt59 -60 - h # hold target61 - d # delete line62 + # This pattern includes a literal tab character as \t is not a portable63 + # representation and fails with BSD sed64 + /^[^# :%]\{1,\}:/ { # found target block65 + /^\.PHONY:/ d; # special target66 + /^\.SUFFIXES:/ d; # special target67 + /^\.DEFAULT:/ d; # special target68 + /^\.PRECIOUS:/ d; # special target69 + /^\.INTERMEDIATE:/ d; # special target70 + /^\.SECONDARY:/ d; # special target71 + /^\.SECONDEXPANSION:/ d; # special target72 + /^\.DELETE_ON_ERROR:/ d; # special target73 + /^\.IGNORE:/ d; # special target74 + /^\.LOW_RESOLUTION_TIME:/ d; # special target75 + /^\.SILENT:/ d; # special target76 + /^\.EXPORT_ALL_VARIABLES:/ d; # special target77 + /^\.NOTPARALLEL:/ d; # special target78 + /^\.ONESHELL:/ d; # special target79 + /^\.POSIX:/ d; # special target80 + /^\.NOEXPORT:/ d; # special target81 + /^\.MAKE:/ d; # special target82 +83 + /^[^a-zA-Z0-9]/ d; # convention for hidden tgt84 +85 + h; # hold target86 + d; # delete line87 }88 89 EOF90 @@ -144,7 +145,7 @@ _make()91 local reset=$( set +o | grep -F posix ); set +o posix # for <(...)92 COMPREPLY=( $( LC_ALL=C \93 make -npq "${makef[@]}" "${makef_dir[@]}" .DEFAULT 2>/dev/null | \94 - sed -nrf <(_make_target_extract_script $mode "$cur") ) )95 + sed -nf <(_make_target_extract_script $mode "$cur") ) )96 $reset97 98 if [[ $mode != -d ]]; then -
sysutils/bash-completion/files/patch-perldoc-pod.diff
diff --git a/sysutils/bash-completion/files/patch-perldoc-pod.diff b/sysutils/bash-completion/files/patch-perldoc-pod.diff index 50b93a3..4d5c47b 100644
a b Forwarded: no 10 10 11 11 --- helpers/perl 12 12 +++ helpers/perl 13 @@ -2 3,8 +23,8 @@ sub print_modules_real {13 @@ -24,8 +24,8 @@ sub print_modules_real { 14 14 chdir($dir) or return; 15 15 16 16 # print each file -
sysutils/bash-completion/files/patch-remove-pkgutil.diff
diff --git a/sysutils/bash-completion/files/patch-remove-pkgutil.diff b/sysutils/bash-completion/files/patch-remove-pkgutil.diff index 5ef4566..3d29412 100644
a b 1 1 pkgutil completions are for Solaris CSW, let's avoid confusion with pkgutil on OS X 2 --- completions/Makefile. in.orig 2015-06-10 18:36:56.000000000 +02003 +++ completions/Makefile. in 2015-06-10 18:37:07.000000000 +02004 @@ - 421,7 +421,6 @@2 --- completions/Makefile.am.orig 3 +++ completions/Makefile.am 4 @@ -268,7 +268,6 @@ bashcomp_DATA = 2to3 \ 5 5 pkgadd \ 6 6 pkgrm \ 7 7 pkgtool \ -
sysutils/bash-completion/files/patch-vpnc.diff
diff --git a/sysutils/bash-completion/files/patch-vpnc.diff b/sysutils/bash-completion/files/patch-vpnc.diff index 891e232..3dfc3c7 100644
a b 1 --- completions/vpnc.orig 2012-04-14 12:02:34.000000000 +02002 +++ completions/vpnc 2012-04-14 12:09:45.000000000 +02003 @@ - 32,7 +32,7 @@4 --pid-file --local-port --udp-port --disable-natt\5 -- non-inter' --"$cur" ) )1 --- completions/vpnc.orig 2 +++ completions/vpnc 3 @@ -54,7 +54,7 @@ _vpnc() 4 COMPREPLY=( $( compgen -W '$( _parse_help "$1" --long-help )' \ 5 -- "$cur" ) ) 6 6 else 7 7 - COMPREPLY=( $( compgen -W '$( command ls /etc/vpnc )' -- "$cur" ) ) 8 8 + COMPREPLY=( $( compgen -W '$( command ls @@PREFIX@@/etc/vpnc )' -- "$cur" ) ) -
deleted file sysutils/bash-completion/files/patch-words-bad-array-subscript.diff
diff --git a/sysutils/bash-completion/files/patch-words-bad-array-subscript.diff b/sysutils/bash-completion/files/patch-words-bad-array-subscript.diff deleted file mode 100644 index c511b91..0000000
+ - 1 From: Barry Warsaw <barry@python.org>2 Subject: Fix bash: words: bad array subscript3 Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/bash-completion/+bug/12895974 Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=7414795 Origin: vendor, https://bugs.launchpad.net/ubuntu/+source/bash-completion/+bug/12895976 Forwarded: yes, <20140312212729.17788.38099.reportbug@samba4.Chuck.local>7 8 ---9 bash_completion | 2 +-10 1 file changed, 1 insertion(+), 1 deletion(-)11 12 --- bash_completion13 +++ bash_completion14 @@ -718,7 +718,7 @@ _init_completion()15 fi16 done17 18 - [[ $cword -eq 0 ]] && return 119 + [[ $cword -le 0 ]] && return 120 prev=${words[cword-1]}21 22 [[ ${split-} ]] && _split_longopt && split=true