extra/cpufrequtils to 008-2

This commit is contained in:
Kevin Mihelich 2012-06-22 12:26:01 -04:00
parent b6487eeafe
commit a2681af0b3
2 changed files with 58 additions and 19 deletions

View file

@ -0,0 +1,34 @@
From f1b6bccf08f53295b2f7f448f28bbd37533c14a2 Mon Sep 17 00:00:00 2001
From: Zhang Le <r0bertz@gentoo.org>
Date: Sun, 18 Jul 2010 02:05:28 +0800
Subject: [PATCH 1/8] Only x86 has cpuid instruction
Signed-off-by: Zhang Le <r0bertz@gentoo.org>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
---
utils/aperf.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/utils/aperf.c b/utils/aperf.c
index 627fb17..1c64501 100644
--- a/utils/aperf.c
+++ b/utils/aperf.c
@@ -68,11 +68,15 @@ struct avg_perf_cpu_info
static int cpu_has_effective_freq()
{
+#if defined(__i386__) || defined(__x86_64__)
/* largest base level */
if (cpuid_eax(0) < 6)
return 0;
return cpuid_ecx(6) & 0x1;
+#else
+ return 0;
+#endif
}
/*
--
1.7.10

View file

@ -1,37 +1,42 @@
# $Id: PKGBUILD 85780 2010-07-19 14:39:52Z kevin $ # $Id: PKGBUILD 149475 2012-02-08 09:53:00Z pierre $
# Maintainer: kevin <kevin@archlinux.org> # Maintainer: kevin <kevin@archlinux.org>
# Contributor: phrakture <aaronmgriffin+gmail+com> # Contributor: phrakture <aaronmgriffin+gmail+com>
# Contributor: SpepS <dreamspepser at yahoo dot it> # Contributor: SpepS <dreamspepser at yahoo dot it>
# ALARM: Kevin Mihelich <kevin@plugapps.com> # ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - no changes, this older version works with ARM though # - patch to fix x86-only parts
plugrel=1
pkgname=cpufrequtils pkgname=cpufrequtils
pkgver=007 pkgver=008
pkgrel=1 pkgrel=2
pkgdesc="Userspace tools for the kernel cpufreq subsystem" pkgdesc="Userspace tools for the kernel cpufreq subsystem"
arch=('i686' 'x86_64') arch=('i686' 'x86_64')
url="http://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils.html" url="http://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils.html"
license=('GPL') license=('GPL')
depends=('sysfsutils') depends=('sysfsutils')
backup=('etc/conf.d/cpufreq') backup=('etc/conf.d/cpufreq')
source=(http://www.kernel.org/pub/linux/utils/kernel/cpufreq/${pkgname}-${pkgver}.tar.bz2 source=("ftp://ftp.archlinux.org/other/${pkgname}/${pkgname}-${pkgver}.tar.bz2"
cpufreq.rcd 'cpufreq.rcd'
cpufreq.confd) 'cpufreq.confd'
options=(!libtool !distcc !ccache) '0001-Only-x86-has-cpuid-instruction.patch')
md5sums=('fdd833ce70a9ae40ae8bce5b18f2becf' options=('!libtool' '!makeflags')
md5sums=('c59b71c044d463896f3247e8dd83dd7e'
'7f2b5085df44d2df3e7c2d0b9f6dab08' '7f2b5085df44d2df3e7c2d0b9f6dab08'
'baae1f2abffc6bef2bd32a8dd8263c09') 'baae1f2abffc6bef2bd32a8dd8263c09'
'9ed71a50670aa99e12245cb3f5199142')
build() build() {
{
cd "${srcdir}/${pkgname}-${pkgver}" cd "${srcdir}/${pkgname}-${pkgver}"
make -j1 || return 1 patch -p1 -i "${srcdir}/0001-Only-x86-has-cpuid-instruction.patch"
make INSTALL="/bin/install -c" mandir=/usr/share/man DESTDIR="${pkgdir}" install || return 1
install -D -m755 ${srcdir}/cpufreq.rcd "${pkgdir}/etc/rc.d/cpufreq" || return 1 make
install -D -m644 ${srcdir}/cpufreq.confd "${pkgdir}/etc/conf.d/cpufreq" || return 1 }
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
make INSTALL="/usr/bin/install -c" mandir=/usr/share/man DESTDIR="${pkgdir}" install
install -D -m755 ${srcdir}/cpufreq.rcd "${pkgdir}/etc/rc.d/cpufreq"
install -D -m644 ${srcdir}/cpufreq.confd "${pkgdir}/etc/conf.d/cpufreq"
} }