diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2012-11-01 23:17:22 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2012-11-01 23:17:22 +0000 |
commit | 1025311d4d106a7dc9fee0d7b00b9e38dc4e2790 (patch) | |
tree | 01afe037f76d7d2f1d2f37dc2a00d20c83b4f439 | |
parent | add ffmpeg dep (diff) | |
download | gentoo-2-1025311d4d106a7dc9fee0d7b00b9e38dc4e2790.tar.gz gentoo-2-1025311d4d106a7dc9fee0d7b00b9e38dc4e2790.tar.bz2 gentoo-2-1025311d4d106a7dc9fee0d7b00b9e38dc4e2790.zip |
stable new version, drop old
(Portage version: 2.2.0_alpha142/cvs/Linux x86_64, signed Manifest commit with key 4868F14D)
-rw-r--r-- | sys-apps/uevt/ChangeLog | 9 | ||||
-rw-r--r-- | sys-apps/uevt/files/uevt-2.3-support_for_more_than_one_CPU.patch | 220 | ||||
-rw-r--r-- | sys-apps/uevt/uevt-2.3-r1.ebuild | 29 | ||||
-rw-r--r-- | sys-apps/uevt/uevt-2.3.ebuild | 31 |
4 files changed, 246 insertions, 43 deletions
diff --git a/sys-apps/uevt/ChangeLog b/sys-apps/uevt/ChangeLog index f67fbbb724db..34d55fac8060 100644 --- a/sys-apps/uevt/ChangeLog +++ b/sys-apps/uevt/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-apps/uevt # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/uevt/ChangeLog,v 1.10 2012/07/31 06:26:15 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/uevt/ChangeLog,v 1.11 2012/11/01 23:17:22 ssuominen Exp $ + + 02 Nov 2012; Samuli Suominen <ssuominen@gentoo.org -uevt-2.3.ebuild: + old + + 01 Nov 2012; Samuli Suominen <ssuominen@gentoo.org> uevt-2.3-r1.ebuild, + +files/uevt-2.3-support_for_more_than_one_CPU.patch: + amd64/x86 stable; grab last upstream commit to fix multicore support 31 Jul 2012; Samuli Suominen <ssuominen@gentoo.org> metadata.xml: Part of the desktop-misc herd now. diff --git a/sys-apps/uevt/files/uevt-2.3-support_for_more_than_one_CPU.patch b/sys-apps/uevt/files/uevt-2.3-support_for_more_than_one_CPU.patch new file mode 100644 index 000000000000..87e72c81e726 --- /dev/null +++ b/sys-apps/uevt/files/uevt-2.3-support_for_more_than_one_CPU.patch @@ -0,0 +1,220 @@ +From 69d2f45e234190fbfb37745ea05ab88547a3de96 Mon Sep 17 00:00:00 2001 +From: Elentir <elentir@frugalware.org> +Date: Wed, 29 Aug 2012 03:41:38 +0000 +Subject: fix for processors with more than 2 cores + +--- +diff --git a/src/helpers/uevt-cpu-helper.vala b/src/helpers/uevt-cpu-helper.vala +index 89df7db..81283ff 100644 +--- a/src/helpers/uevt-cpu-helper.vala ++++ b/src/helpers/uevt-cpu-helper.vala +@@ -21,9 +21,9 @@ using Posix; + + namespace UEvtCpuHelper + { +- string[] availcpulist; ++ int cpunumber; + +- private string[] uevt_cpu_helper_detect_cpu_number() ++ private int uevt_cpu_helper_detect_cpu_number() + { + string prescpu = ""; + GLib.File file = File.new_for_path("/sys/devices/system/cpu/present"); +@@ -38,17 +38,17 @@ namespace UEvtCpuHelper + + string[] availcpu = prescpu.split("-", 0); + +- return availcpu; ++ return int.parse(availcpu[1]); + } + +- private string uevt_cpu_helper_get_cpu_max_freq(string cpu_num) ++ private string uevt_cpu_helper_get_cpu_max_freq(int cpu_num) + { + string freq = ""; + +- if(!(cpu_num in availcpulist)) ++ if(cpu_num > cpunumber) + return ""; + +- GLib.File file = File.new_for_path("/sys/devices/system/cpu/cpu%s/cpufreq/scaling_max_freq" ++ GLib.File file = File.new_for_path("/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq" + .printf(cpu_num)); + + try { +@@ -61,14 +61,14 @@ namespace UEvtCpuHelper + return freq; + } + +- private string uevt_cpu_helper_get_cpu_min_freq(string cpu_num) ++ private string uevt_cpu_helper_get_cpu_min_freq(int cpu_num) + { + string freq = ""; + +- if(!(cpu_num in availcpulist)) ++ if(cpu_num > cpunumber) + return ""; + +- GLib.File file = File.new_for_path("/sys/devices/system/cpu/cpu%s/cpufreq/scaling_min_freq" ++ GLib.File file = File.new_for_path("/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq" + .printf(cpu_num)); + + try { +@@ -81,14 +81,14 @@ namespace UEvtCpuHelper + return freq; + } + +- private string uevt_cpu_helper_get_frequency(string cpu_num) ++ private string uevt_cpu_helper_get_frequency(int cpu_num) + { + string freq = ""; + +- if(!(cpu_num in availcpulist)) ++ if(cpu_num > cpunumber) + return ""; + +- GLib.File file = File.new_for_path("/sys/devices/system/cpu/cpu%s/cpufreq/scaling_cur_freq" ++ GLib.File file = File.new_for_path("/sys/devices/system/cpu/cpu%d/cpufreq/scaling_cur_freq" + .printf(cpu_num)); + + try { +@@ -101,7 +101,7 @@ namespace UEvtCpuHelper + return freq; + } + +- private void uevt_cpu_helper_set_frequency(string cpu_num, string newfreq) ++ private void uevt_cpu_helper_set_frequency(int cpu_num, string newfreq) + { + string newfreqstring = newfreq.to_string(); + +@@ -110,7 +110,7 @@ namespace UEvtCpuHelper + return; + } + +- FILE file = FILE.open("/sys/devices/system/cpu/cpu%s/cpufreq/scaling_setspeed" ++ FILE file = FILE.open("/sys/devices/system/cpu/cpu%d/cpufreq/scaling_setspeed" + .printf(cpu_num), "w"); + file.puts(newfreq); + +@@ -119,20 +119,20 @@ namespace UEvtCpuHelper + + private void uevt_cpu_helper_set_global_frequency(string newfrequency) + { +- foreach(string cpu in availcpulist) ++ for(int cpu = 0; cpu <= cpunumber; cpu++) + uevt_cpu_helper_set_frequency(cpu, newfrequency); + + return; + } + +- private string[] uevt_cpu_helper_get_available_cpu_freqs(string cpu_num) ++ private string[] uevt_cpu_helper_get_available_cpu_freqs(int cpu_num) + { + string[] freqs = {}; + +- if(!(cpu_num in availcpulist)) ++ if(cpu_num > cpunumber) + return {}; + +- GLib.File file = File.new_for_path("/sys/devices/system/cpu/cpu%s/cpufreq/scaling_available_frequencies" ++ GLib.File file = File.new_for_path("/sys/devices/system/cpu/cpu%d/cpufreq/scaling_available_frequencies" + .printf(cpu_num)); + + try { +@@ -147,14 +147,14 @@ namespace UEvtCpuHelper + return freqs; + } + +- private string[] uevt_cpu_helper_get_available_governors(string cpu_num) ++ private string[] uevt_cpu_helper_get_available_governors(int cpu_num) + { + string[] govs = {}; + +- if(!(cpu_num in availcpulist)) ++ if(cpu_num > cpunumber) + return {}; + +- GLib.File file = File.new_for_path("/sys/devices/system/cpu/cpu%s/cpufreq/scaling_available_governors" ++ GLib.File file = File.new_for_path("/sys/devices/system/cpu/cpu%d/cpufreq/scaling_available_governors" + .printf(cpu_num)); + + try { +@@ -169,14 +169,14 @@ namespace UEvtCpuHelper + return govs; + } + +- private string uevt_cpu_helper_get_governor(string cpu_num) ++ private string uevt_cpu_helper_get_governor(int cpu_num) + { + string gov = ""; + +- if(!(cpu_num in availcpulist)) ++ if(cpu_num > cpunumber) + return ""; + +- GLib.File file = File.new_for_path("/sys/devices/system/cpu/cpu%s/cpufreq/scaling_governor" ++ GLib.File file = File.new_for_path("/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor" + .printf(cpu_num)); + + try { +@@ -189,14 +189,14 @@ namespace UEvtCpuHelper + return gov; + } + +- private void uevt_cpu_helper_set_governor(string cpu_num, string newgovernor) ++ private void uevt_cpu_helper_set_governor(int cpu_num, string newgovernor) + { + if(!(newgovernor in uevt_cpu_helper_get_available_governors(cpu_num))) { + Posix.stdout.printf("Unrecognized governor %s\n", newgovernor); + return; + } + +- FILE file = FILE.open("/sys/devices/system/cpu/cpu%s/cpufreq/scaling_governor" ++ FILE file = FILE.open("/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor" + .printf(cpu_num), "w"); + file.puts(newgovernor); + +@@ -205,7 +205,7 @@ namespace UEvtCpuHelper + + private void uevt_cpu_helper_set_global_governor(string newgovernor) + { +- foreach(string cpu in availcpulist) ++ for(int cpu = 0; cpu <= cpunumber; cpu++) + uevt_cpu_helper_set_governor(cpu, newgovernor); + + return; +@@ -215,7 +215,7 @@ namespace UEvtCpuHelper + { + string minfreq; + +- foreach(string cpu in availcpulist) { ++ for(int cpu = 0; cpu <= cpunumber; cpu++) { + minfreq = uevt_cpu_helper_get_cpu_min_freq(cpu); + uevt_cpu_helper_set_frequency(cpu, minfreq); + } +@@ -227,7 +227,7 @@ namespace UEvtCpuHelper + { + string maxfreq; + +- foreach(string cpu in availcpulist) { ++ for(int cpu = 0; cpu <= cpunumber; cpu++) { + maxfreq = uevt_cpu_helper_get_cpu_max_freq(cpu); + uevt_cpu_helper_set_frequency(cpu, maxfreq); + } +@@ -242,11 +242,11 @@ namespace UEvtCpuHelper + return 1; + } + +- availcpulist = uevt_cpu_helper_detect_cpu_number(); ++ cpunumber = uevt_cpu_helper_detect_cpu_number(); + + if(args[1] == "show-infos") { +- foreach(string cpu in availcpulist) { +- Posix.stdout.printf("CPU %s : current governor %s, current frequency %s\n", ++ for(int cpu = 0; cpu <= cpunumber; cpu++) { ++ Posix.stdout.printf("CPU %d : current governor %s, current frequency %s\n", + cpu, + uevt_cpu_helper_get_governor(cpu), + uevt_cpu_helper_get_frequency(cpu)); +-- +cgit v0.9.0.3 diff --git a/sys-apps/uevt/uevt-2.3-r1.ebuild b/sys-apps/uevt/uevt-2.3-r1.ebuild index 088f3a7165fc..792326670327 100644 --- a/sys-apps/uevt/uevt-2.3-r1.ebuild +++ b/sys-apps/uevt/uevt-2.3-r1.ebuild @@ -1,8 +1,11 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/uevt/uevt-2.3-r1.ebuild,v 1.1 2012/07/31 06:24:50 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/uevt/uevt-2.3-r1.ebuild,v 1.2 2012/11/01 23:17:22 ssuominen Exp $ EAPI=4 +inherit eutils + +UEVT_VALA_VERSION=0.16 DESCRIPTION="A lightweight, desktop-independant daemon for disks mounting and power managing" HOMEPAGE="http://elentir.sleipnir.fr/ http://git.sleipnir.fr/uevt/" @@ -10,28 +13,32 @@ SRC_URI="http://ftp.sleipnir.fr/${PN}/${P}.tar.bz2" LICENSE="GPL-3" SLOT="0" -KEYWORDS="~amd64 ~x86" +KEYWORDS="amd64 x86" IUSE="" -COMMON_DEPEND=">=dev-libs/glib-2.26 +COMMON_DEPEND=">=dev-libs/glib-2.28 x11-libs/gtk+:2 >=x11-libs/libnotify-0.7" RDEPEND="${COMMON_DEPEND} - sys-fs/udisks:0 - sys-power/upower" + >=sys-fs/udisks-1.0.4-r2:0 + >=sys-power/upower-0.9.16" DEPEND="${COMMON_DEPEND} - dev-lang/vala:0.16 + dev-lang/vala:${UEVT_VALA_VERSION} dev-util/intltool - virtual/pkgconfig - sys-devel/gettext" + sys-devel/gettext + virtual/pkgconfig" + +DOCS="AUTHORS ChangeLog README" pkg_setup() { - export VALAC="$(type -P valac-0.16)" - DOCS=( AUTHORS ChangeLog README ) + export VALAC="$(type -P valac-${UEVT_VALA_VERSION})" } src_prepare() { - # http://bugs.gentoo.org/428438 + # http://git.sleipnir.fr/uevt/commit/?id=69d2f45e234190fbfb37745ea05ab88547a3de96 + epatch "${FILESDIR}"/${P}-support_for_more_than_one_CPU.patch + + # See http://bugs.gentoo.org/ wrt #428438 echo src/configurator.c >> po/POTFILES.skip echo src/power-infos.c >> po/POTFILES.skip } diff --git a/sys-apps/uevt/uevt-2.3.ebuild b/sys-apps/uevt/uevt-2.3.ebuild deleted file mode 100644 index d6483572bca8..000000000000 --- a/sys-apps/uevt/uevt-2.3.ebuild +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/uevt/uevt-2.3.ebuild,v 1.4 2012/05/04 09:17:29 jdhore Exp $ - -EAPI=4 - -DESCRIPTION="A lightweight, desktop-independant daemon for disks mounting and power managing" -HOMEPAGE="http://elentir.sleipnir.fr/ http://git.sleipnir.fr/uevt/" -SRC_URI="http://ftp.sleipnir.fr/${PN}/${P}.tar.bz2" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="amd64 x86" -IUSE="" - -COMMON_DEPEND=">=dev-libs/glib-2.26 - x11-libs/gtk+:2 - >=x11-libs/libnotify-0.7" -RDEPEND="${COMMON_DEPEND} - sys-fs/udisks:0 - sys-power/upower" -DEPEND="${COMMON_DEPEND} - >=dev-lang/vala-0.12:0.12 - dev-util/intltool - virtual/pkgconfig - sys-devel/gettext" - -pkg_setup() { - export VALAC="$(type -P valac-0.12)" - DOCS=( AUTHORS ChangeLog README ) -} |