# Template file for 'gtk-engine-murrine'
pkgname=gtk-engine-murrine
version=0.98.2
revision=7
build_style=gnu-configure
configure_args="--enable-animation ac_cv_path_INTLTOOL_PERL=true"
hostmakedepends="pkg-config gettext"
makedepends="gtk+-devel"
short_desc="GTK2 engine to make your desktop look like a murrina"
maintainer="Orphaned <orphan@voidlinux.org>"
license="LGPL-2.0-or-later"
homepage="http://cimitan.com/murrine/project/murrine"
distfiles="${GNOME_SITE}/murrine/0.98/murrine-${version}.tar.xz"
checksum=e9c68ae001b9130d0f9d1b311e8121a94e5c134b82553ba03971088e57d12c89

post_patch() {
	# abandonware anyway
	sed -i '/test -n.*0[.]37[.]1/,/Check the gettext tools/d' configure
	sed -i 's!@INTLTOOL_XML_RULE@!%.xml: %.xml.in\n\tGETTEXTDATADIRS=$(top_srcdir) msgfmt --xml -d $(top_srcdir)/po --template $< -o $@!' schema/Makefile.in
	sed -i 's/[<]_/</;s![<]/_!</!' schema/murrine.xml.in.in
	mkdir -p its
	cat <<-EOF >its/murrine.its
	<?xml version="1.0"?>
	<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
	  <its:translateRule selector="//*" translate="no"/>
	  <its:translateRule
	    selector="//engine/option/long_name | //engine/option/description"
	    translate="yes"/>
	</its:rules>
	EOF
	cat <<-EOF >its/murrine.loc
	<?xml version="1.0"?>
	<locatingRules>
	  <locatingRule name="murrine" pattern="murrine.xml" target="murrine.its" />
	</locatingRules>
	EOF
}
