# Template file for 'subtle'
pkgname=subtle
version=0.11.6610
revision=1
hostmakedepends="python3 mercurial ruby-devel pkg-config"
makedepends="ruby-devel libX11-devel libXpm-devel libXft-devel
 libXinerama-devel libXrandr-devel libXtst-devel"
short_desc="Manual tiling window manager"
maintainer="Andrea Brancaleoni <abc@pompel.me>"
license="GPL-3.0-or-later"
homepage="https://hg.unexist.dev/subtle/"
distfiles="https://hg.unexist.dev/subtle/archive/${version#*.*.}.tar.gz"
checksum=7aff9833ebe97b49f53c36a3efa644e4ee0cf169befb8facb4941c4ece5d9234
conf_files="/etc/xdg/subtle/subtle.rb"

CFLAGS="-Wno-int-conversion"

if [ "$CROSS_BUILD" ]; then
	if [ "$XBPS_WORDSIZE" != "$XBPS_TARGET_WORDSIZE" ]; then
		broken="Word size must match"
	fi
	hostmakedepends+=" $makedepends"
	CFLAGS+=" -I${XBPS_CROSS_BASE}/usr/include/ruby-3.4.0/"
	export CFLAGS
fi

do_configure() {
	DESTDIR=$PKGDESTDIR rake config
}
do_build() {
	rake build
}
do_install() {
	rake install
}
