void-packages/srcpkgs/glib/template

87 lines
2.7 KiB
Bash

# Template file for 'glib'
pkgname=glib
version=2.78.0
revision=3
build_style=meson
# static version is necessary for qemu-user-static;
# also disable LTO, otherwise there are multiple failures when linking qemu
configure_args="-Dman=true -Dselinux=disabled
$(vopt_bool gtk_doc gtk_doc) --default-library=both -Db_lto=false"
hostmakedepends="gettext pkg-config libxslt docbook-xsl $(vopt_if gtk_doc gtk-doc)"
makedepends="zlib-devel pcre2-devel libffi-devel dbus-devel elfutils-devel libmount-devel"
checkdepends="desktop-file-utils shared-mime-info dbus python3-pytest"
short_desc="GNU library of C routines"
maintainer="Orphaned <orphan@voidlinux.org>"
license="LGPL-2.1-or-later"
homepage="https://wiki.gnome.org/Projects/GLib"
#changelog="https://gitlab.gnome.org/GNOME/glib/raw/glib-2-78/NEWS"
changelog="https://gitlab.gnome.org/GNOME/glib/raw/main/NEWS"
distfiles="${GNOME_SITE}/glib/${version%.*}/glib-${version}.tar.xz"
checksum=44eaab8b720877ce303c5540b657b126f12dc94972d9880b52959f43fb537b30
make_check_pre="dbus-run-session"
build_options="gtk_doc"
desc_option_gtk_doc="Build GTK API docs"
if [ -z "$CROSS_BUILD" ]; then
build_options_default+=" gtk_doc"
fi
post_patch() {
# Timer test is flaky on 32 bit (does float comparisons)
if [ "${XBPS_TARGET_WORDSIZE}" = "32" ]; then
vsed -e "s/'timer' : {},//" -i glib/tests/meson.build
fi
}
pre_check() {
# machine-id is a random, non-zero value
echo 'dcb30309cd6c8b7cc20383d85a5c7012' > /etc/machine-id
}
post_check() {
rm /etc/machine-id
}
libglib-devel_package() {
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
lib32files="/usr/lib/glib-2.0/include/glibconfig.h"
pkg_install() {
vmove usr/include
vmove usr/lib/glib-2.0
vmove usr/lib/pkgconfig
vmove "usr/lib/*.so"
vmove "usr/lib/*.a"
}
}
glib-devel_package() {
depends="python3-setuptools libglib-devel>=${version}_${revision}"
short_desc+=" - development files"
python_version=3
pycompile_dirs="usr/share/glib-2.0/codegen usr/share/glib-2.0/gdb"
pkg_install() {
vmove usr/bin/glib-compile-resources
vmove usr/bin/glib-genmarshal
vmove usr/bin/glib-mkenums
vmove usr/bin/gtester-report
vmove usr/bin/gdbus-codegen
vmove usr/bin/gtester
vmove usr/bin/glib-gettextize
vmove usr/share/man/man1/glib-compile-resources.1
vmove usr/share/man/man1/glib-gettextize.1
vmove usr/share/man/man1/gtester.1
vmove usr/share/man/man1/glib-mkenums.1
vmove usr/share/man/man1/gdbus-codegen.1
vmove usr/share/man/man1/glib-genmarshal.1
vmove usr/share/man/man1/gtester-report.1
for f in aclocal glib-2.0 gdb; do
vmove usr/share/${f}
done
if [ -d $DESTDIR/usr/share/gtk-doc ]; then
vmove usr/share/gtk-doc
fi
}
}