aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorRasmus Thomsen <oss@cogitri.dev>2020-04-25 20:16:09 +0200
committerRasmus Thomsen <oss@cogitri.dev>2020-04-26 19:31:44 +0000
commit443a81a1bf3bde94a70cc17ff1fd6d6788db34bf (patch)
treeee1137461577b5538977b60974f0031f0c938d0b /testing
parent3787533f65f7defa44a50686c37f87998bd1f81c (diff)
downloadaports-443a81a1bf3bde94a70cc17ff1fd6d6788db34bf.tar.bz2
aports-443a81a1bf3bde94a70cc17ff1fd6d6788db34bf.tar.xz
community/cpupower: move from testing
Diffstat (limited to 'testing')
-rw-r--r--testing/cpupower/APKBUILD43
-rw-r--r--testing/cpupower/cpupower.confd36
-rw-r--r--testing/cpupower/cpupower.initd42
-rw-r--r--testing/cpupower/nls.patch90
4 files changed, 0 insertions, 211 deletions
diff --git a/testing/cpupower/APKBUILD b/testing/cpupower/APKBUILD
deleted file mode 100644
index 95db8f0353..0000000000
--- a/testing/cpupower/APKBUILD
+++ /dev/null
@@ -1,43 +0,0 @@
-# Contributor: Carlo Landmeter <clandmeter@gmail.com>
-# Maintainer: Ben Allen <bensallen@me.com>
-pkgname=cpupower
-_kver=4.4.14
-_kpkgrel=2
-
-pkgver=$_kver
-pkgrel=$_kpkgrel
-pkgdesc="Linux kernel tool to examine and tune power saving related features of your processor"
-url="https://www.kernel.org/"
-arch="all"
-license="GPL-2.0"
-depends_dev="pciutils-dev readline-dev"
-makedepends="$depends_dev bash linux-headers"
-subpackages="$pkgname-doc $pkgname-dev"
-replaces="linux-tools-cpupower"
-source="https://kernel.org/pub/linux/kernel/v4.x/linux-$pkgver.tar.xz
- cpupower.initd
- cpupower.confd
- nls.patch
- "
-
-builddir="$srcdir"/linux-$pkgver
-
-build() {
- cd "$builddir"/tools/power/cpupower
- make NLS=false VERSION=$pkgver-$pkgrel
-}
-
-package() {
- cd "$builddir"/tools/power/cpupower
- make NLS=false DESTDIR="$pkgdir" mandir="/usr/share/man" install || return 1
-
- install -Dm755 "$srcdir"/$pkgname.initd \
- "$pkgdir"/etc/init.d/$pkgname || return 1
- install -Dm644 "$srcdir"/$pkgname.confd \
- "$pkgdir"/etc/conf.d/$pkgname || return 1
-}
-
-sha512sums="c9d4f3e8949cfb715ff2fc4169a12938132f967ad509c154f5c8598c70ac14989364083f1ab29c2fbab120945363f1343f2a30819df9be53938d4ef43391dbc5 linux-4.4.14.tar.xz
-97ecfeaaaa8efca7af585316b843bf7be885e88095bbdfbf52bc9a96b14dc862435482781e205ea022ab208978aaa4aabb317354fab890ed514a5088ae5045c8 cpupower.initd
-63cd12a4d8782198c71662e9205e346e064b65bae5e3e175b5bc43bdf7ec6ddf675b60349750afe3c37c8a925f9ae9a93530671821342581bd282a69e0773b8c cpupower.confd
-f4e8365ddccc26f3dec66311fac04560661934f9ddb888d48c2e67818a0647883e13e8542149f7981f532ff58c002e901ca543061cd0c46c29ea089dfe3ceafe nls.patch"
diff --git a/testing/cpupower/cpupower.confd b/testing/cpupower/cpupower.confd
deleted file mode 100644
index 1e67ed04e2..0000000000
--- a/testing/cpupower/cpupower.confd
+++ /dev/null
@@ -1,36 +0,0 @@
-# /etc/conf.d/cpupower: config file for /etc/init.d/cpupower
-
-# Options when starting cpufreq (given to the `cpupower` program)
-# Possible options are:
-# -g --governor <GOV> (ie: ondemand, performance, or powersave)
-# -d --min <FREQ> (ie: 1000MHz)
-# -u --max <FREQ> (ie: 2000MHz)
-# -f --freq <FREQ> (requires userspace governor, this *can not* be combined with
-# with any other parameters).
-# Frequencies can be passed in Hz, kHz (default), MHz, GHz, or THz by postfixing the
-# value with the wanted unit name, without any space.
-# (frequency in kHz =^ Hz * 0.001 =^ MHz * 1000 =^ GHz * 1000000).
-
-START_OPTS="--governor ondemand"
-
-# Options when stopping cpufreq (given to the `cpupower` program)
-# This option can be used to change governer on stop. Leaving it empty will ensure
-# the governer remains on the one provided above.
-STOP_OPTS=""
-
-# Extra settings to write to sysfs cpufreq values.
-#
-# up_threshold: threshold for stepping up frequency, where the value represents
-# the percentage of cpu load.
-#
-# down_threshold: threshold for stepping down frequency, where the value
-# represents the percentage of cpu load.
-#
-# sampling_down_factor: determines how frequently the governor polls the cpu, a
-# value greater than 1 improves performance by reducing the polling when the
-# load is high. This tunable has no effect on behavior at lower CPU frequencies.
-#
-# ignore_nice_load: when set to '1' the processes that are run with a 'nice'
-# value will not count in the usage calculation.
-
-#SYSFS_EXTRA="ondemand/ignore_nice_load=1 ondemand/up_threshold=75 ondemand/sampling_down_factor=10"
diff --git a/testing/cpupower/cpupower.initd b/testing/cpupower/cpupower.initd
deleted file mode 100644
index 7e4584f5a7..0000000000
--- a/testing/cpupower/cpupower.initd
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-CPUFREQ_SYSFS=/sys/devices/system/cpu/cpufreq
-
-change() {
- local c ret=0 opts="$1"
- if [ -n "$opts" ] ; then
- ebegin "Running cpupower -c all frequency-set ${opts}"
- cpupower -c all frequency-set ${opts} >/dev/null 2>&1
- : $(( ret += $? ))
- eend ${ret}
-
- if [ -d ${CPUFREQ_SYSFS} ] && [ -n "${SYSFS_EXTRA}" ] ; then
- c=1
- einfo "Setting extra options: ${SYSFS_EXTRA}"
- if cd ${CPUFREQ_SYSFS} ; then
- local o v
- for o in ${SYSFS_EXTRA} ; do
- v=${o#*=}
- o=${o%%=*}
- echo ${v} > ${o} || break
- done
- c=0
- fi
- eend ${c}
- : $(( ret += c ))
- fi
- fi
-
- return ${ret}
-}
-
-start() {
- change "${START_OPTS}"
-}
-
-stop() {
- change "${STOP_OPTS}"
-}
diff --git a/testing/cpupower/nls.patch b/testing/cpupower/nls.patch
deleted file mode 100644
index 24f5afd45f..0000000000
--- a/testing/cpupower/nls.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-diff --git a/tools/power/cpupower/utils/cpupower-info.c b/tools/power/cpupower/utils/cpupower-info.c
-index 10299f2..b26cc08 100644
---- a/tools/power/cpupower/utils/cpupower-info.c
-+++ b/tools/power/cpupower/utils/cpupower-info.c
-@@ -41,8 +41,10 @@ int cmd_info(int argc, char **argv)
- } params = {};
- int ret = 0;
-
-+#ifdef NLS
- setlocale(LC_ALL, "");
- textdomain(PACKAGE);
-+#endif
-
- /* parameter parsing */
- while ((ret = getopt_long(argc, argv, "b", set_opts, NULL)) != -1) {
-diff --git a/tools/power/cpupower/utils/cpupower-set.c b/tools/power/cpupower/utils/cpupower-set.c
-index 3e6f374..a40b50d 100644
---- a/tools/power/cpupower/utils/cpupower-set.c
-+++ b/tools/power/cpupower/utils/cpupower-set.c
-@@ -43,8 +43,10 @@ int cmd_set(int argc, char **argv)
- int perf_bias = 0;
- int ret = 0;
-
-+#ifdef NLS
- setlocale(LC_ALL, "");
- textdomain(PACKAGE);
-+#endif
-
- params.params = 0;
- /* parameter parsing */
-diff --git a/tools/power/cpupower/utils/cpupower.c b/tools/power/cpupower/utils/cpupower.c
-index 9ea9143..24d19db 100644
---- a/tools/power/cpupower/utils/cpupower.c
-+++ b/tools/power/cpupower/utils/cpupower.c
-@@ -189,8 +189,10 @@ int main(int argc, const char *argv[])
- return EXIT_FAILURE;
- }
-
-+#ifdef NLS
- setlocale(LC_ALL, "");
- textdomain(PACKAGE);
-+#endif
-
- /* Turn "perf cmd --help" into "perf help cmd" */
- if (argc > 1 && !strcmp(argv[1], "--help")) {
-diff --git a/tools/power/cpupower/utils/helpers/helpers.h b/tools/power/cpupower/utils/helpers/helpers.h
-index aa9e954..261692a 100644
---- a/tools/power/cpupower/utils/helpers/helpers.h
-+++ b/tools/power/cpupower/utils/helpers/helpers.h
-@@ -10,13 +10,13 @@
- #ifndef __CPUPOWERUTILS_HELPERS__
- #define __CPUPOWERUTILS_HELPERS__
-
--#include <libintl.h>
- #include <locale.h>
-
- #include "helpers/bitmask.h"
-
- /* Internationalization ****************************/
- #ifdef NLS
-+#include <libintl.h>
-
- #define _(String) gettext(String)
- #ifndef gettext_noop
-diff --git a/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c b/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c
-index 05f953f..dec8ff9 100644
---- a/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c
-+++ b/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c
-@@ -268,7 +268,7 @@ void list_monitors(void)
- * percent, time (granlarity)
- */
- printf("%s\t[%c] -> %s\n", s.name, range_abbr[s.range],
-- gettext(s.desc));
-+ _(s.desc));
- }
- }
- }
-diff --git a/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.h b/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.h
-index 9e43f33..d96d618 100644
---- a/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.h
-+++ b/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.h
-@@ -60,7 +60,7 @@ extern long long timespec_diff_us(struct timespec start, struct timespec end);
-
- #define print_overflow_err(mes, ov) \
- { \
-- fprintf(stderr, gettext("Measure took %u seconds, but registers could " \
-+ fprintf(stderr, _("Measure took %u seconds, but registers could " \
- "overflow at %u seconds, results " \
- "could be inaccurate\n"), mes, ov); \
- }