From root@sucked-in.com  Fri Jul 25 07:48:16 2008
Return-Path: <root@sucked-in.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 52C8C106564A
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 25 Jul 2008 07:48:16 +0000 (UTC)
	(envelope-from root@sucked-in.com)
Received: from mail.sucked-in.com (got.sucked-in.com [64.251.22.156])
	by mx1.freebsd.org (Postfix) with ESMTP id 03DA08FC21
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 25 Jul 2008 07:48:16 +0000 (UTC)
	(envelope-from root@sucked-in.com)
Received: from localhost (got.sucked-in.com [64.251.22.156])
	by mail.sucked-in.com (Postfix) with ESMTP id AF3371CD3E
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 25 Jul 2008 17:48:15 +1000 (EST)
Received: from mail.sucked-in.com ([64.251.22.156])
	by localhost (mail.sucked-in.com [64.251.22.156]) (amavisd-new, port 10024)
	with ESMTP id I3vpTp8yHcZ2 for <FreeBSD-gnats-submit@freebsd.org>;
	Fri, 25 Jul 2008 17:48:15 +1000 (EST)
Received: by mail.sucked-in.com (Postfix, from userid 0)
	id 681E91CD3C; Fri, 25 Jul 2008 17:48:15 +1000 (EST)
Message-Id: <20080725074815.681E91CD3C@mail.sucked-in.com>
Date: Fri, 25 Jul 2008 17:48:15 +1000 (EST)
From: terry@sucked-in.com
Reply-To: terry@sucked-in.com
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: New Port: devel/p5-Sys-Cpu
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         125947
>Category:       ports
>Synopsis:       New Port: devel/p5-Sys-Cpu
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gahr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 25 07:50:05 UTC 2008
>Closed-Date:    Fri Jul 25 08:17:28 UTC 2008
>Last-Modified:  Fri Jul 25 08:20:02 UTC 2008
>Originator:     Terry Sposato
>Release:        FreeBSD 6.3-RELEASE-p3 i386
>Organization:
Sucked In
>Environment:
System: FreeBSD got.sucked-in.com 6.3-RELEASE-p3 FreeBSD 6.3-RELEASE-p3 #6: Mon Jul 14 12:33:56 EST 2008 root@got.sucked-in.com:/usr/obj/usr/src/sys/SUCKED i386


>Description:
	New Port: devel/p5-Sys-Cpu for obtaining CPU information
>How-To-Repeat:

>Fix:


--- p5-Sys-Cpu.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	devel/p5-Sys-Cpu/
#	devel/p5-Sys-Cpu/Makefile
#	devel/p5-Sys-Cpu/distinfo
#	devel/p5-Sys-Cpu/pkg-descr
#	devel/p5-Sys-Cpu/pkg-plist
#	devel/p5-Sys-Cpu/files
#	devel/p5-Sys-Cpu/files/patch-CPU.xs
#
echo c - devel/p5-Sys-Cpu/
mkdir -p devel/p5-Sys-Cpu/ > /dev/null 2>&1
echo x - devel/p5-Sys-Cpu/Makefile
sed 's/^X//' >devel/p5-Sys-Cpu/Makefile << 'END-of-devel/p5-Sys-Cpu/Makefile'
X# New ports collection makefile for:	Sys-Cpu
X# Date created:	   25 July 2008
X# Whom:		   Terry Sposato <terry@sucked-in.com>
X#
X
XPORTNAME=	Sys-CPU
XPORTVERSION=	0.40
XCATEGORIES=	devel perl5
XMASTER_SITES=	CPAN
XPKGNAMEPREFIX=	p5-
X
XMAINTAINER=	terry@sucked-in.com
XCOMMENT=	Sys::CPU - Perl extension for getting CPU information.
X
XPERL_CONFIGURE=	yes
X
XMAN3=		Sys::CPU.3
X
X.include <bsd.port.mk>
END-of-devel/p5-Sys-Cpu/Makefile
echo x - devel/p5-Sys-Cpu/distinfo
sed 's/^X//' >devel/p5-Sys-Cpu/distinfo << 'END-of-devel/p5-Sys-Cpu/distinfo'
XMD5 (Sys-CPU-0.40.tar.gz) = c2731716e5c1eaa4e88860ccc09791e2
XSHA256 (Sys-CPU-0.40.tar.gz) = 48efce686727f6529a555c3a6f7c57f91285e364675370007bb462174e773558
XSIZE (Sys-CPU-0.40.tar.gz) = 4696
END-of-devel/p5-Sys-Cpu/distinfo
echo x - devel/p5-Sys-Cpu/pkg-descr
sed 's/^X//' >devel/p5-Sys-Cpu/pkg-descr << 'END-of-devel/p5-Sys-Cpu/pkg-descr'
XSys::CPU - Perl extension for getting CPU information.
XIn responce to a post on perlmonks.org, a module for counting 
Xthe number of CPU's on a system. Support has now also been 
Xadded for type of CPU and clock speed. While much of the code 
Xis from UNIX::Processors, win32 support has been added 
X(but not tested).
X
XWWW: http://search.cpan.org/dist/Sys-Cpu/
END-of-devel/p5-Sys-Cpu/pkg-descr
echo x - devel/p5-Sys-Cpu/pkg-plist
sed 's/^X//' >devel/p5-Sys-Cpu/pkg-plist << 'END-of-devel/p5-Sys-Cpu/pkg-plist'
X%%SITE_PERL%%/%%PERL_ARCH%%/Sys/CPU.pm
X%%SITE_PERL%%/%%PERL_ARCH%%/auto/Sys/CPU/CPU.so
X%%SITE_PERL%%/%%PERL_ARCH%%/auto/Sys/CPU/CPU.bs
X%%SITE_PERL%%/%%PERL_ARCH%%/auto/Sys/CPU/.packlist
X@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Sys/CPU
X@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/Sys
X@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto/Sys
END-of-devel/p5-Sys-Cpu/pkg-plist
echo c - devel/p5-Sys-Cpu/files
mkdir -p devel/p5-Sys-Cpu/files > /dev/null 2>&1
echo x - devel/p5-Sys-Cpu/files/patch-CPU.xs
sed 's/^X//' >devel/p5-Sys-Cpu/files/patch-CPU.xs << 'END-of-devel/p5-Sys-Cpu/files/patch-CPU.xs'
X--- CPU.xs.orig	2008-07-25 09:06:35.000000000 +0200
X+++ CPU.xs	2008-07-25 09:24:13.000000000 +0200
X@@ -35,6 +35,9 @@
X  #define _have_cpu_clock
X  #define _have_cpu_type
X #endif
X+#ifdef __FreeBSD__
X+ #include <sys/sysctl.h>
X+#endif
X 
X #ifdef WINDOWS
X /* Registry Functions */
X@@ -237,6 +240,10 @@
X {
X     int clock = 0;
X     int retcode = 0;
X+#ifdef __FreeBSD__
X+    size_t len = sizeof(clock);
X+    sysctlbyname("hw.clockrate", &clock, &len, NULL, 0);
X+#else
X #ifdef __linux__
X     int value = proc_cpuinfo_clock();
X     if (value) clock = value;
X@@ -263,12 +270,13 @@
X         }
X     }
X #endif
X+#endif
X     if (clock) {
X 	    ST(0) = sv_newmortal();
X 	    sv_setiv (ST(0), clock);
X     } else {
X 	    ST(0) = &PL_sv_undef;
X-    }   
X+    }
X }
X 
X SV *
X@@ -277,6 +285,10 @@
X {
X     char *value = malloc(MAX_IDENT_SIZE);
X     int retcode = 0;
X+#ifdef __FreeBSD__
X+   size_t len = MAX_IDENT_SIZE;
X+   sysctlbyname("hw.model", value, &len, NULL, 0);
X+#else
X #ifdef __linux__
X     value = proc_cpuinfo_field ("model name");
X     if (!value) value = proc_cpuinfo_field ("machine");
X@@ -296,6 +308,7 @@
X 	value = infop->pi_processor_type;
X     }
X #endif
X+#endif
X     if (value) {
X 	    ST(0) = sv_newmortal();
X 	    sv_setpv (ST(0), value);
END-of-devel/p5-Sys-Cpu/files/patch-CPU.xs
exit
--- p5-Sys-Cpu.shar ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->gahr 
Responsible-Changed-By: gahr 
Responsible-Changed-When: Fri Jul 25 07:53:24 UTC 2008 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=125947 
State-Changed-From-To: open->closed 
State-Changed-By: gahr 
State-Changed-When: Fri Jul 25 08:17:28 UTC 2008 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=125947 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/125947: commit references a PR
Date: Fri, 25 Jul 2008 08:12:30 +0000 (UTC)

 gahr        2008-07-25 08:12:22 UTC
 
   FreeBSD ports repository
 
   Modified files:
     devel                Makefile 
   Added files:
     devel/p5-Sys-Cpu     Makefile distinfo pkg-descr pkg-plist 
     devel/p5-Sys-Cpu/files patch-CPU.xs 
   Log:
   - New port: p5-Sys-Cpu
     Obtain CPU information from a perl script
   
   PR:             125947
   Submitted by:   terry@sucked-in.com
   
   Revision  Changes    Path
   1.3143    +1 -0      ports/devel/Makefile
   1.1       +21 -0     ports/devel/p5-Sys-Cpu/Makefile (new)
   1.1       +3 -0      ports/devel/p5-Sys-Cpu/distinfo (new)
   1.1       +57 -0     ports/devel/p5-Sys-Cpu/files/patch-CPU.xs (new)
   1.1       +8 -0      ports/devel/p5-Sys-Cpu/pkg-descr (new)
   1.1       +7 -0      ports/devel/p5-Sys-Cpu/pkg-plist (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
