[Midnightbsd-cvs] mports [17158] trunk/shells/bash: bash 4.3 patch level 24
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sun Sep 14 16:19:48 EDT 2014
Revision: 17158
http://svnweb.midnightbsd.org/mports/?rev=17158
Author: laffer1
Date: 2014-09-14 16:19:46 -0400 (Sun, 14 Sep 2014)
Log Message:
-----------
bash 4.3 patch level 24
Modified Paths:
--------------
trunk/shells/bash/Makefile
trunk/shells/bash/distinfo
Added Paths:
-----------
trunk/shells/bash/files/extrapatch-colonbreakswords
trunk/shells/bash/files/extrapatch-implicitcd
trunk/shells/bash/files/patch-doc_Makefile.in
trunk/shells/bash/files/patch-doc_bash.1
trunk/shells/bash/files/patch-doc_bashref.texi
trunk/shells/bash/files/patch-lib_readline_display.c
Modified: trunk/shells/bash/Makefile
===================================================================
--- trunk/shells/bash/Makefile 2014-09-14 20:17:04 UTC (rev 17157)
+++ trunk/shells/bash/Makefile 2014-09-14 20:19:46 UTC (rev 17158)
@@ -1,7 +1,7 @@
# $MidnightBSD$
PORTNAME= bash
-PATCHLEVEL= 18
+PATCHLEVEL= 24
PORTVERSION= 4.3.${PATCHLEVEL:S/^0//g}
PORTREVISION?= 0
CATEGORIES= shells
@@ -29,7 +29,7 @@
COLONBREAKSWORDS_DESC= Colons break words
HELP_DESC= Enable builtin help
-USES= bison
+USES= bison makeinfo
OPTIONS_SUB= yes
IMPLICITCD_EXTRA_PATCHES= ${PATCHDIR}/extrapatch-implicitcd
Modified: trunk/shells/bash/distinfo
===================================================================
--- trunk/shells/bash/distinfo 2014-09-14 20:17:04 UTC (rev 17157)
+++ trunk/shells/bash/distinfo 2014-09-14 20:19:46 UTC (rev 17158)
@@ -36,3 +36,15 @@
SIZE (bash/bash43-017) = 1565
SHA256 (bash/bash43-018) = 7aa8b40a9e973931719d8cc72284a8fb3292b71b522db57a5a79052f021a3d58
SIZE (bash/bash43-018) = 1315
+SHA256 (bash/bash43-019) = a7a91475228015d676cafa86d2d7aa9c5d2139aa51485b6bbdebfdfbcf0d2d23
+SIZE (bash/bash43-019) = 2610
+SHA256 (bash/bash43-020) = ca5e86d87f178128641fe91f2f094875b8c1eb2de9e0d2e9154f5d5cc0336c98
+SIZE (bash/bash43-020) = 2777
+SHA256 (bash/bash43-021) = 41439f06883e6bd11c591d9d5e9ae08afbc2abd4b935e1d244b08100076520a9
+SIZE (bash/bash43-021) = 1623
+SHA256 (bash/bash43-022) = fd4d47bb95c65863f634c4706c65e1e3bae4ee8460c72045c0a0618689061a88
+SIZE (bash/bash43-022) = 1782
+SHA256 (bash/bash43-023) = 9ac250c7397a8f53dbc84dfe790d2a418fbf1fe090bcece39b4a5c84a2d300d4
+SIZE (bash/bash43-023) = 3414
+SHA256 (bash/bash43-024) = 3b505882a0a6090667d75824fc919524cd44cc3bd89dd08b7c4e622d3f960f6c
+SIZE (bash/bash43-024) = 1909
Added: trunk/shells/bash/files/extrapatch-colonbreakswords
===================================================================
--- trunk/shells/bash/files/extrapatch-colonbreakswords (rev 0)
+++ trunk/shells/bash/files/extrapatch-colonbreakswords 2014-09-14 20:19:46 UTC (rev 17158)
@@ -0,0 +1,176 @@
+--- bashline.c.orig 2014-03-02 13:26:23.000000000 -0500
++++ bashline.c 2014-03-02 13:30:09.000000000 -0500
+@@ -255,6 +255,11 @@
+ host list. */
+ int perform_hostname_completion = 1;
+
++/* If non-zero, we do hostname completion, breaking words at `@' and
++ trying to complete the stuff after the `@' from our own internal
++ host list. */
++int colon_is_wordbreak = 1;
++
+ /* If non-zero, we don't do command completion on an empty line. */
+ int no_empty_command_completion;
+
+@@ -284,7 +289,8 @@
+
+ static char *bash_completer_word_break_characters = " \t\n\"'@><=;|&(:";
+ static char *bash_nohostname_word_break_characters = " \t\n\"'><=;|&(:";
+-/* )) */
++static char *bash_nocolon_word_break_characters = " \t\n\"'@><=;|&(";
++/* ))) */
+
+ static const char *default_filename_quote_characters = " \t\n\\\"'@<>=;|&()#$`?*[!:{~"; /*}*/
+ static char *custom_filename_quote_characters = 0;
+@@ -403,6 +409,80 @@
+ return (old_value);
+ }
+
++/* When this function returns, rl_completer_word_break_characters points to
++ dynamically allocated memory. */
++int
++enable_colon_wordbreak (on_or_off)
++ int on_or_off;
++{
++ int old_value;
++ char *at, *nv, *nval;
++
++ old_value = colon_is_wordbreak;
++
++ if (on_or_off)
++ {
++ colon_is_wordbreak = 1;
++ rl_filename_quote_characters = default_filename_quote_characters;
++ }
++ else
++ {
++ colon_is_wordbreak = 0;
++ rl_filename_quote_characters = " \t\n\\\"'@<>=;|&()#$`?*[!{~"; /*}*/
++ }
++
++ /* Now we need to figure out how to appropriately modify and assign
++ rl_completer_word_break_characters depending on whether we want
++ the colon to be a word break or not. */
++
++ /* If this is the first time this has been called
++ (bash_readline_initialized == 0), use the sames values as before, but
++ allocate new memory for rl_completer_word_break_characters. */
++
++ if (bash_readline_initialized == 0 &&
++ (rl_completer_word_break_characters == 0 ||
++ rl_completer_word_break_characters == rl_basic_word_break_characters))
++ {
++ if (on_or_off)
++ rl_completer_word_break_characters = savestring (bash_completer_word_break_characters);
++ else
++ rl_completer_word_break_characters = savestring (bash_nocolon_word_break_characters);
++ }
++ else
++ {
++ /* See if we have anything to do. */
++ at = strchr (rl_completer_word_break_characters, ':');
++ if ((at == 0 && on_or_off == 0) || (at != 0 && on_or_off != 0))
++ return old_value;
++
++ /* We have something to do. Do it. */
++ nval = (char *)xmalloc (strlen (rl_completer_word_break_characters) + 1 + on_or_off);
++
++ if (on_or_off == 0)
++ {
++ /* Turn it off -- just remove `:' from word break chars. We want
++ to remove all occurrences of `:' from the char list, so we loop
++ rather than just copy the rest of the list over AT. */
++ for (nv = nval, at = rl_completer_word_break_characters; *at; )
++ if (*at != ':')
++ *nv++ = *at++;
++ else
++ at++;
++ *nv = '\0';
++ }
++ else
++ {
++ nval[0] = ':';
++ strcpy (nval + 1, rl_completer_word_break_characters);
++ }
++
++ free (rl_completer_word_break_characters);
++ rl_completer_word_break_characters = nval;
++ }
++
++ return (old_value);
++}
++
+ /* Called once from parse.y if we are going to use readline. */
+ void
+ initialize_readline ()
+@@ -573,8 +653,13 @@
+ completion is enabled. */
+ enable_hostname_completion (perform_hostname_completion);
+
++ /* This sets rl_completer_word_break_characters and rl_filename_quote_characters
++ to the appropriate values, depending on whether or not a colon
++ should break completion words or not. */
++ enable_colon_wordbreak (colon_is_wordbreak);
++
+ /* characters that need to be quoted when appearing in filenames. */
+- rl_filename_quote_characters = default_filename_quote_characters;
++// rl_filename_quote_characters = default_filename_quote_characters;
+ set_filename_bstab (rl_filename_quote_characters);
+
+ rl_filename_quoting_function = bash_quote_filename;
+--- builtins/shopt.def.orig 2014-03-02 13:30:44.000000000 -0500
++++ builtins/shopt.def 2014-03-02 13:31:38.000000000 -0500
+@@ -103,6 +103,8 @@
+ extern int complete_fullquote;
+
+ extern int enable_hostname_completion __P((int));
++extern int colon_is_wordbreak;
++extern int enable_colon_wordbreak __P((int));
+ #endif
+
+ #if defined (PROGRAMMABLE_COMPLETION)
+@@ -166,6 +168,9 @@
+ { "direxpand", &dircomplete_expand, shopt_set_complete_direxpand },
+ { "dirspell", &dircomplete_spelling, (shopt_set_func_t *)NULL },
+ #endif
++#if defined (READLINE)
++ { "colonbreakswords", &colon_is_wordbreak, enable_colon_wordbreak },
++#endif
+ { "dotglob", &glob_dot_filenames, (shopt_set_func_t *)NULL },
+ { "execfail", &no_exit_on_failed_exec, (shopt_set_func_t *)NULL },
+ { "expand_aliases", &expand_aliases, (shopt_set_func_t *)NULL },
+--- doc/bash.1.orig 2014-03-02 13:32:14.000000000 -0500
++++ doc/bash.1 2014-03-02 13:32:40.000000000 -0500
+@@ -9252,6 +9252,18 @@
+ command in the same history entry. This allows
+ easy re-editing of multi-line commands.
+ .TP 8
++.B colonbreakswords
++If set, and
++.B readline
++is being used, \fBbash\fP will treat \fB:\fP as
++separating word being completed (see
++.B Completing
++under
++.SM
++.B READLINE
++above).
++This is enabled by default.
++.TP 8
+ .B compat31
+ If set,
+ .B bash
+--- doc/bashref.texi.orig 2014-03-02 13:33:17.000000000 -0500
++++ doc/bashref.texi 2014-03-02 13:33:44.000000000 -0500
+@@ -4937,6 +4937,11 @@
+ command in the same history entry. This allows
+ easy re-editing of multi-line commands.
+
++ at item colonbreakswords
++If set, and Readline is being used, Bash will treat @samp{:} as
++separating word being completed (@pxref{Commands For Completion}).
++This option is enabled by default.
++
+ @item compat31
+ If set, Bash
+ changes its behavior to that of version 3.1 with respect to quoted
Added: trunk/shells/bash/files/extrapatch-implicitcd
===================================================================
--- trunk/shells/bash/files/extrapatch-implicitcd (rev 0)
+++ trunk/shells/bash/files/extrapatch-implicitcd 2014-09-14 20:19:46 UTC (rev 17158)
@@ -0,0 +1,95 @@
+--- execute_cmd.c.orig 2014-03-02 13:15:12.000000000 -0500
++++ execute_cmd.c 2014-03-02 13:17:14.000000000 -0500
+@@ -199,6 +199,9 @@
+
+ static int execute_intern_function __P((WORD_DESC *, FUNCTION_DEF *));
+
++/* add an implicit `cd' if the command is the name of a directory */
++int implicitcd = 0;
++
+ /* Set to 1 if fd 0 was the subject of redirection to a subshell. Global
+ so that reader_loop can set it to zero before executing a command. */
+ int stdin_redir;
+@@ -4111,6 +4114,20 @@
+
+ QUIT;
+
++ if (implicitcd && interactive_shell && words->next == NULL && func == 0 && builtin == 0)
++ {
++ struct stat finfo;
++
++ if ((stat (words->word->word, &finfo) == 0) && (S_ISDIR (finfo.st_mode)))
++ {
++ this_command_name = "cd";
++ last_shell_builtin = this_shell_builtin;
++ this_shell_builtin = builtin_address (this_command_name);
++ result = (*this_shell_builtin) (words);
++ goto return_result;
++ }
++ }
++
+ /* This command could be a shell builtin or a user-defined function.
+ We have already found special builtins by this time, so we do not
+ set builtin_is_special. If this is a function or builtin, and we
+--- builtins/shopt.def.orig 2014-03-02 13:18:07.000000000 -0500
++++ builtins/shopt.def 2014-03-02 13:19:22.000000000 -0500
+@@ -83,6 +83,7 @@
+ extern int check_window_size;
+ extern int glob_ignore_case, match_ignore_case;
+ extern int hup_on_exit;
++extern int implicitcd;
+ extern int xpg_echo;
+ extern int gnu_error_format;
+ extern int check_jobs_at_exit;
+@@ -192,6 +193,7 @@
+ { "hostcomplete", &perform_hostname_completion, shopt_enable_hostname_completion },
+ #endif
+ { "huponexit", &hup_on_exit, (shopt_set_func_t *)NULL },
++ { "implicitcd", &implicitcd, (shopt_set_func_t *)NULL },
+ { "interactive_comments", &interactive_comments, set_shellopts_after_change },
+ { "lastpipe", &lastpipe_opt, (shopt_set_func_t *)NULL },
+ #if defined (HISTORY)
+@@ -305,6 +307,7 @@
+ cdable_vars = mail_warning = 0;
+ no_exit_on_failed_exec = print_shift_error = 0;
+ check_hashed_filenames = cdspelling = expand_aliases = 0;
++ implicitcd = 0;
+
+ source_uses_path = promptvars = 1;
+
+--- doc/bash.1.orig 2014-03-02 13:19:59.000000000 -0500
++++ doc/bash.1 2014-03-02 13:21:10.000000000 -0500
+@@ -9480,6 +9480,15 @@
+ .B SIGHUP
+ to all jobs when an interactive login shell exits.
+ .TP 8
++.B implicitcd
++If this is set, a directory name typed as a command is treated as a
++request to change to that directory.
++This behavior is inhibited in non-interactive mode or for command
++strings with more than one word.
++Changing directory takes precedence over executing a like-named
++command, but it is done after alias substitutions.
++Tilde and variable expansions work as expected.
++.TP 8
+ .B interactive_comments
+ If set, allow a word beginning with
+ .B #
+--- doc/bashref.texi.orig 2014-03-02 13:21:54.000000000 -0500
++++ doc/bashref.texi 2014-03-02 13:22:31.000000000 -0500
+@@ -5118,6 +5118,15 @@
+ If set, Bash will send @code{SIGHUP} to all jobs when an interactive
+ login shell exits (@pxref{Signals}).
+
++ at item implicitcd
++If this is set, a directory name typed as a command is treated as a
++request to change to that directory.
++This behavior is inhibited in non-interactive mode or for command
++strings with more than one word.
++Changing directory takes precedence over executing a like-named
++command, but it is done after alias substitutions.
++Tilde and variable expansions work as expected.
++
+ @item interactive_comments
+ Allow a word beginning with @samp{#}
+ to cause that word and all remaining characters on that
Added: trunk/shells/bash/files/patch-doc_Makefile.in
===================================================================
--- trunk/shells/bash/files/patch-doc_Makefile.in (rev 0)
+++ trunk/shells/bash/files/patch-doc_Makefile.in 2014-09-14 20:19:46 UTC (rev 17158)
@@ -0,0 +1,21 @@
+--- doc/Makefile.in.orig 2014-03-02 13:39:04.000000000 -0500
++++ doc/Makefile.in 2014-03-02 13:39:56.000000000 -0500
+@@ -167,7 +167,7 @@
+ bashref.dvi: $(BASHREF_FILES) $(HSUSER) $(RLUSER)
+ ${SET_TEXINPUTS} $(TEXI2DVI) $(srcdir)/bashref.texi || { ${RM} $@ ; exit 1; }
+
+-bashref.info: $(BASHREF_FILES) $(HSUSER) $(RLUSER)
++bash.info: $(BASHREF_FILES) $(HSUSER) $(RLUSER)
+ $(MAKEINFO) --no-split -I$(TEXINPUTDIR) $(srcdir)/bashref.texi
+
+ # can also use:
+@@ -175,9 +175,6 @@
+ bashref.html: $(BASHREF_FILES) $(HSUSER) $(RLUSER)
+ $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/bashref.texi
+
+-bash.info: bashref.info
+- ${SHELL} ${INFOPOST} < $(srcdir)/bashref.info > $@ ; \
+-
+ bash.txt: bash.1
+ bash.ps: bash.1
+ bash.html: bash.1 $(MAN2HTML)
Added: trunk/shells/bash/files/patch-doc_bash.1
===================================================================
--- trunk/shells/bash/files/patch-doc_bash.1 (rev 0)
+++ trunk/shells/bash/files/patch-doc_bash.1 2014-09-14 20:19:46 UTC (rev 17158)
@@ -0,0 +1,20 @@
+--- doc/bash.1.orig Wed Dec 28 19:44:28 2005
++++ doc/bash.1 Wed Dec 28 20:03:12 2005
+@@ -1897,7 +1897,7 @@
+ .SM
+ .B PROMPTING
+ below) and used as the primary prompt string. The default value is
+-``\fB\es\-\ev\e$ \fP''.
++``\fB\eu\@\eh\e$ \fP''.
+ .TP
+ .B PS2
+ The value of this parameter is expanded as with
+@@ -8784,7 +8784,7 @@
+ .SH FILES
+ .PD 0
+ .TP
+-.FN /bin/bash
++.FN %%PREFIX%%/bin/bash
+ The \fBbash\fP executable
+ .TP
+ .FN /etc/profile
Added: trunk/shells/bash/files/patch-doc_bashref.texi
===================================================================
--- trunk/shells/bash/files/patch-doc_bashref.texi (rev 0)
+++ trunk/shells/bash/files/patch-doc_bashref.texi 2014-09-14 20:19:46 UTC (rev 17158)
@@ -0,0 +1,28 @@
+--- doc/bashref.texi.orig 2014-03-02 13:40:51.000000000 -0500
++++ doc/bashref.texi 2014-03-02 13:42:04.000000000 -0500
+@@ -1,6 +1,6 @@
+ \input texinfo.tex @c -*- texinfo -*-
+ @c %**start of header
+- at setfilename bashref.info
++ at setfilename bash.info
+ @settitle Bash Reference Manual
+
+ @include version.texi
+@@ -8,7 +8,7 @@
+
+ @copying
+ This text is a brief description of the features that are present in
+-the Bash shell (version @value{VERSION}, @value{UPDATED}).
++the Bash shell (version @value{VERSION}, @value{UPDATED})
+
+ This is Edition @value{EDITION}, last updated @value{UPDATED},
+ of @cite{The GNU Bash Reference Manual},
+@@ -5299,7 +5299,7 @@
+
+
+ @item PS1
+-The primary prompt string. The default value is @samp{\s-\v\$ }.
++The primary prompt string. The default value is @samp{[\u@@\h \w]\$ }.
+ @xref{Controlling the Prompt}, for the complete list of escape
+ sequences that are expanded before @env{PS1} is displayed.
+
Added: trunk/shells/bash/files/patch-lib_readline_display.c
===================================================================
--- trunk/shells/bash/files/patch-lib_readline_display.c (rev 0)
+++ trunk/shells/bash/files/patch-lib_readline_display.c 2014-09-14 20:19:46 UTC (rev 17158)
@@ -0,0 +1,11 @@
+--- lib/readline/display.c.orig 2009-01-04 11:32:32.000000000 -0800
++++ lib/readline/display.c 2009-03-08 00:51:31.000000000 -0800
+@@ -654,5 +654,8 @@ rl_redisplay ()
+ /* inv_lbreaks[i] is where line i starts in the buffer. */
+ inv_lbreaks[newlines = 0] = 0;
++ if (local_prompt)
+ lpos = prompt_physical_chars + modmark;
++ else
++ lpos = 0;
+
+ #if defined (HANDLE_MULTIBYTE)
More information about the Midnightbsd-cvs
mailing list