summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarald van Dijk <truedfx@gentoo.org>2005-09-17 18:18:39 +0000
committerHarald van Dijk <truedfx@gentoo.org>2005-09-17 18:18:39 +0000
commit8ed2c0f4ed26783ea54c135a6b7395ea34efbe1a (patch)
tree13981e5f2823614fa8b763c8c9cbb151c975c97b
parentStable on ppc and hppa (diff)
downloadgentoo-2-8ed2c0f4ed26783ea54c135a6b7395ea34efbe1a.tar.gz
gentoo-2-8ed2c0f4ed26783ea54c135a6b7395ea34efbe1a.tar.bz2
gentoo-2-8ed2c0f4ed26783ea54c135a6b7395ea34efbe1a.zip
remove old version, fix bug #106173, and fix things to work without /usr/X11R6
(Portage version: 1.589-cvs)
-rw-r--r--x11-misc/xosview/ChangeLog16
-rw-r--r--x11-misc/xosview/Manifest19
-rw-r--r--x11-misc/xosview/files/digest-xosview-1.8.11
-rw-r--r--x11-misc/xosview/files/digest-xosview-1.8.2-r11
-rw-r--r--x11-misc/xosview/files/xosview-1.8.1-kernel-2.5+.diff158
-rw-r--r--x11-misc/xosview/files/xosview-resdir.patch35
-rw-r--r--x11-misc/xosview/xosview-1.8.1.ebuild38
-rw-r--r--x11-misc/xosview/xosview-1.8.2-r1.ebuild33
-rw-r--r--x11-misc/xosview/xosview-1.8.2.ebuild8
9 files changed, 103 insertions, 206 deletions
diff --git a/x11-misc/xosview/ChangeLog b/x11-misc/xosview/ChangeLog
index 9974186d4b90..50baa42c889f 100644
--- a/x11-misc/xosview/ChangeLog
+++ b/x11-misc/xosview/ChangeLog
@@ -1,6 +1,20 @@
# ChangeLog for x11-misc/xosview
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-misc/xosview/ChangeLog,v 1.20 2005/04/20 10:01:30 truedfx Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-misc/xosview/ChangeLog,v 1.21 2005/09/17 18:18:39 truedfx Exp $
+
+*xosview-1.8.2-r1 (17 Sep 2005)
+
+ 17 Sep 2005; Harald van Dijk <truedfx@gentoo.org>
+ +files/xosview-resdir.patch, +xosview-1.8.2-r1.ebuild:
+ Correct checks for resource dirs, and work without /usr/X11R6
+
+ 17 Sep 2005; Harald van Dijk <truedfx@gentoo.org>
+ xosview-1.8.2.ebuild:
+ Install XOsview resource file in correct location (bug #106173)
+
+ 17 Sep 2005; Harald van Dijk <truedfx@gentoo.org>
+ -files/xosview-1.8.1-kernel-2.5+.diff, -xosview-1.8.1.ebuild:
+ Removing old version
20 Apr 2005; Harald van Dijk <truedfx@gentoo.org>
+files/xosview-emptyxpaths.patch, xosview-1.8.2.ebuild:
diff --git a/x11-misc/xosview/Manifest b/x11-misc/xosview/Manifest
index b8a6b1397157..34dc5d1d4a54 100644
--- a/x11-misc/xosview/Manifest
+++ b/x11-misc/xosview/Manifest
@@ -1,8 +1,19 @@
-MD5 7157c576afa36d303d0ba0736f4645be ChangeLog 3948
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+MD5 b26ebed851cadad6dfe07e1ad3820e7c ChangeLog 4399
MD5 fe402b096905cae8dcb4a503d3a838ac metadata.xml 173
-MD5 26335e66a65db22f72ce4657bf7b79d2 xosview-1.8.1.ebuild 995
-MD5 5b1d41ccdef822a8eb7858b6af71d044 xosview-1.8.2.ebuild 1216
-MD5 eddb6473d81018249d098b1d013fd044 files/digest-xosview-1.8.1 65
+MD5 d98e406704d6c0fe46a7eb30b1ae3c41 xosview-1.8.2.ebuild 1229
+MD5 963117661fc853340e953d9c3a8a41b5 xosview-1.8.2-r1.ebuild 744
MD5 efaaa39f5b7d26d1feffe219417ed633 files/digest-xosview-1.8.2 65
+MD5 efaaa39f5b7d26d1feffe219417ed633 files/digest-xosview-1.8.2-r1 65
MD5 faeccca9ef506e145c54e58b72a5b3af files/xosview-1.8.1-kernel-2.5+.diff 4609
MD5 e5d743e89fadcc4cc2facb642650e018 files/xosview-emptyxpaths.patch 1861
+MD5 647297fad7639dbf11950956b41194eb files/xosview-resdir.patch 1566
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.2 (GNU/Linux)
+
+iD8DBQFDLFn2wnQyISwouHwRAuSnAJ4oakYsLwlRQouopICuRxcqd30KEACgkQ9O
+nRgb7oo8IAIwP1Ny2agHRNU=
+=GGic
+-----END PGP SIGNATURE-----
diff --git a/x11-misc/xosview/files/digest-xosview-1.8.1 b/x11-misc/xosview/files/digest-xosview-1.8.1
deleted file mode 100644
index 969d51187aab..000000000000
--- a/x11-misc/xosview/files/digest-xosview-1.8.1
+++ /dev/null
@@ -1 +0,0 @@
-MD5 1cb7a3e09d1cf8551f3c10e76d5d92ed xosview-1.8.1.tar.gz 237724
diff --git a/x11-misc/xosview/files/digest-xosview-1.8.2-r1 b/x11-misc/xosview/files/digest-xosview-1.8.2-r1
new file mode 100644
index 000000000000..1627abd4cc5e
--- /dev/null
+++ b/x11-misc/xosview/files/digest-xosview-1.8.2-r1
@@ -0,0 +1 @@
+MD5 cc8b261b1f8d82da29239f1cc2ee55e9 xosview-1.8.2.tar.gz 248859
diff --git a/x11-misc/xosview/files/xosview-1.8.1-kernel-2.5+.diff b/x11-misc/xosview/files/xosview-1.8.1-kernel-2.5+.diff
deleted file mode 100644
index c6a9190fd00b..000000000000
--- a/x11-misc/xosview/files/xosview-1.8.1-kernel-2.5+.diff
+++ /dev/null
@@ -1,158 +0,0 @@
-diff -ruN xosview-1.8.1/linux/diskmeter.cc xosview-disk-2.6/linux/diskmeter.cc
---- xosview-1.8.1/linux/diskmeter.cc 2003-10-20 10:59:25.000000000 +1000
-+++ xosview-disk-2.6/linux/diskmeter.cc 2003-12-10 02:33:05.946203885 +1100
-@@ -12,6 +12,8 @@
- #include <stdlib.h>
-
- static const char STATFILENAME[] = "/proc/stat";
-+// kernel >= 2.5 support
-+static const char VMSTATFILENAME[] = "/proc/vmstat";
- #define MAX_PROCSTAT_LENGTH 2048
-
- DiskMeter::DiskMeter( XOSView *parent, float max ) : FieldMeterGraph(
-@@ -51,27 +53,63 @@
- IntervalTimerStop();
- total_ = maxspeed_;
- char buf[MAX_PROCSTAT_LENGTH];
-+ unsigned char new_kernel = 1;
-+ std::ifstream vmstats( VMSTATFILENAME );
- std::ifstream stats( STATFILENAME );
-
-- if ( !stats )
-+ if ( new_kernel && !vmstats )
- {
-- std::cerr <<"Can not open file : " <<STATFILENAME << std::endl;
-- exit( 1 );
-+ new_kernel = 0;
- }
-
-- // Find the line with 'page'
-- stats >> buf;
-- while (strncmp(buf, "page", 9))
-+ if ( !new_kernel && !stats )
- {
-- stats.ignore(MAX_PROCSTAT_LENGTH, '\n');
-- stats >> buf;
-+ std::cerr <<"Can not open file : " <<STATFILENAME <<std::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(MAX_PROCSTAT_LENGTH, '\n');
-+ vmstats >> buf;
-+ }
-+
-+ // read first value
-+ vmstats >> one;
-+
-+ while (!vmstats.eof() && strncmp(buf, "pgpgout", 7))
-+ {
-+ vmstats.ignore(MAX_PROCSTAT_LENGTH, '\n');
-+ vmstats >> buf;
-+ }
-+ // read second value
-+ vmstats >> two;
-+ } else {
-+ stats >> buf;
-+ while (strncmp(buf, "disk_io:", 8))
-+ {
-+ stats.ignore(MAX_PROCSTAT_LENGTH, '\n');
-+ stats >> buf;
-+ }
-+
-+ unsigned long one=0, two=0;
-+ unsigned long junk,read1,write1;
-+ stats >> buf;
-+ while (7 == sscanf(buf,"(%lu,%lu):(%lu,%lu,%lu,%lu,%lu)",&junk,&junk,&junk,&junk,&read1,&junk,&write1))
-+ {
-+ one += read1;
-+ two += write1;
-+ stats >> buf;
-+ }
-+ }
-
- // assume each "unit" is 1k.
-+ // (As per the kernel docs...
- // This is true for ext2, but seems to be 512 bytes
- // for vfat and 2k for cdroms
- // work in 512-byte blocks
-@@ -83,8 +121,8 @@
- // So this is a FIXME - but how ???
-
- float itim = IntervalTimeInMicrosecs();
-- unsigned long read_curr = one * 2; // FIXME!
-- unsigned long write_curr = two * 2; // FIXME!
-+ unsigned long read_curr = one; // FIXME!
-+ unsigned long write_curr = two; // FIXME!
-
- // avoid strange values at first call
- if(read_prev_ == 0) read_prev_ = read_curr;
-diff -ruN xosview-1.8.1/linux/pagemeter.cc xosview-disk-2.6/linux/pagemeter.cc
---- xosview-1.8.1/linux/pagemeter.cc 2003-10-20 11:24:32.000000000 +1000
-+++ xosview-disk-2.6/linux/pagemeter.cc 2003-12-10 02:29:41.259134595 +1100
-@@ -13,6 +13,8 @@
-
-
- static const char STATFILENAME[] = "/proc/stat";
-+// kernel >= 2.5 support
-+static const char VMSTATFILENAME[] = "/proc/vmstat";
- #define MAX_PROCSTAT_LENGTH 2048
-
-
-@@ -50,19 +52,41 @@
- void PageMeter::getpageinfo( void ){
- total_ = 0;
- char buf[MAX_PROCSTAT_LENGTH];
-+ unsigned char new_kernel = 1;
-+
-+ std::ifstream vmstats( VMSTATFILENAME );
- std::ifstream stats( STATFILENAME );
-
-- if ( !stats ){
-- std::cerr <<"Cannot open file : " <<STATFILENAME << std::endl;
-- exit( 1 );
-+ if ( new_kernel && !vmstats ){
-+ new_kernel = 0;
- }
-
-- do {
-- stats >>buf;
-- } while (strncasecmp(buf, "swap", 5));
-+ if ( !new_kernel && !stats ) {
-+ std::cerr <<"Cannot open file : " <<STATFILENAME <<std::endl;
-+ exit( 1 );
-+ }
-
-- stats >>pageinfo_[pageindex_][0] >>pageinfo_[pageindex_][1];
-+ if ( new_kernel ) {
-+ // kernel >= 2.5
-+ do {
-+ vmstats >>buf;
-+ } while (!vmstats.eof() && strncasecmp(buf, "pswpin", 7));
-+
-+ 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;
-
- for ( int i = 0; i < 2; i++ ) {
diff --git a/x11-misc/xosview/files/xosview-resdir.patch b/x11-misc/xosview/files/xosview-resdir.patch
new file mode 100644
index 000000000000..3bd142e1d732
--- /dev/null
+++ b/x11-misc/xosview/files/xosview-resdir.patch
@@ -0,0 +1,35 @@
+--- xosview-1.8.2.orig/Xrm.cc
++++ xosview-1.8.2/Xrm.cc
+@@ -148,20 +148,26 @@
+
+ // Merge in the system resource database.
+ char rfilename[2048];
++ int result;
+
+ // Get the app-defaults
++ // Check /usr/lib/X11 for when /usr/X11R6 compatibility symlink is removed
++ result = snprintf(rfilename, sizeof rfilename, "/usr/lib/X11/app-defaults/%s",
++ XrmQuarkToString(_class));
++ if (result >= 0 && result < sizeof rfilename)
++ XrmCombineFileDatabase (rfilename, &_db, 1);
+- snprintf(rfilename, 2048, "/usr/X11R6/lib/X11/app-defaults/%s",
++ result = snprintf(rfilename, sizeof rfilename, "/usr/X11R6/lib/X11/app-defaults/%s",
+ XrmQuarkToString(_class));
+- if (rfilename != NULL)
++ if (result >= 0 && result < sizeof rfilename)
+ XrmCombineFileDatabase (rfilename, &_db, 1);
+ // Try a few more, for SunOS/Solaris folks.
+- snprintf(rfilename, 2048, "/usr/openwin/lib/X11/app-defaults/%s",
++ result = snprintf(rfilename, sizeof rfilename, "/usr/openwin/lib/X11/app-defaults/%s",
+ XrmQuarkToString(_class));
+- if (rfilename != NULL)
++ if (result >= 0 && result < sizeof rfilename)
+ XrmCombineFileDatabase (rfilename, &_db, 1);
+- snprintf(rfilename, 2048, "/usr/local/X11R6/lib/X11/app-defaults/%s",
++ result = snprintf(rfilename, sizeof rfilename, "/usr/local/X11R6/lib/X11/app-defaults/%s",
+ XrmQuarkToString(_class));
+- if (rfilename != NULL)
++ if (result >= 0 && result < sizeof rfilename)
+ XrmCombineFileDatabase (rfilename, &_db, 1);
+
+ // Now, check for an XOSView file in the XAPPLRESDIR directory...
diff --git a/x11-misc/xosview/xosview-1.8.1.ebuild b/x11-misc/xosview/xosview-1.8.1.ebuild
deleted file mode 100644
index 5c80a046da80..000000000000
--- a/x11-misc/xosview/xosview-1.8.1.ebuild
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-misc/xosview/xosview-1.8.1.ebuild,v 1.10 2004/06/24 22:43:00 agriffis Exp $
-
-inherit eutils
-
-DESCRIPTION="X11 operating system viewer"
-SRC_URI="mirror://sourceforge/xosview/${P}.tar.gz"
-HOMEPAGE="http://xosview.sourceforge.net"
-
-SLOT="0"
-LICENSE="GPL-2 BSD"
-KEYWORDS="x86 alpha ppc amd64 sparc"
-
-DEPEND="virtual/x11"
-IUSE=""
-
-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-1.8.1-kernel-2.5+.diff || die "patch failed"
- fi
-
- econf || die "econf failed"
- 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
-}
diff --git a/x11-misc/xosview/xosview-1.8.2-r1.ebuild b/x11-misc/xosview/xosview-1.8.2-r1.ebuild
new file mode 100644
index 000000000000..69af2c5dd4d4
--- /dev/null
+++ b/x11-misc/xosview/xosview-1.8.2-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-misc/xosview/xosview-1.8.2-r1.ebuild,v 1.1 2005/09/17 18:18:39 truedfx Exp $
+
+inherit eutils gnuconfig
+
+DESCRIPTION="X11 operating system viewer"
+SRC_URI="mirror://sourceforge/xosview/${P}.tar.gz"
+HOMEPAGE="http://xosview.sourceforge.net"
+
+SLOT="0"
+LICENSE="GPL-2 BSD"
+KEYWORDS="~x86 ~alpha ~ppc ~amd64 ~sparc ~ppc64"
+
+DEPEND="virtual/x11"
+IUSE=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/xosview-emptyxpaths.patch"
+ epatch "${FILESDIR}/xosview-resdir.patch"
+ gnuconfig_update # for ppc64, but no reason to restrict it
+}
+
+src_install() {
+ exeinto /usr/bin
+ doexe xosview
+ insinto /etc/X11/app-defaults
+ newins Xdefaults XOsview
+ doman *.1
+ dodoc CHANGES README README.linux TODO
+}
diff --git a/x11-misc/xosview/xosview-1.8.2.ebuild b/x11-misc/xosview/xosview-1.8.2.ebuild
index 025be297fd0c..0979de1473a1 100644
--- a/x11-misc/xosview/xosview-1.8.2.ebuild
+++ b/x11-misc/xosview/xosview-1.8.2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-misc/xosview/xosview-1.8.2.ebuild,v 1.9 2005/04/20 10:01:30 truedfx Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-misc/xosview/xosview-1.8.2.ebuild,v 1.10 2005/09/17 18:18:39 truedfx Exp $
inherit eutils gnuconfig
@@ -17,8 +17,8 @@ IUSE=""
src_unpack() {
unpack ${A}
- cd ${S}
- epatch ${FILESDIR}/xosview-emptyxpaths.patch
+ cd "${S}"
+ epatch "${FILESDIR}/xosview-emptyxpaths.patch"
}
src_compile() {
@@ -38,7 +38,7 @@ src_compile() {
src_install() {
exeinto /usr/bin
doexe xosview
- insinto /usr/lib/X11
+ insinto /etc/X11/app-defaults
cp Xdefaults XOsview
doins XOsview
into /usr