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

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