remove old version, fix bug #106173, and fix things to work without /usr/X11R6
authorHarald van Dijk <truedfx@gentoo.org>
Sat, 17 Sep 2005 18:18:39 +0000 (18:18 +0000)
committerHarald van Dijk <truedfx@gentoo.org>
Sat, 17 Sep 2005 18:18:39 +0000 (18:18 +0000)
Package-Manager: portage-1.589-cvs

x11-misc/xosview/ChangeLog
x11-misc/xosview/Manifest
x11-misc/xosview/files/digest-xosview-1.8.1 [deleted file]
x11-misc/xosview/files/digest-xosview-1.8.2-r1 [new file with mode: 0644]
x11-misc/xosview/files/xosview-1.8.1-kernel-2.5+.diff [deleted file]
x11-misc/xosview/files/xosview-resdir.patch [new file with mode: 0644]
x11-misc/xosview/xosview-1.8.1.ebuild [deleted file]
x11-misc/xosview/xosview-1.8.2-r1.ebuild [new file with mode: 0644]
x11-misc/xosview/xosview-1.8.2.ebuild

index 9974186d4b901e2fdb6871b2de650de267b6b567..50baa42c889f9a6d15e4c5a5212c7527d51110c1 100644 (file)
@@ -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:
index b8a6b1397157c34ea461ad2552ee079dc1904321..1d710d12c9ecd34cc314d08d35bc7f838d32ca7c 100644 (file)
@@ -1,8 +1,18 @@
-MD5 7157c576afa36d303d0ba0736f4645be ChangeLog 3948
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+MD5 65396460360334904c2690196b0e6d6e ChangeLog 4438
 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 946ad621f834996cb4b66d070945bda9 xosview-1.8.2.ebuild 1230
+MD5 ce0988447ecb9e78eb2d8590d4902cd7 xosview-1.8.2-r1.ebuild 847
 MD5 efaaa39f5b7d26d1feffe219417ed633 files/digest-xosview-1.8.2 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
+MD5 efaaa39f5b7d26d1feffe219417ed633 files/digest-xosview-1.8.2-r1 65
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.2 (GNU/Linux)
+
+iD8DBQFDLF4BwnQyISwouHwRApmbAKC+99IP/xioDvuKZBgsXwwMvcuK2gCfRj8q
+jpX99o4rihT5c1fRu5uCZFs=
+=GGy7
+-----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 (file)
index 969d511..0000000
+++ /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 (file)
index 0000000..1627abd
--- /dev/null
@@ -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 (file)
index c6a9190..0000000
+++ /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 (file)
index 0000000..3bd142e
--- /dev/null
@@ -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 (file)
index 5c80a04..0000000
+++ /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 (file)
index 0000000..69af2c5
--- /dev/null
@@ -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
+}
index 025be297fd0c8298741cc2ab3c3ae154d21e1bc1..0979de1473a1fb3277fd0456dd10c30a8cfbfa06 100644 (file)
@@ -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