SUMMARY="GNU's line-oriented text editor"
DESCRIPTION="GNU ed is a line-oriented text editor. It is used to create, \
display, modify and otherwise manipulate text files, both interactively and \
via shell scripts. A restricted version of ed, red, can only edit files in \
the current directory and cannot execute shell commands.
Ed is the \"standard\" text editor in the sense that it is the original editor \
for Unix, and thus widely available."
HOMEPAGE="https://www.gnu.org/software/ed/"
COPYRIGHT="1992-2020 Free Software Foundation, Inc."
LICENSE="GNU GPL v3"
REVISION="1"
# Upstream only ships lziped tarballs, not usable on pure x86_gcc2.
#SOURCE_URI="https://ftp.gnu.org/gnu/ed/ed-$portVersion.tar.lz"
#CHECKSUM_SHA256="ffb97eb8f2a2b5a71a9b97e3872adce953aa1b8958e04c5b7bf11d556f32552a"
# So use gziped tarball from fossies until we have lzip for x86_gcc2.
SOURCE_URI="https://fossies.org/linux/privat/ed-$portVersion.tar.gz"
CHECKSUM_SHA256="e9345ba139347040a246698b1734ae3d203ccc78c5324d4e4ea1f55f9dfe4589"

ARCHITECTURES="all"

PROVIDES="
	ed = $portVersion compat >= 1
	cmd:ed = $portVersion compat >= 1
	cmd:red = $portVersion compat >= 1
	"
REQUIRES="
	haiku
	"

BUILD_REQUIRES="
	haiku_devel
	"
BUILD_PREREQUIRES="
	cmd:cmp
	cmd:gcc
	cmd:ld
	cmd:make
	cmd:perl
	cmd:sed
	"

BUILD()
{
	runConfigure ./configure
	make
}

INSTALL()
{
	make install
}

TEST()
{
	make check
}
