commit:     6bfa389a9bda535026178ba0e61f804bddb2505a
Author:     NP-Hardass <NP-Hardass <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 22 20:58:54 2017 +0000
Commit:     NP Hardass <np-hardass <AT> gentoo <DOT> org>
CommitDate: Fri Sep 22 20:58:54 2017 +0000
URL:        https://gitweb.gentoo.org/proj/gentoo-mate.git/commit/?id=6bfa389a

mate-base/mate-applets: Fix building with >cpupower-4.9

Bug: https://bugs.gentoo.org/593470
Package-Manager: Portage-2.3.10, Repoman-2.3.3

 .../files/mate-applets-1.10.4-cpupower-4.7.patch   | 46 ++++++++++++++++++++
 .../files/mate-applets-1.14.1-cpupower-4.7.patch   | 44 +++++++++++++++++++
 ...s-9999.ebuild => mate-applets-1.12.1-r5.ebuild} | 49 ++++++++++++----------
 ...s-9999.ebuild => mate-applets-1.14.1-r2.ebuild} | 33 +++++++++------
 ...s-9999.ebuild => mate-applets-1.16.0-r1.ebuild} | 30 ++++++++-----
 ...s-9999.ebuild => mate-applets-1.18.1-r1.ebuild} |  5 +--
 mate-base/mate-applets/mate-applets-9999.ebuild    |  5 +--
 7 files changed, 161 insertions(+), 51 deletions(-)

diff --git 
a/mate-base/mate-applets/files/mate-applets-1.10.4-cpupower-4.7.patch 
b/mate-base/mate-applets/files/mate-applets-1.10.4-cpupower-4.7.patch
new file mode 100644
index 0000000..070b417
--- /dev/null
+++ b/mate-base/mate-applets/files/mate-applets-1.10.4-cpupower-4.7.patch
@@ -0,0 +1,46 @@
+diff --git a/configure.ac b/configure.ac
+index c867af3..4ff5311 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -416,6 +416,8 @@ fi
+ AM_CONDITIONAL(HAVE_LIBCPUFREQ, test x$have_libcpufreq = xyes)
+ AC_SUBST(LIBCPUFREQ_LIBS)
+ 
++AC_CHECK_HEADERS([cpupower.h])
++
+ build_cpufreq_applet=no
+ 
+ if test x$disable_cpufreq = xno; then
+diff --git a/cpufreq/src/cpufreq-monitor-libcpufreq.c 
b/cpufreq/src/cpufreq-monitor-libcpufreq.c
+index 40c44ba..120693c 100644
+--- a/cpufreq/src/cpufreq-monitor-libcpufreq.c
++++ b/cpufreq/src/cpufreq-monitor-libcpufreq.c
+@@ -19,11 +19,16 @@
+  * Authors : Carlos Garc�a Campos <[email protected]>
+  */
+ 
++#include <config.h>
++
+ #include <glib.h>
+ #include <glib/gi18n.h>
+ 
+ #include <stdlib.h>
+ #include <cpufreq.h>
++#ifdef HAVE_CPUPOWER_H
++#include <cpupower.h>
++#endif
+ 
+ #include "cpufreq-monitor-libcpufreq.h"
+ #include "cpufreq-utils.h"
+@@ -111,7 +114,11 @@ cpufreq_monitor_libcpufreq_run (CPUFreqMonitor *monitor)
+               /* Check whether it failed because
+                * cpu is not online.
+                */
++#ifndef HAVE_CPUPOWER_H
+               if (!cpufreq_cpu_exists (cpu)) {
++#else
++    if (cpupower_is_cpu_online (cpu)) {
++#endif
+                       g_object_set (G_OBJECT (monitor), "online", FALSE, 
NULL);
+                       return TRUE;
+               }

diff --git 
a/mate-base/mate-applets/files/mate-applets-1.14.1-cpupower-4.7.patch 
b/mate-base/mate-applets/files/mate-applets-1.14.1-cpupower-4.7.patch
new file mode 100644
index 0000000..203f158
--- /dev/null
+++ b/mate-base/mate-applets/files/mate-applets-1.14.1-cpupower-4.7.patch
@@ -0,0 +1,44 @@
+diff --git a/configure.ac b/configure.ac
+index b49d127..6b87389 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -411,6 +411,8 @@ fi
+ AM_CONDITIONAL(HAVE_LIBCPUFREQ, test x$have_libcpufreq = xyes)
+ AC_SUBST(LIBCPUFREQ_LIBS)
+ 
++AC_CHECK_HEADERS([cpupower.h])
++
+ build_cpufreq_applet=no
+ 
+ if test x$disable_cpufreq = xno; then
+diff --git a/cpufreq/src/cpufreq-monitor-libcpufreq.c 
b/cpufreq/src/cpufreq-monitor-libcpufreq.c
+index 4fa9d4c..ba52fde 100644
+--- a/cpufreq/src/cpufreq-monitor-libcpufreq.c
++++ b/cpufreq/src/cpufreq-monitor-libcpufreq.c
+@@ -19,12 +19,16 @@
+  * Authors : Carlos Garc�a Campos <[email protected]>
+  */
+ 
++#include <config.h>
++
+ #include <glib.h>
+ #include <glib/gi18n.h>
+ 
+ #include <stdlib.h>
+-#include <linux/version.h>
+ #include <cpufreq.h>
++#ifdef HAVE_CPUPOWER_H
++#include <cpupower.h>
++#endif
+ 
+ #include "cpufreq-monitor-libcpufreq.h"
+ #include "cpufreq-utils.h"
+@@ -112,7 +116,7 @@
+               /* Check whether it failed because
+                * cpu is not online.
+                */
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 7, 0)
++#ifndef HAVE_CPUPOWER_H
+               if (!cpufreq_cpu_exists (cpu)) {
+ #else
+               if (cpupower_is_cpu_online (cpu)) {

diff --git a/mate-base/mate-applets/mate-applets-9999.ebuild 
b/mate-base/mate-applets/mate-applets-1.12.1-r5.ebuild
similarity index 67%
copy from mate-base/mate-applets/mate-applets-9999.ebuild
copy to mate-base/mate-applets/mate-applets-1.12.1-r5.ebuild
index d1b6e71..3853add 100644
--- a/mate-base/mate-applets/mate-applets-9999.ebuild
+++ b/mate-base/mate-applets/mate-applets-1.12.1-r5.ebuild
@@ -15,46 +15,50 @@ DESCRIPTION="Applets for the MATE Desktop and Panel"
 LICENSE="GPL-2 FDL-1.1 LGPL-2"
 SLOT="0"
 
-IUSE="X ipv6 policykit +upower"
+IUSE="X gtk3 ipv6 policykit +upower"
 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
 
-#cpupower #593470
-COMMON_DEPEND="${PYTHON_DEPS}
+RDEPEND="${PYTHON_DEPS}
+       app-text/rarian:0
        dev-libs/atk:0
        >=dev-libs/dbus-glib-0.74:0
        >=dev-libs/glib-2.36:2
-       >=dev-libs/libmateweather-1.17.0
+       >=dev-libs/libmateweather-1.6.1[gtk3(-)=]
        >=dev-libs/libxml2-2.5:2
        dev-python/pygobject:3
-       >=gnome-base/libgtop-2.12.0:2=
-       >=gnome-extra/gucharmap-3.0:2.90
-       >=mate-base/mate-panel-1.17.0
-       >=net-wireless/wireless-tools-28_pre9:0
+       >=gnome-base/libgtop-2.11.92:2=
+       >=mate-base/mate-desktop-1.9[gtk3(-)=]
+       >=mate-base/mate-panel-1.7[gtk3(-)=]
+       >=mate-base/mate-settings-daemon-1.6
        >=sys-apps/dbus-1.1.2:0
-       <sys-power/cpupower-4.7
+       sys-power/cpupower
        x11-libs/gdk-pixbuf:2
-       >=x11-libs/gtk+-3.14:3
-       x11-libs/gtksourceview:3.0
        >=x11-libs/libnotify-0.7:0
        x11-libs/libX11:0
-       >=x11-libs/libwnck-3.0:3
        x11-libs/pango:0
        virtual/libintl:0
-       policykit? ( >=sys-auth/polkit-0.97:0 )
+       !gtk3? (
+               >=gnome-extra/gucharmap-2.32.1:0
+               >=x11-libs/gtk+-2.24:2
+               x11-libs/gtksourceview:2.0
+               >=x11-libs/libwnck-2.30:1
+       )
+       gtk3? (
+               >=gnome-extra/gucharmap-3.0:2.90
+               >=x11-libs/gtk+-3.0:3
+               x11-libs/gtksourceview:3.0
+               >=x11-libs/libwnck-3.0:3
+       )
+       policykit? ( >=sys-auth/polkit-0.92:0 )
        upower? (
                || (
                        >=sys-power/upower-0.9.23
                        >=sys-power/upower-pm-utils-0.9.23
                )
-       )
-       !!net-analyzer/mate-netspeed"
-
-RDEPEND="${COMMON_DEPEND}
-       >=mate-base/mate-settings-daemon-1.6"
+       )"
 
-DEPEND="${COMMON_DEPEND}
+DEPEND="${RDEPEND}
        app-text/docbook-xml-dtd:4.3
-       app-text/rarian:0
        >=app-text/scrollkeeper-dtd-1:1.0
        app-text/yelp-tools:0
        >=dev-util/intltool-0.50.1:*
@@ -62,12 +66,13 @@ DEPEND="${COMMON_DEPEND}
        sys-devel/gettext:*
        virtual/pkgconfig:*"
 
-PATCHES=( "${FILESDIR}/${PN}-1.14.1-revert-upstream-cpupower-4.7-fix.patch" )
+PATCHES=( "${FILESDIR}/${PN}-1.10.4-cpupower-4.7.patch" )
 
 src_configure() {
        mate_src_configure \
                --libexecdir=/usr/libexec/mate-applets \
                --with-cpufreq-lib=cpupower \
+               --with-gtk=$(usex gtk3 3.0 2.0) \
                $(use_with X x) \
                $(use_with upower) \
                $(use_enable ipv6) \
@@ -84,7 +89,7 @@ src_install() {
        mate_src_install
 
        local APPLETS="accessx-status battstat charpick command cpufreq 
drivemount
-                       geyes invest-applet mateweather multiload netspeed 
stickynotes
+                       geyes invest-applet mateweather multiload null_applet 
stickynotes
                        timerapplet trashapplet"
 
        for applet in ${APPLETS}; do

diff --git a/mate-base/mate-applets/mate-applets-9999.ebuild 
b/mate-base/mate-applets/mate-applets-1.14.1-r2.ebuild
similarity index 74%
copy from mate-base/mate-applets/mate-applets-9999.ebuild
copy to mate-base/mate-applets/mate-applets-1.14.1-r2.ebuild
index d1b6e71..900d903 100644
--- a/mate-base/mate-applets/mate-applets-9999.ebuild
+++ b/mate-base/mate-applets/mate-applets-1.14.1-r2.ebuild
@@ -15,32 +15,40 @@ DESCRIPTION="Applets for the MATE Desktop and Panel"
 LICENSE="GPL-2 FDL-1.1 LGPL-2"
 SLOT="0"
 
-IUSE="X ipv6 policykit +upower"
+IUSE="X gtk3 ipv6 policykit +upower"
 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
 
-#cpupower #593470
 COMMON_DEPEND="${PYTHON_DEPS}
        dev-libs/atk:0
        >=dev-libs/dbus-glib-0.74:0
        >=dev-libs/glib-2.36:2
-       >=dev-libs/libmateweather-1.17.0
+       >=dev-libs/libmateweather-1.6.1[gtk3(-)=]
        >=dev-libs/libxml2-2.5:2
        dev-python/pygobject:3
-       >=gnome-base/libgtop-2.12.0:2=
-       >=gnome-extra/gucharmap-3.0:2.90
-       >=mate-base/mate-panel-1.17.0
+       >=gnome-base/libgtop-2.11.92:2=
+       >=mate-base/mate-desktop-1.9[gtk3(-)=]
+       >=mate-base/mate-panel-1.7[gtk3(-)=]
        >=net-wireless/wireless-tools-28_pre9:0
        >=sys-apps/dbus-1.1.2:0
-       <sys-power/cpupower-4.7
+       sys-power/cpupower
        x11-libs/gdk-pixbuf:2
-       >=x11-libs/gtk+-3.14:3
-       x11-libs/gtksourceview:3.0
        >=x11-libs/libnotify-0.7:0
        x11-libs/libX11:0
-       >=x11-libs/libwnck-3.0:3
        x11-libs/pango:0
        virtual/libintl:0
-       policykit? ( >=sys-auth/polkit-0.97:0 )
+       !gtk3? (
+               >=gnome-extra/gucharmap-2.32.1:0
+               >=x11-libs/gtk+-2.24:2
+               x11-libs/gtksourceview:2.0
+               >=x11-libs/libwnck-2.30:1
+       )
+       gtk3? (
+               >=gnome-extra/gucharmap-3.0:2.90
+               >=x11-libs/gtk+-3.0:3
+               x11-libs/gtksourceview:3.0
+               >=x11-libs/libwnck-3.0:3
+       )
+       policykit? ( >=sys-auth/polkit-0.92:0 )
        upower? (
                || (
                        >=sys-power/upower-0.9.23
@@ -62,12 +70,13 @@ DEPEND="${COMMON_DEPEND}
        sys-devel/gettext:*
        virtual/pkgconfig:*"
 
-PATCHES=( "${FILESDIR}/${PN}-1.14.1-revert-upstream-cpupower-4.7-fix.patch" )
+PATCHES=( "${FILESDIR}/${PN}-1.14.1-cpupower-4.7.patch" )
 
 src_configure() {
        mate_src_configure \
                --libexecdir=/usr/libexec/mate-applets \
                --with-cpufreq-lib=cpupower \
+               --with-gtk=$(usex gtk3 3.0 2.0) \
                $(use_with X x) \
                $(use_with upower) \
                $(use_enable ipv6) \

diff --git a/mate-base/mate-applets/mate-applets-9999.ebuild 
b/mate-base/mate-applets/mate-applets-1.16.0-r1.ebuild
similarity index 77%
copy from mate-base/mate-applets/mate-applets-9999.ebuild
copy to mate-base/mate-applets/mate-applets-1.16.0-r1.ebuild
index d1b6e71..3540d0a 100644
--- a/mate-base/mate-applets/mate-applets-9999.ebuild
+++ b/mate-base/mate-applets/mate-applets-1.16.0-r1.ebuild
@@ -15,31 +15,38 @@ DESCRIPTION="Applets for the MATE Desktop and Panel"
 LICENSE="GPL-2 FDL-1.1 LGPL-2"
 SLOT="0"
 
-IUSE="X ipv6 policykit +upower"
+IUSE="X gtk3 ipv6 policykit +upower"
 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
 
-#cpupower #593470
 COMMON_DEPEND="${PYTHON_DEPS}
        dev-libs/atk:0
        >=dev-libs/dbus-glib-0.74:0
        >=dev-libs/glib-2.36:2
-       >=dev-libs/libmateweather-1.17.0
+       >=dev-libs/libmateweather-1.6.1[gtk3(-)=]
        >=dev-libs/libxml2-2.5:2
        dev-python/pygobject:3
-       >=gnome-base/libgtop-2.12.0:2=
-       >=gnome-extra/gucharmap-3.0:2.90
-       >=mate-base/mate-panel-1.17.0
+       >=gnome-base/libgtop-2.11.92:2=
+       >=mate-base/mate-panel-1.7[gtk3(-)=]
        >=net-wireless/wireless-tools-28_pre9:0
        >=sys-apps/dbus-1.1.2:0
-       <sys-power/cpupower-4.7
+       sys-power/cpupower
        x11-libs/gdk-pixbuf:2
-       >=x11-libs/gtk+-3.14:3
-       x11-libs/gtksourceview:3.0
        >=x11-libs/libnotify-0.7:0
        x11-libs/libX11:0
-       >=x11-libs/libwnck-3.0:3
        x11-libs/pango:0
        virtual/libintl:0
+       !gtk3? (
+               >=gnome-extra/gucharmap-2.32.1:0
+               >=x11-libs/gtk+-2.24:2
+               x11-libs/gtksourceview:2.0
+               >=x11-libs/libwnck-2.30:1
+       )
+       gtk3? (
+               >=gnome-extra/gucharmap-3.0:2.90
+               >=x11-libs/gtk+-3.0:3
+               x11-libs/gtksourceview:3.0
+               >=x11-libs/libwnck-3.0:3
+       )
        policykit? ( >=sys-auth/polkit-0.97:0 )
        upower? (
                || (
@@ -62,12 +69,13 @@ DEPEND="${COMMON_DEPEND}
        sys-devel/gettext:*
        virtual/pkgconfig:*"
 
-PATCHES=( "${FILESDIR}/${PN}-1.14.1-revert-upstream-cpupower-4.7-fix.patch" )
+PATCHES=( "${FILESDIR}/${PN}-1.14.1-cpupower-4.7.patch" )
 
 src_configure() {
        mate_src_configure \
                --libexecdir=/usr/libexec/mate-applets \
                --with-cpufreq-lib=cpupower \
+               --with-gtk=$(usex gtk3 3.0 2.0) \
                $(use_with X x) \
                $(use_with upower) \
                $(use_enable ipv6) \

diff --git a/mate-base/mate-applets/mate-applets-9999.ebuild 
b/mate-base/mate-applets/mate-applets-1.18.1-r1.ebuild
similarity index 94%
copy from mate-base/mate-applets/mate-applets-9999.ebuild
copy to mate-base/mate-applets/mate-applets-1.18.1-r1.ebuild
index d1b6e71..b62a57f 100644
--- a/mate-base/mate-applets/mate-applets-9999.ebuild
+++ b/mate-base/mate-applets/mate-applets-1.18.1-r1.ebuild
@@ -18,7 +18,6 @@ SLOT="0"
 IUSE="X ipv6 policykit +upower"
 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
 
-#cpupower #593470
 COMMON_DEPEND="${PYTHON_DEPS}
        dev-libs/atk:0
        >=dev-libs/dbus-glib-0.74:0
@@ -31,7 +30,7 @@ COMMON_DEPEND="${PYTHON_DEPS}
        >=mate-base/mate-panel-1.17.0
        >=net-wireless/wireless-tools-28_pre9:0
        >=sys-apps/dbus-1.1.2:0
-       <sys-power/cpupower-4.7
+       sys-power/cpupower
        x11-libs/gdk-pixbuf:2
        >=x11-libs/gtk+-3.14:3
        x11-libs/gtksourceview:3.0
@@ -62,7 +61,7 @@ DEPEND="${COMMON_DEPEND}
        sys-devel/gettext:*
        virtual/pkgconfig:*"
 
-PATCHES=( "${FILESDIR}/${PN}-1.14.1-revert-upstream-cpupower-4.7-fix.patch" )
+PATCHES=( "${FILESDIR}/${PN}-1.14.1-cpupower-4.7.patch" )
 
 src_configure() {
        mate_src_configure \

diff --git a/mate-base/mate-applets/mate-applets-9999.ebuild 
b/mate-base/mate-applets/mate-applets-9999.ebuild
index d1b6e71..b62a57f 100644
--- a/mate-base/mate-applets/mate-applets-9999.ebuild
+++ b/mate-base/mate-applets/mate-applets-9999.ebuild
@@ -18,7 +18,6 @@ SLOT="0"
 IUSE="X ipv6 policykit +upower"
 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
 
-#cpupower #593470
 COMMON_DEPEND="${PYTHON_DEPS}
        dev-libs/atk:0
        >=dev-libs/dbus-glib-0.74:0
@@ -31,7 +30,7 @@ COMMON_DEPEND="${PYTHON_DEPS}
        >=mate-base/mate-panel-1.17.0
        >=net-wireless/wireless-tools-28_pre9:0
        >=sys-apps/dbus-1.1.2:0
-       <sys-power/cpupower-4.7
+       sys-power/cpupower
        x11-libs/gdk-pixbuf:2
        >=x11-libs/gtk+-3.14:3
        x11-libs/gtksourceview:3.0
@@ -62,7 +61,7 @@ DEPEND="${COMMON_DEPEND}
        sys-devel/gettext:*
        virtual/pkgconfig:*"
 
-PATCHES=( "${FILESDIR}/${PN}-1.14.1-revert-upstream-cpupower-4.7-fix.patch" )
+PATCHES=( "${FILESDIR}/${PN}-1.14.1-cpupower-4.7.patch" )
 
 src_configure() {
        mate_src_configure \

Reply via email to