Skip to content

Commit

Permalink
libvirt-glib: make gtk doc a build_option to fix cross. Default is off
Browse files Browse the repository at this point in the history
  • Loading branch information
Gottox committed Apr 5, 2021
1 parent 39af159 commit 6a9d300
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 5 deletions.
20 changes: 20 additions & 0 deletions srcpkgs/libvirt-glib/patches/fix-cross.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--- meson.build.orig 2021-04-05 19:05:59.233949995 +0200
+++ meson.build 2021-04-05 19:06:10.010949599 +0200
@@ -61,7 +61,7 @@ includedir = join_paths(prefix, get_opti

# gobject introspection
gir = find_program('g-ir-scanner', required: get_option('introspection'))
-enable_introspection = gir.found() and not meson.is_cross_build()
+enable_introspection = gir.found()

# vala
vapi_opt = get_option('vapi')
@@ -76,7 +76,7 @@ endif
# gtk-doc
if not get_option('docs').disabled()
gtk_doc = find_program('gtkdoc-scan', required: get_option('docs'))
- enable_doc = gtk_doc.found() and not meson.is_cross_build()
+ enable_doc = gtk_doc.found()
else
enable_doc = false
endif
12 changes: 7 additions & 5 deletions srcpkgs/libvirt-glib/template
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ revision=1
build_helper="gir"
build_style=meson
configure_args="-Dintrospection=$(vopt_if gir enabled disabled)
-Dvapi=$(vopt_if vala enabled disabled)"
hostmakedepends="automake pkg-config intltool glib-devel gettext-devel gtk-doc
python-devel $(vopt_if vala vala)"
-Dvapi=$(vopt_if vala enabled disabled) -Ddocs=$(vopt_if doc enabled disabled)"
hostmakedepends="automake pkg-config intltool glib-devel gettext-devel
python-devel $(vopt_if vala vala) $(vopt_if doc gtk-doc)"
makedepends="libglib-devel libvirt-devel libxml2-devel python-devel"
short_desc="Glib integration with libvirt"
maintainer="Enno Boland <gottox@voidlinux.org>"
Expand All @@ -17,7 +17,7 @@ distfiles="http://libvirt.org/sources/glib/${pkgname}-${version}.tar.xz"
checksum=8423f7069daa476307321d1c11e2ecc285340cd32ca9fc05207762843edeacbd
replaces="libvirt-glib-python>=0"

build_options="gir vala"
build_options="gir vala doc"
build_options_default="gir vala"

libvirt-glib-devel_package() {
Expand All @@ -27,7 +27,9 @@ libvirt-glib-devel_package() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.so"
vmove usr/share/gtk-doc
if [ "$build_option_doc" ]; then
vmove usr/share/gtk-doc
fi
if [ "$build_option_gir" ]; then
vmove usr/share/gir-1.0
vmove usr/share/vala
Expand Down

0 comments on commit 6a9d300

Please sign in to comment.