#Maintainer: George Vlahavas (vlahavas~at~gmail~dot~com)

pkgname=w3m
pkgver=0.5.3
pkgrel=3gv
source=("http://downloads.sourceforge.net/w3m/w3m-$pkgver.tar.gz" "file_handle.patch" "gc72.patch" "https.patch")
docs=("readme" "install" "copying" "changelog" "authors" "news" "todo" "maintainers" "about-nls")
url=http://sourceforge.net/projects/w3m/

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"w3m (a text based browser)"
"w3m is a pager and/or text-based browser. It can handle tables,"
"cookies, authentication, and almost everything except JavaScript."
)


build() {
	cd $startdir/src/$pkgname-$pkgver

	patch -p1 < $startdir/src/file_handle.patch || exit 1
	patch -p1 < $startdir/src/gc72.patch || exit 1
	patch -p1 < $startdir/src/https.patch || exit 1

	./configure --prefix=/usr --libdir=/usr/lib${LIBDIRSUFFIX} --localstatedir=/var --sysconfdir=/etc --with-termlib="terminfo ncurses" --enable-image=no --build=$arch-slackware-linux
	make || return 1
	make install DESTDIR=$startdir/pkg
}