projects/package-update-indicator

changeset 27:73081cc299f5

Fix support for libayatana-appindicator

Fix the library name and use the correct headers.
author Guido Berhoerster <guido+pui@berhoerster.name>
date Wed Jul 24 16:25:24 2019 +0200 (10 months ago)
parents 3e8551a41944
children 74644b419e86
files Makefile pui-application.c
line diff
     1.1 --- a/Makefile	Wed Jul 24 15:13:07 2019 +0200
     1.2 +++ b/Makefile	Wed Jul 24 16:25:24 2019 +0200
     1.3 @@ -73,9 +73,11 @@
     1.4  INDICATOR_LIB := $(or \
     1.5  		    $(shell pkg-config --exists appindicator3-0.1 && \
     1.6  		        printf '%s\\\n' appindicator3-0.1), \
     1.7 -		    $(shell pkg-config --exists ayatana-indicator3-0.1 && \
     1.8 -		        printf '%s\\\n' ayatana-indicator3-0.1), \
     1.9 +		    $(shell pkg-config --exists ayatana-appindicator3-0.1 && \
    1.10 +		        printf '%s\\\n' ayatana-appindicator3-0.1), \
    1.11  		    appindicator3-0.1)
    1.12 +INDICATOR_FLAG := $(if $(findstring ayatana,$(INDICATOR_LIB)), \
    1.13 +		    -DHAVE_AYATANA_APPINDICATOR,)
    1.14  
    1.15  define generate-manpage-rule =
    1.16  %.$1: %.$(addsuffix .xml,$1) docbook-update-source-data.xsl
    1.17 @@ -156,7 +158,8 @@
    1.18  			-DPACKAGE_LOCALE_DIR="\"$(localedir)\"" \
    1.19  			-DGETTEXT_PACKAGE=\"$(PACKAGE)\" \
    1.20  			-DSETTINGS_SCHEMA_ID=\"$(APPLICATION_ID)\" \
    1.21 -			-DI_KNOW_THE_PACKAGEKIT_GLIB2_API_IS_SUBJECT_TO_CHANGE
    1.22 +			-DI_KNOW_THE_PACKAGEKIT_GLIB2_API_IS_SUBJECT_TO_CHANGE \
    1.23 +			$(INDICATOR_FLAG)
    1.24  $(PACKAGE): XCFLAGS =	$(shell pkg-config --cflags gtk+-3.0 \
    1.25  			    $(INDICATOR_LIB) packagekit-glib2 \
    1.26  			    polkit-gobject-1 upower-glib)
     2.1 --- a/pui-application.c	Wed Jul 24 15:13:07 2019 +0200
     2.2 +++ b/pui-application.c	Wed Jul 24 16:25:24 2019 +0200
     2.3 @@ -23,7 +23,11 @@
     2.4  
     2.5  #include <gio/gdesktopappinfo.h>
     2.6  #include <glib/gi18n.h>
     2.7 +#ifndef	HAVE_AYATANA_APPINDICATOR
     2.8  #include <libappindicator/app-indicator.h>
     2.9 +#else /* !HAVE_AYATANA_APPINDICATOR */
    2.10 +#include <libayatana-appindicator/app-indicator.h>
    2.11 +#endif /* !HAVE_AYATANA_APPINDICATOR */
    2.12  #include <stdlib.h>
    2.13  #include <string.h>
    2.14