summaryrefslogtreecommitdiff
path: root/extra/cpufrequtils
diff options
context:
space:
mode:
Diffstat (limited to 'extra/cpufrequtils')
-rw-r--r--extra/cpufrequtils/PKGBUILD10
-rw-r--r--extra/cpufrequtils/cpufrequtils-mips.patch18
2 files changed, 25 insertions, 3 deletions
diff --git a/extra/cpufrequtils/PKGBUILD b/extra/cpufrequtils/PKGBUILD
index 6854c2d37..2eab017a8 100644
--- a/extra/cpufrequtils/PKGBUILD
+++ b/extra/cpufrequtils/PKGBUILD
@@ -7,22 +7,26 @@ pkgname=cpufrequtils
pkgver=008
pkgrel=2
pkgdesc="Userspace tools for the kernel cpufreq subsystem"
-arch=('i686' 'x86_64')
+arch=('i686' 'x86_64' 'mips64el')
url="http://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils.html"
license=('GPL')
depends=('sysfsutils')
backup=('etc/conf.d/cpufreq')
source=("ftp://ftp.archlinux.org/other/${pkgname}/${pkgname}-${pkgver}.tar.bz2"
'cpufreq.rcd'
- 'cpufreq.confd')
+ 'cpufreq.confd'
+ cpufrequtils-mips.patch)
options=('!libtool' '!makeflags')
md5sums=('c59b71c044d463896f3247e8dd83dd7e'
'7f2b5085df44d2df3e7c2d0b9f6dab08'
- 'baae1f2abffc6bef2bd32a8dd8263c09')
+ 'baae1f2abffc6bef2bd32a8dd8263c09'
+ 'edbe311e6813f3b395a08b7f174065c1')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
+ [ "$CARCH" = "mips64el" ] && patch -Np0 -i ${srcdir}/cpufrequtils-mips.patch
+
make
}
diff --git a/extra/cpufrequtils/cpufrequtils-mips.patch b/extra/cpufrequtils/cpufrequtils-mips.patch
new file mode 100644
index 000000000..cba8ab48b
--- /dev/null
+++ b/extra/cpufrequtils/cpufrequtils-mips.patch
@@ -0,0 +1,18 @@
+--- utils/aperf.c.orig 2010-07-18 01:38:02.000000000 +0800
++++ utils/aperf.c 2010-07-18 01:38:39.000000000 +0800
+@@ -68,11 +68,15 @@
+
+ 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
+ }
+
+ /*