[109658] trunk/dports/sysutils

raimue at macports.org raimue at macports.org
Mon Aug 19 08:07:19 PDT 2013


Revision: 109658
          https://trac.macports.org/changeset/109658
Author:   raimue at macports.org
Date:     2013-08-19 08:07:19 -0700 (Mon, 19 Aug 2013)
Log Message:
-----------
sysutils/bash-completion{,-devel}:
Fix completion for make, closes #39853

Modified Paths:
--------------
    trunk/dports/sysutils/bash-completion/Portfile
    trunk/dports/sysutils/bash-completion-devel/Portfile

Added Paths:
-----------
    trunk/dports/sysutils/bash-completion/files/patch-make.diff
    trunk/dports/sysutils/bash-completion-devel/files/patch-make.diff

Modified: trunk/dports/sysutils/bash-completion/Portfile
===================================================================
--- trunk/dports/sysutils/bash-completion/Portfile	2013-08-19 14:34:52 UTC (rev 109657)
+++ trunk/dports/sysutils/bash-completion/Portfile	2013-08-19 15:07:19 UTC (rev 109658)
@@ -6,6 +6,7 @@
 conflicts       bash-completion-devel
 epoch           1
 version         2.1
+revision        1
 categories      sysutils
 platforms       darwin
 supported_archs noarch
@@ -25,7 +26,8 @@
 
 depends_run     port:bash
 
-patchfiles      patch-vpnc.diff
+patchfiles      patch-vpnc.diff \
+                patch-make.diff
 
 post-patch {
     reinplace "s:/etc/bash_completion:${prefix}/etc/bash_completion:g" \

Added: trunk/dports/sysutils/bash-completion/files/patch-make.diff
===================================================================
--- trunk/dports/sysutils/bash-completion/files/patch-make.diff	                        (rev 0)
+++ trunk/dports/sysutils/bash-completion/files/patch-make.diff	2013-08-19 15:07:19 UTC (rev 109658)
@@ -0,0 +1,98 @@
+Upstream: https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=314345&group_id=100114
+--- completions/make
++++ completions/make
+@@ -20,9 +20,9 @@ function _make_target_extract_script()
+     fi
+ 
+     cat <<EOF
+-    /^# Make data base/,/^# Files/d             # skip until files section
+-    /^# Not a target/,/^$/        d             # skip not target blocks
+-    /^${prefix_pat}/,/^$/!        d             # skip anything user dont want
++    /^# Make data base/,/^# Files/d;            # skip until files section
++    /^# Not a target/,/^$/        d;            # skip not target blocks
++    /^${prefix_pat}/,/^$/!        d;            # skip anything user dont want
+ 
+     # The stuff above here describes lines that are not
+     #  explicit targets or not targets other than special ones
+@@ -30,41 +30,42 @@ function _make_target_extract_script()
+     #  should be output.
+ 
+     /^# File is an intermediate prerequisite/ {
+-      s/^.*$//;x                                # unhold target
+-      d                                         # delete line
++      s/^.*$//;x;                               # unhold target
++      d;                                        # delete line
+     }
+ 
+     /^$/ {                                      # end of target block
+-      x                                         # unhold target
+-      /^$/d                                     # dont print blanks
+-      s,^(.{${dirname_len}})(.{${#basename}}[^:/]*/?)[^:]*:.*$,${output},p
+-      d                                         # hide any bugs
++      x;                                        # unhold target
++      /^$/d;                                    # dont print blanks
++      s|^\(.\{${dirname_len}\}\)\(.\{${#basename}\}[^:/]*/\{0,1\}\)[^:]*:.*$|${output}|p;
++      d;                                        # hide any bugs
+     }
+ 
+-    /^[^#\t:%]+:/ {         # found target block
+-
+-      /^\.PHONY:/                 d             # special target
+-      /^\.SUFFIXES:/              d             # special target
+-      /^\.DEFAULT:/               d             # special target
+-      /^\.PRECIOUS:/              d             # special target
+-      /^\.INTERMEDIATE:/          d             # special target
+-      /^\.SECONDARY:/             d             # special target
+-      /^\.SECONDEXPANSION:/       d             # special target
+-      /^\.DELETE_ON_ERROR:/       d             # special target
+-      /^\.IGNORE:/                d             # special target
+-      /^\.LOW_RESOLUTION_TIME:/   d             # special target
+-      /^\.SILENT:/                d             # special target
+-      /^\.EXPORT_ALL_VARIABLES:/  d             # special target
+-      /^\.NOTPARALLEL:/           d             # special target
+-      /^\.ONESHELL:/              d             # special target
+-      /^\.POSIX:/                 d             # special target
+-      /^\.NOEXPORT:/              d             # special target
+-      /^\.MAKE:/                  d             # special target
+-
+-      /^[^a-zA-Z0-9]/             d             # convention for hidden tgt
+-
+-      h                                         # hold target
+-      d                                         # delete line
++    # This pattern includes a literal tab character as \t is not a portable
++    # representation and fails with BSD sed
++    /^[^#	:%]\{0,\}:/ {         # found target block
++      /^\.PHONY:/                 d;            # special target
++      /^\.SUFFIXES:/              d;            # special target
++      /^\.DEFAULT:/               d;            # special target
++      /^\.PRECIOUS:/              d;            # special target
++      /^\.INTERMEDIATE:/          d;            # special target
++      /^\.SECONDARY:/             d;            # special target
++      /^\.SECONDEXPANSION:/       d;            # special target
++      /^\.DELETE_ON_ERROR:/       d;            # special target
++      /^\.IGNORE:/                d;            # special target
++      /^\.LOW_RESOLUTION_TIME:/   d;            # special target
++      /^\.SILENT:/                d;            # special target
++      /^\.EXPORT_ALL_VARIABLES:/  d;            # special target
++      /^\.NOTPARALLEL:/           d;            # special target
++      /^\.ONESHELL:/              d;            # special target
++      /^\.POSIX:/                 d;            # special target
++      /^\.NOEXPORT:/              d;            # special target
++      /^\.MAKE:/                  d;            # special target
++
++      /^[^a-zA-Z0-9]/             d;            # convention for hidden tgt
++
++      h;                                        # hold target
++      d;                                        # delete line
+     }
+ 
+ EOF
+@@ -144,7 +145,7 @@ _make()
+         local reset=$( set +o | grep -F posix ); set +o posix # for <(...)
+         COMPREPLY=( $( LC_ALL=C \
+             make -npq "${makef[@]}" "${makef_dir[@]}" .DEFAULT 2>/dev/null | \
+-            sed -nrf <(_make_target_extract_script $mode "$cur") ) )
++            sed -nf <(_make_target_extract_script $mode "$cur") ) )
+         $reset
+ 
+         if [[ $mode != -d ]]; then

Modified: trunk/dports/sysutils/bash-completion-devel/Portfile
===================================================================
--- trunk/dports/sysutils/bash-completion-devel/Portfile	2013-08-19 14:34:52 UTC (rev 109657)
+++ trunk/dports/sysutils/bash-completion-devel/Portfile	2013-08-19 15:07:19 UTC (rev 109658)
@@ -5,6 +5,7 @@
 name            bash-completion-devel
 conflicts       bash-completion
 version         2.1
+revision        1
 categories      sysutils
 platforms       darwin
 supported_archs noarch
@@ -25,7 +26,8 @@
 
 depends_run     port:bash
 
-patchfiles      patch-vpnc.diff
+patchfiles      patch-vpnc.diff \
+                patch-make.diff
 
 post-patch {
     reinplace "s:/etc/bash_completion:${prefix}/etc/bash_completion:g" \

Added: trunk/dports/sysutils/bash-completion-devel/files/patch-make.diff
===================================================================
--- trunk/dports/sysutils/bash-completion-devel/files/patch-make.diff	                        (rev 0)
+++ trunk/dports/sysutils/bash-completion-devel/files/patch-make.diff	2013-08-19 15:07:19 UTC (rev 109658)
@@ -0,0 +1,98 @@
+Upstream: https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=314345&group_id=100114
+--- completions/make
++++ completions/make
+@@ -20,9 +20,9 @@ function _make_target_extract_script()
+     fi
+ 
+     cat <<EOF
+-    /^# Make data base/,/^# Files/d             # skip until files section
+-    /^# Not a target/,/^$/        d             # skip not target blocks
+-    /^${prefix_pat}/,/^$/!        d             # skip anything user dont want
++    /^# Make data base/,/^# Files/d;            # skip until files section
++    /^# Not a target/,/^$/        d;            # skip not target blocks
++    /^${prefix_pat}/,/^$/!        d;            # skip anything user dont want
+ 
+     # The stuff above here describes lines that are not
+     #  explicit targets or not targets other than special ones
+@@ -30,41 +30,42 @@ function _make_target_extract_script()
+     #  should be output.
+ 
+     /^# File is an intermediate prerequisite/ {
+-      s/^.*$//;x                                # unhold target
+-      d                                         # delete line
++      s/^.*$//;x;                               # unhold target
++      d;                                        # delete line
+     }
+ 
+     /^$/ {                                      # end of target block
+-      x                                         # unhold target
+-      /^$/d                                     # dont print blanks
+-      s,^(.{${dirname_len}})(.{${#basename}}[^:/]*/?)[^:]*:.*$,${output},p
+-      d                                         # hide any bugs
++      x;                                        # unhold target
++      /^$/d;                                    # dont print blanks
++      s|^\(.\{${dirname_len}\}\)\(.\{${#basename}\}[^:/]*/\{0,1\}\)[^:]*:.*$|${output}|p;
++      d;                                        # hide any bugs
+     }
+ 
+-    /^[^#\t:%]+:/ {         # found target block
+-
+-      /^\.PHONY:/                 d             # special target
+-      /^\.SUFFIXES:/              d             # special target
+-      /^\.DEFAULT:/               d             # special target
+-      /^\.PRECIOUS:/              d             # special target
+-      /^\.INTERMEDIATE:/          d             # special target
+-      /^\.SECONDARY:/             d             # special target
+-      /^\.SECONDEXPANSION:/       d             # special target
+-      /^\.DELETE_ON_ERROR:/       d             # special target
+-      /^\.IGNORE:/                d             # special target
+-      /^\.LOW_RESOLUTION_TIME:/   d             # special target
+-      /^\.SILENT:/                d             # special target
+-      /^\.EXPORT_ALL_VARIABLES:/  d             # special target
+-      /^\.NOTPARALLEL:/           d             # special target
+-      /^\.ONESHELL:/              d             # special target
+-      /^\.POSIX:/                 d             # special target
+-      /^\.NOEXPORT:/              d             # special target
+-      /^\.MAKE:/                  d             # special target
+-
+-      /^[^a-zA-Z0-9]/             d             # convention for hidden tgt
+-
+-      h                                         # hold target
+-      d                                         # delete line
++    # This pattern includes a literal tab character as \t is not a portable
++    # representation and fails with BSD sed
++    /^[^#	:%]\{0,\}:/ {         # found target block
++      /^\.PHONY:/                 d;            # special target
++      /^\.SUFFIXES:/              d;            # special target
++      /^\.DEFAULT:/               d;            # special target
++      /^\.PRECIOUS:/              d;            # special target
++      /^\.INTERMEDIATE:/          d;            # special target
++      /^\.SECONDARY:/             d;            # special target
++      /^\.SECONDEXPANSION:/       d;            # special target
++      /^\.DELETE_ON_ERROR:/       d;            # special target
++      /^\.IGNORE:/                d;            # special target
++      /^\.LOW_RESOLUTION_TIME:/   d;            # special target
++      /^\.SILENT:/                d;            # special target
++      /^\.EXPORT_ALL_VARIABLES:/  d;            # special target
++      /^\.NOTPARALLEL:/           d;            # special target
++      /^\.ONESHELL:/              d;            # special target
++      /^\.POSIX:/                 d;            # special target
++      /^\.NOEXPORT:/              d;            # special target
++      /^\.MAKE:/                  d;            # special target
++
++      /^[^a-zA-Z0-9]/             d;            # convention for hidden tgt
++
++      h;                                        # hold target
++      d;                                        # delete line
+     }
+ 
+ EOF
+@@ -144,7 +145,7 @@ _make()
+         local reset=$( set +o | grep -F posix ); set +o posix # for <(...)
+         COMPREPLY=( $( LC_ALL=C \
+             make -npq "${makef[@]}" "${makef_dir[@]}" .DEFAULT 2>/dev/null | \
+-            sed -nrf <(_make_target_extract_script $mode "$cur") ) )
++            sed -nf <(_make_target_extract_script $mode "$cur") ) )
+         $reset
+ 
+         if [[ $mode != -d ]]; then
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130819/7f00a490/attachment-0001.html>


More information about the macports-changes mailing list