SUMMARY="A terminal multiplexer"
DESCRIPTION="tmux is a \"terminal multiplexer\", it enables a number of \
terminals (or windows) to be accessed and controlled from a single terminal. \
tmux is intended to be a simple, modern, BSD-licensed alternative to programs \
such as GNU screen."
HOMEPAGE="http://tmux.github.io/"
COPYRIGHT="2015 tmux team"
LICENSE="ISC"
REVISION="2"
SOURCE_URI="https://github.com/tmux/tmux/releases/download/$portVersion/tmux-$portVersion.tar.gz"
CHECKSUM_SHA256="918f7220447bef33a1902d4faff05317afd9db4ae1c9971bef5c787ac6c88386"
PATCHES="tmux-$portVersion.patchset"

ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"

PROVIDES="
	tmux$secondaryArchSuffix = $portVersion
	cmd:tmux$secondaryArchSuffix = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libevent_2.1$secondaryArchSuffix
	lib:libncurses$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libevent_2.1$secondaryArchSuffix
	devel:libncurses$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	cmd:aclocal
	cmd:autoconf
	cmd:awk
	cmd:gcc$secondaryArchSuffix
	cmd:make
	cmd:pkg_config$secondaryArchSuffix
	cmd:sed
	"

BUILD()
{
	autoreconf -fi
	runConfigure ./configure
	make $jobArgs
}

INSTALL()
{
	make install
}
