Date: Thu, 23 Jul 2009 22:37:16 +1000 (EST) From: Terry Sposato <terry@sucked-in.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/137030: maintainer update devel/p5-Sys-Cpu Message-ID: <20090723123716.480341CD8A@mail.sucked-in.com> Resent-Message-ID: <200907231240.n6NCe1tj004639@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 137030 >Category: ports >Synopsis: maintainer update devel/p5-Sys-Cpu >Confidential: yes >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Thu Jul 23 12:40:00 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Terry Sposato >Release: FreeBSD 7.2-RELEASE-p1 i386 >Organization: >Environment: System: FreeBSD got.sucked-in.com 7.2-RELEASE-p1 FreeBSD 7.2-RELEASE-p1 #0: Tue Jun 9 21:30:43 UTC 2009 root@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386 >Description: Maintainer update of port devel/p5-Sys-Cpu to 0.51 >How-To-Repeat: Apply diff and build as per normal >Fix: --- p5-Sys-CPU.update.diff begins here --- diff -Nru /usr/ports/devel/p5-Sys-Cpu.old/Makefile /usr/ports/devel/p5-Sys-Cpu/Makefile --- /usr/ports/devel/p5-Sys-Cpu.old/Makefile 2009-07-23 15:39:40.000000000 +1000 +++ /usr/ports/devel/p5-Sys-Cpu/Makefile 2009-07-23 15:39:19.000000000 +1000 @@ -6,7 +6,7 @@ # PORTNAME= Sys-CPU -PORTVERSION= 0.40 +PORTVERSION= 0.51 CATEGORIES= devel perl5 MASTER_SITES= CPAN PKGNAMEPREFIX= p5- diff -Nru /usr/ports/devel/p5-Sys-Cpu.old/distinfo /usr/ports/devel/p5-Sys-Cpu/distinfo --- /usr/ports/devel/p5-Sys-Cpu.old/distinfo 2008-07-25 18:12:22.000000000 +1000 +++ /usr/ports/devel/p5-Sys-Cpu/distinfo 2009-07-23 15:39:27.000000000 +1000 @@ -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.51.tar.gz) = 714b8ee88cfea4cc5f01a897c1de2f7a +SHA256 (Sys-CPU-0.51.tar.gz) = 5fade386d41bf2e21da9604dfbb523cab2ca74ba65296e568e1fd963f49ba625 +SIZE (Sys-CPU-0.51.tar.gz) = 5626 diff -Nru /usr/ports/devel/p5-Sys-Cpu.old/files/patch-CPU.xs /usr/ports/devel/p5-Sys-Cpu/files/patch-CPU.xs --- /usr/ports/devel/p5-Sys-Cpu.old/files/patch-CPU.xs 2008-07-25 18:12:22.000000000 +1000 +++ /usr/ports/devel/p5-Sys-Cpu/files/patch-CPU.xs 2009-07-23 20:44:18.000000000 +1000 @@ -1,57 +1,49 @@ ---- 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 2009-05-15 07:55:48.000000000 +1000 ++++ CPU.xs 2009-07-23 20:42:21.000000000 +1000 +@@ -16,7 +16,11 @@ + #define _have_cpu_clock + #define WINDOWS + #endif +- ++#ifdef __FreeBSD__ ++ #include <sys/sysctl.h> ++ #define _have_cpu_clock ++ #define _have_cpu_type ++#endif + #ifdef WINDOWS /* WINDOWS */ + #include <stdlib.h> + #include <windows.h> +@@ -313,9 +317,14 @@ + { + int clock = 0; + int retcode = 0; +-#ifdef __linux__ +- int value = proc_cpuinfo_clock(); +- if (value) clock = value; ++#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; ++ #endif + #endif + #ifdef WINDOWS + char *clock_str = malloc(MAX_IDENT_SIZE); +@@ -356,10 +365,15 @@ + { + 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"); + #endif ++#endif + #ifdef WINDOWS + retcode = GetSysInfoKey("Identifier",value); + if (retcode != 0) { --- p5-Sys-CPU.update.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090723123716.480341CD8A>