### this file is sourced not run
# source: step

repo=yad
pkgname=${repo}_gtk3 # for SLACKDESC

# [1] Branch maintain-gtk2 in step's repo compiled for gtk3

MD5SUM=9f77b3f2eb9bdb5a010ecf27609ea174
PKGVER=0.42.43

TARBALL=$pkgname-$PKGVER.tar.gz
SRC_URL=https://github.com/step-/$repo/archive/$PKGVER.tar.gz

PKGARCH=x86_64
PKGBUILD=1
BUNDLE=

SLACKREQ='yad_gtk2_doc libgtksourceview3 libgtkspell3_gtk3 libenchant2 gtk3'
SLACKDESC="$pkgname: yad $PKGVER (GUI dialog for shell scripts)
$pkgname: YAD (yet another dialog) creates graphical dialogs from shell scripts.
$pkgname: This package builds the GTK+-2 maintenance branch with GTK+-3 libraries,
$pkgname: and it only supplies the binary, named as yad_gtk3.
$pkgname:
$pkgname: License: GNU GPL3
$pkgname:
$pkgname: https://github.com/step-/yad     maintain-gtk2
$pkgname: forked from
$pkgname: https://github.com/v1cont/yad    master
$pkgname: https://sourceforge.net/projects/yad-dialog
"

### default pkg_download
### default pkg_prepare
### package
pkg_package() {
	#rm usr/share/icons/hicolor/icon-theme.cache
	# remove everything else except the three binaries
	rm -r usr/share
}

### build
pkg_build() {
	export LDFLAGS="$LDFLAGS -Wl,--as-needed"
	CONFFLAGS="$CONFFLAGS --enable-icon-browser \
		--enable-html --enable-gio --enable-spell \
		--enable-sourceview \
		--enable-standalone \
		--with-gtk=gtk3 --with-rgb=/usr/share/X11/rgb.txt"
	cd /tmp/$repo-* &&
	autoreconf -fiv &&
	intltoolize --force &&
	pkg_build_autoconf &&
	err=0
	for p in yad yad-icon-browser pfd; do
		mv -v /usr/bin/$p /usr/bin/${p}_gtk3 ||
		err=1
	done
	[ 0 = $err ] &&
	pkg_build_slackdesc
}

# vim:ft=sh:

