summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2014-06-05 06:30:20 +0000
committerLars Wendler <polynomial-c@gentoo.org>2014-06-05 06:30:20 +0000
commitd8846a39ad4743b4563cb4aa401b6b0094f078ad (patch)
treecb5d475c86dd745de6153a840544f115fbf232bc /app-shells
parentAdd ruby21. (diff)
downloadhistorical-d8846a39ad4743b4563cb4aa401b6b0094f078ad.tar.gz
historical-d8846a39ad4743b4563cb4aa401b6b0094f078ad.tar.bz2
historical-d8846a39ad4743b4563cb4aa401b6b0094f078ad.zip
Added upstream fix
Package-Manager: portage-2.2.10/cvs/Linux x86_64 Manifest-Sign-Key: 0x981CA6FC
Diffstat (limited to 'app-shells')
-rw-r--r--app-shells/bash/ChangeLog8
-rw-r--r--app-shells/bash/Manifest30
-rw-r--r--app-shells/bash/bash-4.3_p18-r1.ebuild234
-rw-r--r--app-shells/bash/files/bash-4.3-here-doc-ps2-comsub.patch47
4 files changed, 304 insertions, 15 deletions
diff --git a/app-shells/bash/ChangeLog b/app-shells/bash/ChangeLog
index 21ba5b4ae9b5..bba2996158ea 100644
--- a/app-shells/bash/ChangeLog
+++ b/app-shells/bash/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-shells/bash
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v 1.371 2014/05/18 10:06:59 polynomial-c Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v 1.372 2014/06/05 06:30:18 polynomial-c Exp $
+
+*bash-4.3_p18-r1 (05 Jun 2014)
+
+ 05 Jun 2014; Lars Wendler <polynomial-c@gentoo.org> +bash-4.3_p18-r1.ebuild,
+ +files/bash-4.3-here-doc-ps2-comsub.patch:
+ Added upstream fix.
*bash-4.3_p18 (18 May 2014)
diff --git a/app-shells/bash/Manifest b/app-shells/bash/Manifest
index f048460c228c..08379830588c 100644
--- a/app-shells/bash/Manifest
+++ b/app-shells/bash/Manifest
@@ -28,6 +28,7 @@ AUX bash-4.2-no-readline.patch 287 SHA256 f145706f0a83939575023929905199ac4359c9
AUX bash-4.2-parallel-build.patch 4448 SHA256 1c5f7fb5c324d6f2b786ad259cc35bfdd3fe3087e778e4a5031277b33ca097c3 SHA512 44690ed868ed95b7949b21a308f402af64d46873a8eb023f44e3f12381719e66b5c123c75d496ccb3d51b10b7102ae041dc41d55131ff9835757731afb9f7711 WHIRLPOOL 70bf422d8207f08d15cfe95daf5b6ac264bd320c7544ee626efe0afdb751ebd4c953a59e39e44af85273cbdec3ebbd060597ab9ccfcc1b5b767fde4f6afa9916
AUX bash-4.2-read-retry.patch 932 SHA256 37d60b456efd563960a9f1f3f40f0e7f6ef2f9aeb63d8dafabf13853f3d41987 SHA512 b8c9524a1385f8a66b964bc629ed62a1c825415e3388ac4204709440d3feedd5ffa92dd0fb54eab85283b0de49ce24a76836512b737612c0a4c45eb4ab40f8cb WHIRLPOOL b88a33ea5dd903f6049f79d96bd5975074e9b43bf21e5491cd8ccffc1649f4afcf48456b80bb99c3bc576c553c9bb99ca8ca831a85e936e82aef4aa39509a652
AUX bash-4.2-speed-up-read-N.patch 2858 SHA256 8547d32535ed4e2fe5cb7b3503e6044c3f5df3772079509bd02cec4177059dcf SHA512 6b7f611ac35746c5ce8caad49def25d060397d81844c0dda2ba7c73f4b0318a28b3fb89f356695c8a7799b70ab0591d9612619403b7d4ade8aba1e60a933fdae WHIRLPOOL da9647b199f090b358b8186187d9ceff6cc5dd7cb20885f7963c1a1b445bf833093c2db931763a9c05f2e4b87e9e1c201bd34a441c49a39703eca7f3c61b2d49
+AUX bash-4.3-here-doc-ps2-comsub.patch 1110 SHA256 02e0ae122479b362d90351b5b2b697744f716ece1118b40ae2b9ec6cc18e87af SHA512 bb6cc52bce73f6384eb14d4aec5f9f6b20cc8766b20c5e196a07dc4e559266d6c79813ad1b10b6a40d6f92d2201206000f219fa3e40a5b3aad7ab5161ef033d4 WHIRLPOOL 256631146c70cef00f8ab305a512f03c7288eaaef339dcb2b37ea11ae21124f17c20183683c5a02c9beaff2f37f1432439bf89edf871703743b829ef5aa5f4c2
AUX bash-4.x-deferred-heredocs.patch 1255 SHA256 845ffcd7035eef5dc029747f211a737e0260b53b16086a37fb3c8ab3609a7d36 SHA512 9016203189d0b601f0441daec19f902de7387b599a2196c475d76c596dcf9a9c22765a58e7fc5a3117522ec2722475bd166bea271ff3048f31674e8bed2901a0 WHIRLPOOL f3a2ef5245c446b7e90917e987d80efba5e6437dbe86fc27bbd7768bc5f1e5f6e7663b350ca8a81a3f21a29af6e1594c14061be0d818fce6a4a63aed7efcb6fe
AUX bash_logout 205 SHA256 15aaded954389c05d7de5d36c4887db61975ad52c87ad78baf1062ec8997289d SHA512 7234250c03fc920996a381f9daef9e2d8ab1e1a29acdebed6669d8e0fe1c872a7fa343adf7d9ddc81225b0cd9eb223ba7ad1ff42448aff057fc6d6baa8f04a7d WHIRLPOOL 16242c8796af44f550f2935b37c770c022754c63db75b57fbe49d1a313b8651235619ead571cd70ae37f890c694d1c6b2e4871ec51345743eff8649782d0523b
AUX bashrc 2870 SHA256 52715d113347ac51c63206697a48c341aceeddf7474eb6150e8fcea3f4163bdc SHA512 f841e6b3a28d78773bfc1118c6314c03bff4b0e8f5c8b334e156a299bcb64232c46c14c433b734cfbab2aa9faca8f94c2a10b76f8db8f1cdad81b35761ca5d2b WHIRLPOOL af08d0a5403bea70198d0a01443322594f36efdaec38e0183bb04a81fb5cde45ab6726720949364c8fb37f43af979cdaaf75ca184fdbfdde0f038ea13946ba24
@@ -228,23 +229,24 @@ EBUILD bash-4.0_p38.ebuild 4464 SHA256 d6aa599f3e77808c09095c892c684a5a589fa7db9
EBUILD bash-4.1_p11.ebuild 4199 SHA256 b6163a5d4aef950e3b5dad8c2590323549072b9f8819a939eda692fefccfb38c SHA512 06b47daa5e875b03408f2acc8108d52275a4e4681a0f88b9bd89ee43fb6db3d963b54086d0039c4bae90916b5b059bfdb53288877ffe3d08a0d4a91bcde634e5 WHIRLPOOL bf23eed9aba5773e423171c89ebeff05106864a4a3507ed186d1cbfd8fe982fc53e081b389937aaa7d6ee6ea54a98ecfc618a6fe67170ac9600573054bee3a8f
EBUILD bash-4.2_p45.ebuild 6525 SHA256 784442914f6f6740031598a0cf1baaec087d973e6460d76a32baa120a2794b8e SHA512 8b6c57dead7a18b429632694e5d1e35791b262cd09c3d49919287c2b07ab9e524b9a758e247a8d2706ddfae2576d19e535c9467b7ef99ed08ddb041ef60025da WHIRLPOOL 55954d5cb13b064f89305af8c5de0c7f84714afb08c0f07bf4703ef62860cf08f9e9f38ba60a4e891d5cb0f26f0e46d26e2eea553b0785bc9e82d790b6c4d111
EBUILD bash-4.2_p47.ebuild 6647 SHA256 c215fe883cd37a3aa70102401ecd2a153e8e0917b2430fecfe618ed3deef5710 SHA512 bc783f9287e7456f626e6caa55b83a50383289cca3899b8d6a0023e69e0335d498615156e997f1ce417408f7ae4cffe74e68cbcf4c1363e7c7c8df07b7f2ea74 WHIRLPOOL 848161565e680196e5e4e5b631a8a873c5425d0ed6658b9226d6b7371ce3f90f78501a6fd062894d02dc382412b53fb72ec45fea5eae4b19a9637cf2ef4a8851
+EBUILD bash-4.3_p18-r1.ebuild 6761 SHA256 bf77be9482e605a2025dc13196876247ec1b96d7b5f2693ad4fcd1362f14d688 SHA512 4ec72b7b34c49de45593738da7952b9f89b017db080d8a70c7fe1d3224148825fc4bd7c056988e3b0aeb3d5b7559cdf66bbce4b799278ca0e43ef5401a0e9c59 WHIRLPOOL 166fa8ef4cc5be2c448ffa566989e880665de9e7348946451506ed466bf35498b1b764938c9655f9ad5d0f850a85f4fdc02fc9f3872ea50a72c7a5b864435dfc
EBUILD bash-4.3_p18.ebuild 6699 SHA256 856c984d7b253bc9ae4c2924739905647cb64530ac3a7a15ff023d4e42077105 SHA512 6531978d3af96bf780d6ec183741b7c06d18e17b90fdd38700c4dfc3d5b4ed3512969cbb5a8a0e00eda21ad4f04cc99e9f46cec1de0662c7d95d82645c02ff21 WHIRLPOOL 2277b58f99b6206f27b72c295de6421ce2aa0cda77de79b509dee2a3ab3817357175616a6b2a52bdc71e8a444b7c2637f98b98c99c6adab08e8acb95dbb184c2
-MISC ChangeLog 57892 SHA256 679725b2d066ded0c44d220e71b70b99f5fd00ed1674d6664be4a94861194467 SHA512 852b679d126983f2b9c62307e067e1affcc9664366e5ce2bd6ced47a3f4139a7e2c32cde0e92ff3c44850e1b7e8b404cea4c21d8c7e1ed17f04f1b4f574a40c7 WHIRLPOOL 1db97cc2ad0f2dbd5b4ad9def91663e6e85e123ee276cb3f07c8892b15513a3c5750aee83a6a690806cae4b496023ba8bce6584199db54a368fd9c1ab5c07575
+MISC ChangeLog 58071 SHA256 2252682ca80706692983e8d578b3a0d5b9b30e8154fbb6475ccba2aae98b014b SHA512 edd88ea219f1c9c4dea223da4487ff496a0944fc512760bf204190dd8143f24fa73cf5be79c01ab54b2430f80546e1cc3da76509e1c5dcfd382c745dfd0a5835 WHIRLPOOL 65ce004fa4ca127f1069abaa2b624a5bf4a121a892ea035e0dc588b4d0118c4bac03f713f3f956a9fe13be1ae76cbbf0d424f5b672ca7e0cd8428c98b3cb5e34
MISC metadata.xml 643 SHA256 928c1ec952dec872f913d5e121725431435f651a87e48e784617c49f9dcf806a SHA512 3eb4baf0efbee2606a1e56d0359c3489887fb3f2e0dfe9ba25b6143b9d5e02b8df06a8065019201184b1fca12b8a86d781a68131810b80784c678765d55df679 WHIRLPOOL 52aeb839d294d5f43af735698afb6ee8f99e388c86260e1a1cc0d8fa57671bb8bef36f09d3f7e84cb70bc5fba0d645b427033c13b6ebbc66f5520acb1985b8b6
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
-iQIcBAEBCAAGBQJTeIZEAAoJEPiazRVxLXTFo8sP/3MC0z3NdqRKGTWo+1kYTOjZ
-RrDO9NG7SyhSKE9H3GTpNzh8e0ad1I0ULWkc3QfOjp5RwGxKjNfOlZ6UpaZjsq7x
-ujx3jy9oL2Z/1hE1W5vBl/b95bUsWFiBZ4gBR5WUTi1dRALa5+P5G6kYyrqP4jKJ
-0T7ZmWnKIbsGxJ9XhIpXw3Fcp6WjAo8psTv0IaNHLxKpNclbETmEbgik61YqwN/W
-pWyF3+c6nfBrrb4nlASjxzgBPZbLZMKQQf4sKTzxURlR9/+uPtq6OSMJj8QJ9K4I
-KK89VsTr3NTmL4UiKASyNoss+56Gf2XmnU/xyt4SU87Z0jISfoVS9Wquh0TCQVKG
-B5H525ma1IuxNqDkvz9i71ODlEauRDwHAl6TNF/FmJvF6xRUHIme8rEOE0gw4cn1
-/NRrd2TLsv7Wjn3v2F3Os99f+TiXBcpIBCDlB0jgzUB98hYkkaofHhTvBZjiT2fm
-qaCeQrjHhqZSD13aVZJWURPC8AovtrClWkmXtTq3UAoECNmI+mQuwS2UzNlHuY9w
-AsEabdFB/Z6PzdQYQmr0RJ8XIQBnlV0ZT4K/Ca4TgZa5xCCaSOTxEuYqSM48i4gr
-zYwRcQSMip2oVl+VEChCoQD0ggyJUh4QMIibOtT3fq3M662sSd825U0rmwa0slSB
-6vWgqwXD6wNSARYo5gvA
-=fbDj
+iQIcBAEBCAAGBQJTkA57AAoJEPiazRVxLXTFY7YQAIijEC1qHuZleAgRAPAvFzxJ
+5tPbAO7xu/Mk6x+VffBJivli+i+Qw2jac//VhIXrIR0sr788Yr4kLVygrmlw+mmI
+qvSfrfM/Z0bWI42bPAJxsxhdMIOByLibSX/8KFL2Dd1gw7av1S5kF61yGFzSHpVx
+zMve/XZiaus9wWCXDATNk0nEQ9Qr9jYMGPemlCDmbFD3K7FfvlK2+9wR4K7ifDho
+0yygmelPfd3s/2viwpQkXuKB7vvsXDboAxnN86DH4A3E205ubyCQAqVUPo7bIeAI
+h04zZdPk4zEZL/vpGZf94FeJCnAGjmX9991SKk8SHCrqf1MgLSsZVg/j1jdxkYCM
+msyfcKGmM9sk2p7jXN80SLxeC/BMynfj9gn9JI/kJnHGj0Vux6t8NypFmVISe/fO
+QQbP2G46JoxPysxpbuXRJgr/6U5F+Fp5p2vw7bWivDnOKl0Ky0vf2gpgm5+Xf5JK
+pFCmAGyItYUWIi73BVW2WGKoruJJbaOcg0ovRneelHaOR0d75Vctw4UJvqlAERL/
+R9tNAruTQBAXk/jfKWCJVqF+QIxBGwqfAQxmJtYjTn+DAqoMGlIicz4CH7NGNgRo
+g7chrkAv0UxvXU3PD7U1nf5/c3O6Q7ysVyFxhgU/yGywkKBwxZorQ6n7+anB/Cjr
+EoyvoCf3M5V41oPOFGUL
+=58vt
-----END PGP SIGNATURE-----
diff --git a/app-shells/bash/bash-4.3_p18-r1.ebuild b/app-shells/bash/bash-4.3_p18-r1.ebuild
new file mode 100644
index 000000000000..e34da851a4f3
--- /dev/null
+++ b/app-shells/bash/bash-4.3_p18-r1.ebuild
@@ -0,0 +1,234 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/bash-4.3_p18-r1.ebuild,v 1.1 2014/06/05 06:30:18 polynomial-c Exp $
+
+EAPI="4"
+
+inherit eutils flag-o-matic toolchain-funcs multilib
+
+# Official patchlevel
+# See ftp://ftp.cwru.edu/pub/bash/bash-4.3-patches/
+PLEVEL=${PV##*_p}
+MY_PV=${PV/_p*}
+MY_PV=${MY_PV/_/-}
+MY_P=${PN}-${MY_PV}
+[[ ${PV} != *_p* ]] && PLEVEL=0
+patches() {
+ local opt=$1 plevel=${2:-${PLEVEL}} pn=${3:-${PN}} pv=${4:-${MY_PV}}
+ [[ ${plevel} -eq 0 ]] && return 1
+ eval set -- {1..${plevel}}
+ set -- $(printf "${pn}${pv/\.}-%03d " "$@")
+ if [[ ${opt} == -s ]] ; then
+ echo "${@/#/${DISTDIR}/}"
+ else
+ local u
+ for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${pn} ; do
+ printf "${u}/${pn}-${pv}-patches/%s " "$@"
+ done
+ fi
+}
+
+# The version of readline this bash normally ships with.
+READLINE_VER="6.3"
+
+DESCRIPTION="The standard GNU Bourne again shell"
+HOMEPAGE="http://tiswww.case.edu/php/chet/bash/bashtop.html"
+SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)"
+[[ ${PV} == *_rc* ]] && SRC_URI+=" ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="afs bashlogger examples mem-scramble +net nls plugins +readline vanilla"
+
+DEPEND=">=sys-libs/ncurses-5.2-r2
+ readline? ( >=sys-libs/readline-${READLINE_VER} )
+ nls? ( virtual/libintl )"
+RDEPEND="${DEPEND}
+ !<sys-apps/portage-2.1.6.7_p1
+ !<sys-apps/paludis-0.26.0_alpha5"
+# we only need yacc when the .y files get patched (bash42-005)
+DEPEND+=" virtual/yacc"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ if is-flag -malign-double ; then #7332
+ eerror "Detected bad CFLAGS '-malign-double'. Do not use this"
+ eerror "as it breaks LFS (struct stat64) on x86."
+ die "remove -malign-double from your CFLAGS mr ricer"
+ fi
+ if use bashlogger ; then
+ ewarn "The logging patch should ONLY be used in restricted (i.e. honeypot) envs."
+ ewarn "This will log ALL output you enter into the shell, you have been warned."
+ fi
+}
+
+src_unpack() {
+ unpack ${MY_P}.tar.gz
+}
+
+src_prepare() {
+ # Include official patches
+ [[ ${PLEVEL} -gt 0 ]] && epatch $(patches -s)
+
+ # Clean out local libs so we know we use system ones w/releases.
+ if [[ ${PV} != *_rc* ]] ; then
+ rm -rf lib/{readline,termcap}/*
+ touch lib/{readline,termcap}/Makefile.in # for config.status
+ sed -ri -e 's:\$[(](RL|HIST)_LIBSRC[)]/[[:alpha:]]*.h::g' Makefile.in || die
+ fi
+
+ # Avoid regenerating docs after patches #407985
+ sed -i -r '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in || die
+ touch -r . doc/*
+
+ epatch "${FILESDIR}"/${PN}-4.3-here-doc-ps2-comsub.patch
+
+ epatch_user
+}
+
+src_configure() {
+ local myconf=()
+
+ # For descriptions of these, see config-top.h
+ # bashrc/#26952 bash_logout/#90488 ssh/#24762
+ append-cppflags \
+ -DDEFAULT_PATH_VALUE=\'\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\"\' \
+ -DSTANDARD_UTILS_PATH=\'\"/bin:/usr/bin:/sbin:/usr/sbin\"\' \
+ -DSYS_BASHRC=\'\"/etc/bash/bashrc\"\' \
+ -DSYS_BASH_LOGOUT=\'\"/etc/bash/bash_logout\"\' \
+ -DNON_INTERACTIVE_LOGIN_SHELLS \
+ -DSSH_SOURCE_BASHRC \
+ $(use bashlogger && echo -DSYSLOG_HISTORY)
+
+ # Don't even think about building this statically without
+ # reading Bug 7714 first. If you still build it statically,
+ # don't come crying to us with bugs ;).
+ #use static && export LDFLAGS="${LDFLAGS} -static"
+ use nls || myconf+=( --disable-nls )
+
+ # Historically, we always used the builtin readline, but since
+ # our handling of SONAME upgrades has gotten much more stable
+ # in the PM (and the readline ebuild itself preserves the old
+ # libs during upgrades), linking against the system copy should
+ # be safe.
+ # Exact cached version here doesn't really matter as long as it
+ # is at least what's in the DEPEND up above.
+ export ac_cv_rl_version=${READLINE_VER}
+
+ # Force linking with system curses ... the bundled termcap lib
+ # sucks bad compared to ncurses. For the most part, ncurses
+ # is here because readline needs it. But bash itself calls
+ # ncurses in one or two small places :(.
+
+ if [[ ${PV} != *_rc* ]] ; then
+ # Use system readline only with released versions.
+ myconf+=( --with-installed-readline=. )
+ fi
+
+ use plugins && append-ldflags -Wl,-rpath,/usr/$(get_libdir)/bash
+ tc-export AR #444070
+ econf \
+ --docdir='$(datarootdir)'/doc/${PF} \
+ --htmldir='$(docdir)/html' \
+ --with-curses \
+ $(use_with afs) \
+ $(use_enable net net-redirections) \
+ --disable-profiling \
+ $(use_enable mem-scramble) \
+ $(use_with mem-scramble bash-malloc) \
+ $(use_enable readline) \
+ $(use_enable readline history) \
+ $(use_enable readline bang-history) \
+ "${myconf[@]}"
+}
+
+src_compile() {
+ emake
+
+ if use plugins ; then
+ emake -C examples/loadables all others
+ fi
+}
+
+src_install() {
+ local d f
+
+ default
+
+ dodir /bin
+ mv "${ED}"/usr/bin/bash "${ED}"/bin/ || die
+ dosym bash /bin/rbash
+
+ insinto /etc/bash
+ doins "${FILESDIR}"/{bashrc,bash_logout}
+ insinto /etc/skel
+ for f in bash{_logout,_profile,rc} ; do
+ newins "${FILESDIR}"/dot-${f} .${f}
+ done
+
+ local sed_args=(
+ -e "s:#${USERLAND}#@::"
+ -e '/#@/d'
+ )
+ if ! use readline ; then
+ sed_args+=( #432338
+ -e '/^shopt -s histappend/s:^:#:'
+ -e 's:use_color=true:use_color=false:'
+ )
+ fi
+ sed -i \
+ "${sed_args[@]}" \
+ "${ED}"/etc/skel/.bashrc \
+ "${ED}"/etc/bash/bashrc || die
+
+ if use plugins ; then
+ exeinto /usr/$(get_libdir)/bash
+ doexe $(echo examples/loadables/*.o | sed 's:\.o::g')
+ insinto /usr/include/bash-plugins
+ doins *.h builtins/*.h examples/loadables/*.h include/*.h \
+ lib/{glob/glob.h,tilde/tilde.h}
+ fi
+
+ if use examples ; then
+ for d in examples/{functions,misc,scripts,scripts.noah,scripts.v2} ; do
+ exeinto /usr/share/doc/${PF}/${d}
+ insinto /usr/share/doc/${PF}/${d}
+ for f in ${d}/* ; do
+ if [[ ${f##*/} != PERMISSION ]] && [[ ${f##*/} != *README ]] ; then
+ doexe ${f}
+ else
+ doins ${f}
+ fi
+ done
+ done
+ fi
+
+ doman doc/*.1
+ newdoc CWRU/changelog ChangeLog
+ dosym bash.info /usr/share/info/bashref.info
+}
+
+pkg_preinst() {
+ if [[ -e ${EROOT}/etc/bashrc ]] && [[ ! -d ${EROOT}/etc/bash ]] ; then
+ mkdir -p "${EROOT}"/etc/bash
+ mv -f "${EROOT}"/etc/bashrc "${EROOT}"/etc/bash/
+ fi
+
+ if [[ -L ${EROOT}/bin/sh ]] ; then
+ # rewrite the symlink to ensure that its mtime changes. having /bin/sh
+ # missing even temporarily causes a fatal error with paludis.
+ local target=$(readlink "${EROOT}"/bin/sh)
+ local tmp=$(emktemp "${EROOT}"/bin)
+ ln -sf "${target}" "${tmp}"
+ mv -f "${tmp}" "${EROOT}"/bin/sh
+ fi
+}
+
+pkg_postinst() {
+ # If /bin/sh does not exist, provide it
+ if [[ ! -e ${EROOT}/bin/sh ]] ; then
+ ln -sf bash "${EROOT}"/bin/sh
+ fi
+}
diff --git a/app-shells/bash/files/bash-4.3-here-doc-ps2-comsub.patch b/app-shells/bash/files/bash-4.3-here-doc-ps2-comsub.patch
new file mode 100644
index 000000000000..0ccfd20117b0
--- /dev/null
+++ b/app-shells/bash/files/bash-4.3-here-doc-ps2-comsub.patch
@@ -0,0 +1,47 @@
+*** ../bash-4.3-patched/shell.h 2012-12-25 21:11:01.000000000 -0500
+--- shell.h 2014-06-03 09:24:28.000000000 -0400
+***************
+*** 169,173 ****
+ int expand_aliases;
+ int echo_input_at_read;
+!
+ } sh_parser_state_t;
+
+--- 169,174 ----
+ int expand_aliases;
+ int echo_input_at_read;
+! int need_here_doc;
+!
+ } sh_parser_state_t;
+
+*** ../bash-4.3-patched/parse.y 2014-05-14 09:16:40.000000000 -0400
+--- parse.y 2014-04-30 09:27:59.000000000 -0400
+***************
+*** 2643,2647 ****
+
+ r = 0;
+! while (need_here_doc)
+ {
+ parser_state |= PST_HEREDOC;
+--- 2643,2647 ----
+
+ r = 0;
+! while (need_here_doc > 0)
+ {
+ parser_state |= PST_HEREDOC;
+***************
+*** 6076,6079 ****
+--- 6076,6080 ----
+ ps->expand_aliases = expand_aliases;
+ ps->echo_input_at_read = echo_input_at_read;
++ ps->need_here_doc = need_here_doc;
+
+ ps->token = token;
+***************
+*** 6124,6127 ****
+--- 6125,6129 ----
+ expand_aliases = ps->expand_aliases;
+ echo_input_at_read = ps->echo_input_at_read;
++ need_here_doc = ps->need_here_doc;
+
+ FREE (token);