void-packages/srcpkgs/libdex/template

56 lines
1.5 KiB
Bash

# Template file for 'libdex'
pkgname=libdex
version=0.2.0
revision=1
build_style=meson
build_helper=gir
configure_args="-Dexamples=false
$(vopt_bool gtk_doc docs)
$(vopt_feature gir introspection)
$(vopt_bool vala vapi)"
hostmakedepends="pkg-config glib-devel gettext
$(vopt_if vala vala) $(vopt_if gtk_doc gi-docgen)"
makedepends="glib-devel libgirepository-devel
liburing-devel $(vopt_if vala 'vala vala-devel')"
short_desc="Future-based programming for GLib-based applications"
maintainer="oreo639 <oreo6391@gmail.com>"
license="LGPL-2.1-or-later"
homepage="https://gitlab.gnome.org/GNOME/libdex"
changelog="https://gitlab.gnome.org/GNOME/libdex/-/raw/main/NEWS"
distfiles="${GNOME_SITE}/libdex/${version%.*}/libdex-${version}.tar.xz"
checksum=a0f7566260971a1e4aeb53a07d95c806091257b8789d6fad9931dba872c5070d
# Package build options
build_options="gir vala gtk_doc"
build_options_default="gir vala gtk_doc"
if [ "$XBPS_TARGET_LIBC" = musl ]; then
makedepends+=" libucontext-devel"
CFLAGS="-D_GNU_SOURCE"
fi
if [ "$XBPS_CHECK_PKGS" ]; then
configure_args+=" -Dtests=true"
else
configure_args+=" -Dtests=false"
fi
libdex-devel_package() {
depends="${sourcepkg}-${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.so"
if [ "$build_option_gir" ]; then
vmove usr/share/gir-1.0
fi
if [ "$build_option_vala" ]; then
vmove usr/share/vala
fi
if [ "$build_option_gtk_doc" ]; then
vmove usr/share/doc
fi
}
}