Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/xosview sysutils/xosview: update to 1.22



details:   https://anonhg.NetBSD.org/pkgsrc/rev/9557394ed1c3
branches:  trunk
changeset: 432682:9557394ed1c3
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sun May 24 11:24:19 2020 +0000

description:
sysutils/xosview: update to 1.22

This gets rid of a few uncommented and unclear patches.  The upstream
code has changed a lot, therefore the pkgsrc patches have all been
dropped.

Upstream changes are unknown since the CHANGES file mentions 1.9 as the
latest version.

diffstat:

 sysutils/xosview/Makefile                          |   60 +++---
 sysutils/xosview/PLIST                             |    4 +-
 sysutils/xosview/distinfo                          |   20 +-
 sysutils/xosview/patches/patch-aa                  |  191 ---------------------
 sysutils/xosview/patches/patch-ab                  |   32 ---
 sysutils/xosview/patches/patch-ac                  |   16 -
 sysutils/xosview/patches/patch-ad                  |   20 --
 sysutils/xosview/patches/patch-ae                  |   26 --
 sysutils/xosview/patches/patch-af                  |   34 ---
 sysutils/xosview/patches/patch-bsd_kernel.cc       |   19 ++
 sysutils/xosview/patches/patch-configure           |   24 --
 sysutils/xosview/patches/patch-linux_lmstemp.cc    |   13 -
 sysutils/xosview/patches/patch-sunos5_diskmeter.cc |   13 -
 13 files changed, 58 insertions(+), 414 deletions(-)

diffs (truncated from 554 to 300 lines):

diff -r 8cd4c1271232 -r 9557394ed1c3 sysutils/xosview/Makefile
--- a/sysutils/xosview/Makefile Sun May 24 11:09:43 2020 +0000
+++ b/sysutils/xosview/Makefile Sun May 24 11:24:19 2020 +0000
@@ -1,39 +1,46 @@
-# $NetBSD: Makefile,v 1.75 2020/01/26 17:32:12 rillig Exp $
+# $NetBSD: Makefile,v 1.76 2020/05/24 11:24:19 rillig Exp $
 
-DISTNAME=      xosview-1.8.3
-PKGREVISION=   2
-CATEGORIES=    sysutils
-MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=xosview/}
+DISTNAME=      xosview-1.22
+CATEGORIES=    sysutils x11
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=hills/}
 
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=      https://www.pogo.org.uk/~mark/xosview/
 COMMENT=       X11 graphical display of OS statistics
 
-USE_LANGUAGES=         c gnu++03
+USE_TOOLS+=    gmake
+USE_LANGUAGES= c gnu++03
 
-HAS_CONFIGURE=         YES
-CONFIGURE_ARGS+=       --prefix=${PREFIX}
-CONFIGURE_ARGS+=       --x-includes=${X11BASE}/include
-CONFIGURE_ARGS+=       --x-libraries=${X11BASE}/lib
-
-INSTALLATION_DIRS=     bin lib/X11/app-defaults ${PKGMANDIR}/man1
-INSTALL_MAKE_FLAGS+=   MANDIR=${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
-INSTALL_MAKE_FLAGS+=   PREFIX_TO_USE=${DESTDIR}${PREFIX}
+AUTO_MKDIRS=   yes
 
 .include "../../mk/bsd.prefs.mk"
 
+.if ${OPSYS} == Linux
+MAKE_FLAGS+=   PLATFORM=linux
+.elif ${OPSYS} == IRIX
+MAKE_FLAGS+=   PLATFORM=irix65
+.elif ${OPSYS:M*BSD} || ${OPSYS} == DragonFly
+MAKE_FLAGS+=   PLATFORM=bsd
+.elif ${OPSYS} == SunOS
+MAKE_FLAGS+=   PLATFORM=sunos5
+.else
+MAKE_FLAGS+=   PLATFORM=gnu
+.endif
+
+BUILD_TARGET=          xosview
+MAKE_ENV+=             LDLIBS=${LIBS:Q}
+MAKE_ENV+=             MANDIR=${PREFIX}/${PKGMANDIR}
+LIBS.NetBSD+=          -lkvm -lprop
+LIBS.SunOS+=           -lsocket -lnsl
+CPPFLAGS.SunOS+=       -I${X11BASE}/include
+ICON_THEMES=           yes
+
 .if ${OPSYS} == "NetBSD"
 .  if !defined(UVM) && exists(/usr/include/uvm/uvm.h)
 CFLAGS+=       -DUVM
 UVM=           yes
 BUILD_DEFS+=   UVM
 .  endif
-.elif ${OPSYS} == "SunOS"
-USE_TOOLS+=    gmake
-CPPFLAGS+=     -I${X11BASE}/include
-LIBS+=         -lsocket -lnsl
-.elif ${OPSYS} == "Linux"
-USE_TOOLS+=    gmake
 .endif
 
 .if ${OPSYS} == "NetBSD" || ${OPSYS} == "FreeBSD" || \
@@ -41,16 +48,9 @@
 SPECIAL_PERMS+=        bin/xosview ${REAL_ROOT_USER} kmem 2555
 .endif
 
-SUBST_CLASSES+=                unpriv
-SUBST_STAGE.unpriv=    pre-configure
-SUBST_FILES.unpriv=    config/Makefile.top.in
-SUBST_SED.unpriv=      -e s,@INSTALL_ARGS@,,
+post-install:
+       ${INSTALL_DATA} ${WRKSRC}/Xdefaults ${DESTDIR}${PREFIX}/lib/X11/app-defaults/XOsview
 
-SUBST_CLASSES+=                paths
-SUBST_STAGE.paths=     post-configure
-SUBST_MESSAGE.paths=   Fixing manpage path.
-SUBST_FILES.paths=     Makefile
-SUBST_SED.paths=       -e s,share/man/man1,${PKGMANDIR}/man1,
-
+.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
 .include "../../x11/libXpm/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r 8cd4c1271232 -r 9557394ed1c3 sysutils/xosview/PLIST
--- a/sysutils/xosview/PLIST    Sun May 24 11:09:43 2020 +0000
+++ b/sysutils/xosview/PLIST    Sun May 24 11:24:19 2020 +0000
@@ -1,4 +1,6 @@
-@comment $NetBSD: PLIST,v 1.2 2009/06/12 19:09:38 rillig Exp $
+@comment $NetBSD: PLIST,v 1.3 2020/05/24 11:24:19 rillig Exp $
 bin/xosview
 lib/X11/app-defaults/XOsview
 man/man1/xosview.1
+share/applications/xosview.desktop
+share/icons/hicolor/32x32/apps/xosview.png
diff -r 8cd4c1271232 -r 9557394ed1c3 sysutils/xosview/distinfo
--- a/sysutils/xosview/distinfo Sun May 24 11:09:43 2020 +0000
+++ b/sysutils/xosview/distinfo Sun May 24 11:24:19 2020 +0000
@@ -1,15 +1,7 @@
-$NetBSD: distinfo,v 1.29 2020/02/22 13:10:22 pgoyette Exp $
+$NetBSD: distinfo,v 1.30 2020/05/24 11:24:19 rillig Exp $
 
-SHA1 (xosview-1.8.3.tar.gz) = 420fd0620ff9fb9ba83fc833eeb8b872414e377e
-RMD160 (xosview-1.8.3.tar.gz) = 595e812dee686ccaa5d95eb537782679d752271b
-SHA512 (xosview-1.8.3.tar.gz) = 196dc66f4a20c6cd9663f82e613f0039ee09cfe565867dc68e3c29b8dc6be4037ad26f10a8a7f36e9b80fb5ab406592a30254840b473861be836e44503fd94a5
-Size (xosview-1.8.3.tar.gz) = 259793 bytes
-SHA1 (patch-aa) = 7d24ba9b1caab1968bb49ba1da4d850fcf615b08
-SHA1 (patch-ab) = 2bc4ca0772c931dc208edb99158e7f7ae7261b3b
-SHA1 (patch-ac) = 3e9073c4ccd7e08d29a76b08f2ed0c7f9f9d9ede
-SHA1 (patch-ad) = 02ae8395e200e5cbf8d6339eced33fe5aa421d38
-SHA1 (patch-ae) = 6ff69eeffd40ec4ee3686f2069fd46853f346fff
-SHA1 (patch-af) = c556f02c7d8297968a78eb087f413f9472371c54
-SHA1 (patch-configure) = 903afa94aeee2d687f0341c08bca7b163849249d
-SHA1 (patch-linux_lmstemp.cc) = d46c27884963901d0e5f5bed7cc880dc7fddc01c
-SHA1 (patch-sunos5_diskmeter.cc) = 99e119cb645c9982f2a116950ac2ffe84eeff1d4
+SHA1 (xosview-1.22.tar.gz) = 47bf5fe6f61ac828bc7707abec0c1e4bb8da9e13
+RMD160 (xosview-1.22.tar.gz) = 217ec543afee8b77bb36ad639c872a5af3b660a6
+SHA512 (xosview-1.22.tar.gz) = 40e668ff1d142b6986ea5d50475d4c82523c62269d328d2f6001c651808d9b5194ccd6f144fd0ff791110302c91688126aca5762d6645d9dbc3819cd15df343b
+Size (xosview-1.22.tar.gz) = 147492 bytes
+SHA1 (patch-bsd_kernel.cc) = 78a1ff699c2ef3da1b312d97ad1ce5591ca0df72
diff -r 8cd4c1271232 -r 9557394ed1c3 sysutils/xosview/patches/patch-aa
--- a/sysutils/xosview/patches/patch-aa Sun May 24 11:09:43 2020 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,191 +0,0 @@
-$NetBSD: patch-aa,v 1.20 2020/02/22 13:10:22 pgoyette Exp $
-
---- bsd/kernel.cc.orig 2006-02-17 23:36:06.000000000 -0800
-+++ bsd/kernel.cc      2020-02-21 13:26:06.554690464 -0800
-@@ -115,8 +115,16 @@
- // in __NetBSD_Version__ for us if needed.
- #if defined(XOSVIEW_NETBSD) && defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 106010000)
- #define NETBSD_1_6A
-+#ifdef HW_DISKSTATS
-+static int dmib[3] = {CTL_HW, HW_DISKSTATS, sizeof(struct disk_sysctl)};
-+#endif
-+#ifdef HW_IOSTATS
-+static int dmib[3] = {CTL_HW, HW_IOSTATS, sizeof(struct io_sysctl)};
-+#include <sys/iostat.h>
-+#endif
- #endif
- 
-+#include "netmeter.h"         /*  For netIface_  */
- #include "general.h"
- #include "kernel.h"           /*  To grab CVSID stuff.  */
- 
-@@ -303,9 +311,11 @@
- 
- void
- OpenKDIfNeeded() {
-+  static int initialized = 0;
-   char unusederrorstring[_POSIX2_LINE_MAX];
- 
--  if (kd) return; //  kd is non-NULL, so it has been initialized.  BCG
-+  if (initialized) return;
-+  initialized = 1;
- 
-     /*  Open it read-only, for a little added safety.  */
-     /*  If the first character of kernelFileName is not '\0', then use
-@@ -313,8 +323,10 @@
-       specifying NULL.  */
-   if ((kd = kvm_openfiles ((kernelFileName[0]) ? kernelFileName : NULL,
-                           NULL, NULL, O_RDONLY, unusederrorstring))
--      == NULL)
--        err (-1, "OpenKDIfNeeded():kvm-open()");
-+      == NULL) {
-+        warn ("OpenKDIfNeeded():kvm-open()");
-+        return;
-+  }
-   // Parenthetical note:  FreeBSD kvm_openfiles() uses getbootfile() to get
-   // the correct kernel file if the 1st arg is NULL.  As far as I can see,
-   // one should always use NULL in FreeBSD, but I suppose control is never a
-@@ -400,6 +412,8 @@
-   static int mib[] = { CTL_KERN, KERN_CPUSTATS };
- #endif
- #if defined(XOSVIEW_NETBSD) && (__NetBSD_Version__ >= 104260000)
-+  uint64_t cp_time[CPUSTATES];
-+  size_t size = sizeof(cp_time[0]) * CPUSTATES;
-   static int mib[] = { CTL_KERN, KERN_CP_TIME };
- #endif
- 
-@@ -407,14 +421,11 @@
-   if (CPUSTATES != 5)
-     errx (-1, "Error:  xosview for *BSD expects 5 cpu states!\n");
- #if defined(__NetBSD_Version__) && __NetBSD_Version__ > 104260000 /* > 1.4Z */
--  struct schedstate_percpu ssp;
--  size_t size = sizeof(ssp.spc_cp_time);
--  if (sysctl(mib, 2, ssp.spc_cp_time, &size, NULL, 0) < 0) {
--    fprintf(stderr, "can't get schedstate_percpu: %s\n", strerror(errno));
--    memset(&ssp, 0, sizeof(ssp));
-+  if (sysctl(mib, 2, cp_time, &size, NULL, 0) < 0) {
-+    fprintf(stderr, "xosview: sysctl kern.cp_time failed: %s\n", strerror(errno));
-+    bzero(&cp_time, size);
-   }
--  for (size = 0; size < CPUSTATES; size++)
--    timeArray[size] = (long) ssp.spc_cp_time[size];
-+  bcopy (cp_time, timeArray, size);
- #else
- #ifdef XOSVIEW_BSDI
-   if (sysctl(mib, 2, &cpu, &size, NULL, 0) < 0) {
-@@ -441,7 +452,7 @@
- }
- 
- void
--BSDGetNetInOut (long long * inbytes, long long * outbytes) {
-+NetMeter::BSDGetNetInOut (long long * inbytes, long long * outbytes) {
- 
- 
-   struct ifnet * ifnetp;
-@@ -466,7 +477,8 @@
-   while (ifnetp) {
-     //  Now, dereference the pointer to get the ifnet struct.
-     safe_kvm_read ((u_long) ifnetp, &ifnet, sizeof(ifnet));
--#ifdef NET_DEBUG
-+#ifdef XOSVIEW_NETBSD
-+    if (netIface_ != "False" ) {
-     char ifname[256];
- #ifdef NETBSD_OLD_IFACE
-     //  In pre-1.2A, getting the interface name was more complicated.
-@@ -476,15 +488,29 @@
-     safe_kvm_read ((u_long) (((char*)ifnetp) + (&ifnet.if_xname[0] - (char*)&ifnet)), ifname, 256);
-     snprintf (ifname, 256, "%s", ifname);
- #endif
-+#ifdef NET_DEBUG
-     printf ("Interface name is %s\n", ifname);
-+#if defined(XOSVIEW_NETBSD) && (__NetBSD_Version__ >= 999004500)
-+/* Need to create new way to access interface stats */
-+#else
-     printf ("Ibytes: %8llu Obytes %8llu\n",
-       (unsigned long long) ifnet.if_ibytes,
-       (unsigned long long) ifnet.if_obytes);
-     printf ("Ipackets:  %8llu\n", (unsigned long long) ifnet.if_ipackets);
- #endif
-+#endif /* NET_DEBUG */
-+      if (ifname != netIface_)
-+       goto skipif;
-+    }
-+#endif /* XOSVIEW_NETBSD */
-+#if defined(XOSVIEW_NETBSD) && (__NetBSD_Version__ >= 999004500)
-+/* Need to create new way to access interface stats */
-+#else
-     *inbytes  += ifnet.if_ibytes;
-     *outbytes += ifnet.if_obytes;
-+#endif
- 
-+    skipif:
-     //  Linked-list step taken from if.c in netstat source, line 120.
- #ifdef XOSVIEW_FREEBSD
- #if (__FreeBSD_version >= 300000) 
-@@ -773,13 +799,12 @@
- #ifdef NETBSD_1_6A
-   // Do a sysctl with a NULL data pointer to get the size that would
-   // have been returned, and use that to figure out # drives.
--  int mib[3] = {CTL_HW, HW_DISKSTATS, sizeof(struct disk_sysctl)};
-   size_t size;
--  if (sysctl(mib, 3, NULL, &size, NULL, 0) < 0) {
-+  if (sysctl(dmib, 3, NULL, &size, NULL, 0) < 0) {
-     warnx("!!! The DiskMeter sysctl failed.  Disabling DiskMeter.");
-     return 0;
-   }
--  NetBSD_N_Drives = size / sizeof(struct disk_sysctl);
-+  NetBSD_N_Drives = size / dmib[2];
-   return 1;
- #endif
-   return ValidSymbol(DISKLIST_SYM_INDEX);
-@@ -816,19 +841,29 @@
- #else
- #if defined(NETBSD_1_6A)
-   // Use the new sysctl to do this for us.
--  int mib[3] = {CTL_HW, HW_DISKSTATS, sizeof(struct disk_sysctl)};
--  size_t sysctl_sz = NetBSD_N_Drives * sizeof(struct disk_sysctl);
-+  size_t sysctl_sz = NetBSD_N_Drives * dmib[2];
-+#ifdef HW_DISKSTATS
-   struct disk_sysctl drive_stats[NetBSD_N_Drives];
-+#endif
-+#ifdef HW_IOSTATS
-+  struct io_sysctl drive_stats[NetBSD_N_Drives];
-+#endif
- 
-   // Do the sysctl.
--  if (sysctl(mib, 3, drive_stats, &sysctl_sz, NULL, 0) < 0) {
-+  if (sysctl(dmib, 3, drive_stats, &sysctl_sz, NULL, 0) < 0) {
-     err(1, "sysctl hw.diskstats failed");
-   }
- 
-   // Now accumulate the total.
-   unsigned long long xferred = 0;
-   for (unsigned int i = 0; i < NetBSD_N_Drives; i++) {
-+#ifdef HW_DISKSTATS
-     xferred += drive_stats[i].dk_rbytes + drive_stats[i].dk_wbytes;
-+#endif
-+#ifdef HW_IOSTATS
-+    if (drive_stats[i].type == IOSTAT_DISK)
-+      xferred += drive_stats[i].rbytes + drive_stats[i].wbytes;
-+#endif



Home | Main Index | Thread Index | Old Index