From 7ae7b018ccf7760013f368fcb83aad9ecd8982a8 Mon Sep 17 00:00:00 2001 From: Mathieu Arnold Date: Mon, 20 Jun 2016 16:23:28 +0000 Subject: With the power of USES=dos2unix, get rid of most patches and files with CRLF. While there, run make makepatch, rename patches to use the new scheme, and various fixes. With hat: portmgr Sponsored by: Absolight --- devel/p5-Sys-Cpu/files/patch-CPU.xs | 72 ++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 36 deletions(-) (limited to 'devel/p5-Sys-Cpu/files/patch-CPU.xs') diff --git a/devel/p5-Sys-Cpu/files/patch-CPU.xs b/devel/p5-Sys-Cpu/files/patch-CPU.xs index ba4ae3ca5fdb..839bdb22303f 100644 --- a/devel/p5-Sys-Cpu/files/patch-CPU.xs +++ b/devel/p5-Sys-Cpu/files/patch-CPU.xs @@ -1,36 +1,36 @@ ---- CPU.xs.orig 2010-09-03 23:30:18.000000000 +0100 -+++ CPU.xs 2010-09-03 23:57:31.000000000 +0100 -@@ -40,6 +40,11 @@ - #define _have_cpu_clock - #define _have_cpu_type - #endif -+#ifdef __FreeBSD__ -+ #include -+ #define _have_cpu_type -+ #define _have_cpu_clock -+#endif - #ifdef WINDOWS - /* Registry Functions */ - -@@ -317,6 +322,10 @@ - int value = proc_cpuinfo_clock(); - if (value) clock = value; - #endif -+#ifdef __FreeBSD__ -+ size_t len = sizeof(clock); -+ sysctlbyname("hw.clockrate", &clock, &len, NULL, 0); -+#endif - #ifdef WINDOWS - char *clock_str = malloc(MAX_IDENT_SIZE); - /*!! untested !!*/ -@@ -356,6 +365,10 @@ - { - char *value = malloc(MAX_IDENT_SIZE); - int retcode = 0; -+#ifdef __FreeBSD__ -+ size_t len = MAX_IDENT_SIZE; -+ sysctlbyname("hw.model", value, &len, NULL, 0); -+#endif - #ifdef __linux__ - value = proc_cpuinfo_field ("model name"); - if (!value) value = proc_cpuinfo_field ("machine"); +--- CPU.xs.orig 2016-06-20 15:01:16 UTC ++++ CPU.xs +@@ -40,6 +40,11 @@ + #define _have_cpu_clock + #define _have_cpu_type + #endif ++#ifdef __FreeBSD__ ++ #include ++ #define _have_cpu_type ++ #define _have_cpu_clock ++#endif + #ifdef WINDOWS + /* Registry Functions */ + +@@ -317,6 +322,10 @@ CODE: + int value = proc_cpuinfo_clock(); + if (value) clock = value; + #endif ++#ifdef __FreeBSD__ ++ size_t len = sizeof(clock); ++ sysctlbyname("hw.clockrate", &clock, &len, NULL, 0); ++#endif + #ifdef WINDOWS + char *clock_str = malloc(MAX_IDENT_SIZE); + /*!! untested !!*/ +@@ -356,6 +365,10 @@ CODE: + { + char *value = malloc(MAX_IDENT_SIZE); + int retcode = 0; ++#ifdef __FreeBSD__ ++ size_t len = MAX_IDENT_SIZE; ++ sysctlbyname("hw.model", value, &len, NULL, 0); ++#endif + #ifdef __linux__ + value = proc_cpuinfo_field ("model name"); + if (!value) value = proc_cpuinfo_field ("machine"); -- cgit v1.2.3