# Template file for 'icewm'
pkgname=icewm
version=4.0.0
revision=1
build_style=cmake
make_cmd=make
configure_args="-DENABLE_LTO=ON -DCONFIG_LIBRSVG=ON -DENABLE_ALSA=ON
 -DCONFIG_XPM=ON -DCONFIG_LIBJPEG=ON -DCFGDIR=/etc/icewm"
hostmakedepends="python3-Markdown gettext-devel libtool mkfontdir perl
 pkg-config"
makedepends="libSM-devel libXft-devel libXinerama-devel
 libXrandr-devel libao-devel librsvg-devel libsndfile-devel
 libXcomposite-devel libXdamage-devel fribidi-devel imlib2-devel libXpm-devel libXcursor-devel"
depends="shared-mime-info"
short_desc="Window Manager designed for speed, usability, and consistency"
maintainer="Glaulher <glaulher.developer@gmail.com>"
license="GPL-2.0-or-later"
homepage="https://ice-wm.org/"
changelog="https://raw.githubusercontent.com/ice-wm/icewm/master/NEWS"
distfiles="https://github.com/ice-wm/icewm/archive/${version}.tar.gz"
checksum=9a2eb74449bf4c2b995fd8b85c392dda06f0da684fae34849d8f04466b2e5943
# broken tests
make_check=no

# Ninja build files generation fails
export CMAKE_GENERATOR="Unix Makefiles"

# No c++ warnings for 'One Defintion Rules' and make sure LTO goes ok
CXXFLAGS="-Wno-odr -fno-strict-aliasing"

pre_install() {
	cp lib/IceWM.jpg build/lib/IceWM.jpg
}
post_install() {
	# See https://github.com/ice-wm/icewm/commit/5d735df293e61fd94e114ef58e800d757f98d01c
	rm -rf "${DESTDIR}/builddir/"
}
