# Template file for 'gucharmap'
pkgname=gucharmap
version=16.0.1
revision=1
build_style=meson
build_helper="gir"
configure_args="-Db_ndebug=false -Db_lto=false -Dgtk3=true
 $(vopt_if gir '' '-Dgir=false -Dvapi=false') $(vopt_bool gtk_doc docs)
 -Ducd_path=${XBPS_SRCDISTDIR}/${pkgname}-${version}"
hostmakedepends="pkg-config glib-devel gettext itstool perl unzip
 $(vopt_if gtk_doc gtk-doc)"
makedepends="desktop-file-utils cairo-devel pango-devel atk-devel
 freetype-devel libglib-devel pcre2-devel gtk+3-devel"
depends="hicolor-icon-theme desktop-file-utils"
short_desc="GNOME Unicode Charmap"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-3.0-or-later, GFDL-1.3-only, Unicode-DFS-2015"
homepage="https://wiki.gnome.org/Apps/Gucharmap"
distfiles="https://gitlab.gnome.org/GNOME/gucharmap/-/archive/${version}/gucharmap-${version}.tar.bz2
 https://www.unicode.org/Public/${version%%.*}.0.0/ucd/Blocks.txt
 https://www.unicode.org/Public/${version%%.*}.0.0/ucd/DerivedAge.txt
 https://www.unicode.org/Public/${version%%.*}.0.0/ucd/NamesList.txt
 https://www.unicode.org/Public/${version%%.*}.0.0/ucd/Scripts.txt
 https://www.unicode.org/Public/${version%%.*}.0.0/ucd/UnicodeData.txt
 https://www.unicode.org/Public/${version%%.*}.0.0/ucd/Unihan.zip"
checksum="d687d3a3d4990ea7aff4066e17768ec9fefe7b3129b98090c750b8d7074b4764
 f3907b395d410f1b97342292ca6bc83dd12eb4b205f2a0c48efdef99e517d7b0
 60caa81b99a4dfb0bc5d38440d323073e3f356f46f9ca7869da848cd0715408b
 6a299e9259d07c2a941fdc967e2117e1246d56aa4e133caff86dfc0845715679
 9e88f0a677df47311106340be8ede2ecdacd9c1c931831218d2be6d5508e0039
 ff58e5823bd095166564a006e47d111130813dcf8bf234ef79fa51a870edb48f
 b8f000df69de7828d21326a2ffea462b04bc7560022989f7cc704f10521ef3e0"
skip_extraction="Blocks.txt DerivedAge.txt NamesList.txt Scripts.txt UnicodeData.txt Unihan.zip"

# Package build options
build_options="gir gtk_doc"
build_options_default="gir"

if [ -z "$CROSS_BUILD" ]; then
	build_options_default+=" gtk_doc"
fi

post_install() {
	vlicense COPYING
	vlicense COPYING.GFDL
	vlicense COPYING.UNICODE
}

gucharmap-devel_package() {
	depends="gtk+3-devel libglib-devel pcre2-devel
	 ${sourcepkg}>=${version}_${revision}"
	short_desc+=" - development files"
	pkg_install() {
		vmove usr/include
		vmove "usr/lib/*.so"
		vmove usr/lib/pkgconfig
		if [ "$build_option_gir" ]; then
			vmove usr/share/gir-1.0
		fi
	}
}
