SUMMARY="A free, light-weight system monitor"
DESCRIPTION="Conky is a free, light-weight system monitor for X, that \
displays any kind of information on your desktop.
Conky can display more than 300 built-in objects, including support for:

• A plethora of OS stats (uname, uptime, CPU usage, mem usage, disk usage, \
\"top\" like process stats, and network monitoring, just to name \
a few).
• Built-in IMAP and POP3 support.
• Built-in support for many popular music players (MPD, XMMS2, \
Audacious).
• Can be extended using built-in Lua support, or any of your own scripts \
and programs.
• Built-in Imlib2 and Cairo bindings for arbitrary drawing with Lua.
• Runs on Linux, FreeBSD, OpenBSD, DragonFlyBSD, NetBSD, Solaris, \
Haiku, and macOS!
and much much more.

Conky can display information either as text, or using simple progress bars and
graph widgets, with different fonts and colours."
HOMEPAGE="https://github.com/brndnmtthws/conky"
COPYRIGHT="2004 Hannu Saransaari and Lauri Hakkarainen
	2005-2020 Brenden Matthews, Philip Kovacs, et. al."
LICENSE="GNU GPL v3
	GNU LGPL v3
	MIT"
REVISION="3"
srcGitRev="6ad788b78d8b0cf384e97dac5cabd052cb8a53f2"
SOURCE_URI="https://github.com/brndnmtthws/conky/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="2efa3f40626ee910de8f638d8c4648eda33c6565aea4905bfd4f2de742bf69ee"
SOURCE_FILENAME="conky-$portVersion-$srcGitRev.tar.gz"
SOURCE_DIR="conky-$srcGitRev"

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

GLOBAL_WRITABLE_FILES="
	settings/conky_no_x11.conf keep-old
	"

PROVIDES="
	conky$secondaryArchSuffix = $portVersion
	cmd:conky = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libcurl$secondaryArchSuffix
	lib:libintl$secondaryArchSuffix
	lib:liblua$secondaryArchSuffix
	lib:libncurses$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libcurl$secondaryArchSuffix
	devel:libintl$secondaryArchSuffix
	devel:liblua$secondaryArchSuffix >= 5.3
	devel:libncurses$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	cmd:cmake
	cmd:gawk
	cmd:gcc$secondaryArchSuffix
	cmd:git
	cmd:make
	cmd:pkg_config$secondaryArchSuffix
	"

BUILD()
{
	cmake -DCMAKE_INSTALL_PREFIX=$prefix \
		-DDOC_PATH=$docDir \
		-DMAN_PATH=$manDir \
		-DXDG_CONFIG_FILE=$settingsDir/conky_no_x11.conf \
		-DBUILD_X11=false .
	make $jobArgs
}

INSTALL()
{
	make install
	mv $docDir/conky_no_x11.conf $settingsDir
}
