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$
    22
    33PortSystem      1.0
     4PortGroup       github 1.0
     5
     6github.setup    scop bash-completion 2.3
     7epoch           2
    48
    5 name            bash-completion
    6 conflicts       bash-completion-devel
    7 epoch           1
    8 version         2.1
    9 revision        10
    109categories      sysutils
    1110platforms       darwin
    1211supported_archs noarch
    long_description \ 
    1716    Programmable completion library for bash. This port requires bash >=4.1 and \
    1817    is meant to be used together with the bash port.
    1918
    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
     19homepage        https://github.com/scop/bash-completion
     20
     21checksums       rmd160  42491a6210af0a67bea246c22724a8edbfe830cc \
     22                sha256  eaf238d12187364affb2f70fd127060a4fd889900054fe30e2abf69ed5e48cb9
    2623
    2724depends_run     port:bash
    2825
    2926patchfiles      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 \
    3427                patch-fix-quote-readline-by-ref.diff \
    3528                patch-perldoc-pod.diff \
    3629                patch-remove-pkgutil.diff
    3730
     31use_autoreconf  yes
     32
    3833post-patch {
    3934    reinplace "s:/etc/bash_completion:${prefix}/etc/bash_completion:g" \
    4035        ${worksrcpath}/bash_completion
    if {${os.platform} eq "darwin" && ${os.subplatform} eq "macosx"} { 
    7267        will be available.
    7368    "
    7469}
    75 
    76 livecheck.type      regex
    77 livecheck.url       ${homepage}
    78 livecheck.regex     "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
    79 
    80 subport bash-completion-devel {
    81     epoch 0
    82     conflicts bash-completion
    83 
    84     # nothing special at the moment
    85 }
  • 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=413095
    2 --- bash_completion
    3 +++ bash_completion
    4 @@ -1533,7 +1533,7 @@ _known_hosts_real()
    5  
    6      # append any available aliases from config files
    7      if [[ ${#config[@]} -gt 0 && -n "$aliases" ]]; then
    8 -        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 script
    3 Origin: upstream, http://anonscm.debian.org/gitweb/?p=bash-completion/bash-completion.git;a=commitdiff;h=867282a
    4 Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=741657
    5 Forwarded: not-needed
    6 
    7 ---
    8  bash_completion.sh.in |    4 +++-
    9  1 file changed, 3 insertions(+), 1 deletion(-)
    10 
    11 --- bash_completion.sh.in
    12 +++ bash_completion.sh.in
    13 @@ -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" ] && return
    16 +if [ -n "$BASH_VERSION" -a -n "$PS1" -a -z "$BASH_COMPLETION_COMPAT_DIR" ]; then
    17  
    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 4
    21      fi
    22  fi
    23  unset bash bmajor bminor
    24 +
    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> 
    1515
    1616--- bash_completion
    1717+++ bash_completion
    18 @@ -536,13 +536,24 @@ __ltrim_colon_completions()
     18@@ -537,13 +537,24 @@ __ltrim_colon_completions()
    1919 # @param $2  Name of variable to return result to
    2020 _quote_readline_by_ref()
    2121 {
  • 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=100114
    2 --- completions/make
    3 +++ completions/make
    4 @@ -20,9 +20,9 @@ function _make_target_extract_script()
    5      fi
    6  
    7      cat <<EOF
    8 -    /^# Make data base/,/^# Files/d             # skip until files section
    9 -    /^# Not a target/,/^$/        d             # skip not target blocks
    10 -    /^${prefix_pat}/,/^$/!        d             # skip anything user dont want
    11 +    /^# Make data base/,/^# Files/d;            # skip until files section
    12 +    /^# Not a target/,/^$/        d;            # skip not target blocks
    13 +    /^${prefix_pat}/,/^$/!        d;            # skip anything user dont want
    14  
    15      # The stuff above here describes lines that are not
    16      #  explicit targets or not targets other than special ones
    17 @@ -30,41 +30,42 @@ function _make_target_extract_script()
    18      #  should be output.
    19  
    20      /^# File is an intermediate prerequisite/ {
    21 -      s/^.*$//;x                                # unhold target
    22 -      d                                         # delete line
    23 +      s/^.*$//;x;                               # unhold target
    24 +      d;                                        # delete line
    25      }
    26  
    27      /^$/ {                                      # end of target block
    28 -      x                                         # unhold target
    29 -      /^$/d                                     # dont print blanks
    30 -      s,^(.{${dirname_len}})(.{${#basename}}[^:/]*/?)[^:]*:.*$,${output},p
    31 -      d                                         # hide any bugs
    32 +      x;                                        # unhold target
    33 +      /^$/d;                                    # dont print blanks
    34 +      s|^\(.\{${dirname_len}\}\)\(.\{${#basename}\}[^:/]*/\{0,1\}\)[^:]*:.*$|${output}|p;
    35 +      d;                                        # hide any bugs
    36      }
    37  
    38 -    /^[^#\t:%]+:/ {         # found target block
    39 -
    40 -      /^\.PHONY:/                 d             # special target
    41 -      /^\.SUFFIXES:/              d             # special target
    42 -      /^\.DEFAULT:/               d             # special target
    43 -      /^\.PRECIOUS:/              d             # special target
    44 -      /^\.INTERMEDIATE:/          d             # special target
    45 -      /^\.SECONDARY:/             d             # special target
    46 -      /^\.SECONDEXPANSION:/       d             # special target
    47 -      /^\.DELETE_ON_ERROR:/       d             # special target
    48 -      /^\.IGNORE:/                d             # special target
    49 -      /^\.LOW_RESOLUTION_TIME:/   d             # special target
    50 -      /^\.SILENT:/                d             # special target
    51 -      /^\.EXPORT_ALL_VARIABLES:/  d             # special target
    52 -      /^\.NOTPARALLEL:/           d             # special target
    53 -      /^\.ONESHELL:/              d             # special target
    54 -      /^\.POSIX:/                 d             # special target
    55 -      /^\.NOEXPORT:/              d             # special target
    56 -      /^\.MAKE:/                  d             # special target
    57 -
    58 -      /^[^a-zA-Z0-9]/             d             # convention for hidden tgt
    59 -
    60 -      h                                         # hold target
    61 -      d                                         # delete line
    62 +    # This pattern includes a literal tab character as \t is not a portable
    63 +    # representation and fails with BSD sed
    64 +    /^[^#      :%]\{1,\}:/ {         # found target block
    65 +      /^\.PHONY:/                 d;            # special target
    66 +      /^\.SUFFIXES:/              d;            # special target
    67 +      /^\.DEFAULT:/               d;            # special target
    68 +      /^\.PRECIOUS:/              d;            # special target
    69 +      /^\.INTERMEDIATE:/          d;            # special target
    70 +      /^\.SECONDARY:/             d;            # special target
    71 +      /^\.SECONDEXPANSION:/       d;            # special target
    72 +      /^\.DELETE_ON_ERROR:/       d;            # special target
    73 +      /^\.IGNORE:/                d;            # special target
    74 +      /^\.LOW_RESOLUTION_TIME:/   d;            # special target
    75 +      /^\.SILENT:/                d;            # special target
    76 +      /^\.EXPORT_ALL_VARIABLES:/  d;            # special target
    77 +      /^\.NOTPARALLEL:/           d;            # special target
    78 +      /^\.ONESHELL:/              d;            # special target
    79 +      /^\.POSIX:/                 d;            # special target
    80 +      /^\.NOEXPORT:/              d;            # special target
    81 +      /^\.MAKE:/                  d;            # special target
    82 +
    83 +      /^[^a-zA-Z0-9]/             d;            # convention for hidden tgt
    84 +
    85 +      h;                                        # hold target
    86 +      d;                                        # delete line
    87      }
    88  
    89  EOF
    90 @@ -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          $reset
    97  
    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 
    1010
    1111--- helpers/perl
    1212+++ helpers/perl
    13 @@ -23,8 +23,8 @@ sub print_modules_real {
     13@@ -24,8 +24,8 @@ sub print_modules_real {
    1414     chdir($dir) or return;
    1515 
    1616     # 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  
    11pkgutil 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 +0200
    3 +++ completions/Makefile.in     2015-06-10 18:37:07.000000000 +0200
    4 @@ -421,7 +421,6 @@
     2--- completions/Makefile.am.orig
     3+++ completions/Makefile.am
     4@@ -268,7 +268,6 @@ bashcomp_DATA = 2to3 \
    55                pkgadd \
    66                pkgrm \
    77                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 +0200
    2 +++ completions/vpnc    2012-04-14 12:09:45.000000000 +0200
    3 @@ -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" ) )
    66     else
    77-        COMPREPLY=( $( compgen -W '$( command ls /etc/vpnc )' -- "$cur" ) )
    88+        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 subscript
    3 Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/bash-completion/+bug/1289597
    4 Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=741479
    5 Origin: vendor, https://bugs.launchpad.net/ubuntu/+source/bash-completion/+bug/1289597
    6 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_completion
    13 +++ bash_completion
    14 @@ -718,7 +718,7 @@ _init_completion()
    15          fi
    16      done
    17  
    18 -    [[ $cword -eq 0 ]] && return 1
    19 +    [[ $cword -le 0 ]] && return 1
    20      prev=${words[cword-1]}
    21  
    22      [[ ${split-} ]] && _split_longopt && split=true