1SUMMARY="A simple, Unicode-aware word processor that runs on the console"
2DESCRIPTION="WordGrinder is designed to get out of your way and let you write; \
3it does very little, but what it does it does it well. It supports basic \
4paragraph styles, basic character styles, basic screen markup, a menu \
5interface that means you don't have to remember complex key sequences, HTML \
6import and export, and some other useful features."
7HOMEPAGE="http://cowlark.com/wordgrinder/"
8COPYRIGHT="2007-2020 David Given"
9LICENSE="MIT"
10REVISION="1"
11SOURCE_URI="https://github.com/davidgiven/wordgrinder/archive/$portVersion.tar.gz"
12CHECKSUM_SHA256="856cbed2b4ccd5127f61c4997a30e642d414247970f69932f25b4b5a81b18d3f"
13
14ARCHITECTURES="all !x86_gcc2"
15SECONDARY_ARCHITECTURES="x86"
16
17commandBinDir=$binDir
18commandSuffix=$secondaryArchSuffix
19if [ "$targetArchitecture" = x86_gcc2 ]
20then
21	commandBinDir=$prefix/bin
22	commandSuffix=
23fi
24
25PROVIDES="
26	wordgrinder$secondaryArchSuffix = $portVersion
27	cmd:wordgrinder$commandSuffix = $portVersion
28	"
29REQUIRES="
30	haiku$secondaryArchSuffix
31	lib:libfreetype$secondaryArchSuffix
32	lib:liblua$secondaryArchSuffix >= 5.3
33	lib:libncurses$secondaryArchSuffix
34	lib:libz$secondaryArchSuffix
35	"
36
37BUILD_REQUIRES="
38	haiku${secondaryArchSuffix}_devel
39	devel:libfreetype$secondaryArchSuffix
40	devel:liblua$secondaryArchSuffix >= 5.3
41	devel:libncurses$secondaryArchSuffix
42	devel:libz$secondaryArchSuffix
43	"
44BUILD_PREREQUIRES="
45	cmd:cc$secondaryArchSuffix
46	cmd:make
47	cmd:ninja
48	cmd:pkg_config$secondaryArchSuffix
49	cmd:xxd
50	"
51
52defineDebugInfoPackage wordgrinder$secondaryArchSuffix \
53	$commandBinDir/wordgrinder
54
55BUILD()
56{
57	make PREFIX=$prefix BINDIR=$commandBinDir DOCDIR=$docDir \
58		MANDIR=$manDir HOME="`finddir B_USER_DIRECTORY`" \
59		LUA_PACKAGE=lua5.3
60}
61
62INSTALL()
63{
64	make install PREFIX=$prefix BINDIR=$commandBinDir DOCDIR=$docDir \
65		MANDIR=$manDir HOME="`finddir B_USER_DIRECTORY`" \
66		LUA_PACKAGE=lua5.3
67	mv $docDir/wordgrinder/README.wg $docDir
68	rmdir $docDir/wordgrinder
69	rm -rf $prefix/share
70}
71