# Template file for 'oksh'
pkgname=oksh
version=7.1
revision=2
build_style=gnu-configure
hostmakedepends="pkgconf"
makedepends="netbsd-curses-devel"
short_desc="Portable OpenBSD ksh, based on the Public Domain Korn Shell"
maintainer="Tuxliban Torvalds <tenshalito@gmail.com>"
license="Public Domain"
homepage="https://github.com/ibara/oksh"
distfiles="${homepage}/releases/download/${pkgname}-${version}/${pkgname}-${version}.tar.gz"
checksum=9dc0b0578d9d64d10c834f9757ca11f526b562bc5454da64b2cb270122f52064
register_shell="/bin/oksh"

alternatives="
 ksh:ksh:/usr/bin/oksh
 ksh:ksh.1:/usr/share/man/man1/oksh.1
 sh:sh:/usr/bin/oksh
 sh:sh.1:/usr/share/man/man1/oksh.1
"
build_options="static"
build_options_default="static"

do_configure() {
	export PKG_CONFIG=/usr/bin/pkgconf
	if [ "$build_option_static" ]; then
		./configure --prefix=/usr \
		--enable-curses \
		--enable-static
	fi
}
