# Template file for 'GTK-NoCSD'
pkgname=GTK-NoCSD
version=4.6
revision=1
build_style=gnu-makefile
make_install_args="LIBDIR=/usr/lib NOOPT=1"
hostmakedepends="pkg-config"
makedepends="gtk4-devel libadwaita-devel"
short_desc="LD_PRELOAD library to disable CSD in GTK3/4 apps"
maintainer="Nafis <mnabid.25@outlook.com>"
license="GPL-3.0-or-later"
homepage="https://codeberg.org/MorsMortium/GTK-NoCSD"
distfiles="${homepage}/archive/${version}.tar.gz"
checksum=8dfe649f124ccc04a27cea1a6db2470744215c110714b427792f2b441e2b5750
replaces="gtk3-nocsd>=0"

pre_build() {
	CFLAGS+=" $(pkg-config --cflags gtk4 glib-2.0)"
	LDFLAGS+=" $(pkg-config --libs gtk4 glib-2.0)"
}

gtk3-nocsd_package() {
	depends="${sourcepkg}-${version}_${revision}"
	short_desc+=" (transitional dummy package)"
	pkg_install() {
		ln -s /usr/lib/libgtk-nocsd.so.0 ${PKGDESTDIR}/usr/lib/libgtk3-nocsd.so.0
	}
}
