Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Dec 2004 22:15:49 +0300
From:      Roman Bogorodskiy <bogorodskiy@inbox.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/75633: [ maintainer ] sysutils/torsmo: attempt to fix build on alpha
Message-ID:  <E1CjjIT-000J8A-00.bogorodskiy-inbox-ru@mx1.mail.ru>
Resent-Message-ID: <200412291920.iBTJKP4K093233@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         75633
>Category:       ports
>Synopsis:       [ maintainer ] sysutils/torsmo: attempt to fix build on alpha
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 29 19:20:25 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Roman Bogorodskiy
>Release:        FreeBSD 5.3-RELEASE-p2 i386
>Organization:
>Environment:
System: FreeBSD lame.novel.ru 5.3-RELEASE-p2 FreeBSD 5.3-RELEASE-p2 #3: Sat Dec 11 21:01:26 MSK 2004 root@lame.novel.ru:/usr/obj/usr/src/sys/MIRRORBOX i386


>Description:
	- use CPU freq. detection code only on i386 (I have no non-i386 boxes, so I cannot test it)
	- s/int/size_t/ 
	- bump PORTREVISION
>How-To-Repeat:
>Fix:

--- port.torsmo.update begins here ---
diff -ru torsmo.orig/Makefile torsmo/Makefile
--- torsmo.orig/Makefile	Wed Dec 29 21:56:58 2004
+++ torsmo/Makefile	Wed Dec 29 21:57:42 2004
@@ -7,6 +7,7 @@
 
 PORTNAME=	torsmo
 PORTVERSION=	0.18
+PORTREVISION=	1
 CATEGORIES=	sysutils
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	${PORTNAME}
diff -ru torsmo.orig/files/patch-freebsd.c torsmo/files/patch-freebsd.c
--- torsmo.orig/files/patch-freebsd.c	Wed Dec 29 21:56:58 2004
+++ torsmo/files/patch-freebsd.c	Wed Dec 29 22:12:05 2004
@@ -1,5 +1,5 @@
---- freebsd.c.orig	Wed Dec 22 20:52:33 2004
-+++ freebsd.c	Wed Dec 22 21:34:40 2004
+--- freebsd.c.orig	Wed Aug 25 20:24:24 2004
++++ freebsd.c	Wed Dec 29 22:11:31 2004
 @@ -4,14 +4,12 @@
  #include <stdio.h>
  #include <stdlib.h>
@@ -17,7 +17,7 @@
  #include <sys/vmmeter.h>
  #include <sys/dkstat.h>
  #include <unistd.h>
-@@ -19,11 +17,48 @@
+@@ -19,11 +17,50 @@
  #include <sys/socket.h>
  #include <net/if.h>
  #include <net/if_mib.h>
@@ -27,6 +27,7 @@
  #define GETSYSCTL(name, var) getsysctl(name, &(var), sizeof(var))
  #define KELVTOC(x)      ((x - 2732) / 10.0)
  
++#if defined(i386) || defined(__i386__)
 +static unsigned int get_timer();
 +static unsigned int get_cpu_speed(void);
 +static inline unsigned long long int rdtsc( void );
@@ -61,12 +62,22 @@
 +
 +    	return((tscstop-tscstart)/((stop-start)/1000.0));
 +} 
++#endif
 +
 +
  static int getsysctl(char *name, void *ptr, size_t len)
  {   
  	size_t nlen = len;
-@@ -344,4 +379,34 @@
+@@ -91,7 +128,7 @@
+ 	int mib[2] = {CTL_KERN, KERN_BOOTTIME};
+       	struct timeval boottime;
+         time_t now;
+-	int size = sizeof(boottime);
++	size_t size = sizeof(boottime);
+ 
+ 	if((sysctl(mib, 2, &boottime, &size, NULL, 0) != -1) && (boottime.tv_sec != 0)) {
+ 		time(&now);
+@@ -344,4 +381,38 @@
  
  char* get_acpi_fan() {
  	return "";
@@ -81,6 +92,7 @@
 +}
 +
 +char* get_freq() {
++#if defined(i386) || defined(__i386__)
 +	int i;
 +	char *cpuspeed;
 +
@@ -100,4 +112,7 @@
 +	}
 +
 +	return cpuspeed;
++#else
++	return "";
++#endif
  }
--- port.torsmo.update ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1CjjIT-000J8A-00.bogorodskiy-inbox-ru>