Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 619790 Details for
Bug 703264
=mate-base/mate-applets-1.22.{0,1} do not build with recent versions of cpupower
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to commit 34d9b916fe4133457b7c2e7a00cd23f4f5b85114
mate-applets-1.22.1-sync_commit_34d9b916fe4133457b7c2e7a00cd23f4f5b85114.patch (text/plain), 5.84 KB, created by
Thibaud CANALE
on 2020-03-15 13:02:44 UTC
(
hide
)
Description:
Patch to commit 34d9b916fe4133457b7c2e7a00cd23f4f5b85114
Filename:
MIME Type:
Creator:
Thibaud CANALE
Created:
2020-03-15 13:02:44 UTC
Size:
5.84 KB
patch
obsolete
>diff -pru a/configure.ac b/configure.ac >--- a/configure.ac 2019-04-22 21:49:26.000000000 +0200 >+++ b/configure.ac 2020-03-15 00:19:19.698233902 +0100 >@@ -357,33 +357,51 @@ if test "x$HAVE_POLKIT" = "xyes"; then > enable_suid=no > fi > >-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"]) >+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_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 >+ 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=]) >+ ]) >+ ]) > >-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 >+ 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) > 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 -pru a/cpufreq/src/cpufreq-monitor-libcpufreq.c b/cpufreq/src/cpufreq-monitor-libcpufreq.c >--- a/cpufreq/src/cpufreq-monitor-libcpufreq.c 2019-04-22 21:49:26.000000000 +0200 >+++ b/cpufreq/src/cpufreq-monitor-libcpufreq.c 2020-03-15 00:04:53.268796199 +0100 >@@ -19,11 +19,14 @@ > * 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" >@@ -36,8 +39,15 @@ static GList *cpufreq_monitor_libcpufr > > G_DEFINE_TYPE (CPUFreqMonitorLibcpufreq, cpufreq_monitor_libcpufreq, CPUFREQ_TYPE_MONITOR) > >-typedef struct cpufreq_policy CPUFreqPolicy; >+#ifdef HAVE_GET_FREQUENCIES >+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; > typedef struct cpufreq_available_governors CPUFreqGovernorList; > > static void >@@ -98,7 +108,7 @@ cpufreq_monitor_libcpufreq_new (guint cp > return CPUFREQ_MONITOR (monitor); > } > >-#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 7, 0) >+#ifdef HAVE_IS_CPU_ONLINE > extern int cpupower_is_cpu_online (unsigned int cpu); > #endif > >@@ -115,7 +125,7 @@ cpufreq_monitor_libcpufreq_run (CPUFreqM > /* Check whether it failed because > * cpu is not online. > */ >-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 7, 0) >+#ifndef HAVE_IS_CPU_ONLINE > if (!cpufreq_cpu_exists (cpu)) { > #else > if (cpupower_is_cpu_online (cpu)) { >diff -pru a/cpufreq/src/cpufreq-selector/cpufreq-selector-libcpufreq.c b/cpufreq/src/cpufreq-selector/cpufreq-selector-libcpufreq.c >--- a/cpufreq/src/cpufreq-selector/cpufreq-selector-libcpufreq.c 2019-04-22 21:49:26.000000000 +0200 >+++ b/cpufreq/src/cpufreq-selector/cpufreq-selector-libcpufreq.c 2020-03-15 00:05:11.152403907 +0100 >@@ -19,10 +19,15 @@ > * 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> > #include <stdlib.h> >+#include <linux/version.h> > > #include "cpufreq-selector-libcpufreq.h" > >@@ -38,8 +43,15 @@ static gboolean cpufreq_selector_libcpuf > > G_DEFINE_TYPE (CPUFreqSelectorLibcpufreq, cpufreq_selector_libcpufreq, CPUFREQ_TYPE_SELECTOR) > >-typedef struct cpufreq_policy CPUFreqPolicy; >+#ifdef HAVE_GET_FREQUENCIES >+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; > typedef struct cpufreq_available_governors CPUFreqGovernorList; > > static void
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 703264
:
600000
| 619790