diff --git a/srcpkgs/gtk-theme-config/template b/srcpkgs/gtk-theme-config/template index 88cf8cebeff..4e99d4100b2 100644 --- a/srcpkgs/gtk-theme-config/template +++ b/srcpkgs/gtk-theme-config/template @@ -2,7 +2,7 @@ pkgname=gtk-theme-config version=1.0 reverts=20140605_1 -revision=1 +revision=2 build_style=gnu-makefile hostmakedepends="pkg-config vala-devel" makedepends="glib-devel vala-devel gtk+3-devel hicolor-icon-theme desktop-file-utils" @@ -13,3 +13,18 @@ license="GPL-3" homepage="https://github.com/satya164/gtk-theme-config" distfiles="$homepage/archive/v$version.tar.gz" checksum=174aac3ea43966168d120dbd9e0f23d7900d095ee1b0cf32472d59b0fdea8448 + +pre_build() { + local _p _cflags _ldflags + + # Prepend every CFLAGS item with -X + for _p in ${CFLAGS}; do + _cflags="${_cflags} -X $_p" + done + # Prepend every LDFLAGS item with -X + for _p in ${LDFLAGS}; do + _ldflags="${_ldflags} -X $_p" + done + # Add to VALACFLAGS + sed -i Makefile -e "s;^VALACFLAGS.*;& $_cflags $_ldflags;" +}