[packages/lxsession] - build using libayatana-indicator and libayatana-appindicator - force regeneration of .c files with

hawk hawk at pld-linux.org
Tue Apr 23 04:45:26 CEST 2024


commit c25660810d5f239c0819aa87a4968d691289849f
Author: Marcin Krol <hawk at tld-linux.org>
Date:   Tue Apr 23 03:02:35 2024 +0200

    - build using libayatana-indicator and libayatana-appindicator
    - force regeneration of .c files with valac
    - fix building with gtk3

 libayatana.patch | 34 ++++++++++++++++++++++++++++++++++
 lxsession.spec   | 23 +++++++++++++++++++----
 2 files changed, 53 insertions(+), 4 deletions(-)
---
diff --git a/lxsession.spec b/lxsession.spec
index bc8f31a..70f1730 100644
--- a/lxsession.spec
+++ b/lxsession.spec
@@ -7,11 +7,12 @@ Summary:	Default session manager for LXDE
 Summary(pl.UTF-8):	Domyślny zarząda sesji dla LXDE
 Name:		lxsession
 Version:	0.5.5
-Release:	1
+Release:	2
 License:	GPL v2+
 Group:		X11/Applications
 Source0:	https://downloads.sourceforge.net/lxde/%{name}-%{version}.tar.xz
 # Source0-md5:	e8380acef215ee7c99c067a2241c2c7b
+Patch0:		libayatana.patch
 URL:		http://www.lxde.org/
 BuildRequires:	dbus-devel
 BuildRequires:	dbus-glib-devel
@@ -22,14 +23,21 @@ BuildRequires:	glib2-devel >= 1:2.28.0
 %{!?with_gtk3:BuildRequires:	gtk+2-devel >= 2:2.12.0}
 %{?with_gtk3:BuildRequires:	gtk+3-devel >= 3.0.0}
 BuildRequires:	intltool >= 0.40.0
-%{?with_notify:BuildRequires:	libappindicator-gtk2-devel >= 0.1}
-%{?with_notify:BuildRequires:	libindicator-devel >= 0.4.93}
-%{?with_notify:BuildRequires:	libnotify-devel}
+%if %{with notify}
+%{!?with_gtk3:BuildRequires:	libayatana-appindicator-gtk2-devel}
+%{?with_gtk3:BuildRequires:	libayatana-appindicator-gtk3-devel}
+BuildRequires:	libayatana-indicator-devel
+BuildRequires:	libnotify-devel
+%endif
 BuildRequires:	libxslt-progs
 BuildRequires:	pkgconfig
 BuildRequires:	polkit-devel
 BuildRequires:	tar >= 1:1.22
 BuildRequires:	vala >= 2:0.16.0
+%if %{with notify}
+%{!?with_gtk3:BuildRequires:	vala-libayatana-appindicator-gtk2}
+%{?with_gtk3:BuildRequires:	vala-libayatana-appindicator-gtk3}
+%endif
 BuildRequires:	xorg-lib-libX11-devel
 BuildRequires:	xz
 %{!?with_gtk3:Requires:	gtk+2 >= 2:2.12.0}
@@ -58,12 +66,19 @@ uruchomić je ponownie przy kolejnym zalogowaniu tego użytkownika.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
+%{__libtoolize}
+%{__aclocal} -I m4
+%{__autoconf}
+%{__automake}
 %configure \
 	%{?with_notify:--enable-advanced-notifications} \
 	%{?with_gtk3:--enable-gtk3} \
 	--disable-silent-rules
+# Delete bundled .c files to force regeneration using valac
+%{__make} clean-generic
 %{__make}
 
 %install
diff --git a/libayatana.patch b/libayatana.patch
new file mode 100644
index 0000000..9a0b045
--- /dev/null
+++ b/libayatana.patch
@@ -0,0 +1,34 @@
+diff -ur lxsession-0.5.5.orig/configure.ac lxsession-0.5.5/configure.ac
+--- lxsession-0.5.5.orig/configure.ac	2020-02-29 17:29:36.000000000 +0100
++++ lxsession-0.5.5/configure.ac	2024-04-23 02:02:29.782055165 +0200
+@@ -117,7 +117,11 @@
+ AM_CONDITIONAL(USE_ADVANCED_NOTIFICATIONS, test "$use_advanced_notifications" = "yes")
+ 
+ if test "$use_advanced_notifications" = "yes"; then
+-  PKG_CHECK_MODULES(INDICATORS, [indicator-0.4 >= 0.4.93 appindicator-0.1])
++  if test "$enable_gtk3" = "yes"; then
++    PKG_CHECK_MODULES(INDICATORS, [ayatana-indicator-0.4 ayatana-appindicator3-0.1])
++  else
++    PKG_CHECK_MODULES(INDICATORS, [ayatana-indicator-0.4 ayatana-appindicator-0.1])
++  fi
+   AC_SUBST(INDICATORS_CFLAGS)
+   AC_SUBST(INDICATORS_LIBS)
+ 
+diff -ur lxsession-0.5.5.orig/Makefile.am lxsession-0.5.5/Makefile.am
+--- lxsession-0.5.5.orig/Makefile.am	2020-02-29 15:15:59.000000000 +0100
++++ lxsession-0.5.5/Makefile.am	2024-04-23 01:59:56.536039201 +0200
+@@ -459,8 +459,13 @@
+     $(GTK_LIBS)
+ 
+ if USE_ADVANCED_NOTIFICATIONS
++if USE_GTK3
++GTKVER=3
++else
++GTKVER=
++endif
+ lxsession_lxsession_VALAFLAGS +=     \
+-    --pkg appindicator-0.1 \
++    --pkg ayatana-appindicator$(GTKVER)-0.1 \
+     --pkg libnotify \
+     -D USE_ADVANCED_NOTIFICATIONS
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/lxsession.git/commitdiff/c25660810d5f239c0819aa87a4968d691289849f



More information about the pld-cvs-commit mailing list