Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37786726
en ru br
Репозитории ALT

Группа :: Graphical desktop/MATE
Пакет: mate-polkit

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: mate-polkit-1.26.1-alt2.patch
Скачать


 .gear/rules                                        |  2 +
 .../tags/bfbe9defcfdffe98b1ecaa1119354c8ebf64c977  |  6 ++
 .gear/tags/list                                    |  1 +
 configure.ac                                       | 54 +++++++++++++-----
 mate-polkit.spec                                   | 66 ++++++++++++++++++++++
 src/Makefile.am                                    |  6 +-
 src/main.c                                         | 15 ++---
 7 files changed, 126 insertions(+), 24 deletions(-)
diff --git a/.gear/rules b/.gear/rules
new file mode 100644
index 0000000..4b0460c
--- /dev/null
+++ b/.gear/rules
@@ -0,0 +1,2 @@
+tar: v@version@:.
+diff: v@version@:. .
diff --git a/.gear/tags/bfbe9defcfdffe98b1ecaa1119354c8ebf64c977 b/.gear/tags/bfbe9defcfdffe98b1ecaa1119354c8ebf64c977
new file mode 100644
index 0000000..dc21c48
--- /dev/null
+++ b/.gear/tags/bfbe9defcfdffe98b1ecaa1119354c8ebf64c977
@@ -0,0 +1,6 @@
+object e137fc7de7f27c949e45298dfa8d7fe521fa547b
+type commit
+tag v1.26.1
+tagger raveit65 <mate@raveit.de> 1665315339 +0200
+
+version 1.26.1
diff --git a/.gear/tags/list b/.gear/tags/list
new file mode 100644
index 0000000..7ff4acb
--- /dev/null
+++ b/.gear/tags/list
@@ -0,0 +1 @@
+bfbe9defcfdffe98b1ecaa1119354c8ebf64c977 v1.26.1
diff --git a/configure.ac b/configure.ac
index 51725c3..0648ad1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -111,8 +111,17 @@ AC_ARG_ENABLE([accountsservice],
 
 AM_CONDITIONAL([HAVE_ACCOUNTSSERVICE], [test "x$enable_accountsservice" = xyes])
 
-# Application indicator
-APPINDICATOR_PKG=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 application indicators]),
@@ -120,22 +129,33 @@ AC_ARG_ENABLE([appindicator],
 	      [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 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
 # ********************
@@ -181,6 +201,10 @@ echo "
         Warning flags:              ${WARN_CFLAGS}
 
         Accountsservice:            ${enable_accountsservice}
-        Application indicator:      ${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/mate-polkit.spec b/mate-polkit.spec
new file mode 100644
index 0000000..ae7a741
--- /dev/null
+++ b/mate-polkit.spec
@@ -0,0 +1,66 @@
+%define _libexecdir %_prefix/libexec
+
+Name: mate-polkit
+Version: 1.26.1
+Release: alt2
+Epoch: 1
+Summary: Integrates polkit authentication for MATE desktop
+License: GPLv2+
+Group: Graphical desktop/MATE
+Url: http://mate-desktop.org/
+Packager: Valery Inozemtsev <shrek@altlinux.ru>
+
+Source: %name-%version.tar
+Patch: %name-%version-%release.patch
+
+BuildRequires: mate-common libpolkit-devel
+BuildRequires: libayatana-appindicator3-devel
+
+%description
+Integrates polkit with the MATE Desktop environment
+
+%prep
+%setup -q
+%patch -p1
+
+%build
+%autoreconf
+%configure \
+	--enable-appindicator
+
+%make_build
+
+%install
+%make DESTDIR=%buildroot install
+
+%find_lang %name
+
+%files -f %name.lang
+%doc AUTHORS COPYING README
+%_sysconfdir/xdg/autostart/polkit-mate-authentication-agent-1.desktop
+%_libexecdir/polkit-mate-authentication-agent-1
+
+%changelog
+* Wed Jun 14 2023 Anton Midyukov <antohami@altlinux.org> 1:1.26.1-alt2
+- NMU: rebuild with libayatana-appindicator3
+
+* Tue Nov 22 2022 Valery Inozemtsev <shrek@altlinux.ru> 1:1.26.1-alt1
+- 1.26.1
+
+* Fri Aug 06 2021 Valery Inozemtsev <shrek@altlinux.ru> 1:1.26.0-alt1
+- 1.26.0
+
+* Tue Feb 25 2020 Valery Inozemtsev <shrek@altlinux.ru> 1:1.24.0-alt1
+- 1.24.0
+
+* Tue Mar 05 2019 Valery Inozemtsev <shrek@altlinux.ru> 1:1.22.0-alt1
+- 1.22.0
+
+* Mon Dec 24 2018 Valery Inozemtsev <shrek@altlinux.ru> 1:1.20.2-alt1
+- 1.20.2
+
+* Thu Mar 15 2018 Valery Inozemtsev <shrek@altlinux.ru> 1:1.20.0-alt1
+- initial build from git.mate-desktop.org
+
+* Tue Feb 20 2018 Vladimir D. Seleznev <vseleznv@altlinux.org> 1.20.0-alt1_1
+- new fc release
diff --git a/src/Makefile.am b/src/Makefile.am
index a534d1e..5f7ead8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -35,7 +35,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)
 
@@ -47,7 +48,8 @@ polkit_mate_authentication_agent_1_LDADD = 		\
 	$(GLIB_LIBS)					\
 	$(POLKIT_AGENT_LIBS)				\
 	$(POLKIT_GOBJECT_LIBS)				\
-	$(APPINDICATOR_LIBS)
+	$(AYATANA_APPINDICATOR_LIBS)			\
+	$(UBUNTU_APPINDICATOR_LIBS)			
 
 EXTRA_DIST = \
 	polkit-mate-authentication-agent-1.desktop.in \
diff --git a/src/main.c b/src/main.c
index 43616cd..9fc2bf5 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,6 +1,5 @@
 /*
  * Copyright (C) 2009 Red Hat, Inc.
- * Copyright (C) 2012-2021 MATE Developers
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -30,8 +29,10 @@
 #include <glib/gi18n.h>
 #include <polkitagent/polkitagent.h>
 
-#ifdef HAVE_APPINDICATOR
-#include <libappindicator/app-indicator.h>
+#if defined(HAVE_AYATANA_APPINDICATOR)
+# include <libayatana-appindicator/app-indicator.h>
+#elif defined(HAVE_UBUNTU_APPINDICATOR)
+# include <libappindicator/app-indicator.h>
 #endif
 
 #include "polkitmatelistener.h"
@@ -52,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;
@@ -91,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)
@@ -152,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;
@@ -200,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*/
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin