diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-apps/uevt | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-apps/uevt')
-rw-r--r-- | sys-apps/uevt/Manifest | 1 | ||||
-rw-r--r-- | sys-apps/uevt/files/uevt-2.3-support_for_more_than_one_CPU.patch | 220 | ||||
-rw-r--r-- | sys-apps/uevt/files/uevt-2.3-vala-0.24.patch | 13 | ||||
-rw-r--r-- | sys-apps/uevt/metadata.xml | 5 | ||||
-rw-r--r-- | sys-apps/uevt/uevt-2.3-r1.ebuild | 53 |
5 files changed, 292 insertions, 0 deletions
diff --git a/sys-apps/uevt/Manifest b/sys-apps/uevt/Manifest new file mode 100644 index 000000000000..6e92fe048e5e --- /dev/null +++ b/sys-apps/uevt/Manifest @@ -0,0 +1 @@ +DIST uevt-2.3.tar.bz2 787807 SHA256 504daa8c1ff1475ad545a86432d3bd98af4f7ee8570c6aa2b54bedf80d57f0dc SHA512 69baeae514cc34b95f1c908000509d37ce0dff58fbdeffb911f13f1800c4f0fb8de1f9e6f0622836c04f2614bae3a17402d3448236e8ff6b3eadde038a34c1a8 WHIRLPOOL 93bf4a1c9854569c7287ab59a7c668453ebbcb093423acd375f9c089234ab9950e336cb736ad94266aa61b0e598e671fabddfb93973cbdb94e7e29a6a30c789b 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/files/uevt-2.3-vala-0.24.patch b/sys-apps/uevt/files/uevt-2.3-vala-0.24.patch new file mode 100644 index 000000000000..9cb0917b180f --- /dev/null +++ b/sys-apps/uevt/files/uevt-2.3-vala-0.24.patch @@ -0,0 +1,13 @@ +http://bugs.gentoo.org/509512 + +--- src/uevt-notify.vala ++++ src/uevt-notify.vala +@@ -51,7 +51,7 @@ + if(notify != true) + return; + +- Notification notif = new Notification(head, Markup.escape_text(body), icon); ++ Notify.Notification notif = new Notify.Notification(head, Markup.escape_text(body), icon); + + try { + notif.show(); diff --git a/sys-apps/uevt/metadata.xml b/sys-apps/uevt/metadata.xml new file mode 100644 index 000000000000..40838bc36783 --- /dev/null +++ b/sys-apps/uevt/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>desktop-misc</herd> +</pkgmetadata> diff --git a/sys-apps/uevt/uevt-2.3-r1.ebuild b/sys-apps/uevt/uevt-2.3-r1.ebuild new file mode 100644 index 000000000000..a9942628497e --- /dev/null +++ b/sys-apps/uevt/uevt-2.3-r1.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +VALA_MIN_API_VERSION="0.16" +inherit eutils vala + +DESCRIPTION="UPower/UDisks Event, a lightweight desktop-independent power and disk manager" +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.28 + x11-libs/gtk+:2 + >=x11-libs/libnotify-0.7" +# Prefer sys-power/upower-pm-utils because there is no Hibernate/Suspend otherwise +RDEPEND="${COMMON_DEPEND} + >=sys-fs/udisks-1.0.5:0 + || ( sys-power/upower-pm-utils >=sys-power/upower-0.9.23 )" +DEPEND="${COMMON_DEPEND} + $(vala_depend) + dev-util/intltool + sys-devel/gettext + virtual/pkgconfig" + +DOCS="AUTHORS ChangeLog README" + +pkg_setup() { + export VALAC="$(type -P valac-${UEVT_VALA_VERSION})" +} + +src_prepare() { + # http://git.sleipnir.fr/uevt/commit/?id=69d2f45e234190fbfb37745ea05ab88547a3de96 + epatch \ + "${FILESDIR}"/${P}-support_for_more_than_one_CPU.patch \ + "${FILESDIR}"/${P}-vala-0.24.patch + + # See http://bugs.gentoo.org/ wrt #428438 + echo src/configurator.c >> po/POTFILES.skip + echo src/power-infos.c >> po/POTFILES.skip + + vala_src_prepare +} + +pkg_postinst() { + has_version '>=sys-power/upower-0.99.0' && \ + ewarn "This version of UEvt doesn't support Hibernate/Suspend with UPower >= 0.99.0" +} |