Diff bash-4.3_p48-r2 with a bash-4.4_p23-r2

/usr/portage/app-shells/bash/bash-4.4_p23-r2.ebuild 2023-10-09 14:52:28.852368334 +0300
3 3

  
4 4
EAPI=7
5 5

  
6
inherit flag-o-matic toolchain-funcs
6
inherit flag-o-matic toolchain-funcs prefix
7 7

  
8 8
# Uncomment if we have a patchset
9 9
GENTOO_PATCH_DEV="sam"
10 10
GENTOO_PATCH_VER="${PV}-r2"
11 11

  
12 12
# Official patchlevel
13
# See ftp://ftp.cwru.edu/pub/bash/bash-4.3-patches/
13
# See ftp://ftp.cwru.edu/pub/bash/bash-4.4-patches/
14 14
PLEVEL="${PV##*_p}"
15 15
MY_PV="${PV/_p*}"
16 16
MY_PV="${MY_PV/_/-}"
17 17
MY_P="${PN}-${MY_PV}"
18
is_release() {
19
	case ${PV} in
20
	*_alpha*|*_beta*|*_rc*) return 1 ;;
21
	*) return 0 ;;
22
	esac
23
}
18 24
[[ ${PV} != *_p* ]] && PLEVEL=0
19 25
patches() {
20 26
	local opt=${1} plevel=${2:-${PLEVEL}} pn=${3:-${PN}} pv=${4:-${MY_PV}}
......
32 38
}
33 39

  
34 40
# The version of readline this bash normally ships with.
35
READLINE_VER="6.3"
41
READLINE_VER="7.0"
36 42

  
37 43
DESCRIPTION="The standard GNU Bourne again shell"
38 44
HOMEPAGE="https://tiswww.case.edu/php/chet/bash/bashtop.html"
39
SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)"
40
[[ ${PV} == *_rc* ]] && SRC_URI+=" ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz"
45
if is_release ; then
46
	SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)"
47
else
48
	SRC_URI="ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz"
49
fi
41 50

  
42 51
if [[ -n ${GENTOO_PATCH_VER} ]] ; then
43 52
	SRC_URI+=" https://dev.gentoo.org/~${GENTOO_PATCH_DEV}/distfiles/${CATEGORY}/${PN}/${PN}-${GENTOO_PATCH_VER}-patches.tar.xz"
......
45 54

  
46 55
LICENSE="GPL-3"
47 56
SLOT="${MY_PV}"
48
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86"
57
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
49 58
IUSE="afs bashlogger examples mem-scramble +net nls plugins +readline"
50 59

  
51
DEPEND=">=sys-libs/ncurses-5.2-r2:0=
60
DEPEND="
61
	>=sys-libs/ncurses-5.2-r2:0=
62
	nls? ( virtual/libintl )
52 63
	readline? ( >=sys-libs/readline-${READLINE_VER}:0= )
53
	nls? ( virtual/libintl )"
54
RDEPEND="${DEPEND}
55
	!<sys-apps/portage-2.1.6.7_p1"
64
"
65
RDEPEND="
66
	${DEPEND}
67
"
56 68
# We only need bison (yacc) when the .y files get patched (bash42-005)
57
BDEPEND="sys-devel/bison"
58

  
59
PATCHES=(
60
	"${WORKDIR}"/${P}-r2-patches/${PN}-4.3-mapfile-improper-array-name-validation.patch
61
	"${WORKDIR}"/${P}-r2-patches/${PN}-4.3-arrayfunc.patch
62
	"${WORKDIR}"/${P}-r2-patches/${PN}-4.3-protos.patch
63
	"${WORKDIR}"/${P}-r2-patches/${PN}-4.4-popd-offset-overflow.patch # bug #600174
64
)
69
#BDEPEND="sys-devel/bison"
65 70

  
66 71
S="${WORKDIR}/${MY_P}"
67 72

  
......
91 96
	# Include official patches
92 97
	[[ ${PLEVEL} -gt 0 ]] && eapply -p0 $(patches -s)
93 98

  
99
	eapply "${WORKDIR}"/${P}-r2-patches/${PN}-4.4-jobs_overflow.patch # bug #644720
100
	eapply "${WORKDIR}"/${P}-r2-patches/${PN}-4.4-set-SHOBJ_STATUS.patch # bug #644720
101

  
94 102
	# Clean out local libs so we know we use system ones w/releases.
95
	if [[ ${PV} != *_rc* ]] ; then
103
	if is_release ; then
96 104
		rm -rf lib/{readline,termcap}/* || die
97 105
		touch lib/{readline,termcap}/Makefile.in || die # for config.status
98 106
		sed -ri -e 's:\$[{(](RL|HIST)_LIBSRC[)}]/[[:alpha:]_-]*\.h::g' Makefile.in || die
99 107
	fi
100 108

  
109
	# Prefixify hardcoded path names. No-op for non-prefix.
110
	hprefixify pathnames.h.in
111

  
101 112
	# Avoid regenerating docs after patches, bug #407985
102 113
	sed -i -r '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in || die
103 114
	touch -r . doc/* || die
104 115

  
105
	default
116
	eapply_user
106 117
}
107 118

  
108 119
src_configure() {
......
114 125
	unset YACC
115 126

  
116 127
	local myconf=(
117
		--docdir='$(datarootdir)'/doc/${PF}
118
		--htmldir='$(docdir)/html'
128
		--disable-profiling
119 129

  
120 130
		# Force linking with system curses ... the bundled termcap lib
121 131
		# sucks bad compared to ncurses.  For the most part, ncurses
......
123 133
		# ncurses in one or two small places :(.
124 134
		--with-curses
125 135

  
126
		$(use_with afs)
127
		$(use_enable net net-redirections)
128
		--disable-profiling
129 136
		$(use_enable mem-scramble)
130
		$(use_with mem-scramble bash-malloc)
137
		$(use_enable net net-redirections)
131 138
		$(use_enable readline)
132
		$(use_enable readline history)
133 139
		$(use_enable readline bang-history)
140
		$(use_enable readline history)
141
		$(use_with afs)
142
		$(use_with mem-scramble bash-malloc)
134 143
	)
135 144

  
136 145
	# For descriptions of these, see config-top.h
......
142 151
		-DSYS_BASH_LOGOUT=\'\""${EPREFIX}"/etc/bash/bash_logout\"\' \
143 152
		-DNON_INTERACTIVE_LOGIN_SHELLS \
144 153
		-DSSH_SOURCE_BASHRC \
145
		-DUSE_MKTEMP -DUSE_MKSTEMP \
146 154
		$(use bashlogger && echo -DSYSLOG_HISTORY)
147 155

  
148 156
	# Don't even think about building this statically without
......
158 166
	# be safe.
159 167
	# Exact cached version here doesn't really matter as long as it
160 168
	# is at least what's in the DEPEND up above.
161
	export ac_cv_rl_version=${READLINE_VER}
169
	export ac_cv_rl_version=${READLINE_VER%%_*}
162 170

  
163
	if [[ ${PV} != *_rc* ]] ; then
171
	if is_release ; then
164 172
		# Use system readline only with released versions.
165 173
		myconf+=( --with-installed-readline=. )
166 174
	fi
Thank you!