aboutsummaryrefslogtreecommitdiff
path: root/sysutils/xosview
diff options
context:
space:
mode:
authorGuido Falsi <madpilot@FreeBSD.org>2015-11-12 20:10:36 +0000
committerGuido Falsi <madpilot@FreeBSD.org>2015-11-12 20:10:36 +0000
commitf5ee83e310e9851eaebb5a8cee3c5039f0399c86 (patch)
tree817190c8fa48ba901fe5613d6ea10534ac2ea02b /sysutils/xosview
parent1c09d0ba9000bf61fd4caa450a0ce14cd2c7a96a (diff)
downloadports-f5ee83e310e9851eaebb5a8cee3c5039f0399c86.tar.gz
ports-f5ee83e310e9851eaebb5a8cee3c5039f0399c86.zip
Notes
Diffstat (limited to 'sysutils/xosview')
-rw-r--r--sysutils/xosview/Makefile22
-rw-r--r--sysutils/xosview/distinfo4
-rw-r--r--sysutils/xosview/files/patch-bsd-kernel.cc35
-rw-r--r--sysutils/xosview/pkg-descr11
4 files changed, 39 insertions, 33 deletions
diff --git a/sysutils/xosview/Makefile b/sysutils/xosview/Makefile
index 13ee92bdcdbd..c2902b39bc78 100644
--- a/sysutils/xosview/Makefile
+++ b/sysutils/xosview/Makefile
@@ -2,28 +2,34 @@
# $FreeBSD$
PORTNAME= xosview
-PORTVERSION= 1.16
-PORTREVISION= 2
+PORTVERSION= 1.17
CATEGORIES= sysutils
-MASTER_SITES= http://www.pogo.org.uk/~mark/xosview/releases/
MAINTAINER= ports@FreeBSD.org
COMMENT= Graphical performance meter
+LICENSE= BSD4CLAUSE GPLv2
+LICENSE_COMB= multi
+
ONLY_FOR_ARCHS= amd64 i386 ia64
ONLY_FOR_ARCHS_REASON= used i386-specific hardware resources
+USE_GITHUB= yes
+GH_ACCOUNT= hills
+
USE_XORG= xpm
USES= gmake
-MAKE_ENV+= PLATFORM=bsd MANDIR=${LOCALBASE}/man
-ALL_TARGET= # empty
+MAKE_ENV= OPTFLAGS="" PLATFORM=bsd MANDIR=${MANPREFIX}/man
+ALL_TARGET= xosview
+
+DESKTOP_ENTRIES="XOsview" "" "" "xosview" "" ""
do-configure:
- @${CP} ${WRKSRC}/targets/freebsd-9.0 ${WRKSRC}/.config
- @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' ${WRKSRC}/.config
+ @${SED} -e '/CXX/s|^|#|' -e 's|/usr/local|${LOCALBASE}|' \
+ ${WRKSRC}/targets/freebsd > ${WRKSRC}/.config
post-install:
- ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
+ @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
@${CP} ${WRKSRC}/Xdefaults ${STAGEDIR}${PREFIX}/lib/X11/app-defaults/XOsview
.include <bsd.port.mk>
diff --git a/sysutils/xosview/distinfo b/sysutils/xosview/distinfo
index 56cf56890b8b..a5d598e5a1b1 100644
--- a/sysutils/xosview/distinfo
+++ b/sysutils/xosview/distinfo
@@ -1,2 +1,2 @@
-SHA256 (xosview-1.16.tar.gz) = 8e9e130d1bbb30b68419d12f0d74609c10eeed4d6c6a85f35d9941ea3c7b23a0
-SIZE (xosview-1.16.tar.gz) = 137097
+SHA256 (hills-xosview-1.17_GH0.tar.gz) = a5a84cbcee21805922781d3532cf5c4436331f031fa39e741a699f83ad5ddda9
+SIZE (hills-xosview-1.17_GH0.tar.gz) = 144327
diff --git a/sysutils/xosview/files/patch-bsd-kernel.cc b/sysutils/xosview/files/patch-bsd-kernel.cc
index cd113c303202..4519fe24d210 100644
--- a/sysutils/xosview/files/patch-bsd-kernel.cc
+++ b/sysutils/xosview/files/patch-bsd-kernel.cc
@@ -1,5 +1,5 @@
---- bsd/kernel.cc.orig 2013-08-23 13:40:35.000000000 +0400
-+++ bsd/kernel.cc 2014-10-03 00:35:05.000000000 +0400
+--- bsd/kernel.cc.orig 2015-09-23 13:28:14 UTC
++++ bsd/kernel.cc
@@ -28,6 +28,7 @@
#include <string.h>
#include <err.h>
@@ -8,15 +8,15 @@
#include <sysexits.h>
#include <sys/types.h>
#include <sys/queue.h>
-@@ -43,7 +44,6 @@
- #if defined(XOSVIEW_FREEBSD) || defined(XOSVIEW_DFBSD)
+@@ -44,7 +45,6 @@
static const char ACPIDEV[] = "/dev/acpi";
static const char APMDEV[] = "/dev/apm";
+ static int maxcpus = 1;
-#include <net/if_var.h>
#include <sys/ioctl.h>
+ #include <sys/resource.h>
#include <dev/acpica/acpiio.h>
- #include <machine/apm_bios.h>
-@@ -115,56 +115,41 @@
+@@ -114,56 +114,41 @@ static struct nlist nlst[] =
// this later on. This keeps the indices within the nlist constant.
#define DUMMY_SYM "dummy_sym"
@@ -83,7 +83,7 @@
#endif
{ NULL }
};
-@@ -337,7 +322,21 @@
+@@ -338,7 +323,21 @@ BSDGetPageStats(uint64_t *meminfo, uint6
#else /* HAVE_UVM */
struct vmmeter vm;
#if defined(XOSVIEW_FREEBSD)
@@ -106,7 +106,7 @@
#else /* XOSVIEW_DFBSD */
struct vmstats vms;
size_t size = sizeof(vms);
-@@ -421,99 +420,37 @@
+@@ -468,99 +467,37 @@ BSDGetCPUTimes(uint64_t *timeArray, unsi
int
BSDNetInit() {
OpenKDIfNeeded();
@@ -118,7 +118,7 @@
}
void
- BSDGetNetInOut(unsigned long long *inbytes, unsigned long long *outbytes, const char *netIface, bool ignored) {
+ BSDGetNetInOut(uint64_t *inbytes, uint64_t *outbytes, const char *netIface, bool ignored) {
- char ifname[IFNAMSIZ];
+ struct ifaddrs *ifap, *ifa;
*inbytes = 0;
@@ -129,16 +129,19 @@
- struct if_msghdr *ifm;
- struct if_data ifd;
- struct sockaddr_dl *sdl;
--
+
- if ( sysctl(mib_ifl, 6, NULL, &size, NULL, 0) < 0 )
- err(EX_OSERR, "BSDGetNetInOut(): sysctl 1 failed");
- if ( (buf = (char *)malloc(size)) == NULL)
- err(EX_OSERR, "BSDGetNetInOut(): malloc failed");
- if ( sysctl(mib_ifl, 6, buf, &size, NULL, 0) < 0 )
- err(EX_OSERR, "BSDGetNetInOut(): sysctl 2 failed");
++ if (getifaddrs(&ifap) != 0)
++ return;
- for (next = buf; next < buf + size; next += ifm->ifm_msglen) {
-- bool skipif = false;
++ for (ifa = ifap; ifa; ifa = ifa->ifa_next) {
+ bool skipif = false;
- ifm = (struct if_msghdr *)next;
- if (ifm->ifm_type != RTM_IFINFO || ifm->ifm_addrs & RTAX_IFP == 0)
- continue;
@@ -168,14 +171,11 @@
-#endif
- safe_kvm_read(nlst[IFNET_SYM_INDEX].n_value, &ifnethd, sizeof(ifnethd));
- ifnetp = TAILQ_FIRST(&ifnethd);
-+ if (getifaddrs(&ifap) != 0)
-+ return;
- while (ifnetp) {
-+ for (ifa = ifap; ifa; ifa = ifa->ifa_next) {
- bool skipif = false;
+- bool skipif = false;
- // Now, dereference the pointer to get the ifnet struct.
-- safe_kvm_read((u_long)ifnetp, &ifnet, sizeof(ifnet));
+- safe_kvm_read((unsigned long)ifnetp, &ifnet, sizeof(ifnet));
- strlcpy(ifname, ifnet.if_xname, sizeof(ifname));
-#if defined(XOSVIEW_NETBSD)
- ifnetp = TAILQ_NEXT(&ifnet, if_list);
@@ -183,7 +183,6 @@
- ifnetp = TAILQ_NEXT(&ifnet, if_link);
-#endif
- if (!(ifnet.if_flags & IFF_UP))
-+
+ if (ifa->ifa_addr->sa_family != AF_LINK)
continue;
+
@@ -201,7 +200,7 @@
- struct ifdata_pcpu ifdata;
- int ncpus = BSDCountCpus();
- for (int cpu = 0; cpu < ncpus; cpu++) {
-- safe_kvm_read((u_long)ifdatap + cpu * sizeof(ifdata),
+- safe_kvm_read((unsigned long)ifdatap + cpu * sizeof(ifdata),
- &ifdata, sizeof(ifdata));
- *inbytes += ifdata.ifd_ibytes;
- *outbytes += ifdata.ifd_obytes;
diff --git a/sysutils/xosview/pkg-descr b/sysutils/xosview/pkg-descr
index 7a9124c09fcb..a6dc5c3175a7 100644
--- a/sysutils/xosview/pkg-descr
+++ b/sysutils/xosview/pkg-descr
@@ -1,6 +1,7 @@
-XOsview is an application originally developed by Mike Romberg for
-Linux. It can be summarized as a graphical performance meter, and
-it looks similar in appearance to the zoomy performance meters to
-be found on various other platforms.
+xosview is a monitor which displays the status of several system
+parameters. These include CPU usage, load average, memory, swap space,
+network usage and more. Each resource is displayed as a horizontal bar
+which is separated into color coded regions showing how much of the
+resource is being put to a particular use.
-WWW: http://xosview.sourceforge.net
+WWW: http://www.pogo.org.uk/~mark/xosview/