SUMMARY="A text-mode web browser"
DESCRIPTION="Lynx is a highly configurable console-based web browser with SSL \
support."
HOMEPAGE="https://lynx.invisible-island.net/"
COPYRIGHT="1997-2018 Thomas E. Dickey"
LICENSE="GNU GPL v2"
REVISION="3"
SOURCE_URI="https://invisible-mirror.net/archives/lynx/tarballs/lynx$portVersion.tar.bz2"
CHECKSUM_SHA256="387f193d7792f9cfada14c60b0e5c0bff18f227d9257a39483e14fa1aaf79595"
SOURCE_DIR="lynx$portVersion"
PATCHES="lynx-$portVersion.patchset"

ARCHITECTURES="all"

GLOBAL_WRITABLE_FILES="
	settings/lynx.lss keep-old
	settings/lynx.cfg keep-old
	"

PROVIDES="
	lynx = $portVersion
	cmd:lynx = $portVersion
	"
REQUIRES="
	haiku
	lib:libiconv
	lib:libncurses
	lib:libssl
	lib:libz
	"

BUILD_REQUIRES="
	haiku_devel
	devel:libiconv
	devel:libncurses
	devel:libssl
	devel:libz >= 1.2.8
	"
BUILD_PREREQUIRES="
	cmd:ar
	cmd:bison
	cmd:bzip2
	cmd:cmp
	cmd:ctags
	cmd:gcc
	cmd:gzip
	cmd:ld
	cmd:make
	cmd:pkg_config
	cmd:ranlib
	cmd:tar
	"

BUILD()
{
	runConfigure --omit-dirs "docDir" ./configure --with-ssl
	make
}

INSTALL()
{
	make install install-help install-doc
}
