From 71dc252bb96c5d8f667f11abf3e0b8ba59fd4131 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Sun, 6 Feb 2022 10:45:03 +0100 Subject: [PATCH] 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 --- package/avahi/avahi.mk | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/package/avahi/avahi.mk b/package/avahi/avahi.mk index 04c4164af6..1992669a92 100644 --- a/package/avahi/avahi.mk +++ b/package/avahi/avahi.mk @@ -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)