summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Leitch <port001@gentoo.org>2003-11-20 23:40:36 +0000
committerIan Leitch <port001@gentoo.org>2003-11-20 23:40:36 +0000
commitd9bf13b25f0b6cfa82145f48143e3ac30ed8f729 (patch)
tree77c1bd7acbfecb1b61769a882dd855212404293d /x11-misc
parentMoved from app-misc to x11-misc, metadata.xml created. (diff)
downloadgentoo-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')
-rw-r--r--x11-misc/xosview/ChangeLog43
-rw-r--r--x11-misc/xosview/Manifest4
-rw-r--r--x11-misc/xosview/files/digest-xosview-1.8.01
-rw-r--r--x11-misc/xosview/files/xosview-1.8.0-ppc.diff112
-rw-r--r--x11-misc/xosview/files/xosview-gcc-3.3.1.patch153
-rw-r--r--x11-misc/xosview/files/xosview-kernel-2.5+.diff139
-rw-r--r--x11-misc/xosview/metadata.xml5
-rw-r--r--x11-misc/xosview/xosview-1.8.0.ebuild43
8 files changed, 498 insertions, 2 deletions
diff --git a/x11-misc/xosview/ChangeLog b/x11-misc/xosview/ChangeLog
new file mode 100644
index 000000000000..471380169cac
--- /dev/null
+++ b/x11-misc/xosview/ChangeLog
@@ -0,0 +1,43 @@
+# ChangeLog for app-misc/xosview
+# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/x11-misc/xosview/ChangeLog,v 1.1 2003/11/20 23:40:31 port001 Exp $
+
+xosview-1.8.0 (28 Aug 2003)
+
+*xosview-1.8.0 (20 Nov 2003)
+
+ 20 Nov 2003; Ian Leitch <port001@gentoo.org> xosview-1.8.0.ebuild:
+ Moved from app-misc to x11-misc, metadata.xml created.
+
+ 15 Oct 2003; <plasmaroo@gentoo.org> xosview-1.8.0.ebuild,
+ files/xosview-gcc-3.3.1.patch:
+ Added a GCC 3.3 patch, thanks to Max Valdex <maxvaldez@yahoo.com> for sending
+ this in.
+
+ 12 Oct 2003; Brandy Westcott brandy@gentoo.org xosview-1.8.0.ebuild:
+ Fixed ebuild to install documention.
+
+ 28 Aug 2003; Tim Yamin <plasmaroo@gentoo.org> :
+ Added kernel 2.5/2.6 support through a patch [Bug 24342]
+
+*xosview-1.8.0 (12 Jul 2002)
+
+ 24 Jul 2002; Mark Guertin <gerk@gentoo.org> :
+ Added set of ppc diffs (thanks mostly to mdk/ydl patches), but
+ also had to make workaround for the fact that /proc/stat on PPC
+ currently seems to have no EOF (?!?). Will submit patches upstream.
+ Also added ppc to keywords.
+
+ 12 Jul 2002; Grant Goodyear <g2boojum@gentoo.org> ChangeLog :
+
+ new version
+
+*xosview-1.7.3-r1 (1 Feb 2002)
+
+ 1 Feb 2002; G.Bevin <gbevin@gentoo.org> ChangeLog :
+
+ Added initial ChangeLog which should be updated whenever the package is
+ updated in any way. This changelog is targetted to users. This means that the
+ comments should well explained and written in clean English. The details about
+ writing correct changelogs are explained in the skel.ChangeLog file which you
+ can find in the root directory of the portage repository.
diff --git a/x11-misc/xosview/Manifest b/x11-misc/xosview/Manifest
index ac9fca21633c..12e16c5641dc 100644
--- a/x11-misc/xosview/Manifest
+++ b/x11-misc/xosview/Manifest
@@ -1,5 +1,5 @@
-MD5 2706df8fdcd73d9c0dd478565d927814 xosview-1.8.0.ebuild 1114
-MD5 4385ee62ca6056e1d9b38f1121e014e5 ChangeLog 1508
+MD5 f6a8b5f79074cc055a3005e9212c067c xosview-1.8.0.ebuild 1112
+MD5 7564d2940258ad61113bfa6ab70722bf ChangeLog 1663
MD5 fe402b096905cae8dcb4a503d3a838ac metadata.xml 173
MD5 c6579bb720046ebff01f1b2a8c3d62fa files/digest-xosview-1.8.0 65
MD5 9ccfdc5def757ddbc2460b7a7c6ed84d files/xosview-gcc-3.3.1.patch 4605
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;
+
diff --git a/x11-misc/xosview/metadata.xml b/x11-misc/xosview/metadata.xml
new file mode 100644
index 000000000000..2518313f5241
--- /dev/null
+++ b/x11-misc/xosview/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>desktop-misc</herd>
+</pkgmetadata>
diff --git a/x11-misc/xosview/xosview-1.8.0.ebuild b/x11-misc/xosview/xosview-1.8.0.ebuild
new file mode 100644
index 000000000000..bbad5ead9ca5
--- /dev/null
+++ b/x11-misc/xosview/xosview-1.8.0.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-misc/xosview/xosview-1.8.0.ebuild,v 1.1 2003/11/20 23:40:31 port001 Exp $
+
+DESCRIPTION="X11 operating system viewer"
+SRC_URI="http://www.ibiblio.org/pub/Linux/system/status/xstatus/${P}.tar.gz"
+HOMEPAGE="http://xosview.sourceforge.net"
+
+SLOT="0"
+LICENSE="GPL-2 BSD"
+KEYWORDS="x86 ppc"
+
+DEPEND="virtual/x11"
+
+src_compile() {
+
+ if [ `uname -r | cut -d. -f1` -eq 2 -a `uname -r | cut -d. -f2` -ge 5 -a `uname -r | cut -d. -f2` -le 6 ] ; then
+ einfo "You are running `uname -r`"
+ einfo "Using 2.5/2.6 kernel compatibility patch"
+ epatch ${FILESDIR}/xosview-kernel-2.5+.diff || die "patch failed"
+ fi
+
+ if [ ${ARCH} = "ppc" ] ; then
+ patch -p0 < ${FILESDIR}/xosview-1.8.0-ppc.diff || die "patch failed"
+ fi
+
+ epatch ${FILESDIR}/xosview-gcc-3.3.1.patch
+
+ econf
+ emake || die
+
+}
+
+src_install() {
+ exeinto /usr/bin
+ doexe xosview
+ insinto /usr/lib/X11
+ cp Xdefaults XOsview
+ doins XOsview
+ into /usr
+ doman *.1
+ dodoc CHANGES COPYING README README.linux TODO
+}