diff options
author | Oliver Eikemeier <eik@FreeBSD.org> | 2004-10-14 13:24:20 +0000 |
---|---|---|
committer | Oliver Eikemeier <eik@FreeBSD.org> | 2004-10-14 13:24:20 +0000 |
commit | 875ebd31e7b0c845a482d12d49e1a601a8fcfdd5 (patch) | |
tree | aee72473670eb41fcdd9149216a8d8a827130e5e /shells | |
parent | ad4c22b11aa13013f93ad2bf2abf95adb7271ac3 (diff) | |
download | ports-875ebd31e7b0c845a482d12d49e1a601a8fcfdd5.tar.gz ports-875ebd31e7b0c845a482d12d49e1a601a8fcfdd5.zip |
Notes
Diffstat (limited to 'shells')
-rw-r--r-- | shells/bash/Makefile | 43 | ||||
-rw-r--r-- | shells/bash/files/patch-builtins::Makefile.in | 11 | ||||
-rw-r--r-- | shells/bash/files/patch-config-top.h | 24 | ||||
-rw-r--r-- | shells/bash/files/patch-doc::bash.1 | 20 | ||||
-rw-r--r-- | shells/bash/files/patch-doc::bashref.texi | 9 | ||||
-rw-r--r-- | shells/bash/files/patch-support::mkversion.sh | 11 | ||||
-rw-r--r-- | shells/bash/files/xpatch-colonbreakswords | 178 | ||||
-rw-r--r-- | shells/bash/pkg-deinstall | 19 | ||||
-rw-r--r-- | shells/bash/pkg-install | 9 |
9 files changed, 302 insertions, 22 deletions
diff --git a/shells/bash/Makefile b/shells/bash/Makefile index c9a8999410d9..ca12271e168d 100644 --- a/shells/bash/Makefile +++ b/shells/bash/Makefile @@ -6,21 +6,22 @@ # PORTNAME= bash -PORTVERSION= 3.0 -PORTREVISION= 5 +PORTVERSION= 3.0.13 +PORTREVISION= 0 CATEGORIES= shells MASTER_SITES= ${MASTER_SITE_GNU:S/$/:bash/} \ http://cnswww.cns.cwru.edu/~chet/%SUBDIR%/:faq \ ftp://ftp.cwru.edu/pub/%SUBDIR%/:bash,faq MASTER_SITE_SUBDIR= ${PORTNAME}/:bash,faq +DISTNAME= ${PORTNAME}-${PORTVERSION:R} DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:bash DIST_SUBDIR= ${PORTNAME} EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} PATCH_SITES= ftp://ftp.cwru.edu/pub/%SUBDIR%/:bash -PATCH_SITE_SUBDIR= ${PORTNAME}/${PORTNAME}-${PORTVERSION}-patches/:bash +PATCH_SITE_SUBDIR= ${PORTNAME}/${DISTNAME}-patches/:bash .for patch in 01 02 03 04 05 06 07 08 09 10 11 12 13 -PATCHFILES+= ${PORTNAME}${PORTVERSION:S/.//g}-0${patch}:bash +PATCHFILES+= ${PORTNAME}${PORTVERSION:R:S/.//g}-0${patch}:bash .endfor MAINTAINER= eik@FreeBSD.org @@ -30,7 +31,11 @@ IGNOREFILES= FAQ CONFLICTS= bash-[0-24-9].* .if !defined(WITHOUT_IMPLICITCD) -EXTRA_PATCHES= ${PATCHDIR}/xpatch-implicitcd +EXTRA_PATCHES+= ${PATCHDIR}/xpatch-implicitcd +.endif + +.if !defined(WITHOUT_COLONBREAKSWORDS) +EXTRA_PATCHES+= ${PATCHDIR}/xpatch-colonbreakswords .endif MAN1= bash.1 bashbug.1 @@ -40,8 +45,10 @@ USE_REINPLACE= yes GNU_CONFIGURE= yes .if !defined(NOPORTDOCS) +.if !defined(WITH_INCLUDED_FAQ) DISTFILES+= FAQ:faq -PORTDOCS= FAQ CHANGES COMPAT NEWS POSIX RBASH +.endif +PORTDOCS= FAQ INTRO CHANGES COMPAT NEWS POSIX RBASH .endif CONFIGURE_ARGS= --without-bash-malloc \ @@ -76,22 +83,34 @@ CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" \ LDFLAGS="${LDFLAGS}" post-patch: - @${REINPLACE_CMD} -e "s| /bin| ${PREFIX}/bin|g" ${WRKSRC}/doc/bash.1 + @${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/doc/bash.1 + +post-configure: + @${FIND} ${WRKSRC} -name Makefile -print0 | ${XARGS} -0 \ + ${REINPLACE_CMD} -e "s|^DESTDIR *=|& ${DESTDIR}|" pre-build: @${ECHO_CMD} $$((${PORTREVISION}-1)) > ${WRKSRC}/.build pre-install: - @${SETENV} PKG_PREFIX="${PREFIX}" PKG_DESTDIR="${DESTDIR}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL; \ + @${SETENV} PKG_PREFIX="${PREFIX}" PKG_DESTDIR="${DESTDIR}" \ + ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL post-install: .if !defined(NOPORTDOCS) - @${MKDIR} ${DOCSDIR} - @${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/FAQ ${DESTDIR}${DOCSDIR} - @for d in ${PORTDOCS:NFAQ}; do \ + @${MKDIR} ${DESTDIR}${DOCSDIR} +.if !defined(WITH_INCLUDED_FAQ) + @${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/FAQ \ + ${WRKSRC}/doc/INTRO ${DESTDIR}${DOCSDIR} +.else + @${INSTALL_DATA} ${WRKSRC}/doc/FAQ \ + ${WRKSRC}/doc/INTRO ${DESTDIR}${DOCSDIR} +.endif + @for d in ${PORTDOCS:NFAQ:NINTRO}; do \ ${INSTALL_DATA} ${WRKSRC}/$${d} ${DESTDIR}${DOCSDIR}; \ done .endif - @${SETENV} PKG_PREFIX="${PREFIX}" PKG_DESTDIR="${DESTDIR}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL; \ + @${SETENV} PKG_PREFIX="${PREFIX}" PKG_DESTDIR="${DESTDIR}" \ + ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL .include <bsd.port.mk> diff --git a/shells/bash/files/patch-builtins::Makefile.in b/shells/bash/files/patch-builtins::Makefile.in new file mode 100644 index 000000000000..45d34668a9c9 --- /dev/null +++ b/shells/bash/files/patch-builtins::Makefile.in @@ -0,0 +1,11 @@ +--- builtins/Makefile.in.orig Mon Oct 11 15:32:28 2004 ++++ builtins/Makefile.in Mon Oct 11 15:32:58 2004 +@@ -177,7 +177,7 @@ + + install-help: + @-if test -n "${HELPDIR}" && test -d helpfiles ; then \ +- test -d ${HELPDIR} || ${SHELL} ${MKDIRS} $(DESTDIR)$(HELPDIR) ;\ ++ test -d ${DESTDIR}${HELPDIR} || ${SHELL} ${MKDIRS} $(DESTDIR)$(HELPDIR) ;\ + ( cd helpfiles ; \ + for f in *; do \ + echo installing $$f; \ diff --git a/shells/bash/files/patch-config-top.h b/shells/bash/files/patch-config-top.h new file mode 100644 index 000000000000..39c10151d5c4 --- /dev/null +++ b/shells/bash/files/patch-config-top.h @@ -0,0 +1,24 @@ +--- config-top.h.orig Tue Aug 5 16:36:12 2003 ++++ config-top.h Mon Oct 11 16:55:40 2004 +@@ -52,18 +52,18 @@ + /* The default value of the PATH variable. */ + #ifndef DEFAULT_PATH_VALUE + #define DEFAULT_PATH_VALUE \ +- "/usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:." ++ "/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:%%LOCALBASE%%/sbin:%%LOCALBASE%%/bin:%%X11BASE%%/bin" + #endif + + /* The value for PATH when invoking `command -p'. This is only used when + the Posix.2 confstr () function, or CS_PATH define are not present. */ + #ifndef STANDARD_UTILS_PATH + #define STANDARD_UTILS_PATH \ +- "/bin:/usr/bin:/sbin:/usr/sbin:/etc:/usr/etc" ++ "/sbin:/bin:/usr/sbin:/usr/bin:/usr/games" + #endif + + /* Default primary and secondary prompt strings. */ +-#define PPROMPT "\\s-\\v\\$ " ++#define PPROMPT "\\u@\\h\\$ " + #define SPROMPT "> " + + /* Undefine this if you don't want the ksh-compatible behavior of reprinting diff --git a/shells/bash/files/patch-doc::bash.1 b/shells/bash/files/patch-doc::bash.1 new file mode 100644 index 000000000000..f02dfdc9fa36 --- /dev/null +++ b/shells/bash/files/patch-doc::bash.1 @@ -0,0 +1,20 @@ +--- doc/bash.1.orig Mon Oct 11 16:08:41 2004 ++++ doc/bash.1 Mon Oct 11 16:09:35 2004 +@@ -1843,7 +1843,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 +@@ -8636,7 +8636,7 @@ + .SH FILES + .PD 0 + .TP +-.FN /bin/bash ++.FN %%PREFIX%%/bin/bash + The \fBbash\fP executable + .TP + .FN /etc/profile diff --git a/shells/bash/files/patch-doc::bashref.texi b/shells/bash/files/patch-doc::bashref.texi index e56d56bb9792..555fbd522c66 100644 --- a/shells/bash/files/patch-doc::bashref.texi +++ b/shells/bash/files/patch-doc::bashref.texi @@ -17,3 +17,12 @@ This is Edition @value{EDITION}, last updated @value{UPDATED}, of @cite{The GNU Bash Reference Manual}, +@@ -4218,7 +4218,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\$ }. + @xref{Printing a Prompt}, for the complete list of escape + sequences that are expanded before @env{PS1} is displayed. + diff --git a/shells/bash/files/patch-support::mkversion.sh b/shells/bash/files/patch-support::mkversion.sh new file mode 100644 index 000000000000..c7c4d609d230 --- /dev/null +++ b/shells/bash/files/patch-support::mkversion.sh @@ -0,0 +1,11 @@ +--- support/mkversion.sh.orig Tue Oct 12 11:20:53 2004 ++++ support/mkversion.sh Tue Oct 12 11:21:10 2004 +@@ -67,7 +67,7 @@ + # increment the build version if that's what's required + + if [ -n "$inc_build" ]; then +- build_ver=`expr $build_ver + 1` ++ build_ver=`expr 1 + $build_ver` + fi + + # what's the patch level? diff --git a/shells/bash/files/xpatch-colonbreakswords b/shells/bash/files/xpatch-colonbreakswords new file mode 100644 index 000000000000..c1cae42aaa09 --- /dev/null +++ b/shells/bash/files/xpatch-colonbreakswords @@ -0,0 +1,178 @@ +# +# new shopt `colonbreakswords' +# http://lists.gnu.org/archive/html/bug-bash/2004-10/msg00190.html +# +--- bashline.c.orig Wed Oct 13 18:39:13 2004 ++++ bashline.c Wed Oct 13 19:02:53 2004 +@@ -212,6 +212,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; + +@@ -222,6 +227,7 @@ + + 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 rl_hook_func_t *old_rl_startup_hook = (rl_hook_func_t *)NULL; +@@ -323,6 +329,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 = " \t\n\\\"'@<>=;|&()#$`?*[!:{"; /*}*/ ++ } ++ 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 () +@@ -479,8 +559,12 @@ + 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 = " \t\n\\\"'@<>=;|&()#$`?*[!:{"; /*}*/ + rl_filename_quoting_function = bash_quote_filename; + rl_filename_dequoting_function = bash_dequote_filename; + rl_char_is_quoted_p = char_is_quoted; +--- builtins/shopt.def.orig Wed Oct 13 19:07:57 2004 ++++ builtins/shopt.def Wed Oct 13 19:10:37 2004 +@@ -82,6 +82,8 @@ + extern int hist_verify, history_reediting, perform_hostname_completion; + extern int no_empty_command_completion; + extern int force_fignore; ++extern int colon_is_wordbreak; ++extern int enable_colon_wordbreak __P((int)); + extern int enable_hostname_completion __P((int)); + #endif + +@@ -120,6 +122,9 @@ + { "checkwinsize", &check_window_size, (shopt_set_func_t *)NULL }, + #if defined (HISTORY) + { "cmdhist", &command_oriented_history, (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 }, +--- doc/bash.1.orig Wed Oct 13 19:49:55 2004 ++++ doc/bash.1 Wed Oct 13 19:53:28 2004 +@@ -7866,6 +7866,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 dotglob + If set, + .B bash +--- doc/bashref.texi.orig Wed Oct 13 19:53:45 2004 ++++ doc/bashref.texi Wed Oct 13 19:56:27 2004 +@@ -3577,6 +3577,11 @@ + command in the same history entry. This allows + easy re-editing of multi-line commands. + ++@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 dotglob + If set, Bash includes filenames beginning with a `.' in + the results of filename expansion. diff --git a/shells/bash/pkg-deinstall b/shells/bash/pkg-deinstall index 11ee3aff420d..c8cee462b8c1 100644 --- a/shells/bash/pkg-deinstall +++ b/shells/bash/pkg-deinstall @@ -3,15 +3,20 @@ # $FreeBSD$ # +BASH="${PKG_PREFIX-/usr/local}/bin/bash" +SHELLS="${PKG_DESTDIR-}/etc/shells" + case $2 in DEINSTALL) - if [ `id -u` -eq 0 ]; then - TMPSHELLS=`mktemp -t shells` - grep -v "^${PKG_PREFIX-/usr/local}/bin/bash\$" /etc/shells > "$TMPSHELLS" - cat "$TMPSHELLS" > /etc/shells - rm "$TMPSHELLS" - elif grep -qs "^${PKG_PREFIX-/usr/local}/bin/bash\$" /etc/shells; then - echo "Not root, please remove ${PKG_PREFIX-/usr/local}/bin/bash from /etc/shells manually" + if grep -qs "^$BASH\$" "$SHELLS"; then + if [ `id -u` -eq 0 ]; then + TMPSHELLS=`mktemp -t shells` + grep -v "^$BASH\$" "$SHELLS" > "$TMPSHELLS" + cat "$TMPSHELLS" > "$SHELLS" + rm "$TMPSHELLS" + else + echo "Not root, please remove $BASH from $SHELLS manually" + fi fi ;; esac diff --git a/shells/bash/pkg-install b/shells/bash/pkg-install index b234a4db0e0a..c84878485e07 100644 --- a/shells/bash/pkg-install +++ b/shells/bash/pkg-install @@ -3,13 +3,16 @@ # $FreeBSD$ # +BASH="${PKG_PREFIX-/usr/local}/bin/bash" +SHELLS="${PKG_DESTDIR-}/etc/shells" + case $2 in POST-INSTALL) - if ! grep -qs "^${PKG_PREFIX-/usr/local}/bin/bash\$" /etc/shells; then + if [ -d "${SHELLS%/*}" ] && ! grep -qs "^$BASH\$" "$SHELLS"; then if [ `id -u` -eq 0 ]; then - echo "${PKG_PREFIX-/usr/local}/bin/bash" >> /etc/shells + echo "$BASH" >> "$SHELLS" else - echo "Not root, please add ${PKG_PREFIX-/usr/local}/bin/bash to /etc/shells manually" + echo "Not root, please add $BASH to $SHELLS manually" fi fi ;; |