SUMMARY="A text-based IRC client"
DESCRIPTION="bitchx is an IRC client written in the C programming language.\
It uses a text-mode user interface.
Features:
* Built-in ANSI color.
* Ease of use. BitchX adds dozens of useful command aliases to reduce typing.
* Built-in notify, protection, bot, and shit lists.
* Built-in mass commands and tools.
* Extended set of DCC commands and built-in CDCC offering.
* Built-in link looker.
* Extended scripting functionality, including functions found nowhere else.
* Huge installed user base, an abundance of scripts, and a dedicated help \
channel (#BitchX on EFNET).
* Built-in screen client, allowing you to detach and re-attach to an irc session."
HOMEPAGE="http://www.bitchx.org/"
COPYRIGHT="1990 Michael Sandroff
	1991, 1992 Troy Rollo
	1992-1996 Matthew Green
	1993, 1997 Jeremy Nelson
	1994 Jake Khuon
	1995, 1998 Jeremy Nelson and others (\"EPIC Software Labs\")
	1996-2004 Colten Edwards et al.
	2008-2014 Kevin Easton et al."
LICENSE="BSD (3-clause)"
REVISION="3"
SOURCE_URI="https://download.sourceforge.net/bitchx/bitchx-$portVersion.tar.gz"
CHECKSUM_SHA256="2d270500dd42b5e2b191980d584f6587ca8a0dbda26b35ce7fadb519f53c83e2"
PATCHES="bitchx-$portVersion.patchset"

ARCHITECTURES="all ?x86"

PROVIDES="
	bitchx = $portVersion
	cmd:bitchx = $portVersion
	cmd:bitchx_$portVersion = $portVersion
	cmd:scr_bx = $portVersion
	"
REQUIRES="
	haiku
	lib:libcrypto
	lib:libncursesw
	lib:libssl
	"

BUILD_REQUIRES="
	haiku_devel
	devel:libcrypto
	devel:libncursesw
	devel:libssl
	"
BUILD_PREREQUIRES="
	cmd:autoreconf
	cmd:gcc
	cmd:grep
	cmd:make
	cmd:pkg_config
	"

defineDebugInfoPackage bitchx \
	"$binDir"/BitchX-$portVersion

BUILD()
{
	autoreconf -fi
	export LDFLAGS="-lnetwork -lbsd"

	runConfigure ./configure \
		--with-plugins
	make $jobArgs
}

INSTALL()
{
	make install
}
