/[gentoo-alt]/trunk/prefix/app-shells/bash/bash-3.0-r13.ebuild
Gentoo

Contents of /trunk/prefix/app-shells/bash/bash-3.0-r13.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1493 - (show annotations) (download)
Sun Sep 17 10:02:17 2006 UTC (7 years, 9 months ago) by grobian
File size: 4707 byte(s)
semi-automatic sync with main tree


1 # Copyright 1999-2006 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-shells/bash/bash-3.0-r13.ebuild,v 1.4 2006/03/23 23:07:21 vapier Exp $
4
5 EAPI="prefix"
6
7 inherit eutils flag-o-matic toolchain-funcs
8
9 # Official patchlevel
10 # See ftp://ftp.cwru.edu/pub/bash/bash-3.0-patches/
11 PLEVEL=16
12
13 DESCRIPTION="The standard GNU Bourne again shell"
14 HOMEPAGE="http://cnswww.cns.cwru.edu/~chet/bash/bashtop.html"
15 # Hit the GNU mirrors before hitting Chet's site
16 SRC_URI="mirror://gnu/bash/${P}.tar.gz
17 ftp://ftp.cwru.edu/pub/bash/${P}.tar.gz
18 $(for ((i=1; i<=PLEVEL; i++)); do
19 printf 'ftp://ftp.cwru.edu/pub/bash/bash-%s-patches/bash%s-%03d\n' \
20 ${PV} ${PV/\.} ${i}
21 printf 'mirror://gnu/bash/bash-%s-patches/bash%s-%03d\n' \
22 ${PV} ${PV/\.} ${i}
23 done)"
24
25 LICENSE="GPL-2"
26 SLOT="0"
27 KEYWORDS="~amd64 ~ppc-macos ~x86"
28 IUSE="afs nls build bashlogger unicode"
29
30 # we link statically with ncurses
31 DEPEND=">=sys-libs/ncurses-5.2-r2"
32 RDEPEND=""
33
34 src_unpack() {
35 unpack ${P}.tar.gz
36 cd ${S}
37 epatch "${FILESDIR}"/${P}-gentoo.patch
38
39 # Remove autoconf dependency
40 sed -i -e "/&& autoconf/d" Makefile.in
41
42 # Include official patches
43 local i
44 for ((i=1; i<=PLEVEL; i++)); do
45 epatch "${DISTDIR}"/${PN}${PV/\.}-$(printf '%03d' ${i})
46 done
47
48 # Fall back to /etc/inputrc
49 epatch "${FILESDIR}"/${P}-etc-inputrc.patch
50 # Fix network tests on Darwin #79124
51 epatch "${FILESDIR}"/${P}-darwin-conn.patch
52 # read patch headers for more info ... many ripped from Fedora/Debian/SuSe
53 for i in afs crash jobs manpage pwd read-e-segfault ulimit histtimeformat \
54 locale multibyteifs rl-display rl-self-insert
55 do
56 epatch "${FILESDIR}"/${P}-${i}.patch
57 done
58 # Hacks for bugs in unicode support #69407 #108936
59 if use unicode ; then
60 epatch "${FILESDIR}"/${P}-prompt.patch
61 epatch "${FILESDIR}"/${P}-utf8.patch
62 fi
63 # Fix read-builtin and the -u pipe option #87093
64 epatch "${FILESDIR}"/${P}-read-builtin-pipe.patch
65 # Don't barf on handled signals in scripts
66 epatch "${FILESDIR}"/${P}-trap-fg-signals.patch
67 # Fix a problem when using pipes and PGRP_PIPE #92349
68 epatch "${FILESDIR}"/${P}-pgrp-pipe-fix.patch
69 # Make sure static linking always works #100138
70 epatch "${FILESDIR}"/${P}-force-static-linking.patch
71 # Fix parallel builds #87247
72 epatch "${FILESDIR}"/${P}-parallel.patch
73 # Log bash commands to syslog #91327
74 if use bashlogger ; then
75 echo
76 ewarn "The logging patch should ONLY be used in restricted (i.e. honeypot) envs."
77 ewarn "This will log ALL output you enter into the shell, you have been warned."
78 ebeep
79 epause
80 epatch "${FILESDIR}"/${P}-bash-logger.patch
81 fi
82
83 epatch "${FILESDIR}"/${P}-configs.patch
84
85 # Add strnlen function for non-glibc systems, as one of Fedora's patches
86 # requires it.
87 epatch "${FILESDIR}"/${P}-strnlen.patch
88
89 epatch "${FILESDIR}"/${P}-pathnames.patch
90 sed -i -e "s:\@PREFIX\@:${EPREFIX}:g" config-top.h pathnames.h.in \
91 || die "sed failed."
92 }
93
94 src_compile() {
95 filter-flags -malign-double
96
97 local myconf=
98
99 # Always use the buildin readline, else if we update readline
100 # bash gets borked as readline is usually not binary compadible
101 # between minor versions.
102 #
103 # Martin Schlemmer <azarah@gentoo.org> (1 Sep 2002)
104 #use readline && myconf="--with-installed-readline"
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 use with bugs ;).
109 #use static && export LDFLAGS="${LDFLAGS} -static"
110 use nls || myconf="${myconf} --disable-nls"
111
112 # Force linking with system curses ... the bundled termcap lib
113 # sucks bad compared to ncurses
114 myconf="${myconf} --with-curses"
115
116 econf \
117 $(use_with afs) \
118 --disable-profiling \
119 --without-gnu-malloc \
120 ${myconf} || die
121 emake -j1 || die "make failed" # see bug 102426
122 }
123
124 src_install() {
125 einstall || die
126
127 dodir /bin
128 mv "${D}"/usr/bin/bash "${D}"/bin/
129 [[ ${USERLAND} != "BSD" ]] && dosym bash /bin/sh
130 dosym bash /bin/rbash
131
132 insinto /etc/bash
133 doins "${FILESDIR}"/{bashrc,bash_logout}
134 insinto /etc/skel
135 for f in bash{_logout,_profile,rc} ; do
136 newins "${FILESDIR}"/dot-${f} .${f}
137 done
138
139 if use build ; then
140 rm -rf "${D}"/usr
141 else
142 doman doc/*.1
143 dodoc README NEWS AUTHORS CHANGES COMPAT Y2K doc/FAQ doc/INTRO
144 dosym bash.info.gz /usr/share/info/bashref.info.gz
145 fi
146 }
147
148 pkg_preinst() {
149 if [[ -e ${ROOT}/etc/bashrc ]] && [[ ! -d ${ROOT}/etc/bash ]] ; then
150 mkdir -p "${ROOT}"/etc/bash
151 mv -f "${ROOT}"/etc/bashrc "${ROOT}"/etc/bash/
152 fi
153
154 # our bash_logout is just a place holder so dont
155 # force users to go through etc-update all the time
156 if [[ -e ${ROOT}/etc/bash/bash_logout ]] ; then
157 rm -f "${D}"/etc/bash/bash_logout
158 fi
159 }

  ViewVC Help
Powered by ViewVC 1.1.20