Hanno Böck

Hanno Böck commited on 2014-09-29 01:24:33
Zeige 2 geänderte Dateien mit 230 Einfügungen und 0 Löschungen.

... ...
@@ -60,4 +60,7 @@ DIST bash42-045 1572 SHA256 ddb7eff0f59d394a483b09feec3771d9026f81ba90afac32846a
60 60
 DIST bash42-046 1988 SHA256 95c1323b68c0ecc0ca09565ef2d5218625ced3957b702e04c8bcaad9e7b3816d SHA512 7e4a9d3961cb8bf8559f82684cb75fe8600a377522f582e1a9537696ceccab32d15d1045f850ea91ea8bd2cf286d79412bb47460af26bec8486d5f3137f5d54f WHIRLPOOL 68d83498307dec79bea516c7e7b03dfdff10116a716922c780c66d9017abb38cf6b32f17674490fed93b2701d8271f71f4aaeab6712b184fe4d880b818fab988
61 61
 DIST bash42-047 1353 SHA256 c1979201d0345011c419a1c82407cd2a00c60a0c75b7f07e145d17f3718daf7a SHA512 0b43eefcc0ef3a55e309dff339db31a07849ce794e645d917f1836f48c71b84bdc50aa3315b3b2e33acef2e6e81a07f2a026cb43381d0f809c8271cc0a0699a0 WHIRLPOOL 5b2a3000dd72b4cd34f74ffcfe160fe891c8e55766913260207cdad0ed205843398ca9a261f41ef5d54c76782ae291809be0b78c3bb960ea84bb0676cdc6e263
62 62
 DIST bash42-048 3258 SHA256 751a5d2330b21ac9aba7323acbbc91c948285f30a4bb41f56796f9a36b983d24 SHA512 4218377052da8900ab6d49b855ae6f7779ad94e9e76daf3424240fbbb1bab37b929989b976ecc3ccbfb66f3c278a7ba546e5d34b214382b41767991945d960b4 WHIRLPOOL 16da3dfb42b1cbb50841e381428135a9d0439d30c519725bd52bf55093c618b7ca8983b4638749dc87d5893a20b4cc5546c1ef5141f62d78fad8ccd5b4261fe7
63
+DIST bash42-049 1159 SHA256 901cd74cdd9f3e9bb5cc907d563e3d4dcdf9d5f6a751e85b706a958f51bc510e SHA512 a0472af2c3bb30fb3ebf0217b34261aa586314a05fc19c959b4931dcd064e0a6a8b4e37f8b4a9dd13d8fff38822e32e12fb28f4fcb73b0f6dcf42827fa5aba05 WHIRLPOOL a34df0a257a3db06b887abbda2afa823b471e1ba705318822e98d4740ce41fe906edf2d91602bcbbf97f1202067086b33217824af7cf8f2f71c58fb4d6fd65eb
64
+DIST bash42-050 6650 SHA256 1a19b84455e83b46fcaa27759a5dd643dde2e11ceacd1e84e351970ea04d8ba6 SHA512 317a5f90d909a5db697025894b50f35f26f8293b3ce1ad9b8e9dc6d0661f277659c8cc0a70a113d3889b2de6e932e5af5ba89a427f32879c69d4e3db24e6a2a8 WHIRLPOOL 2d77d23cd0e2baa59f8024e3e09f9db48f0ab999157d9c6911c4893abcf6a3e320f8f1614049ebf2b7b9ff5da57041ef1fd1b873746a940cf720ca947ad75d43
63 65
 EBUILD bash-4.2_p48-r1.ebuild 6792 SHA256 77dfb8ad867af9d078ca85999dd68271584224bd74b577f83bca84b7cecdb31b SHA512 f0434e0c697e7cf8dbc676af39c5f6481edb80069cbcee8c7b8ec4ab32eb58ac6a572425a89d58ca4bbbe0407cfdaf542de6f75c058dc765a3d3c7a1a3fa5b19 WHIRLPOOL 6fd9ab68a2c754149fed16dc4af52f16d9db4403581bce60933970a615abcf8a7c3d69d02276f6e630b50a24d77e3e23d7b3d1131e650883bb130dedcce7ab82
66
+EBUILD bash-4.2_p50.ebuild 6696 SHA256 f2cb222c16ab719eac21ec0bb6fa09c55bf26f9f357433db16f67380e178d684 SHA512 cb5426d0c92527d64657face1a7c0c8cd7a3f080c82f49800e42af852d52a2757ee8e6148b693a6fa04a983a42513df0ced52ac527ecfa0410f5cb87eabbc708 WHIRLPOOL b99c9b05bbab61f5101dba11804c96faf7b304db3d007631ba6dff1c35ff965da8bf0b158b891763a26a4695ea7e3933aa7227a77514765d2b836334edf29b42
... ...
@@ -0,0 +1,227 @@
1
+# Copyright 1999-2014 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/bash-4.2_p50.ebuild,v 1.1 2014/09/28 16:52:30 polynomial-c Exp $
4
+
5
+EAPI="4"
6
+
7
+inherit eutils flag-o-matic toolchain-funcs multilib
8
+
9
+# Official patchlevel
10
+# See ftp://ftp.cwru.edu/pub/bash/bash-4.2-patches/
11
+PLEVEL=${PV##*_p}
12
+MY_PV=${PV/_p*}
13
+MY_PV=${MY_PV/_/-}
14
+MY_P=${PN}-${MY_PV}
15
+[[ ${PV} != *_p* ]] && PLEVEL=0
16
+patches() {
17
+	local opt=$1 plevel=${2:-${PLEVEL}} pn=${3:-${PN}} pv=${4:-${MY_PV}}
18
+	[[ ${plevel} -eq 0 ]] && return 1
19
+	eval set -- {1..${plevel}}
20
+	set -- $(printf "${pn}${pv/\.}-%03d " "$@")
21
+	if [[ ${opt} == -s ]] ; then
22
+		echo "${@/#/${DISTDIR}/}"
23
+	else
24
+		local u
25
+		for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${pn} ; do
26
+			printf "${u}/${pn}-${pv}-patches/%s " "$@"
27
+		done
28
+	fi
29
+}
30
+
31
+DESCRIPTION="The standard GNU Bourne again shell"
32
+HOMEPAGE="http://tiswww.case.edu/php/chet/bash/bashtop.html"
33
+SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)"
34
+
35
+LICENSE="GPL-3"
36
+SLOT="0"
37
+KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
38
+IUSE="afs bashlogger examples mem-scramble +net nls plugins +readline vanilla"
39
+
40
+DEPEND=">=sys-libs/ncurses-5.2-r2
41
+	readline? ( >=sys-libs/readline-6.2 )
42
+	nls? ( virtual/libintl )"
43
+RDEPEND="${DEPEND}
44
+	!!<sys-apps/portage-2.1.6.7_p1
45
+	!!<sys-apps/paludis-0.26.0_alpha5"
46
+# we only need yacc when the .y files get patched (bash42-005)
47
+DEPEND+=" virtual/yacc"
48
+
49
+S=${WORKDIR}/${MY_P}
50
+
51
+pkg_setup() {
52
+	if is-flag -malign-double ; then #7332
53
+		eerror "Detected bad CFLAGS '-malign-double'.  Do not use this"
54
+		eerror "as it breaks LFS (struct stat64) on x86."
55
+		die "remove -malign-double from your CFLAGS mr ricer"
56
+	fi
57
+	if use bashlogger ; then
58
+		ewarn "The logging patch should ONLY be used in restricted (i.e. honeypot) envs."
59
+		ewarn "This will log ALL output you enter into the shell, you have been warned."
60
+	fi
61
+}
62
+
63
+src_unpack() {
64
+	unpack ${MY_P}.tar.gz
65
+}
66
+
67
+src_prepare() {
68
+	# Include official patches
69
+	[[ ${PLEVEL} -gt 0 ]] && epatch $(patches -s)
70
+
71
+	# Clean out local libs so we know we use system ones
72
+	rm -rf lib/{readline,termcap}/*
73
+	touch lib/{readline,termcap}/Makefile.in # for config.status
74
+	sed -ri -e 's:\$[(](RL|HIST)_LIBSRC[)]/[[:alpha:]]*.h::g' Makefile.in || die
75
+
76
+	# Avoid regenerating docs after patches #407985
77
+	sed -i -r '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in || die
78
+	touch -r . doc/*
79
+
80
+	epatch "${FILESDIR}/parser-oob-4.2-rediff.patch"
81
+	epatch "${FILESDIR}"/${PN}-4.2-execute-job-control.patch #383237
82
+	epatch "${FILESDIR}"/${PN}-4.2-parallel-build.patch
83
+	epatch "${FILESDIR}"/${PN}-4.2-no-readline.patch
84
+	epatch "${FILESDIR}"/${PN}-4.2-read-retry.patch #447810
85
+	if ! use vanilla ; then
86
+		epatch "${FILESDIR}"/${PN}-4.2-speed-up-read-N.patch
87
+	fi
88
+
89
+	epatch_user
90
+}
91
+
92
+src_configure() {
93
+	local myconf=()
94
+
95
+	# For descriptions of these, see config-top.h
96
+	# bashrc/#26952 bash_logout/#90488 ssh/#24762
97
+	append-cppflags \
98
+		-DDEFAULT_PATH_VALUE=\'\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\"\' \
99
+		-DSTANDARD_UTILS_PATH=\'\"/bin:/usr/bin:/sbin:/usr/sbin\"\' \
100
+		-DSYS_BASHRC=\'\"/etc/bash/bashrc\"\' \
101
+		-DSYS_BASH_LOGOUT=\'\"/etc/bash/bash_logout\"\' \
102
+		-DNON_INTERACTIVE_LOGIN_SHELLS \
103
+		-DSSH_SOURCE_BASHRC \
104
+		$(use bashlogger && echo -DSYSLOG_HISTORY)
105
+
106
+	# Don't even think about building this statically without
107
+	# reading Bug 7714 first.  If you still build it statically,
108
+	# don't come crying to us with bugs ;).
109
+	#use static && export LDFLAGS="${LDFLAGS} -static"
110
+	use nls || myconf+=( --disable-nls )
111
+
112
+	# Historically, we always used the builtin readline, but since
113
+	# our handling of SONAME upgrades has gotten much more stable
114
+	# in the PM (and the readline ebuild itself preserves the old
115
+	# libs during upgrades), linking against the system copy should
116
+	# be safe.
117
+	# Exact cached version here doesn't really matter as long as it
118
+	# is at least what's in the DEPEND up above.
119
+	export ac_cv_rl_version=6.2
120
+
121
+	# Force linking with system curses ... the bundled termcap lib
122
+	# sucks bad compared to ncurses.  For the most part, ncurses
123
+	# is here because readline needs it.  But bash itself calls
124
+	# ncurses in one or two small places :(.
125
+
126
+	use plugins && append-ldflags -Wl,-rpath,/usr/$(get_libdir)/bash
127
+	tc-export AR #444070
128
+	econf \
129
+		--with-installed-readline=. \
130
+		--with-curses \
131
+		$(use_with afs) \
132
+		$(use_enable net net-redirections) \
133
+		--disable-profiling \
134
+		$(use_enable mem-scramble) \
135
+		$(use_with mem-scramble bash-malloc) \
136
+		$(use_enable readline) \
137
+		$(use_enable readline history) \
138
+		$(use_enable readline bang-history) \
139
+		"${myconf[@]}"
140
+}
141
+
142
+src_compile() {
143
+	emake
144
+
145
+	if use plugins ; then
146
+		emake -C examples/loadables all others
147
+	fi
148
+}
149
+
150
+src_install() {
151
+	emake install DESTDIR="${D}"
152
+
153
+	dodir /bin
154
+	mv "${ED}"/usr/bin/bash "${ED}"/bin/ || die
155
+	dosym bash /bin/rbash
156
+
157
+	insinto /etc/bash
158
+	doins "${FILESDIR}"/{bashrc,bash_logout}
159
+	insinto /etc/skel
160
+	for f in bash{_logout,_profile,rc} ; do
161
+		newins "${FILESDIR}"/dot-${f} .${f}
162
+	done
163
+
164
+	local sed_args=(
165
+		-e "s:#${USERLAND}#@::"
166
+		-e '/#@/d'
167
+	)
168
+	if ! use readline ; then
169
+		sed_args+=( #432338
170
+			-e '/^shopt -s histappend/s:^:#:'
171
+			-e 's:use_color=true:use_color=false:'
172
+		)
173
+	fi
174
+	sed -i \
175
+		"${sed_args[@]}" \
176
+		"${ED}"/etc/skel/.bashrc \
177
+		"${ED}"/etc/bash/bashrc || die
178
+
179
+	if use plugins ; then
180
+		exeinto /usr/$(get_libdir)/bash
181
+		doexe $(echo examples/loadables/*.o | sed 's:\.o::g')
182
+		insinto /usr/include/bash-plugins
183
+		doins *.h builtins/*.h examples/loadables/*.h include/*.h \
184
+			lib/{glob/glob.h,tilde/tilde.h}
185
+	fi
186
+
187
+	if use examples ; then
188
+		for d in examples/{functions,misc,scripts,scripts.noah,scripts.v2} ; do
189
+			exeinto /usr/share/doc/${PF}/${d}
190
+			insinto /usr/share/doc/${PF}/${d}
191
+			for f in ${d}/* ; do
192
+				if [[ ${f##*/} != PERMISSION ]] && [[ ${f##*/} != *README ]] ; then
193
+					doexe ${f}
194
+				else
195
+					doins ${f}
196
+				fi
197
+			done
198
+		done
199
+	fi
200
+
201
+	doman doc/*.1
202
+	dodoc README NEWS AUTHORS CHANGES COMPAT Y2K doc/FAQ doc/INTRO
203
+	dosym bash.info /usr/share/info/bashref.info
204
+}
205
+
206
+pkg_preinst() {
207
+	if [[ -e ${EROOT}/etc/bashrc ]] && [[ ! -d ${EROOT}/etc/bash ]] ; then
208
+		mkdir -p "${EROOT}"/etc/bash
209
+		mv -f "${EROOT}"/etc/bashrc "${EROOT}"/etc/bash/
210
+	fi
211
+
212
+	if [[ -L ${EROOT}/bin/sh ]]; then
213
+		# rewrite the symlink to ensure that its mtime changes. having /bin/sh
214
+		# missing even temporarily causes a fatal error with paludis.
215
+		local target=$(readlink "${EROOT}"/bin/sh)
216
+		local tmp=$(emktemp "${EROOT}"/bin)
217
+		ln -sf "${target}" "${tmp}"
218
+		mv -f "${tmp}" "${EROOT}"/bin/sh
219
+	fi
220
+}
221
+
222
+pkg_postinst() {
223
+	# If /bin/sh does not exist, provide it
224
+	if [[ ! -e ${EROOT}/bin/sh ]]; then
225
+		ln -sf bash "${EROOT}"/bin/sh
226
+	fi
227
+}
0 228