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

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

# Uncomment either section [1] or [2] below.

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

MD5SUM=92a7596ca291aeb409ac3b3681c3c692
PKGVER=0.42.42

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

# [2] Last official GTK2 release in yad author's repo

# MD5SUM=b6b1142ae15206912e178d33277e2afe
# PKGVER=0.42.0

# TARBALL=$pkgname-$PKGVER.tar.gz
# SRC_URL=https://github.com/v1cont/$pkgname/archive/v$PKGVER.tar.gz

PKGARCH=x86_64
PKGBUILD=1
BUNDLE=

SLACKREQ='gtk2 libgtksourceview libgtkspell3 '
SLACKDESC="$pkgname: yad $PKGVER (GUI dialog for shell scripts)
$pkgname:
$pkgname: YAD (yet another dialog) creates graphical dialogs from shell scripts.
$pkgname: This package is built with the GTK+ 2 maintenance branch of the project.
$pkgname:
$pkgname: License: GNU GPL3
$pkgname:
$pkgname: https://github.com/step-/yad     maintain-gtk2
$pkgname: https://github.com/v1cont/yad    master
$pkgname: https://sourceforge.net/projects/yad-dialog
$pkgname:
"

### default pkg_download
pkg_prepare() {
	pkg_prepare_default &&
		cd tmp/yad-* || return 1
		while read p; do
			: "($p)"
			case $p in
				'#'* | '' ) continue ;;
				* ) patch_file=$p ;;
			esac
			patch -p1 -i ../pkg/"$patch_file" || return 1
		done < ../pkg/patch-list
}
### default pkg_package

### build
pkg_build() {
	CONFFLAGS="$CONFFLAGS --enable-icon-browser \
		--enable-html --enable-gio --enable-spell \
		--enable-sourceview \
		--with-gtk=gtk2 --with-rgb=/usr/share/X11/rgb.txt"
	cd /tmp/$repo-* &&
	autoreconf -fiv &&
	intltoolize --force &&
	pkg_build_autoconf &&
	pkg_build_slackdesc
}

### package
pkg_package() {
	rm usr/share/icons/hicolor/icon-theme.cache
}

# vim:ft=sh:

