!20 update to 1.24.0

From: @longcheng01 
Reviewed-by: @tangjie02 
Signed-off-by: @tangjie02
This commit is contained in:
openeuler-ci-bot 2022-07-19 08:50:04 +00:00 committed by Gitee
commit 982e278d2d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
7 changed files with 104 additions and 194 deletions

Binary file not shown.

BIN
mate-applets-1.24.0.tar.xz Normal file

Binary file not shown.

BIN
mate-applets-icons.tar.xz Normal file

Binary file not shown.

View File

@ -2,7 +2,7 @@
%global rel_build 1
# This is needed, because src-url contains branched part of versioning-scheme.
%global branch 1.22
%global branch 1.24
# Settings used for build from snapshots.
%{!?rel_build:%global commit c3b48ea39ab358b45048e300deafaa3f569748ad}
@ -13,11 +13,11 @@
%{!?rel_build:%global git_tar %{name}-%{version}-%{git_ver}.tar.xz}
Name: mate-applets
Version: %{branch}.2
Version: %{branch}.0
%if 0%{?rel_build}
Release: 1%{?dist}
Release: 5
%else
Release: 0.11%{?git_rel}%{?dist}
Release: 0.13%{?git_rel}
%endif
Summary: MATE Desktop panel applets
License: GPLv2+ and LGPLv2+
@ -29,8 +29,11 @@ URL: http://mate-desktop.org
# Source for snapshot-builds.
%{!?rel_build:Source0: http://git.mate-desktop.org/%{name}/snapshot/%{name}-%{commit}.tar.xz#/%{git_tar}}
# fix build for s390x arch
Patch1: mate-applets_0001-Revert-Make-cpufreq-builds-independent-from-kernel-h.patch
Source1: mate-applets-icons.tar.xz
# https://github.com/mate-desktop/mate-applets/pull/447
Patch1: mate-applets_0001-eyes-generate-missing-256x256-and-64x64-icons-from-s.patch
Patch2: mate-applets_0002-cpufreq-generate-missing-256x256-and-64x64-icons-fro.patch
BuildRequires: gucharmap-devel
BuildRequires: libgtop2-devel
@ -68,6 +71,10 @@ MATE Desktop panel applets
%autosetup -n %{name}-%{commit} -p1
%endif
tar -xf %{SOURCE1}
cp -rf mate-applets-icons/cpufreq .
cp -rf mate-applets-icons/geyes .
%if 0%{?rel_build}
#NOCONFIGURE=1 ./autogen.sh
%else # 0%{?rel_build}
@ -75,7 +82,7 @@ MATE Desktop panel applets
NOCONFIGURE=1 ./autogen.sh
%endif # 0%{?rel_build}
# Patch1
# patch 1,2
NOCONFIGURE=1 ./autogen.sh
%build
@ -87,7 +94,8 @@ NOCONFIGURE=1 ./autogen.sh
--enable-ipv6 \
--enable-stickynotes \
--libexecdir=%{_libexecdir}/mate-applets \
--with-cpufreq-lib=cpupower
--with-cpufreq-lib=cpupower \
--with-dbus-sys=%{_datadir}/dbus-1/system.d
make %{?_smp_mflags} V=1
@ -102,7 +110,7 @@ make %{?_smp_mflags} V=1
%{_bindir}/mate-cpufreq-selector
%{_libexecdir}/mate-applets
%config(noreplace) %{_sysconfdir}/sound/events/mate-battstat_applet.soundlist
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.mate.CPUFreqSelector.conf
%{_datadir}/dbus-1/system.d/org.mate.CPUFreqSelector.conf
%{_datadir}/mate-applets
%{_datadir}/mate-panel/applets
%{_datadir}/dbus-1/services/org.mate.panel.applet.CommandAppletFactory.service
@ -150,6 +158,30 @@ make %{?_smp_mflags} V=1
%changelog
* Thu Jul 14 2022 longcheng <longcheng@kylinos.com.cn> - 1.24.0-5
- remove %{?dist}
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.24.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri Apr 25 2020 Wolfgang Ulbrich <fedora@raveit.de> - 1.24.0-3
- rebuild against latest kernel to fix cpu-freq-applet
- fix rhbz (#1827937)
* Thu Mar 26 2020 Wolfgang Ulbrich <fedora@raveit.de> - 1.24.0-2
- fix broken SVG icons
- use https://github.com/mate-desktop/mate-applets/pull/447
* Tue Feb 11 2020 Wolfgang Ulbrich <fedora@raveit.de> - 1.24.0-1
- update to 1.24.0
* Sun Feb 02 2020 Wolfgang Ulbrich <fedora@raveit.de> - 1.23.1-1
- update to 1.23.3
- fix f32 mass rebuild
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.22.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Sep 19 2019 Wolfgang Ulbrich <fedora@raveit.de> - 1.22.2-1
- update 1.22.2 release
- revert https://github.com/mate-desktop/mate-applets/commit/bd0cf4

View File

@ -1,185 +0,0 @@
From 429c3ab30e69eec68f18ba9c7210ee9e417cdea5 Mon Sep 17 00:00:00 2001
From: raveit65 <mate@raveit.de>
Date: Thu, 19 Sep 2019 19:17:43 +0200
Subject: [PATCH] Revert "Make cpufreq builds independent from kernel header
version."
This reverts commit bd0cf4893b267762cd35fb68f900b4be9de81138.
Try fixing fedora build for s390x arch
---
configure.ac | 72 +++++++------------
cpufreq/src/cpufreq-monitor-libcpufreq.c | 15 ++--
.../cpufreq-selector-libcpufreq.c | 10 +--
3 files changed, 36 insertions(+), 61 deletions(-)
diff --git a/configure.ac b/configure.ac
index af66e0ea..def3d96e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -357,51 +357,33 @@ if test "x$HAVE_POLKIT" = "xyes"; then
enable_suid=no
fi
-build_cpufreq_applet=yes
-AS_IF([test "x$disable_cpufreq" = "xno"], [
- case "${host}" in
- *linux*)
- AC_CHECK_HEADER([cpufreq.h], [
- AC_CHECK_LIB([cpupower], [cpupower_is_cpu_online], [
- AC_DEFINE([HAVE_IS_CPU_ONLINE], 1,
- [Define to 1 if cpupower_is_cpu_online() is available])
- cpufreq_lib="cpupower"
-
- AC_CHECK_LIB([cpupower], [cpufreq_get_frequencies], [
- AC_DEFINE([HAVE_GET_FREQUENCIES], 1,
- [Define to 1 if cpufreq_get_frequencies() is available])
- ])
- ], [
- AC_CHECK_LIB([cpupower], [cpufreq_cpu_exists], [
- cpufreq_lib="cpupower"
- ], [
- AC_CHECK_LIB([cpufreq], [cpufreq_cpu_exists], [
- cpufreq_lib="cpufreq"
- ], [cpufreq_lib=])
- ])
- ])
-
- AS_IF([test "x$cpufreq_lib" != "x"], [
- LIBCPUFREQ_LIBS="-l$cpufreq_lib"
- AC_DEFINE([HAVE_LIBCPUFREQ], [1], [Have libcpufreq.])
- AC_SUBST([LIBCPUFREQ_LIBS])
- ], [
- AC_MSG_WARN([*** cpufreq applet will not be built ***])
- build_cpufreq_applet=no
- ])
- ], [
- AC_MSG_WARN([*** can't find cpufreq.h, cpufreq applet will not be built ***])
- build_cpufreq_applet=no
- ])
- ;;
- *)
- AC_MSG_WARN([${host} is not supported by cpufreq applet, not building])
- build_cpufreq_applet=no
- ;;
- esac
-], [build_cpufreq_applet=no])
-
-AM_CONDITIONAL(HAVE_LIBCPUFREQ, test x$cpufreq_lib != x)
+AC_ARG_WITH([cpufreq-lib],
+ AS_HELP_STRING([--with-cpufreq-lib=lib], [library to use for cpufreq applet @<:@default=cpufreq@:>@]),
+ [with_cpufreq_lib=$withval], [with_cpufreq_lib="cpupower"])
+
+AC_CHECK_HEADER(cpufreq.h, have_libcpufreq=yes, have_libcpufreq=no)
+LIBCPUFREQ_LIBS=
+if test "x$have_libcpufreq" = "xyes"; then
+ AC_DEFINE([HAVE_LIBCPUFREQ], [1], [Have libcpufreq.])
+ LIBCPUFREQ_LIBS="-l$with_cpufreq_lib"
+fi
+AM_CONDITIONAL(HAVE_LIBCPUFREQ, test x$have_libcpufreq = xyes)
+AC_SUBST(LIBCPUFREQ_LIBS)
+
+build_cpufreq_applet=no
+
+if test x$disable_cpufreq = xno; then
+ case "${host}" in
+ *linux*)
+ build_cpufreq_applet=yes
+ ;;
+ *)
+ AC_MSG_WARN([${host} is not supported by cpufreq applet, not building])
+ build_cpufreq_applet=no
+ ;;
+ esac
+fi
+
AM_CONDITIONAL(BUILD_CPUFREQ_APPLET, test x$build_cpufreq_applet = xyes)
AM_CONDITIONAL(BUILD_CPUFREQ_SELECTOR, test x$enable_selector = xyes)
AM_CONDITIONAL(CPUFREQ_SELECTOR_SUID, test x$enable_suid = xyes)
diff --git a/cpufreq/src/cpufreq-monitor-libcpufreq.c b/cpufreq/src/cpufreq-monitor-libcpufreq.c
index dd2722ba..9821f2da 100644
--- a/cpufreq/src/cpufreq-monitor-libcpufreq.c
+++ b/cpufreq/src/cpufreq-monitor-libcpufreq.c
@@ -19,14 +19,11 @@
* Authors : Carlos García Campos <carlosgc@gnome.org>
*/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
#include <glib.h>
#include <glib/gi18n.h>
#include <stdlib.h>
+#include <linux/version.h>
#include <cpufreq.h>
#include "cpufreq-monitor-libcpufreq.h"
#include "cpufreq-utils.h"
@@ -39,12 +36,12 @@ static GList *cpufreq_monitor_libcpufreq_get_available_governors (CPUFreqMon
G_DEFINE_TYPE (CPUFreqMonitorLibcpufreq, cpufreq_monitor_libcpufreq, CPUFREQ_TYPE_MONITOR)
-#ifdef HAVE_GET_FREQUENCIES
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0)
+typedef struct cpufreq_available_frequencies CPUFreqFrequencyList;
+#else
typedef struct cpufreq_frequencies CPUFreqFrequencyList;
#define cpufreq_get_available_frequencies(cpu) cpufreq_get_frequencies ("available", cpu)
#define cpufreq_put_available_frequencies(first) cpufreq_put_frequencies (first)
-#else
-typedef struct cpufreq_available_frequencies CPUFreqFrequencyList;
#endif
typedef struct cpufreq_policy CPUFreqPolicy;
@@ -108,7 +105,7 @@ cpufreq_monitor_libcpufreq_new (guint cpu)
return CPUFREQ_MONITOR (monitor);
}
-#ifdef HAVE_IS_CPU_ONLINE
+#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 7, 0)
extern int cpupower_is_cpu_online (unsigned int cpu);
#endif
@@ -125,7 +122,7 @@ cpufreq_monitor_libcpufreq_run (CPUFreqMonitor *monitor)
/* Check whether it failed because
* cpu is not online.
*/
-#ifndef HAVE_IS_CPU_ONLINE
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 7, 0)
if (!cpufreq_cpu_exists (cpu)) {
#else
if (cpupower_is_cpu_online (cpu)) {
diff --git a/cpufreq/src/cpufreq-selector/cpufreq-selector-libcpufreq.c b/cpufreq/src/cpufreq-selector/cpufreq-selector-libcpufreq.c
index d2fda2bf..f3d76e7e 100644
--- a/cpufreq/src/cpufreq-selector/cpufreq-selector-libcpufreq.c
+++ b/cpufreq/src/cpufreq-selector/cpufreq-selector-libcpufreq.c
@@ -19,10 +19,6 @@
* Authors : Carlos García Campos <carlosgc@gnome.org>
*/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
#include <glib.h>
#include <glib/gstdio.h>
#include <cpufreq.h>
@@ -43,12 +39,12 @@ static gboolean cpufreq_selector_libcpufreq_set_governor (CPUFreqSelector
G_DEFINE_TYPE (CPUFreqSelectorLibcpufreq, cpufreq_selector_libcpufreq, CPUFREQ_TYPE_SELECTOR)
-#ifdef HAVE_GET_FREQUENCIES
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0)
+typedef struct cpufreq_available_frequencies CPUFreqFrequencyList;
+#else
typedef struct cpufreq_frequencies CPUFreqFrequencyList;
#define cpufreq_get_available_frequencies(cpu) cpufreq_get_frequencies ("available", cpu)
#define cpufreq_put_available_frequencies(first) cpufreq_put_frequencies (first)
-#else
-typedef struct cpufreq_available_frequencies CPUFreqFrequencyList;
#endif
typedef struct cpufreq_policy CPUFreqPolicy;
--
2.21.0

View File

@ -0,0 +1,35 @@
From cffde850e424717331598f34037fd39fb2fbdf20 Mon Sep 17 00:00:00 2001
From: rbuj <robert.buj@gmail.com>
Date: Wed, 25 Mar 2020 19:37:01 +0100
Subject: [PATCH 1/2] eyes: generate missing 256x256 and 64x64 icons from svg
file rsvg-convert -w 64 -h 64 mate-eyes-applet.svg -o mate-eyes-applet.64.png
rsvg-convert -w 256 -h 256 mate-eyes-applet.svg -o mate-eyes-applet.256.png
---
geyes/Makefile.am | 10 +-
1 files changed, 266 insertions(+), 297 deletions(-)
diff --git a/geyes/Makefile.am b/geyes/Makefile.am
index 38921e31..c3e0550a 100644
--- a/geyes/Makefile.am
+++ b/geyes/Makefile.am
@@ -53,10 +53,12 @@ gsettings_SCHEMAS = $(geyes_gschema_in_files:.xml.in=.xml)
themesdir = $(pkgdatadir)/geyes
icons = \
- mate-eyes-applet.svg \
- mate-eyes-applet.32.png \
- mate-eyes-applet.24.png \
- mate-eyes-applet.22.png \
+ mate-eyes-applet.svg \
+ mate-eyes-applet.256.png \
+ mate-eyes-applet.64.png \
+ mate-eyes-applet.32.png \
+ mate-eyes-applet.24.png \
+ mate-eyes-applet.22.png \
mate-eyes-applet.16.png
CLEANFILES = $(applet_DATA) $(applet_in_files) $(service_DATA) $(gsettings_SCHEMAS) *.gschema.valid
--
2.21.1

View File

@ -0,0 +1,28 @@
From eb08b8d65f897e27166e298cbe7e2228ba1a2ba7 Mon Sep 17 00:00:00 2001
From: rbuj <robert.buj@gmail.com>
Date: Wed, 25 Mar 2020 19:52:18 +0100
Subject: [PATCH 2/2] cpufreq: generate missing 256x256 and 64x64 icons from
svg file rsvg-convert -w 64 -h 64 mate-cpu-frequency-applet.svg -o
mate-cpu-frequency-applet.64.png rsvg-convert -w 256 -h 256
mate-cpu-frequency-applet.svg -o mate-cpu-frequency-applet.256.png
---
cpufreq/pixmaps/Makefile.am | 2 +
1 files changed, 431 insertions(+), 526 deletions(-)
diff --git a/cpufreq/pixmaps/Makefile.am b/cpufreq/pixmaps/Makefile.am
index fab407c3..5f5c257d 100644
--- a/cpufreq/pixmaps/Makefile.am
+++ b/cpufreq/pixmaps/Makefile.am
@@ -12,6 +12,8 @@ icons = \
mate-cpu-frequency-applet.22.png \
mate-cpu-frequency-applet.24.png \
mate-cpu-frequency-applet.32.png \
+ mate-cpu-frequency-applet.64.png \
+ mate-cpu-frequency-applet.256.png \
mate-cpu-frequency-applet.svg
EXTRA_DIST = \
--
2.21.1