Blame SOURCES/Sys-CPU-0.61-cpu_clock-can-be-undefined-on-an-ARM.patch

eda740
From 32c01db384d8ee22ed1a365378f431a3b7241ef0 Mon Sep 17 00:00:00 2001
eda740
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
eda740
Date: Tue, 6 May 2014 09:12:16 +0200
eda740
Subject: [PATCH 2/2] cpu_clock can be undefined on an ARM
eda740
MIME-Version: 1.0
eda740
Content-Type: text/plain; charset=UTF-8
eda740
Content-Transfer-Encoding: 8bit
eda740
eda740
Some ARM boards do not publish CPU clock.
eda740
eda740
Signed-off-by: Petr Písař <ppisar@redhat.com>
eda740
---
eda740
 Makefile.PL | 1 +
eda740
 t/Sys-CPU.t | 3 +++
eda740
 2 files changed, 4 insertions(+)
eda740
eda740
diff --git a/Makefile.PL b/Makefile.PL
eda740
index 910c77a..4e72025 100644
eda740
--- a/Makefile.PL
eda740
+++ b/Makefile.PL
eda740
@@ -13,4 +13,5 @@ WriteMakefile(
eda740
     'DEFINE'		=> '', # e.g., '-DHAVE_SOMETHING'
eda740
     'INC'		=> '', # e.g., '-I/usr/include/other'
eda740
     'dynamic_lib'       => {OTHERLDFLAGS => $extra_arg},
eda740
+    'BUILD_REQUIRES'    => {'Config' => 0 },
eda740
 );
eda740
diff --git a/t/Sys-CPU.t b/t/Sys-CPU.t
eda740
index 9edaaa3..e6dce80 100755
eda740
--- a/t/Sys-CPU.t
eda740
+++ b/t/Sys-CPU.t
eda740
@@ -8,6 +8,7 @@
eda740
 
eda740
 BEGIN { $| = 1; print "1..4\n"; }
eda740
 END {print "not ok 1\n" unless $loaded;}
eda740
+use Config;
eda740
 use Sys::CPU;
eda740
 $loaded = 1;
eda740
 print "ok 1\n";
eda740
@@ -24,6 +25,8 @@ if (defined($speed)) {
eda740
     print "ok 3 (CPU Speed : $speed)\n";
eda740
 } elsif ( $^O eq 'MSWin32'){
eda740
     print "ok 3 (CPU Speed: test skipped on MSWin32)\n";
eda740
+} elsif ($Config{archname} =~ /^(armv|aarch64)/ ) {
eda740
+    print "ok 3 (CPU Speed: test skipped on ARM and AArch64)\n";
eda740
 } else  {
eda740
     print "not ok 3 (cpu_clock undefined (ok if Win9x))\n";
eda740
 }
eda740
-- 
eda740
1.9.0
eda740