summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-shells/bash/bash-4.2_p53.ebuild')
-rw-r--r--app-shells/bash/bash-4.2_p53.ebuild53
1 files changed, 38 insertions, 15 deletions
diff --git a/app-shells/bash/bash-4.2_p53.ebuild b/app-shells/bash/bash-4.2_p53.ebuild
index 30c860c3ff58..fc1a7772d2da 100644
--- a/app-shells/bash/bash-4.2_p53.ebuild
+++ b/app-shells/bash/bash-4.2_p53.ebuild
@@ -1,10 +1,14 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit flag-o-matic toolchain-funcs
+# Uncomment if we have a patchset
+GENTOO_PATCH_DEV="sam"
+GENTOO_PATCH_VER="${PV}"
+
# Official patchlevel
# See ftp://ftp.cwru.edu/pub/bash/bash-4.2-patches/
PLEVEL="${PV##*_p}"
@@ -28,9 +32,13 @@ patches() {
}
DESCRIPTION="The standard GNU Bourne again shell"
-HOMEPAGE="http://tiswww.case.edu/php/chet/bash/bashtop.html"
+HOMEPAGE="https://tiswww.case.edu/php/chet/bash/bashtop.html"
SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)"
+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="${MY_PV}"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86"
@@ -42,21 +50,22 @@ LIB_DEPEND=">=sys-libs/ncurses-5.2-r2[static-libs(+)]
RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
DEPEND="${RDEPEND}
static? ( ${LIB_DEPEND} )"
-# we only need yacc when the .y files get patched (bash42-005)
-BDEPEND="virtual/yacc"
+# We only need bison (yacc) when the .y files get patched (bash42-005)
+BDEPEND="sys-devel/bison"
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
+ "${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}-patches/${PN}-4.2-execute-job-control.patch # bug #383237
+ "${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}-patches/${PN}-4.2-parallel-build.patch
+ "${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}-patches/${PN}-4.2-no-readline.patch
+ "${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}-patches/${PN}-4.2-read-retry.patch # bug #447810
+ "${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}-patches/${PN}-4.2-speed-up-read-N.patch
)
pkg_setup() {
- if is-flag -malign-double ; then #7332
+ # 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"
@@ -65,6 +74,10 @@ pkg_setup() {
src_unpack() {
unpack ${MY_P}.tar.gz
+
+ if [[ -n ${GENTOO_PATCH_VER} ]] ; then
+ unpack ${PN}-${GENTOO_PATCH_VER}-patches.tar.xz
+ fi
}
src_prepare() {
@@ -84,9 +97,22 @@ src_prepare() {
}
src_configure() {
+ # Upstream only test with Bison and require GNUisms like YYEOF and
+ # YYERRCODE. The former at least may be in POSIX soon:
+ # https://www.austingroupbugs.net/view.php?id=1269.
+ # configure warns on use of non-Bison but doesn't abort. The result
+ # may misbehave at runtime.
+ unset YACC
+
local myconf=(
--with-installed-readline=.
+
+ # 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_with afs)
$(use_enable net net-redirections)
--disable-profiling
@@ -120,12 +146,9 @@ src_configure() {
# is at least what's in the DEPEND up above.
export ac_cv_rl_version=6.2
- # 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 :(.
+ # bug #444070
+ tc-export AR
- tc-export AR #444070
econf "${myconf[@]}"
}