summaryrefslogtreecommitdiff
blob: 891f8d4d035348f0d619968b12bf87fcc49990af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Copyright 1999-2000 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author Daniel Robbins <drobbins@gentoo.org>
# $Header: /var/cvsroot/gentoo-x86/sys-apps/bash/bash-2.04-r4.ebuild,v 1.2 2001/08/04 18:22:45 pete Exp $

A=${P}.tar.gz
S=${WORKDIR}/${P}
DESCRIPTION="The standard GNU Bourne again shell"
SRC_URI="ftp://gatekeeper.dec.com/pub/GNU/bash/${A}
	 ftp://ftp.gnu.org/gnu/bash/${A}"

HOMEPAGE="http://www.gnu.org/software/bash/bash.html"

DEPEND=">=sys-libs/ncurses-5.2-r2
        readline? ( >=sys-libs/readline-4.1-r2 )
        tex? ( app-text/tetex )
	"
RDEPEND="virtual/glibc"

src_compile() {

    local myconf
    if [ "`use readline`" ]
    then
        myconf="--with-installed-readline"
    fi

    if [ -z "`use nls`" ]
    then
        myconf="${myconf} --disable-nls"
    fi

	try ./configure --prefix=/  --mandir=/usr/share/man \
        --infodir=/usr/share/info --host=${CHOST} \
        --disable-profiling --with-curses \
        --enable-static-link ${myconf}

    try pmake

	if [ "`use tex`" ] && [ -z "`use build`" ] && [ -z "`use bootcd`" ]
	then
        cd support
        cp texi2html texi2html.orig
        sed -e "s:/usr/local/bin/perl:/usr/bin/perl:" \
        texi2html.orig > texi2html
        cd ../doc
        try make
	fi

}



src_install() {

    make prefix=${D}/usr mandir=${D}/usr/share/man \
    infodir=${D}/usr/share/info install
    dodir /bin
    mv ${D}/usr/bin/bash ${D}/bin
    dosym bash /bin/sh

    if [ -z "`use build`" ] && [ -z "`use bootcd`" ]
    then
	    doman doc/*.1

        if [ -z "`use readline`" ]
        then
          doman doc/*.3
        fi
	    dodoc README NEWS AUTHORS CHANGES COMPAT COPYING Y2K
	    dodoc doc/FAQ doc/INTRO

        if [ "`use tex`" ]
        then
	        docinto html
	        dodoc doc/*.html
	        docinto ps
	        dodoc doc/*.ps
	    fi
     else
        rm -rf ${D}/usr
     fi

}