diff options
author | Ian Leitch <port001@gentoo.org> | 2003-11-20 23:40:36 +0000 |
---|---|---|
committer | Ian Leitch <port001@gentoo.org> | 2003-11-20 23:40:36 +0000 |
commit | d9bf13b25f0b6cfa82145f48143e3ac30ed8f729 (patch) | |
tree | 77c1bd7acbfecb1b61769a882dd855212404293d /x11-misc/xosview/files | |
parent | Moved from app-misc to x11-misc, metadata.xml created. (diff) | |
download | gentoo-2-d9bf13b25f0b6cfa82145f48143e3ac30ed8f729.tar.gz gentoo-2-d9bf13b25f0b6cfa82145f48143e3ac30ed8f729.tar.bz2 gentoo-2-d9bf13b25f0b6cfa82145f48143e3ac30ed8f729.zip |
Moved from app-misc to x11-misc, metadata.xml created.
Diffstat (limited to 'x11-misc/xosview/files')
-rw-r--r-- | x11-misc/xosview/files/digest-xosview-1.8.0 | 1 | ||||
-rw-r--r-- | x11-misc/xosview/files/xosview-1.8.0-ppc.diff | 112 | ||||
-rw-r--r-- | x11-misc/xosview/files/xosview-gcc-3.3.1.patch | 153 | ||||
-rw-r--r-- | x11-misc/xosview/files/xosview-kernel-2.5+.diff | 139 |
4 files changed, 405 insertions, 0 deletions
diff --git a/x11-misc/xosview/files/digest-xosview-1.8.0 b/x11-misc/xosview/files/digest-xosview-1.8.0 new file mode 100644 index 000000000000..cd6edbac70ee --- /dev/null +++ b/x11-misc/xosview/files/digest-xosview-1.8.0 @@ -0,0 +1 @@ +MD5 bcbc0f02ac8944222ec677d504024c40 xosview-1.8.0.tar.gz 170323 diff --git a/x11-misc/xosview/files/xosview-1.8.0-ppc.diff b/x11-misc/xosview/files/xosview-1.8.0-ppc.diff new file mode 100644 index 000000000000..06535f0431c9 --- /dev/null +++ b/x11-misc/xosview/files/xosview-1.8.0-ppc.diff @@ -0,0 +1,112 @@ +--- linux/MeterMaker.cc.orig Sun Feb 24 17:00:47 2002 ++++ linux/MeterMaker.cc Wed Jul 24 11:22:55 2002 +@@ -57,7 +57,7 @@ + push(new DiskMeter(_xos, atof(_xos->getResource("diskBandwidth")))); + + // check for the serial meters. +-#ifndef __mc68000__ ++#if !defined(__mc68000__) && !defined(__powerpc__) + for (int i = 0 ; i < SerialMeter::numDevices() ; i++) + if (_xos->isResourceTrue(SerialMeter::getResourceName( + (SerialMeter::Device)i))) + +--- config/Makefile.linux.in.orig Sun Feb 24 17:00:47 2002 ++++ config/Makefile.linux.in Wed Jul 24 11:27:23 2002 +@@ -25,7 +25,15 @@ + + FAIL_ARCHS =3D m68k sparc + ifneq (,$(findstring @host_cpu@, $(FAIL_ARCHS))) +-# nothing else for m68k ++ addserial = no ++endif ++ ++ifeq (@host_cpu@, powerpc) ++ addserial = yes ++endif ++ ++ifdef addserial ++# nothing else for m68k, powerpc + else + OBJS += serialmeter.o + endif + +--- ./linux/serialmeter.cc.orig Fri Mar 31 11:23:59 2000 ++++ ./linux/serialmeter.cc Fri Mar 31 11:24:44 2000 +@@ -32,7 +32,7 @@ + + #include <unistd.h> + #if defined(GNULIBC) || defined(__GLIBC__) +-#include <sys/io.h> ++#include "io_patched.h" + #ifndef __alpha__ + #include <sys/perm.h> + #endif ++++ ./linux/io_patched.h Fri Mar 31 11:22:59 2000 +@@ -0,0 +1,46 @@ ++/* Copyright (C) 1996 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Library General Public License as ++ published by the Free Software Foundation; either version 2 of the ++ License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Library General Public License for more details. ++ ++ You should have received a copy of the GNU Library General Public ++ License along with the GNU C Library; see the file COPYING.LIB. If not, ++ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ++ Boston, MA 02111-1307, USA. */ ++ ++#ifndef _SYS_IO_H ++ ++#define _SYS_IO_H 1 ++#include <features.h> ++ ++__BEGIN_DECLS ++ ++/* Get constants from kernel header files. */ ++#include <asm/io.h> ++ ++/* If TURN_ON is TRUE, request for permission to do direct i/o on the ++ port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O ++ permission off for that range. This call requires root privileges. ++ ++ Portability note: not all Linux platforms support this call. Most ++ platforms based on the PC I/O architecture probably will, however. ++ E.g., Linux/Alpha for Alpha PCs supports this. */ ++extern int ioperm __P ((unsigned long int __from, unsigned long int __num, ++ int __turn_on)); ++ ++/* Set the I/O privilege level to LEVEL. If LEVEL>3, permission to ++ access any I/O port is granted. This call requires root ++ privileges. */ ++extern int iopl __P ((int __level)); ++ ++__END_DECLS ++ ++#endif /* _SYS_IO_H */ + +--- linux/cpumeter.cc.orig Wed Feb 24 17:16:20 1999 ++++ linux/cpumeter.cc Wed Jul 24 18:34:47 2002 +@@ -113,14 +113,11 @@ + + int cpuCount = 0; + char buf[1024]; +- while (!stats.eof()){ +- stats.getline(buf, 1024); +- if (!stats.eof()){ +- if (!strncmp(buf, "cpu", 3) && buf[3] != ' ') ++ while (stats.getline(buf,1024)){ ++ if (!strncmp(buf, "cpu", 3) && buf[3] != ' '){ + cpuCount++; +- } ++ } + } +- + return cpuCount; + } + diff --git a/x11-misc/xosview/files/xosview-gcc-3.3.1.patch b/x11-misc/xosview/files/xosview-gcc-3.3.1.patch new file mode 100644 index 000000000000..1421a756b4fb --- /dev/null +++ b/x11-misc/xosview/files/xosview-gcc-3.3.1.patch @@ -0,0 +1,153 @@ +diff -ur xosview-1.8.0/linux/cpumeter.cc xosview-1.8.0-gcc3.3/linux/cpumeter.cc +--- xosview-1.8.0/linux/cpumeter.cc 1999-02-24 22:16:20.000000000 +0000 ++++ xosview-1.8.0-gcc3.3/linux/cpumeter.cc 2003-10-14 21:07:57.000000000 +0000 +@@ -11,7 +11,7 @@ + #include <fstream.h> + #include <stdlib.h> + #include <string.h> +-#include <strstream.h> ++#include <strstream> + #include <ctype.h> + + static const char STATFILENAME[] = "/proc/stat"; +@@ -126,7 +126,7 @@ + + const char *CPUMeter::cpuStr(int num){ + static char buffer[32]; +- ostrstream str(buffer, 32); ++ std::ostrstream str(buffer, 32); + + str << "cpu"; + if (num != 0) +diff -ur xosview-1.8.0/linux/intmeter.cc xosview-1.8.0-gcc3.3/linux/intmeter.cc +--- xosview-1.8.0/linux/intmeter.cc 1998-10-03 23:35:24.000000000 +0000 ++++ xosview-1.8.0-gcc3.3/linux/intmeter.cc 2003-10-14 21:05:13.000000000 +0000 +@@ -10,7 +10,7 @@ + #include "xosview.h" + #include "cpumeter.h" + #include <fstream.h> +-#include <strstream.h> ++#include <strstream> + #include <stdlib.h> + #ifdef __alpha__ + #include <asm/irq.h> +@@ -76,7 +76,7 @@ + char buffer[128]; + vfile >> buffer >> buffer >> buffer; + *strrchr(buffer, '.') = '\0'; +- istrstream is(buffer, 128); ++ std::istrstream is(buffer, 128); + float rval = 0.0; + is >> rval; + +diff -ur xosview-1.8.0/linux/memmeter.cc xosview-1.8.0-gcc3.3/linux/memmeter.cc +--- xosview-1.8.0/linux/memmeter.cc 1999-11-06 22:48:17.000000000 +0000 ++++ xosview-1.8.0-gcc3.3/linux/memmeter.cc 2003-10-14 21:05:13.000000000 +0000 +@@ -8,7 +8,7 @@ + #include "memmeter.h" + #include "xosview.h" + #include <fstream.h> +-#include <strstream.h> ++#include <strstream> + #include <stdlib.h> + + static const char MEMFILENAME[] = "/proc/meminfo"; +@@ -94,7 +94,7 @@ + LineInfo *rval = new LineInfo[len]; + + char buf[256]; +- istrstream line(buf, 256); ++ std::istrstream line(buf, 256); + + // Get the info from the "standard" meminfo file. + int lineNum = 0; +@@ -143,7 +143,7 @@ + } + + char buf[256]; +- istrstream line(buf, 256); ++ std::istrstream line(buf, 256); + + char ignore[256]; + +diff -ur xosview-1.8.0/linux/raidmeter.cc xosview-1.8.0-gcc3.3/linux/raidmeter.cc +--- xosview-1.8.0/linux/raidmeter.cc 1999-11-12 05:28:24.000000000 +0000 ++++ xosview-1.8.0-gcc3.3/linux/raidmeter.cc 2003-10-14 21:05:13.000000000 +0000 +@@ -8,7 +8,7 @@ + #include "raidmeter.h" + #include "xosview.h" + #include <fstream.h> +-#include <strstream.h> ++#include <strstream> + #include <stdio.h> + #include <stdlib.h> + #include <string.h> +@@ -19,7 +19,7 @@ + getRAIDstate(); + if(disknum<1) + disableMeter(); +- ostrstream os; ++ std::ostrstream os; + os << "MD" << raiddev << ends; + legend(os.str()); + delete[] os.str(); +@@ -71,7 +71,7 @@ + int RAIDMeter::find1(char *key, char *findwhat, int num1){ + char buf[80]; + int rc; +- ostrstream os(buf, 80); ++ std::ostrstream os(buf, 80); + os << findwhat << "." << num1 << ends; + rc=!strncmp(buf,key, 80); + return rc; +@@ -80,7 +80,7 @@ + int RAIDMeter::find2(char *key, char *findwhat, int num1, int num2){ + char buf[80]; + int rc; +- ostrstream os(buf, 80); ++ std::ostrstream os(buf, 80); + os << findwhat << "." << num1 << "." << num2 << ends; + rc=!strncmp(buf,key, 80); + return rc; +diff -ur xosview-1.8.0/linux/serialmeter.cc xosview-1.8.0-gcc3.3/linux/serialmeter.cc +--- xosview-1.8.0/linux/serialmeter.cc 2002-02-24 19:52:01.000000000 +0000 ++++ xosview-1.8.0-gcc3.3/linux/serialmeter.cc 2003-10-14 21:17:01.000000000 +0000 +@@ -16,7 +16,7 @@ + #include <sys/ioctl.h> + #include <errno.h> + #include <stdlib.h> +-#include <strstream.h> ++#include <strstream> + #include <iomanip.h> + + // This should go away after types.h gets fixed in the kernel. +@@ -136,7 +136,7 @@ + return serinfo.port; + } + else { // Use user specified port base. +- istrstream istrm(res); ++ std::istrstream istrm(res); + unsigned short int tmp = 0; + istrm >> hex >> tmp; + return tmp; +diff -ur xosview-1.8.0/linux/swapmeter.cc xosview-1.8.0-gcc3.3/linux/swapmeter.cc +--- xosview-1.8.0/linux/swapmeter.cc 1999-01-31 20:18:49.000000000 +0000 ++++ xosview-1.8.0-gcc3.3/linux/swapmeter.cc 2003-10-14 21:05:13.000000000 +0000 +@@ -10,7 +10,7 @@ + #include "swapmeter.h" + #include "xosview.h" + #include <fstream.h> +-#include <strstream.h> ++#include <strstream> + #include <stdlib.h> + + #ifdef USESYSCALLS +@@ -90,7 +90,7 @@ + // Get the info from the "standard" meminfo file. + while (!meminfo.eof()){ + meminfo.getline(buf, 256); +- istrstream line(buf, 256); ++ std::istrstream line(buf, 256); + + if(!strncmp("SwapTotal", buf, strlen("SwapTotal"))) + line >> ignore >> total_; diff --git a/x11-misc/xosview/files/xosview-kernel-2.5+.diff b/x11-misc/xosview/files/xosview-kernel-2.5+.diff new file mode 100644 index 000000000000..42df1cbde10c --- /dev/null +++ b/x11-misc/xosview/files/xosview-kernel-2.5+.diff @@ -0,0 +1,139 @@ +diff -u -r xosview-1.8.0/linux/diskmeter.cc xosview-1.8.0-kai/linux/diskmeter.cc +--- xosview-1.8.0/linux/diskmeter.cc 1999-11-07 21:30:58.000000000 +0100 ++++ xosview-1.8.0-kai/linux/diskmeter.cc 2003-02-27 03:50:54.000000000 +0100 +@@ -12,6 +12,8 @@ + #include <stdlib.h> + + static const char STATFILENAME[] = "/proc/stat"; ++// kernel >= 2.5 support ++static const char VMSTATFILENAME[] = "/proc/vmstat"; + + DiskMeter::DiskMeter( XOSView *parent, float max ) : FieldMeterGraph( + parent, 3, "DISK", "READ/WRITE/IDLE") +@@ -50,25 +52,54 @@ + IntervalTimerStop(); + total_ = maxspeed_; + char buf[1024]; ++ unsigned char new_kernel = 1; ++ ifstream vmstats( VMSTATFILENAME ); + ifstream stats( STATFILENAME ); + +- if ( !stats ) ++ if ( new_kernel && !vmstats ) + { +- cerr <<"Can not open file : " <<STATFILENAME <<endl; +- exit( 1 ); ++ new_kernel = 0; + } + +- // Find the line with 'page' +- stats >> buf; +- while (strncmp(buf, "page", 9)) ++ if ( !new_kernel && !stats ) + { +- stats.ignore(1024, '\n'); +- stats >> buf; ++ cerr <<"Can not open file : " <<STATFILENAME <<endl; ++ exit( 1 ); + } + +- // read values + unsigned long one, two; +- stats >> one >> two; ++ ++ if (new_kernel) { ++ vmstats >> buf; ++ // kernel >= 2.5 ++ while (!vmstats.eof() && strncmp(buf, "pgpgin", 7)) ++ { ++ vmstats.ignore(1024, '\n'); ++ vmstats >> buf; ++ } ++ ++ // read first value ++ vmstats >> one; ++ ++ while (!vmstats.eof() && strncmp(buf, "pgpgout", 7)) ++ { ++ vmstats.ignore(1024, '\n'); ++ vmstats >> buf; ++ } ++ ++ // read second value ++ vmstats >> two; ++ } else { ++ stats >> buf; ++ while (strncmp(buf, "page", 9)) ++ { ++ stats.ignore(1024, '\n'); ++ stats >> buf; ++ } ++ ++ // read values ++ stats >> one >> two; ++ } + + // assume each "unit" is 1k. + // This is true for ext2, but seems to be 512 bytes +Only in xosview-1.8.0/linux/memstat: Makefile +diff -u -r xosview-1.8.0/linux/pagemeter.cc xosview-1.8.0-kai/linux/pagemeter.cc +--- xosview-1.8.0/linux/pagemeter.cc 1999-02-24 23:28:18.000000000 +0100 ++++ xosview-1.8.0-kai/linux/pagemeter.cc 2003-02-27 03:02:17.000000000 +0100 +@@ -13,6 +13,8 @@ + + + static const char STATFILENAME[] = "/proc/stat"; ++// kernel >= 2.5 support ++static const char VMSTATFILENAME[] = "/proc/vmstat"; + + + PageMeter::PageMeter( XOSView *parent, float max ) +@@ -49,18 +51,41 @@ + void PageMeter::getpageinfo( void ){ + total_ = 0; + char buf[1024]; ++ unsigned char new_kernel = 1; ++ ++ ifstream vmstats( VMSTATFILENAME ); + ifstream stats( STATFILENAME ); + +- if ( !stats ){ +- cerr <<"Cannot open file : " <<STATFILENAME <<endl; +- exit( 1 ); ++ if ( new_kernel && !vmstats ){ ++ new_kernel = 0; ++ } ++ ++ if ( !new_kernel && !stats ) { ++ cerr <<"Cannot open file : " <<STATFILENAME <<endl; ++ exit( 1 ); + } + +- do { +- stats >>buf; +- } while (strncasecmp(buf, "swap", 5)); ++ if ( new_kernel ) { ++ // kernel >= 2.5 ++ do { ++ vmstats >>buf; ++ } while (!vmstats.eof() && strncasecmp(buf, "pswpin", 7)); + +- stats >>pageinfo_[pageindex_][0] >>pageinfo_[pageindex_][1]; ++ vmstats >>pageinfo_[pageindex_][0]; ++ ++ do { ++ vmstats >>buf; ++ } while (!vmstats.eof() && strncasecmp(buf, "pswpout", 8)) ; ++ ++ vmstats >>pageinfo_[pageindex_][1]; ++ } else { ++ // kernel < 2.5 ++ do { ++ stats >>buf; ++ } while (strncasecmp(buf, "swap", 5)); ++ ++ stats >>pageinfo_[pageindex_][0] >>pageinfo_[pageindex_][1]; ++ } + + int oldindex = (pageindex_+1)%2; + |