### this file is sourced not run
PKGVER=1.14.0

PKGBUILD=1
PKGARCH=x86_64

# source: step
hash_version= # $hash is Nth commit after tag x.y.z committed on YYYY.mm.dd
hash=
hash7=${hash#???????}; hash7=${hash%"$hash7"}

# git master
#TARBALL=chafa-$PKGVER-${hash7}.tar.gz SRC_URL=https://github.com/hpjansson/chafa/archive/${hash}.tar.gz
# release
TARBALL=chafa-$PKGVER.tar.xz          SRC_URL=https://github.com/hpjansson/chafa/releases/download/${PKGVER}/$TARBALL

MD5SUM=9b13047a48ee89fd1064886ef73ad06b
BUNDLE=

SLACKREQ='glib freetype2 libjpeg-turbo librsvg libwebp libavif'
SLACKDESC="chafa: chafa $PKGVER ${hash7:+ $hash_version $hash7} (terminal image graphics)
chafa:
chafa: Terminal graphics for the 21st century. Chafa is a command-line utility and
chafa: library that converts image data, including animated GIFs, into graphics
chafa: formats or ANSI/Unicode character art suitable for display in a terminal.
chafa:
chafa:
chafa: https://github.com/hpjansson/chafa
chafa: https://hpjansson.org/chafa
chafa:
chafa:
"
SLACKSUG=''

### default pkg_download
### prepare
pkg_prepare() {
	pkg_prepare_default &&
	cd tmp/chafa-* &&
	patch -Np1 -i ../pkg/patches/fix_makefile_am_for_zsh_completion.patch
}
### default pkg_package
### build
pkg_build() {
	CONFFLAGS="$CONFFLAGS --disable-static"
	cd /tmp/chafa-* &&
	# autogen to enable patched Makefile.am
	NOCONFIGURE=1 ./autogen.sh $CONFFLAGS &&
	pkg_build_autoconf &&
	(cd tools/completions && make install-zsh-completion) &&
	pkg_build_slackdesc
}

# vim:ft=sh:
