avahi-discover: fix cross-compilation issues.

The situation: on the 0.7 bump python-gobject was introduced as a
dependency because avahi-discover and avahi-discover-standalone bianaries aren't built without it

What went wrong: armv* arches don't have python-gobject and can't
cross-compile it so the package building just fails (funny enough it
"succeeds" sometimes, exiting 0 and not creating the package) and packages aren't made, leading to a chain
reaction where other packages like gvfs and cups-filters also fail

The fix: wrap the python-gobject dependency, avahi-discover and
avahi-discover-standalone on opt_if gir, add $(vopt_enable gir
pygobject) so the package won't try to find python-gobject

Side-effects: cross-compiled arches won't have avahi-discover and
avahi-discover-standalone binaries available to them, the avahi-discover
pacakge becomes kinda useless by itself, native compilation
arches remain unaffected
This commit is contained in:
maxice8 2017-10-16 08:42:48 -02:00 committed by Leаh Neukirchen
parent e7a3f2a26f
commit 78b5d29cdf
1 changed files with 8 additions and 6 deletions

View File

@ -5,7 +5,7 @@
#
pkgname=avahi-discover
version=0.7
revision=2
revision=3
wrksrc="avahi-${version}"
noarch=yes
build_style=gnu-configure
@ -15,9 +15,9 @@ configure_args="--disable-qt3 --disable-qt4 --disable-mono --disable-monodoc
--with-avahi-priv-access-group=network --with-autoipd-user=avahi
--with-autoipd-group=avahi --with-distro=none --disable-xmltoman
--disable-dbm --without-systemdsystemunitdir
--disable-static ssp_cv_lib=no --enable-python --enable-pygtk
--disable-static ssp_cv_lib=no --enable-python
--enable-glib --enable-gobject --enable-gtk --enable-gtk3
$(vopt_enable gir introspection)"
$(vopt_enable gir introspection) $(vopt_enable gir pygobject)"
short_desc="Service discover user interface for avahi"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="LGPL-2.1"
@ -28,7 +28,7 @@ checksum=57a99b5dfe7fdae794e3d1ee7a62973a368e91e414bd0dfa5d84434de5b14804
hostmakedepends="automake libtool pkg-config intltool pygtk-devel
python-dbus gobject-introspection glib-devel"
makedepends="dbus-devel libcap-devel libdaemon-devel gdbm-devel
pygtk-devel python-dbus gtk+3-devel python-gobject-devel"
pygtk-devel python-dbus gtk+3-devel $(vopt_if gir python-gobject-devel)"
depends="avahi>=$version python avahi-python>=$version python-dbus pygtk desktop-file-utils"
pycompile_module="avahi_discover"
@ -59,7 +59,7 @@ do_install() {
vmkdir usr/lib/pkgconfig
vmkdir usr/share/avahi/interfaces
for f in bvnc bssh bshell avahi-bookmarks avahi-discover avahi-discover-standalone; do
for f in bvnc bssh bshell avahi-bookmarks $(vopt_if gir avahi-discover) $(vopt_if gir avahi-discover-standalone); do
mv ${wrksrc}/tmpinstall/usr/bin/${f} ${DESTDIR}/usr/bin
if [ -f ${wrksrc}/tmpinstall/usr/share/man/man1/${f}.1 ]; then
mv ${wrksrc}/tmpinstall/usr/share/man/man1/${f}.1 ${DESTDIR}/usr/share/man/man1
@ -161,7 +161,9 @@ avahi-ui-utils_package() {
vmove usr/share/applications/bvnc.desktop
vmove usr/share/applications/bssh.desktop
vmove usr/share/man/man1/bssh.1
vmove usr/bin/avahi-discover-standalone
if [ "$build_option_gir" ]; then
vmove usr/bin/avahi-discover-standalone
fi
vmove usr/bin/bssh
vmove usr/share/man/man1/bvnc.1
vmove usr/bin/bvnc