SUMMARY="The friendly interactive shell"
DESCRIPTION="
Fish is a shell geared towards interactive use. Its features are \
focused on user friendliness and discoverability. The language syntax \
is simple but incompatible with other shell languages.
"
HOMEPAGE="http://ridiculousfish.com/shell/"
SOURCE_URI="git://git.gitorious.org/fish-shell/fish-shell.git"
#CHECKSUM_MD5=""
REVISION="1"
LICENSE="GNU GPL v2"
COPYRIGHT="2005-2009 Axel Liljencrantz"

ARCHITECTURES="x86 ?x86_64"
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
	# x86_gcc2 is fine as primary target architecture as long as we're building
	# for a different secondary architecture.
	ARCHITECTURES="$ARCHITECTURES x86_gcc2"
else
	ARCHITECTURES="$ARCHITECTURES !x86_gcc2"
fi
SECONDARY_ARCHITECTURES="x86"

PROVIDES="
	fish$secondaryArchSuffix = $portVersion
	cmd:fish$secondaryArchSuffix = $portVersion
	cmd:fish_indent$secondaryArchSuffix = $portVersion
	cmd:fish_pager$secondaryArchSuffix = $portVersion
	cmd:fishd$secondaryArchSuffix = $portVersion
	cmd:mimedb$secondaryArchSuffix = $portVersion
	cmd:set_color$secondaryArchSuffix = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libiconv$secondaryArchSuffix
	lib:libncurses$secondaryArchSuffix
	lib:libgettextlib_0.18.1$secondaryArchSuffix >= 0.18.1.1
	lib:libintl$secondaryArchSuffix
	"
BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libiconv$secondaryArchSuffix
	devel:libncurses$secondaryArchSuffix >= 5.9
	devel:libgettextlib$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	cmd:autoconf
	cmd:libtoolize
	cmd:make
	cmd:gcc$secondaryArchSuffix
	cmd:which
	cmd:doxygen >= 1.6.3
	"

PATCHES="fish-1.23.1_git.patch"

GLOBAL_WRITABLE_FILES="
	settings/fish/config.fish keep-old
"

BUILD()
{
	libtoolize --force --copy --install
    autoconf
    runConfigure ./configure --without-xsel
    make
}

INSTALL()
{
    make install
}

TEST()
{
	make test
}

