package/avahi: add pygobject support, move to python3

The python support in avahi needs pygobjet to do anything:

Building avahi-python:              no   (You need python, pygobject and python-dbus!)

So add optional support for it.  Python-gobject is only available for
python3, so change the python logic to use python 3.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
Peter Korsgaard 2022-02-06 10:45:03 +01:00
parent ff44d53b64
commit 71dc252bb9

View File

@ -40,7 +40,6 @@ AVAHI_CONF_OPTS = \
--disable-gtk \
--disable-gtk3 \
--disable-gdbm \
--disable-pygobject \
--disable-mono \
--disable-monodoc \
--disable-stack-protector \
@ -104,16 +103,16 @@ else
AVAHI_CONF_OPTS += --disable-glib --disable-gobject
endif
ifeq ($(BR2_PACKAGE_PYTHON),y)
ifeq ($(BR2_PACKAGE_PYTHON3),y)
AVAHI_CONF_ENV += \
am_cv_pathless_PYTHON=python \
am_cv_python_version=$(PYTHON_VERSION) \
am_cv_python_platform=linux2 \
am_cv_python_pythondir=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \
am_cv_python_pyexecdir=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \
am_cv_pathless_PYTHON=python3 \
am_cv_python_version=$(PYTHON3_VERSION) \
am_cv_python_platform=linux5 \
am_cv_python_pythondir=/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \
am_cv_python_pyexecdir=/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \
py_cv_mod_socket_=yes
AVAHI_DEPENDENCIES += python
AVAHI_DEPENDENCIES += python3
AVAHI_CONF_OPTS += --enable-python
else
AVAHI_CONF_OPTS += --disable-python
@ -127,6 +126,13 @@ else
AVAHI_CONF_OPTS += --disable-python-dbus
endif
ifeq ($(BR2_PACKAGE_PYTHON_GOBJECT),y)
AVAHI_CONF_OPTS += --enable-pygobject
AVAHI_DEPENDENCIES += python-gobject
else
AVAHI_CONF_OPTS += --disable-pygobject
endif
AVAHI_CONF_ENV += CFLAGS="$(AVAHI_CFLAGS)"
AVAHI_MAKE_OPTS += LIBS=$(TARGET_NLS_LIBS)