From 5ebffc70745bdbad5fc23ddbaf88aa95c9426f55 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 12 Feb 2020 11:46:39 +0000 Subject: [PATCH] debian/patches: Drop 0002-Prefer-building-against-Ayatana-AppIndicator-but-als.patch. Applied upstream. --- ...against-Ayatana-AppIndicator-but-als.patch | 175 ------------------ debian/patches/series | 1 - 2 files changed, 176 deletions(-) delete mode 100644 debian/patches/0002-Prefer-building-against-Ayatana-AppIndicator-but-als.patch diff --git a/debian/patches/0002-Prefer-building-against-Ayatana-AppIndicator-but-als.patch b/debian/patches/0002-Prefer-building-against-Ayatana-AppIndicator-but-als.patch deleted file mode 100644 index aa19553..0000000 --- a/debian/patches/0002-Prefer-building-against-Ayatana-AppIndicator-but-als.patch +++ /dev/null @@ -1,175 +0,0 @@ -From 8350ca2a4f679f4047a3e84443d3377be51810f0 Mon Sep 17 00:00:00 2001 -From: Mike Gabriel -Date: Thu, 29 Mar 2018 21:46:46 +0200 -Subject: [PATCH 2/2] Prefer building against Ayatana AppIndicator, but also - support legacy Ubuntu AppIndicator. - ---- - configure.ac | 57 ++++++++++++++++++++++++++++++++++++++++----------------- - src/Makefile.am | 6 ++++-- - src/main.c | 14 ++++++++------ - 3 files changed, 52 insertions(+), 25 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 4d10117..2f7ef72 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -145,31 +145,50 @@ AC_ARG_ENABLE([accountsservice], - - AM_CONDITIONAL([HAVE_ACCOUNTSSERVICE], [test "x$enable_accountsservice" = xyes]) - --# Application indicator --APPINDICATOR_PKG=ayatana-appindicator3-0.1 -+# Application Indicator (Ubuntu and Ayatana implementation) -+ -+AYATANA_APPINDICATOR_PKG=ayatana-appindicator3-0.1 -+UBUNTU_APPINDICATOR_PKG=appindicator3-0.1 -+ -+PKG_CHECK_EXISTS($AYATANA_APPINDICATOR_PKG >= $APPINDICATOR_REQUIRED, -+ [have_appindicator_ayatana="yes"], -+ [have_appindicator_ayatana="no"]) -+PKG_CHECK_EXISTS($UBUNTU_APPINDICATOR_PKG >= $APPINDICATOR_REQUIRED, -+ [have_appindicator_ubuntu="yes"], -+ [have_appindicator_ubuntu="no"]) - - AC_ARG_ENABLE([appindicator], -- AS_HELP_STRING([--enable-appindicator[=@<:@no/auto/yes@:>@]],[Build support for Ayatana AppIndicators]), -+ AS_HELP_STRING([--enable-appindicator[=@<:@no/auto/yes@:>@]],[Build support for AppIndicators]), - [enable_appindicator=$enableval], - [enable_appindicator="auto"]) - -- --if test "x$enable_appindicator" = "xauto"; then -- PKG_CHECK_EXISTS($APPINDICATOR_PKG >= $APPINDICATOR_REQUIRED, -- [enable_appindicator="yes"], -- [enable_appindicator="no"]) -+if test "x$enable_appindicator" == "xauto" && -+ (test "x$have_appindicator_ayatana" == "xyes" || -+ test "x$have_appindicator_ubuntu" == "xyes"); then -+ AC_MSG_NOTICE([Enabling AppIndicator support (as --enable-appindicator=auto was used).]) -+ enable_appindicator="yes" - fi - --if test "x$enable_appindicator" = "xyes"; then -- PKG_CHECK_MODULES(APPINDICATOR, -- [$APPINDICATOR_PKG >= $APPINDICATOR_REQUIRED], -- [AC_DEFINE(HAVE_APPINDICATOR, 1, [Have Ayatana AppIndicator])]) -+if test "x$enable_appindicator" == "xyes"; then -+ if test "x$have_appindicator_ayatana" == "xyes"; then -+ AC_MSG_NOTICE([Buidling against Ayatana AppIndicator.]) -+ PKG_CHECK_MODULES(AYATANA_APPINDICATOR, -+ [$AYATANA_APPINDICATOR_PKG >= $APPINDICATOR_REQUIRED], -+ [AC_DEFINE(HAVE_AYATANA_APPINDICATOR, 1, [Have Ayatana AppIndicator])]) -+ AC_SUBST(AYATANA_APPINDICATOR_CFLAGS) -+ AC_SUBST(AYATANA_APPINDICATOR_LIBS) -+ elif test "x$have_appindicator_ubuntu" == "xyes"; then -+ AC_MSG_NOTICE([Buidling against Ubuntu AppIndicator.]) -+ PKG_CHECK_MODULES(UBUNTU_APPINDICATOR, -+ [$UBUNTU_APPINDICATOR_PKG >= $APPINDICATOR_REQUIRED], -+ [AC_DEFINE(HAVE_UBUNTU_APPINDICATOR, 1, [Have Ubuntu AppIndicator])]) -+ AC_SUBST(UBUNTU_APPINDICATOR_CFLAGS) -+ AC_SUBST(UBUNTU_APPINDICATOR_LIBS) -+ else -+ AC_MSG_ERROR([Neither Ayatana AppIndicator nor Ubuntu AppIndicator library is present, but you enabled AppIndicator support.]) -+ fi - fi - --AM_CONDITIONAL(HAVE_APPINDICATOR, test "x$enable_appindicator" = "xyes") --AC_SUBST(APPINDICATOR_CFLAGS) --AC_SUBST(APPINDICATOR_LIBS) -- - # ******************** - # Internationalisation - # ******************** -@@ -214,6 +233,10 @@ echo " - cppflags: ${CPPFLAGS} - - Accountsservice: ${enable_accountsservice} -- Ayatana AppIndicator: ${enable_appindicator} -+ -+ AppIndicator enabled: ${enable_appindicator} -+ Ayatana AppIndicator (preferred) ${have_appindicator_ayatana} -+ Ubuntu AppIndicator (legacy) ${have_appindicator_ubuntu} -+ - Maintainer mode: ${USE_MAINTAINER_MODE} - " -diff --git a/src/Makefile.am b/src/Makefile.am -index 93f17f9..e0c0418 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -33,7 +33,8 @@ polkit_mate_authentication_agent_1_CFLAGS = \ - $(GLIB_CFLAGS) \ - $(POLKIT_AGENT_CFLAGS) \ - $(POLKIT_GOBJECT_CFLAGS) \ -- $(APPINDICATOR_CFLAGS) \ -+ $(AYATANA_APPINDICATOR_CFLAGS) \ -+ $(UBUNTU_APPINDICATOR_CFLAGS) \ - $(WARN_CFLAGS) \ - $(AM_CFLAGS) - -@@ -45,7 +46,8 @@ polkit_mate_authentication_agent_1_LDADD = \ - $(GLIB_LIBS) \ - $(POLKIT_AGENT_LIBS) \ - $(POLKIT_GOBJECT_LIBS) \ -- $(APPINDICATOR_LIBS) \ -+ $(AYATANA_APPINDICATOR_LIBS) \ -+ $(UBUNTU_APPINDICATOR_LIBS) \ - $(INTLLIBS) - - EXTRA_DIST = \ -diff --git a/src/main.c b/src/main.c -index 76bd958..9fc2bf5 100644 ---- a/src/main.c -+++ b/src/main.c -@@ -29,8 +29,10 @@ - #include - #include - --#ifdef HAVE_APPINDICATOR --#include -+#if defined(HAVE_AYATANA_APPINDICATOR) -+# include -+#elif defined(HAVE_UBUNTU_APPINDICATOR) -+# include - #endif - - #include "polkitmatelistener.h" -@@ -51,7 +53,7 @@ static PolkitSubject *session = NULL; - /* the current set of temporary authorizations */ - static GList *current_temporary_authorizations = NULL; - --#ifdef HAVE_APPINDICATOR -+#if defined(HAVE_AYATANA_APPINDICATOR) || defined(HAVE_UBUNTU_APPINDICATOR) - static AppIndicator *app_indicator = NULL; - #else - static GtkStatusIcon *status_icon = NULL; -@@ -90,7 +92,7 @@ revoke_tmp_authz (void) - NULL); - } - --#ifdef HAVE_APPINDICATOR -+#if defined(HAVE_AYATANA_APPINDICATOR) || defined(HAVE_UBUNTU_APPINDICATOR) - static void - on_menu_item_activate (GtkMenuItem *menu_item, - gpointer user_data) -@@ -151,7 +153,7 @@ update_temporary_authorization_icon_real (void) - if (current_temporary_authorizations != NULL) - { - /* show icon */ --#ifdef HAVE_APPINDICATOR -+#if defined(HAVE_AYATANA_APPINDICATOR) || defined(HAVE_UBUNTU_APPINDICATOR) - if (app_indicator == NULL) - { - GtkWidget *item, *menu; -@@ -199,7 +201,7 @@ update_temporary_authorization_icon_real (void) - else - { - /* hide icon */ --#ifdef HAVE_APPINDICATOR -+#if defined(HAVE_AYATANA_APPINDICATOR) || defined(HAVE_UBUNTU_APPINDICATOR) - if (app_indicator != NULL) - { - /* keep the app_indicator, hide the icon or it won't come back*/ --- -2.11.0 - diff --git a/debian/patches/series b/debian/patches/series index 29e0cd5..c142715 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1 @@ 0001-Switch-to-Ayatana-AppIndicator.patch -0002-Prefer-building-against-Ayatana-AppIndicator-but-als.patch