summaryrefslogtreecommitdiff
blob: 80de6a257abd87595dc5b8086fbd4ef540f2ddea (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
# Copyright 1999-2000 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author Achim Gottinger <achim@gentoo.org>
# $Header: /var/cvsroot/gentoo-x86/net-misc/wget/wget-1.7-r1.ebuild,v 1.4 2001/08/13 19:20:17 drobbins Exp $

A="${P}.tar.gz wget-new-percentage-1.7-20010606.diff"
S=${WORKDIR}/${P}
DESCRIPTION="Network utility to retrieve files from the WWW"
SRC_URI="ftp://gatekeeper.dec.com/pub/GNU/wget/${P}.tar.gz
	 ftp://prep.ai.mit.edu/gnu/wget/${P}.tar.gz
         http://www.biscom.net/~cade/away/wget-new-percentage/wget-new-percentage-1.7-20010606.diff"
HOMEPAGE="http://www.cg.tuwien.ac.at/~prikryl/wget.html"

DEPEND="virtual/glibc nls? ( sys-devel/gettext )"

RDEPEND="virtual/glibc"

src_unpack() {
    unpack ${P}.tar.gz
    cd ${S}/src
    patch -p0 < ${DISTDIR}/wget-new-percentage-1.7-20010606.diff
}

src_compile() {
    local myconf
    if [ -z "`use nls`" ] ; then
	myconf="--disable-nls"
    fi                      
#    if [ "`use ssl`" ] ; then
#	myconf="$myconf --with-ssl=/usr"
#    fi 
    if [ -z "$DEBUG" ] ; then
	myconf="$myconf --disable-debug"
    fi
    try ./configure --prefix=/usr --sysconfdir=/etc/wget \
	--infodir=/usr/share/info --mandir=usr/share/man $myconf
    if [ "`use static`" ] ; then
       try make -e LDFLAGS="--static"
    else
       try make
    fi
}

src_install() {   
	
	try make prefix=${D}/usr sysconfdir=${D}/etc/wget \
		mandir=${D}/usr/share/man infodir=${D}/usr/share/info install
	
    if [ "`use build`" ] || [ "`use bootcd`" ] ; then
        rm -rf ${D}/usr
    else                      
		dodoc AUTHORS COPYING ChangeLog MACHINES MAILING-LIST NEWS README TODO 
		dodoc doc/sample.wgetrc
    fi
}