summaryrefslogtreecommitdiff
path: root/app-shells/bash
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-12-13 21:28:20 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-12-13 21:28:20 +0000
commitb9d995791a762215ef1ced2cc1a47b8d3c2cff1a (patch)
treeceff6a3b47b9258682735a5595c9ee8a0427a445 /app-shells/bash
parent50098d976449286058396cebad0087e28f771b90 (diff)
gentoo auto-resync : 13:12:2022 - 21:28:20
Diffstat (limited to 'app-shells/bash')
-rw-r--r--app-shells/bash/Manifest13
-rw-r--r--app-shells/bash/bash-5.1_p16-r2.ebuild5
-rw-r--r--app-shells/bash/bash-5.2_p12.ebuild5
-rw-r--r--app-shells/bash/bash-5.2_p15.ebuild349
-rw-r--r--app-shells/bash/bash-9999.ebuild5
5 files changed, 374 insertions, 3 deletions
diff --git a/app-shells/bash/Manifest b/app-shells/bash/Manifest
index aea79da1ce0f..8a46eca8f126 100644
--- a/app-shells/bash/Manifest
+++ b/app-shells/bash/Manifest
@@ -403,6 +403,12 @@ DIST bash52-011 1229 BLAKE2B e1b246634ee7b1bba7e4b140bc730fa6770f5988ed215ea1ba6
DIST bash52-011.sig 95 BLAKE2B e74cee94ba4f5a1e094b026a5fde7d10a1d9280302694476cc701c79cb1915bec2eabc937f5f44ab393e427dd12c900609e35469514121b006f5efce92acaf29 SHA512 15ca053df8c1e87c1724379984ef93d509602f38fc0ce272a2fb1375e07d68299add46605c2c0fb0053eb449cc588cf063bd7a889eec77d4d55f18d3290359ed
DIST bash52-012 9107 BLAKE2B b7c4888a3af4e9ee37f3d83d15bad1360209eb412ba1e963c4be90b0b1d62e0c860f61f5cf7de3b7b1a34d341101069ffa5a65efc7dc5857dac296444321b9d2 SHA512 8f969cb36ee81ac47a4c3c6ee7fbe62159192fa4f14cb48973eccd55c458e6a093adc3045ee1c379544d8183d77813977a43cad5d225322d8816540a1cb8893b
DIST bash52-012.sig 95 BLAKE2B e4c1867b22814335c9cf233e6240578e181ae9f515e83a652b00b325efc314af463ed019f6f2c692d981a4ef6e70610ae69a16c880e29b44d11c332277f466e6 SHA512 22793024cc8a3c67c03a7e82d910c005e0cbfc657196427cdaaa25158c89c580e5cf2153f62d5bb2083ad5a88715724b79d9d922524c39b82c217824b5609a97
+DIST bash52-013 1503 BLAKE2B a8c5a2d526a049b36677a485d8e12a6ccbabc6118ba760e2e08785650b89ae13b155242c7c5f557fb229ffcdea6ff6d5b0de1d0c66b7f2a1711bee7d01a4b663 SHA512 5aaa82d88ec98382e241cbf1a4356a9e69888432301f1c974038b59fd8be08ad2a52b782f51ac673bad72bc4e07d1eb45b926595ebe6d53223dcb7f15f3883a7
+DIST bash52-013.sig 95 BLAKE2B 93c7fd31b79a89c97f5b37012298f4d36d665d534f8be1a67a71d6c65540a2485821ec0524e6daa3cc845f28c5a9aedab235c8d3670cfddb35d98d61d86a2fa7 SHA512 2d103c299e3bf17bb559d4372e537c5ccf162b4e225fb8c52d27f8e7f64ee5cd884141d849c8728b7c0cb58a2dd56b62d2c2f69795b3b8aecf99ade82c1eb1c4
+DIST bash52-014 3245 BLAKE2B 990e6566c446ce030d1333a05de9027a994054e983bf414e9aa09505c94d0615f1726494e139320b0d1c923c680565b2cf4249bd062e9e8aa98b226386c03c26 SHA512 5b6e846b30691e398ee5628226278ffd9def64ef1edd8d77dd4bd681405c339fce39f820837cf8e09c0478b39ecb3a8db01c3e0afb88bdecb7bf362d797e4884
+DIST bash52-014.sig 95 BLAKE2B 2206483fd1b356099bab6fb7793d21dbd5b2adcbe2b108c69c5d7ccd6a13f934c69adcecd5f3fb1783b380c91c362609a175c4b95f25ac9996bbfad0147f250d SHA512 e7404ca3ff8bac3cb0dc7edd0bfc79dddd07734474c8d99a4dfffae87645653f05a26911e5f1e4670d80472423c84b42f86c84835ca310c083bcf16cdf860dd2
+DIST bash52-015 8088 BLAKE2B 038f03bc543297a3f2e7612afdee7b27eb5d65d7f81c22976936211f4a80acd9f0faf1ba6c56e20fc653b877a448ab7872b5488da3684952682d80c752227ab2 SHA512 eb1bd6b3bf8811d765f222cd48360eb7f3f0aaa4f29f1b6c1f17635b819e5e4734ec4e7fcfde551fd7a6299a7d67869ea0bc5cc86cc523bc4a64d30e433df493
+DIST bash52-015.sig 95 BLAKE2B b32afb78e24554ccc73f95883e1c78cdee222e589634ecca947b00ce163596373de6179f7c6e6bccbb9ab846c9ff3c8ee04723f23b1a641c908f535c01cbea2c SHA512 047d84c9e1bc996acfb735667409a7285d025fc8c63b9c7da86ace9e6be133d58bd66bf8bf918b81d27aaebc5795419604418d2ddb0ee11b675f283b634f441f
EBUILD bash-2.05b_p13.ebuild 5246 BLAKE2B a428bfdebf5a98f8a45f2fb6127a132708ec0efc5bbd9cf6fa5c7bb70e565ae12e6b61248c80fda686da3706f957216aff2b5870ca13e1a0a86edfcf50648049 SHA512 72002267b10db0258c1912d5b665d4ca41054210197b4617822a4888ac7a2ff66a0a0354456a947333df5000272a54f70f75ccbcd24e137efe0a0058a4055f25
EBUILD bash-3.0_p22.ebuild 5384 BLAKE2B a011f5d6d7c8428ffaabfff4f4ced9908876fb3cd198c4f72c2be7fb6b9c8cae37c333c6ad31e8506694c2945e83d0fe8fd6b8bd172f4c6092f74354b9e5fb65 SHA512 e56eedddbbe76d0c96fbbc8b6b1f95c183b1b3fe45fb32ea5ded646cfaff7ab14af4813cfb7ad20a6ce81b75118055aa606bba665e88d4dab55cec7ec6e5acdd
EBUILD bash-3.1_p23.ebuild 5061 BLAKE2B 30640571e07e149a1a087c139c9f891922e9660a23033fdec6be3258a47812ef3280d72f68ec4521b2b6cb0c136cfce515f40c6ca1f2fafdac1205c7b8ac4067 SHA512 1137f8f69407ce2829681e932a534daff6a2f64c9b79c39e49766223719dae21503467e726dcaab729c10be9b887a947dda2d78d9f958b170168e2bcc2bfef5d
@@ -413,7 +419,8 @@ EBUILD bash-4.2_p53.ebuild 4867 BLAKE2B 33051fdd9ab2704b6b8bba9789c7106f26b2a95f
EBUILD bash-4.3_p48-r2.ebuild 6044 BLAKE2B 28a6553e7a0ee09d4f6cc5e34d15d7999c9e746133cb58272e985019aebb85d1da2aeff7b3c24ea4ad8b9f1a0cd103c20f85bb17411ea3f237d225cdcdccdf1c SHA512 6f7280bcabdf492e765d74ec37554d3076602a5f988cdb30f0a2e0d9ed239447ae1edc7b2a3eb2af6640b5d68f142a5348d820e8f7bafdafadd99666acccc7ce
EBUILD bash-4.4_p23-r2.ebuild 6099 BLAKE2B 42d29d2ac77fde9d8be95c5dcaf93cb75dcd06a16ecba570f4287289691401dc64787544f9024e889d98295113d8c5375add1e9e162b680d5a2a2ce91d778780 SHA512 c61d20ba072d05321a4b46611aeee44651f3ce38ac37a802985efc29312b3d7bb9ae4940b956810e28d1176d61d7ed4cd7d76d79eb4bcd364662d6257c92f4bb
EBUILD bash-5.0_p18.ebuild 7432 BLAKE2B f5a4fbca470b8a4f797bbca750a0a426e4827450383c7b96565488afa0ec730962fd66e9ee7ee904f7dd25215f3dbddc514fec4c8b68d098791a2d3586024cfa SHA512 acfc884858000d0e3299384a147367903402858bc403d8b872036a774efecec86be3646e5fc7c688ecdcd40fb30685f21c2497f0a2d5fc344974cb4d8ba069cf
-EBUILD bash-5.1_p16-r2.ebuild 8235 BLAKE2B c40bf132845fc2a59173aa27fd4663a5bf61b5e9c3d94880488d9be4d1456cf1ff3b73fc544d7e46e001ca08ecf08a2f5be692c846d129f48ce88861e596a528 SHA512 00cea24dc2fc180a59a14c4cb3c5465c5238f14e18d373b4619ba5aba9742cf5570a9e1a5eee5489e53d084012e0fbf01806cfdaccb4f53c3d57ec1a104cf56e
-EBUILD bash-5.2_p12.ebuild 9353 BLAKE2B 5691d2750ff29e96e9e38e6a0a41dd9d1d84706bdc9064f7a75b5457c8c591f11391648a05931f6580876d3e246b472ffd78a591324ac2c17245c2111cb69f5e SHA512 31a46145897c77c2b258c3247a23bf4274c75985c2f7037ca9eb998c26e457543b146e596c872c3be5f26c2fbdaf5d1641728cdff34e82b30c9624a853eddbd8
-EBUILD bash-9999.ebuild 9359 BLAKE2B 331528d58e1e89981ec5488461ef6c80bc27537448670d2a1bec951c696cbf747c41a15d2dfeb099312e004800b36522ded03c87afae291d5da2501f96c4affe SHA512 b61aa743622a50e083ed34a36d372248f1d8c8c9071b69c2230d4c673e0c0ceca04ae87ebf7f2d21da032ef1439cafeb119c49dbdbc9e0f59a800ce26649a644
+EBUILD bash-5.1_p16-r2.ebuild 8346 BLAKE2B 9628b78569121dea18801eaee0ff4ee7b33ac846dee3fb271a9b14fcf8c874c29b9713d332a4899cbfc046b6696eb951f58f630c8bf625a9147efafbd0aea8ed SHA512 63e3237dd66e7b926d740b8f4691453dcedafa4584dfe8ee434b7eda3000ef53e1f0e3c6df0e7d51d45136710bf6b1c13a4db125fe629d0c45deabfacd89c28e
+EBUILD bash-5.2_p12.ebuild 9464 BLAKE2B dbea57299405a1642363633f8501e49739129e59efcf8bbb4e719b9e5202b5c053daea018ae6a080c5b1d9cdcc855fd1c2bf0a70d164805739f2434d91b13e11 SHA512 87ad855930e6f9f091a72cf3d090af56af96ee9c7ad984f23166fb2b70f780edbea0a1cfec04d8ace7a242117e840724348eb1615ee1b79dab225da2dc8842a9
+EBUILD bash-5.2_p15.ebuild 9464 BLAKE2B dbea57299405a1642363633f8501e49739129e59efcf8bbb4e719b9e5202b5c053daea018ae6a080c5b1d9cdcc855fd1c2bf0a70d164805739f2434d91b13e11 SHA512 87ad855930e6f9f091a72cf3d090af56af96ee9c7ad984f23166fb2b70f780edbea0a1cfec04d8ace7a242117e840724348eb1615ee1b79dab225da2dc8842a9
+EBUILD bash-9999.ebuild 9470 BLAKE2B f4f65cc2f09372639f7e426807335b1fcba17f64efab9f4c57a112d41a80003849803c9528295588eeb5265e03455f63141352f1d0e4883794b76e38bc0e1fff SHA512 a145ef41a94762f145a5a48dad697d310b8d090efacc6ef3d8af2c974fffa4e535fa113275181b2e0e01ae54a0e2fd5fda66a458d1285cbff27740609da7a711
MISC metadata.xml 1009 BLAKE2B f71587b0a6d05b907f82b26be93b071290d91dc8f612f7b008a05eaa94d45be2ef8c1d992b7ac886648a9dcf964c30e8d9a7aff90d44835beb452e0d635b9533 SHA512 8aa1cb4c3206a76d10181394a91c315967fd9d3b359194f430f075fdd5a0b4b32149eec36b85412ef7e84b55e7b01955c75486b2df82b392a5acb3df8229a88d
diff --git a/app-shells/bash/bash-5.1_p16-r2.ebuild b/app-shells/bash/bash-5.1_p16-r2.ebuild
index eda4291bf8b7..795a74626b61 100644
--- a/app-shells/bash/bash-5.1_p16-r2.ebuild
+++ b/app-shells/bash/bash-5.1_p16-r2.ebuild
@@ -115,6 +115,11 @@ src_unpack() {
else
if use verify-sig ; then
verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.gz{,.sig}
+
+ local patch
+ for patch in "${MY_PATCHES[@]}" ; do
+ verify-sig_verify_detached ${patch}{,.sig}
+ done
fi
unpack ${MY_P}.tar.gz
diff --git a/app-shells/bash/bash-5.2_p12.ebuild b/app-shells/bash/bash-5.2_p12.ebuild
index 96a742ef63a7..3aa6795a6431 100644
--- a/app-shells/bash/bash-5.2_p12.ebuild
+++ b/app-shells/bash/bash-5.2_p12.ebuild
@@ -130,6 +130,11 @@ src_unpack() {
else
if use verify-sig ; then
verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.gz{,.sig}
+
+ local patch
+ for patch in "${MY_PATCHES[@]}" ; do
+ verify-sig_verify_detached ${patch}{,.sig}
+ done
fi
unpack ${MY_P}.tar.gz
diff --git a/app-shells/bash/bash-5.2_p15.ebuild b/app-shells/bash/bash-5.2_p15.ebuild
new file mode 100644
index 000000000000..3aa6795a6431
--- /dev/null
+++ b/app-shells/bash/bash-5.2_p15.ebuild
@@ -0,0 +1,349 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/chetramey.asc
+inherit flag-o-matic toolchain-funcs prefix verify-sig
+
+# Uncomment if we have a patchset
+#GENTOO_PATCH_DEV="sam"
+#GENTOO_PATCH_VER="${PV}"
+
+# Official patchlevel
+# See ftp://ftp.cwru.edu/pub/bash/bash-5.1-patches/
+PLEVEL="${PV##*_p}"
+MY_PV="${PV/_p*}"
+MY_PV="${MY_PV/_/-}"
+MY_P="${PN}-${MY_PV}"
+MY_PATCHES=()
+
+is_release() {
+ case ${PV} in
+ 9999|*_alpha*|*_beta*|*_rc*)
+ return 1
+ ;;
+ *)
+ return 0
+ ;;
+ esac
+}
+
+[[ ${PV} != *_p* ]] && PLEVEL=0
+
+# The version of readline this bash normally ships with.
+# Note: right now, we don't use the system copy of readline for bash for non-releases.
+READLINE_VER="8.2_p1"
+
+DESCRIPTION="The standard GNU Bourne again shell"
+HOMEPAGE="https://tiswww.case.edu/php/chet/bash/bashtop.html https://git.savannah.gnu.org/cgit/bash.git"
+
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://git.savannah.gnu.org/git/bash.git"
+ EGIT_BRANCH=devel
+ inherit git-r3
+elif is_release ; then
+ SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz"
+ SRC_URI+=" verify-sig? ( mirror://gnu/bash/${MY_P}.tar.gz.sig )"
+
+ if [[ ${PLEVEL} -gt 0 ]] ; then
+ # bash-5.1 -> bash51
+ my_p=${PN}$(ver_rs 1-2 '' $(ver_cut 1-2))
+
+ patch_url=
+ my_patch_index=
+
+ for ((my_patch_index=1; my_patch_index <= ${PLEVEL} ; my_patch_index++)) ; do
+ for url in mirror://gnu/${pn} ftp://ftp.cwru.edu/pub/bash ; do
+ patch_url=$(printf "${url}/${PN}-$(ver_cut 1-2)-patches/${my_p}-%03d" ${my_patch_index})
+ SRC_URI+=" ${patch_url}"
+ SRC_URI+=" verify-sig? ( ${patch_url}.sig )"
+ done
+
+ MY_PATCHES+=( "${DISTDIR}"/$(printf ${my_p}-%03d ${my_patch_index}) )
+ done
+
+ unset my_pn patch_url my_patch_index
+ fi
+else
+ SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz"
+ SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${MY_P}.tar.gz.sig ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz.sig )"
+fi
+
+if [[ -n ${GENTOO_PATCH_VER} ]] ; then
+ SRC_URI+=" https://dev.gentoo.org/~${GENTOO_PATCH_DEV}/distfiles/${CATEGORY}/${PN}/${PN}-${GENTOO_PATCH_VER}-patches.tar.xz"
+fi
+
+LICENSE="GPL-3+"
+SLOT="0"
+if is_release ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+IUSE="afs bashlogger examples mem-scramble +net nls plugins pgo +readline"
+
+DEPEND="
+ >=sys-libs/ncurses-5.2-r2:=
+ nls? ( virtual/libintl )
+"
+if is_release ; then
+ DEPEND+=" readline? ( >=sys-libs/readline-${READLINE_VER}:= )"
+fi
+RDEPEND="
+ ${DEPEND}
+"
+# We only need yacc when the .y files get patched (bash42-005, bash51-011)
+BDEPEND="
+ app-alternatives/yacc
+ pgo? ( dev-util/gperf )
+ verify-sig? ( sec-keys/openpgp-keys-chetramey )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+# EAPI 8 tries to append it but it doesn't exist here
+QA_CONFIGURE_OPTIONS="--disable-static"
+
+PATCHES=(
+ #"${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}/
+
+ # Patches from Chet sent to bash-bug ml
+ "${FILESDIR}"/${PN}-5.0-syslog-history-extern.patch
+)
+
+pkg_setup() {
+ # bug #7332
+ if is-flag -malign-double ; then
+ 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() {
+ if [[ ${PV} == 9999 ]] ; then
+ git-r3_src_unpack
+ else
+ if use verify-sig ; then
+ verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.gz{,.sig}
+
+ local patch
+ for patch in "${MY_PATCHES[@]}" ; do
+ verify-sig_verify_detached ${patch}{,.sig}
+ done
+ fi
+
+ unpack ${MY_P}.tar.gz
+
+ if [[ -n ${GENTOO_PATCH_VER} ]] ; then
+ unpack ${PN}-${GENTOO_PATCH_VER}-patches.tar.xz
+ fi
+ fi
+}
+
+src_prepare() {
+ # Include official patches
+ [[ ${PLEVEL} -gt 0 ]] && eapply -p0 "${MY_PATCHES[@]}"
+
+ # Clean out local libs so we know we use system ones w/releases.
+ if is_release ; then
+ rm -rf lib/{readline,termcap}/* || die
+ touch lib/{readline,termcap}/Makefile.in || die # for config.status
+ sed -ri -e 's:\$[{(](RL|HIST)_LIBSRC[)}]/[[:alpha:]_-]*\.h::g' Makefile.in || die
+ fi
+
+ # Prefixify hardcoded path names. No-op for non-prefix.
+ hprefixify pathnames.h.in
+
+ # Avoid regenerating docs after patches, bug #407985
+ sed -i -r '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in || die
+ touch -r . doc/* || die
+
+ eapply -p0 "${PATCHES[@]}"
+ eapply_user
+}
+
+src_configure() {
+ local myconf=(
+ --disable-profiling
+
+ # 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 :(.
+ --with-curses
+
+ $(use_enable mem-scramble)
+ $(use_enable net net-redirections)
+ $(use_enable readline)
+ $(use_enable readline bang-history)
+ $(use_enable readline history)
+ $(use_with afs)
+ $(use_with mem-scramble bash-malloc)
+ )
+
+ # For descriptions of these, see config-top.h
+ # bashrc/#26952 bash_logout/#90488 ssh/#24762 mktemp/#574426
+ append-cppflags \
+ -DDEFAULT_PATH_VALUE=\'\"${EPREFIX}/usr/local/sbin:${EPREFIX}/usr/local/bin:${EPREFIX}/usr/sbin:${EPREFIX}/usr/bin:${EPREFIX}/sbin:${EPREFIX}/bin\"\' \
+ -DSTANDARD_UTILS_PATH=\'\"${EPREFIX}/bin:${EPREFIX}/usr/bin:${EPREFIX}/sbin:${EPREFIX}/usr/sbin\"\' \
+ -DSYS_BASHRC=\'\"${EPREFIX}/etc/bash/bashrc\"\' \
+ -DSYS_BASH_LOGOUT=\'\"${EPREFIX}/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 )
+
+ if is_release ; then
+ # 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%%_*}
+
+ # Use system readline only with released versions.
+ myconf+=( --with-installed-readline=. )
+ fi
+
+ if use plugins ; then
+ append-ldflags -Wl,-rpath,"${EPREFIX}"/usr/$(get_libdir)/bash
+ else
+ # Disable the plugins logic by hand since bash doesn't
+ # provide a way of doing it.
+ export ac_cv_func_dl{close,open,sym}=no \
+ ac_cv_lib_dl_dlopen=no ac_cv_header_dlfcn_h=no
+
+ sed -i \
+ -e '/LOCAL_LDFLAGS=/s:-rdynamic::' \
+ configure || die
+ fi
+
+ # bug #444070
+ tc-export AR
+
+ econf "${myconf[@]}"
+}
+
+src_compile() {
+ if use pgo ; then
+ # Build Bash and run its tests to generate profiles.
+ emake CFLAGS="${CFLAGS} -fprofile-generate=${T}/pgo -fprofile-dir=${T}/pgo"
+
+ # Used in test suite.
+ unset A
+
+ emake CFLAGS="${CFLAGS} -fprofile-generate=${T}/pgo -fprofile-dir=${T}/pgo" -k check
+
+ # Rebuild Bash using the profiling data we just generated.
+ emake clean
+ emake CFLAGS="${CFLAGS} -fprofile-use=${T}/pgo -fprofile-dir=${T}/pgo"
+
+ use plugins && emake -C examples/loadables CFLAGS="${CFLAGS} -fprofile-use=${T}/pgo -fprofile-dir=${T}/pgo" all others
+ else
+ emake
+
+ use plugins && emake -C examples/loadables all others
+ fi
+}
+
+src_test() {
+ # Used in test suite.
+ unset A
+
+ default
+}
+
+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}"/bash_logout
+ doins "$(prefixify_ro "${FILESDIR}"/bashrc)"
+
+ keepdir /etc/bash/bashrc.d
+
+ 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
+ # bug #432338
+ sed_args+=(
+ -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 include/*.h lib/{glob/glob.h,tilde/tilde.h}
+ fi
+
+ if use examples ; then
+ for d in examples/{functions,misc,scripts,startup-files} ; do
+ exeinto /usr/share/doc/${PF}/${d}
+ docinto ${d}
+ for f in ${d}/* ; do
+ if [[ ${f##*/} != PERMISSION ]] && [[ ${f##*/} != *README ]] ; then
+ doexe ${f}
+ else
+ dodoc ${f}
+ fi
+ done
+ done
+ fi
+
+ # Install bash_builtins.1 and rbash.1
+ emake -C doc DESTDIR="${D}" install_builtins
+ sed 's:bash\.1:man1/&:' doc/rbash.1 > "${T}"/rbash.1 || die
+ doman "${T}"/rbash.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
+}
+
+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/bash-9999.ebuild b/app-shells/bash/bash-9999.ebuild
index 6f6be5e13621..5fecc6b0353c 100644
--- a/app-shells/bash/bash-9999.ebuild
+++ b/app-shells/bash/bash-9999.ebuild
@@ -130,6 +130,11 @@ src_unpack() {
else
if use verify-sig ; then
verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.gz{,.sig}
+
+ local patch
+ for patch in "${MY_PATCHES[@]}" ; do
+ verify-sig_verify_detached ${patch}{,.sig}
+ done
fi
unpack ${MY_P}.tar.gz