diff options
Diffstat (limited to 'app-shells/bash/bash-4.2_p53.ebuild')
-rw-r--r-- | app-shells/bash/bash-4.2_p53.ebuild | 70 |
1 files changed, 36 insertions, 34 deletions
diff --git a/app-shells/bash/bash-4.2_p53.ebuild b/app-shells/bash/bash-4.2_p53.ebuild index 000f5397f9cd..1e566e163edc 100644 --- a/app-shells/bash/bash-4.2_p53.ebuild +++ b/app-shells/bash/bash-4.2_p53.ebuild @@ -1,19 +1,19 @@ # Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="4" +EAPI=7 -inherit eutils flag-o-matic toolchain-funcs +inherit flag-o-matic toolchain-funcs # Official patchlevel # See ftp://ftp.cwru.edu/pub/bash/bash-4.2-patches/ -PLEVEL=${PV##*_p} -MY_PV=${PV/_p*} -MY_PV=${MY_PV/_/-} -MY_P=${PN}-${MY_PV} +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}} + 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 " "$@") @@ -40,12 +40,20 @@ LIB_DEPEND=">=sys-libs/ncurses-5.2-r2[static-libs(+)] nls? ( virtual/libintl ) readline? ( >=sys-libs/readline-6.2[static-libs(+)] )" RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )" -# we only need yacc when the .y files get patched (bash42-005) DEPEND="${RDEPEND} - virtual/yacc static? ( ${LIB_DEPEND} )" +# we only need yacc when the .y files get patched (bash42-005) +BDEPEND="virtual/yacc" -S=${WORKDIR}/${MY_P} +S="${WORKDIR}/${MY_P}" + +PATCHES=( + "${FILESDIR}"/${PN}-4.2-execute-job-control.patch #383237 + "${FILESDIR}"/${PN}-4.2-parallel-build.patch + "${FILESDIR}"/${PN}-4.2-no-readline.patch + "${FILESDIR}"/${PN}-4.2-read-retry.patch #447810 + "${FILESDIR}"/${PN}-4.2-speed-up-read-N.patch +) pkg_setup() { if is-flag -malign-double ; then #7332 @@ -61,28 +69,33 @@ src_unpack() { src_prepare() { # Include official patches - [[ ${PLEVEL} -gt 0 ]] && epatch $(patches -s) + [[ ${PLEVEL} -gt 0 ]] && eapply -p0 $(patches -s) # Clean out local libs so we know we use system ones - rm -rf lib/{readline,termcap}/* - touch lib/{readline,termcap}/Makefile.in # for config.status + 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 # Avoid regenerating docs after patches #407985 sed -i -r '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in || die - touch -r . doc/* - - epatch "${FILESDIR}"/${PN}-4.2-execute-job-control.patch #383237 - epatch "${FILESDIR}"/${PN}-4.2-parallel-build.patch - epatch "${FILESDIR}"/${PN}-4.2-no-readline.patch - epatch "${FILESDIR}"/${PN}-4.2-read-retry.patch #447810 - epatch "${FILESDIR}"/${PN}-4.2-speed-up-read-N.patch + touch -r . doc/* || die - epatch_user + default } src_configure() { - local myconf=() + local myconf=( + --with-installed-readline=. + --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) + ) # For descriptions of these, see config-top.h # bashrc/#26952 bash_logout/#90488 ssh/#24762 mktemp/#574426 @@ -113,18 +126,7 @@ src_configure() { # ncurses in one or two small places :(. tc-export AR #444070 - econf \ - --with-installed-readline=. \ - --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[@]}" + econf "${myconf[@]}" } src_install() { |