ports/150261: [PATCH] devel/p5-Sys-CPU: update to 0.52
Jase Thew
freebsd at beardz.net
Fri Sep 3 23:30:07 UTC 2010
>Number: 150261
>Category: ports
>Synopsis: [PATCH] devel/p5-Sys-CPU: update to 0.52
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Fri Sep 03 23:30:06 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Jase Thew
>Release: FreeBSD 8.1-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD jail-ports.localdomain 8.1-RELEASE FreeBSD 8.1-RELEASE #0 r210200M: Wed Jul 21 14:21:18 CEST
>Description:
- Update to 0.52
Port maintainer (terry at sucked-in.com) is cc'd.
Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:
>Fix:
--- p5-Sys-CPU-0.52.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/devel/p5-Sys-Cpu.orig/Makefile /usr/ports/devel/p5-Sys-Cpu/Makefile
--- /usr/ports/devel/p5-Sys-Cpu.orig/Makefile 2008-07-25 09:12:22.000000000 +0100
+++ /usr/ports/devel/p5-Sys-Cpu/Makefile 2010-09-03 21:51:07.000000000 +0100
@@ -6,7 +6,7 @@
#
PORTNAME= Sys-CPU
-PORTVERSION= 0.40
+PORTVERSION= 0.52
CATEGORIES= devel perl5
MASTER_SITES= CPAN
PKGNAMEPREFIX= p5-
diff -ruN --exclude=CVS /usr/ports/devel/p5-Sys-Cpu.orig/distinfo /usr/ports/devel/p5-Sys-Cpu/distinfo
--- /usr/ports/devel/p5-Sys-Cpu.orig/distinfo 2008-07-25 09:12:22.000000000 +0100
+++ /usr/ports/devel/p5-Sys-Cpu/distinfo 2010-09-03 21:51:44.000000000 +0100
@@ -1,3 +1,3 @@
-MD5 (Sys-CPU-0.40.tar.gz) = c2731716e5c1eaa4e88860ccc09791e2
-SHA256 (Sys-CPU-0.40.tar.gz) = 48efce686727f6529a555c3a6f7c57f91285e364675370007bb462174e773558
-SIZE (Sys-CPU-0.40.tar.gz) = 4696
+MD5 (Sys-CPU-0.52.tar.gz) = 34305423e86cfca9a631b6f91217f90f
+SHA256 (Sys-CPU-0.52.tar.gz) = ca0ec47ab24070e3040e5075337cfc69721362d9bef50f6992072efe644d4d26
+SIZE (Sys-CPU-0.52.tar.gz) = 5932
diff -ruN --exclude=CVS /usr/ports/devel/p5-Sys-Cpu.orig/files/patch-CPU.xs /usr/ports/devel/p5-Sys-Cpu/files/patch-CPU.xs
--- /usr/ports/devel/p5-Sys-Cpu.orig/files/patch-CPU.xs 2008-07-25 09:12:22.000000000 +0100
+++ /usr/ports/devel/p5-Sys-Cpu/files/patch-CPU.xs 2010-09-04 00:20:20.077260263 +0100
@@ -1,57 +1,36 @@
---- CPU.xs.orig 2008-07-25 09:06:35.000000000 +0200
-+++ CPU.xs 2008-07-25 09:24:13.000000000 +0200
-@@ -35,6 +35,9 @@
- #define _have_cpu_clock
- #define _have_cpu_type
- #endif
-+#ifdef __FreeBSD__
-+ #include <sys/sysctl.h>
-+#endif
-
- #ifdef WINDOWS
- /* Registry Functions */
-@@ -237,6 +240,10 @@
- {
- int clock = 0;
- int retcode = 0;
-+#ifdef __FreeBSD__
-+ size_t len = sizeof(clock);
-+ sysctlbyname("hw.clockrate", &clock, &len, NULL, 0);
-+#else
- #ifdef __linux__
- int value = proc_cpuinfo_clock();
- if (value) clock = value;
-@@ -263,12 +270,13 @@
- }
- }
- #endif
-+#endif
- if (clock) {
- ST(0) = sv_newmortal();
- sv_setiv (ST(0), clock);
- } else {
- ST(0) = &PL_sv_undef;
-- }
-+ }
- }
-
- SV *
-@@ -277,6 +285,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);
-+#else
- #ifdef __linux__
- value = proc_cpuinfo_field ("model name");
- if (!value) value = proc_cpuinfo_field ("machine");
-@@ -296,6 +308,7 @@
- value = infop->pi_processor_type;
- }
- #endif
-+#endif
- if (value) {
- ST(0) = sv_newmortal();
- sv_setpv (ST(0), value);
+--- 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 <sys/sysctl.h>
++ #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");
--- p5-Sys-CPU-0.52.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list