Drop $Id$ per council decision in bug #611234.
[gentoo.git] / app-shells / shish / shish-0.7_pre3-r1.ebuild
1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 inherit toolchain-funcs
7
8 MY_PV="${PV/_/-}"
9 MY_P="${PN}-${MY_PV}"
10
11 DESCRIPTION="The diet shell"
12 HOMEPAGE="http://www.blah.ch/shish/"
13 SRC_URI="http://www.blah.ch/${PN}/pkg/${MY_P}.tar.bz2"
14
15 LICENSE="GPL-2"
16 SLOT="0"
17 KEYWORDS="~x86"
18 IUSE="debug diet"
19
20 DEPEND="diet? ( dev-libs/dietlibc )"
21 RDEPEND="${DEPEND}"
22
23 S="${WORKDIR}/${MY_P}"
24
25 DOCS=( AUTHORS BUGS ChangeLog README TODO )
26
27 pkg_setup() {
28         use diet && export CC="diet $(tc-getCC) -nostdinc"
29 }
30
31 src_prepare() {
32         # Respect CFLAGS, bug #439974
33         sed -i \
34                 -e '/CFLAGS="$CFLAGS/d' \
35                 -e '/-fexpensive-optimizations -fomit-frame-pointer/d' \
36                 configure || die 'sed on configure failed'
37 }
38
39 src_configure() {
40         econf \
41                 $(use_enable debug) \
42                 --disable-quiet # bug 439974
43 }
44
45 src_compile() {
46         # parallel make is b0rked
47         emake -j1
48 }
49
50 src_install() {
51         default
52         doman doc/man/shish.1
53 }
54
55 pkg_postinst() {
56         einfo "Updating ${ROOT}etc/shells"
57         ( grep -v "^/bin/shish$" "${ROOT}"etc/shells; echo "/bin/shish" ) > "${T}"/shells
58         mv -f "${T}"/shells "${ROOT}"etc/shells
59 }