| 10 |
10 |
GENTOO_PATCH_VER="${PV}"
|
| 11 |
11 |
|
| 12 |
12 |
# Official patchlevel
|
| 13 |
|
# See ftp://ftp.cwru.edu/pub/bash/bash-3.2-patches/
|
|
13 |
# See ftp://ftp.cwru.edu/pub/bash/bash-4.0-patches/
|
| 14 |
14 |
PLEVEL="${PV##*_p}"
|
| 15 |
15 |
MY_PV="${PV/_p*}"
|
| 16 |
16 |
MY_PV="${MY_PV/_/-}"
|
| ... | ... | |
| 38 |
38 |
|
| 39 |
39 |
S="${WORKDIR}/${MY_P}"
|
| 40 |
40 |
|
| 41 |
|
LICENSE="GPL-2"
|
|
41 |
LICENSE="GPL-3"
|
| 42 |
42 |
SLOT="${MY_PV}"
|
| 43 |
43 |
KEYWORDS="~alpha amd64 arm arm64 hppa ~m68k ~mips ppc ppc64 ~s390 sparc x86"
|
| 44 |
|
IUSE="afs +net nls +readline static"
|
|
44 |
IUSE="afs mem-scramble +net nls +readline static"
|
| 45 |
45 |
|
| 46 |
46 |
LIB_DEPEND=">=sys-libs/ncurses-5.2-r2[static-libs(+)]
|
| 47 |
47 |
nls? ( virtual/libintl )
|
| ... | ... | |
| 51 |
51 |
static? ( ${LIB_DEPEND} )"
|
| 52 |
52 |
|
| 53 |
53 |
PATCHES=(
|
| 54 |
|
"${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}-patches/autoconf-mktime-2.59.patch # bug #220040
|
| 55 |
|
"${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}-patches/${PN}-3.2-loadables.patch
|
|
54 |
"${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}-patches/${PN}-4.0-configure.patch # bug #304901
|
|
55 |
"${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}-patches/${PN}-4.x-deferred-heredocs.patch
|
|
56 |
|
| 56 |
57 |
"${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}-patches/${PN}-2.05b-parallel-build.patch # bug #41002
|
| 57 |
|
"${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}-patches/${PN}-3.2-protos.patch
|
| 58 |
|
"${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}-patches/${PN}-3.2-session-leader.patch # bug #231775
|
| 59 |
|
"${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}-patches/${PN}-3.2-ldflags-for-build.patch # bug #211947
|
| 60 |
|
"${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}-patches/${PN}-3.2-process-subst.patch
|
| 61 |
|
"${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}-patches/${PN}-3.2-ulimit.patch
|
| 62 |
|
"${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}-patches/${PN}-3.0-trap-fg-signals.patch
|
| 63 |
|
"${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}-patches/${PN}-3.2-dev-fd-test-as-user.patch # bug #131875
|
| 64 |
|
"${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}-patches/${PN}-4.2-dev-fd-buffer-overflow.patch # bug #431850
|
|
58 |
"${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}-patches/${PN}-4.0-ldflags-for-build.patch # bug #211947
|
|
59 |
"${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}-patches/${PN}-4.0-negative-return.patch
|
|
60 |
"${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}-patches/${PN}-4.0-parallel-build.patch # bug #267613
|
|
61 |
"${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}-patches/${PN}-4.2-dev-fd-buffer-overflow.patch #431850
|
| 65 |
62 |
)
|
| 66 |
63 |
|
| 67 |
64 |
pkg_setup() {
|
| ... | ... | |
| 91 |
88 |
sed -ri -e 's:\$[{(](RL|HIST)_LIBSRC[)}]/[[:alpha:]_-]*\.h::g' Makefile.in || die
|
| 92 |
89 |
|
| 93 |
90 |
default
|
|
91 |
|
|
92 |
sed -i '1i#define NEED_FPURGE_DECL' execute_cmd.c || die # needs fpurge() decl
|
|
93 |
sed -i '/\.o: .*shell\.h/s:$: pathnames.h:' Makefile.in || die # bug #267613
|
| 94 |
94 |
}
|
| 95 |
95 |
|
| 96 |
96 |
src_configure() {
|
| 97 |
|
#/var/tmp/portage/app-shells/bash-3.2_p57/temp/ccW7JJDK.ltrans2.ltrans.o: in function `shell_execve':
|
| 98 |
|
# <artificial>:(.text+0x8b30): undefined reference to `__setostype'
|
| 99 |
|
#
|
| 100 |
|
# It works fine in bash 4+. Backporting may not be worth it.
|
| 101 |
|
filter-lto
|
| 102 |
|
|
| 103 |
97 |
# bash 5.3 drops unprototyped functions, earlier versions are
|
| 104 |
98 |
# incompatible with C23.
|
| 105 |
99 |
append-cflags $(test-flags-CC -std=gnu17)
|
| ... | ... | |
| 120 |
114 |
$(use_with afs)
|
| 121 |
115 |
$(use_enable net net-redirections)
|
| 122 |
116 |
--disable-profiling
|
| 123 |
|
--without-gnu-malloc
|
|
117 |
$(use_enable mem-scramble)
|
|
118 |
$(use_with mem-scramble bash-malloc)
|
| 124 |
119 |
$(use_enable readline)
|
| 125 |
120 |
$(use_enable readline history)
|
| 126 |
121 |
$(use_enable readline bang-history)
|
| 127 |
122 |
)
|
| 128 |
123 |
|
| 129 |
|
# Force pgrp synchronization
|
| 130 |
|
# https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=81653
|
| 131 |
|
export bash_cv_pgrp_pipe=yes
|
| 132 |
|
|
| 133 |
124 |
# For descriptions of these, see config-top.h
|
| 134 |
125 |
# bashrc/#26952 bash_logout/#90488 ssh/#24762 mktemp/#574426
|
| 135 |
126 |
append-cppflags \
|