# HG changeset patch # User Guido Berhoerster # Date 1563978324 -7200 # Node ID 73081cc299f5bfce08dc9e3501a7d27f3fad178b # Parent 3e8551a4194453e60dc9ccf07ae2d49ca762ee56 Fix support for libayatana-appindicator Fix the library name and use the correct headers. diff -r 3e8551a41944 -r 73081cc299f5 Makefile --- a/Makefile Wed Jul 24 15:13:07 2019 +0200 +++ b/Makefile Wed Jul 24 16:25:24 2019 +0200 @@ -73,9 +73,11 @@ INDICATOR_LIB := $(or \ $(shell pkg-config --exists appindicator3-0.1 && \ printf '%s\\\n' appindicator3-0.1), \ - $(shell pkg-config --exists ayatana-indicator3-0.1 && \ - printf '%s\\\n' ayatana-indicator3-0.1), \ + $(shell pkg-config --exists ayatana-appindicator3-0.1 && \ + printf '%s\\\n' ayatana-appindicator3-0.1), \ appindicator3-0.1) +INDICATOR_FLAG := $(if $(findstring ayatana,$(INDICATOR_LIB)), \ + -DHAVE_AYATANA_APPINDICATOR,) define generate-manpage-rule = %.$1: %.$(addsuffix .xml,$1) docbook-update-source-data.xsl @@ -156,7 +158,8 @@ -DPACKAGE_LOCALE_DIR="\"$(localedir)\"" \ -DGETTEXT_PACKAGE=\"$(PACKAGE)\" \ -DSETTINGS_SCHEMA_ID=\"$(APPLICATION_ID)\" \ - -DI_KNOW_THE_PACKAGEKIT_GLIB2_API_IS_SUBJECT_TO_CHANGE + -DI_KNOW_THE_PACKAGEKIT_GLIB2_API_IS_SUBJECT_TO_CHANGE \ + $(INDICATOR_FLAG) $(PACKAGE): XCFLAGS = $(shell pkg-config --cflags gtk+-3.0 \ $(INDICATOR_LIB) packagekit-glib2 \ polkit-gobject-1 upower-glib) diff -r 3e8551a41944 -r 73081cc299f5 pui-application.c --- a/pui-application.c Wed Jul 24 15:13:07 2019 +0200 +++ b/pui-application.c Wed Jul 24 16:25:24 2019 +0200 @@ -23,7 +23,11 @@ #include #include +#ifndef HAVE_AYATANA_APPINDICATOR #include +#else /* !HAVE_AYATANA_APPINDICATOR */ +#include +#endif /* !HAVE_AYATANA_APPINDICATOR */ #include #include