aboutsummaryrefslogtreecommitdiffstats
path: root/shells
diff options
context:
space:
mode:
authoreik <eik@FreeBSD.org>2004-10-09 18:16:33 +0800
committereik <eik@FreeBSD.org>2004-10-09 18:16:33 +0800
commit1d7281f7a1f6ed33d3665fc3b662fd0ea695b5f0 (patch)
tree6ad145ab4cd1b552938eafcbfc92a7b4645075a1 /shells
parent5ead3ea08c4e3c104e61010b10fbfbf07e9a9640 (diff)
downloadfreebsd-ports-gnome-1d7281f7a1f6ed33d3665fc3b662fd0ea695b5f0.tar.gz
freebsd-ports-gnome-1d7281f7a1f6ed33d3665fc3b662fd0ea695b5f0.tar.zst
freebsd-ports-gnome-1d7281f7a1f6ed33d3665fc3b662fd0ea695b5f0.zip
Fix process substitution on systems without fdescfs (FreeBSD 5.x, 6.x)
While I'm here, use the official patchset instead of the custom ones and reflect the port revision in the version number. Submitted by: Reinhard Speyerer <rspmn@arcor.de> Approved by: portmgr (krion)
Diffstat (limited to 'shells')
-rw-r--r--shells/bash/Makefile11
-rw-r--r--shells/bash/distinfo26
-rw-r--r--shells/bash/files/patch-arrayfunc.c16
-rw-r--r--shells/bash/files/patch-braces.c14
-rw-r--r--shells/bash/files/patch-configure23
-rw-r--r--shells/bash/files/patch-jobs.c21
-rw-r--r--shells/bash/files/patch-lib::readline::display.c23
-rw-r--r--shells/bash/files/patch-subst.c24
-rw-r--r--shells/bash/files/patch-variables.c19
9 files changed, 79 insertions, 98 deletions
diff --git a/shells/bash/Makefile b/shells/bash/Makefile
index 63b7619a537b..c9a8999410d9 100644
--- a/shells/bash/Makefile
+++ b/shells/bash/Makefile
@@ -7,7 +7,7 @@
PORTNAME= bash
PORTVERSION= 3.0
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= shells
MASTER_SITES= ${MASTER_SITE_GNU:S/$/:bash/} \
http://cnswww.cns.cwru.edu/~chet/%SUBDIR%/:faq \
@@ -17,6 +17,12 @@ 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
+.for patch in 01 02 03 04 05 06 07 08 09 10 11 12 13
+PATCHFILES+= ${PORTNAME}${PORTVERSION:S/.//g}-0${patch}:bash
+.endfor
+
MAINTAINER= eik@FreeBSD.org
COMMENT= The GNU Project's Bourne Again SHell
@@ -72,6 +78,9 @@ CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" \
post-patch:
@${REINPLACE_CMD} -e "s| /bin| ${PREFIX}/bin|g" ${WRKSRC}/doc/bash.1
+pre-build:
+ @${ECHO_CMD} $$((${PORTREVISION}-1)) > ${WRKSRC}/.build
+
pre-install:
@${SETENV} PKG_PREFIX="${PREFIX}" PKG_DESTDIR="${DESTDIR}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL; \
diff --git a/shells/bash/distinfo b/shells/bash/distinfo
index 6a0e67fa20c2..12a751b3f1d5 100644
--- a/shells/bash/distinfo
+++ b/shells/bash/distinfo
@@ -1,3 +1,29 @@
MD5 (bash/bash-3.0.tar.gz) = 26c4d642e29b3533d8d754995bc277b3
SIZE (bash/bash-3.0.tar.gz) = 2418293
+MD5 (bash/bash30-001) = 24a83f78a44a6029024371f02da174dd
+SIZE (bash/bash30-001) = 4999
+MD5 (bash/bash30-002) = 6f4cf2aa975a1fcc0cb43a406bd47ca5
+SIZE (bash/bash30-002) = 2119
+MD5 (bash/bash30-003) = c8bf41e78cda16d391b9099eeba01386
+SIZE (bash/bash30-003) = 4669
+MD5 (bash/bash30-004) = c069dffbb3f442aac3660b883ddd97f5
+SIZE (bash/bash30-004) = 3372
+MD5 (bash/bash30-005) = ad06309c623ff8e1b9f039d3b7eb97c2
+SIZE (bash/bash30-005) = 1776
+MD5 (bash/bash30-006) = f162bf93a76759bab37b29509a4a6e20
+SIZE (bash/bash30-006) = 4258
+MD5 (bash/bash30-007) = 89903d92ca620921aecb3f1f30c05ebe
+SIZE (bash/bash30-007) = 1808
+MD5 (bash/bash30-008) = 9a295c02f46bc867fc096862c7380a88
+SIZE (bash/bash30-008) = 1220
+MD5 (bash/bash30-009) = 786c7e2af1dca5104af92bbdc60f7474
+SIZE (bash/bash30-009) = 2828
+MD5 (bash/bash30-010) = f2d90d06ed445a285c8406016e9d9c13
+SIZE (bash/bash30-010) = 3193
+MD5 (bash/bash30-011) = 9506c56968c58332489986633319a186
+SIZE (bash/bash30-011) = 2635
+MD5 (bash/bash30-012) = 2753d4de0b57fc8890488463c5e86d3f
+SIZE (bash/bash30-012) = 1395
+MD5 (bash/bash30-013) = 5de5be8289764c11a3206b06351d81a6
+SIZE (bash/bash30-013) = 1963
MD5 (bash/FAQ) = IGNORE
diff --git a/shells/bash/files/patch-arrayfunc.c b/shells/bash/files/patch-arrayfunc.c
deleted file mode 100644
index fbccb3cfc528..000000000000
--- a/shells/bash/files/patch-arrayfunc.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#
-# Fix segfault when accessing an unset array
-#
-# http://lists.gnu.org/archive/html/bug-bash/2004-08/msg00026.html
-#
---- arrayfunc.c.orig Fri Dec 19 00:03:09 2003
-+++ arrayfunc.c Sun Aug 1 20:43:00 2004
-@@ -611,7 +611,7 @@
- var = find_variable (t);
-
- free (t);
-- return var;
-+ return (var == 0 || invisible_p (var)) ? (SHELL_VAR *)0 : var;
- }
-
- /* Return a string containing the elements in the array and subscript
diff --git a/shells/bash/files/patch-braces.c b/shells/bash/files/patch-braces.c
index 591d58ef3888..49cf804cc39f 100644
--- a/shells/bash/files/patch-braces.c
+++ b/shells/bash/files/patch-braces.c
@@ -1,15 +1,17 @@
#
-# Fix nested brace vs. variable expansion
+# Fix brace expansion following quoted text
#
-# http://lists.gnu.org/archive/html/bug-bash/2004-08/msg00056.html
+# http://lists.gnu.org/archive/html/bug-bash/2004-09/msg00255.html
#
---- braces.c.orig Tue Aug 04 14:32:33 2004
-+++ braces.c Tue Aug 04 15:15:36 2004
-@@ -402,6 +402,7 @@
+--- braces.c.orig Wed Sep 8 11:07:53 2004
++++ braces.c Fri Sep 17 18:42:36 2004
+@@ -402,7 +402,8 @@
{
pass_next = 1;
i++;
-+ level++;
+- level++;
++ if (quoted == 0)
++ level++;
continue;
}
#endif
diff --git a/shells/bash/files/patch-configure b/shells/bash/files/patch-configure
new file mode 100644
index 000000000000..3941f575db2a
--- /dev/null
+++ b/shells/bash/files/patch-configure
@@ -0,0 +1,23 @@
+#
+# Fix process substitution on FreeBSD systems without fdescfs
+#
+# http://lists.gnu.org/archive/html/bug-bash/2004-10/msg00089.html
+#
+--- configure.orig Fri Oct 8 12:46:28 2004
++++ configure Fri Oct 8 12:48:44 2004
+@@ -23803,7 +23803,14 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ if test -d /dev/fd && test -r /dev/fd/0 < /dev/null; then
+- bash_cv_dev_fd=standard
++# check for systems like FreeBSD 5 that only provide /dev/fd/[012]
++ exec 3<&0
++ if test -r /dev/fd/3; then
++ bash_cv_dev_fd=standard
++ else
++ bash_cv_dev_fd=absent
++ fi
++ exec 3<&-
+ elif test -d /proc/self/fd && test -r /proc/self/fd/0 < /dev/null; then
+ bash_cv_dev_fd=whacky
+ else
diff --git a/shells/bash/files/patch-jobs.c b/shells/bash/files/patch-jobs.c
deleted file mode 100644
index 4e5db16b983a..000000000000
--- a/shells/bash/files/patch-jobs.c
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# Fix pipefail option
-#
-# http://lists.gnu.org/archive/html/bug-bash/2004-08/msg00215.html
-#
---- jobs.c.orig Fri Apr 23 21:28:25 2004
-+++ jobs.c Wed Aug 18 14:32:19 2004
-@@ -1778,8 +1778,11 @@
- if (pipefail_opt)
- {
- fail = 0;
-- for (p = jobs[job]->pipe; p->next != jobs[job]->pipe; p = p->next)
-- if (p->status != EXECUTION_SUCCESS) fail = p->status;
-+ p = jobs[job]->pipe;
-+ do {
-+ if (p->status != EXECUTION_SUCCESS) fail = p->status;
-+ p=p->next;
-+ } while(p!=jobs[job]->pipe);
- return fail;
- }
-
diff --git a/shells/bash/files/patch-lib::readline::display.c b/shells/bash/files/patch-lib::readline::display.c
deleted file mode 100644
index 578c5c166fd8..000000000000
--- a/shells/bash/files/patch-lib::readline::display.c
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# Fix line wraps
-# http://lists.gnu.org/archive/html/bug-bash/2004-08/msg00325.html
-#
---- lib/readline/display.c.orig Wed Sep 1 18:28:21 2004
-+++ lib/readline/display.c Wed Sep 1 18:29:18 2004
-@@ -351,14 +351,14 @@
- local_prompt = expand_prompt (p, &prompt_visible_length,
- &prompt_last_invisible,
- (int *)NULL,
-- (int *)NULL);
-+ &prompt_physical_chars);
- c = *t; *t = '\0';
- /* The portion of the prompt string up to and including the
- final newline is now null-terminated. */
- local_prompt_prefix = expand_prompt (prompt, &prompt_prefix_length,
- (int *)NULL,
- &prompt_invis_chars_first_line,
-- &prompt_physical_chars);
-+ (int *)NULL);
- *t = c;
- return (prompt_prefix_length);
- }
diff --git a/shells/bash/files/patch-subst.c b/shells/bash/files/patch-subst.c
index d7687e24301a..b55b2f5fa123 100644
--- a/shells/bash/files/patch-subst.c
+++ b/shells/bash/files/patch-subst.c
@@ -1,16 +1,16 @@
#
# Fix broken array expansion
#
-# http://lists.gnu.org/archive/html/bug-bash/2004-08/msg00192.html
+# http://lists.gnu.org/archive/html/bug-bash/2004-09/msg00097.html
#
---- subst.c.orig Sun Jul 4 13:56:13 2004
-+++ subst.c Thu Aug 12 13:36:17 2004
-@@ -4891,7 +4891,7 @@
- if (*e1p < 0) /* negative offsets count from end */
- *e1p += len;
-
-- if (*e1p >= len || *e1p < 0)
-+ if (*e1p > len || *e1p < 0)
- return (-1);
-
- #if defined (ARRAY_VARS)
+--- subst.c.orig Thu Aug 12 13:36:17 2004
++++ subst.c Thu Sep 9 11:54:22 2004
+@@ -4900,7 +4900,7 @@
+ case VT_ARRAYVAR:
+ a = (ARRAY *)value;
+ /* For arrays, the first value deals with array indices. */
+- len = array_max_index (a); /* arrays index from 0 to n - 1 */
++ len = array_max_index (a) + 1; /* arrays index from 0 to n - 1 */
+ break;
+ #endif
+ }
diff --git a/shells/bash/files/patch-variables.c b/shells/bash/files/patch-variables.c
deleted file mode 100644
index ac4bb07c3e37..000000000000
--- a/shells/bash/files/patch-variables.c
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Fix segmentation fault in unset typeset array variable
-#
-# http://lists.gnu.org/archive/html/bug-bash/2004-08/msg00190.html
-#
---- variables.c.orig Sun Jul 4 13:57:26 2004
-+++ variables.c Wed Aug 4 15:28:04 2004
-@@ -1599,7 +1599,10 @@
- /* local foo; local foo; is a no-op. */
- old_var = find_variable (name);
- if (old_var && local_p (old_var) && old_var->context == variable_context)
-- return (old_var);
-+ {
-+ VUNSETATTR (old_var, att_invisible);
-+ return (old_var);
-+ }
-
- was_tmpvar = old_var && tempvar_p (old_var);
- if (was_tmpvar)