diff -urN /usr/ports/sysutils/xosview/Makefile sysutils/xosview/Makefile --- /usr/ports/sysutils/xosview/Makefile 2015-09-26 19:05:10.784101000 +0900 +++ sysutils/xosview/Makefile 2015-11-11 00:00:00.000000000 +0900 @@ -2,28 +2,37 @@ # $FreeBSD: head/sysutils/xosview/Makefile 397897 2015-09-25 21:55:36Z linimon $ PORTNAME= xosview -PORTVERSION= 1.16 -PORTREVISION= 2 +PORTVERSION= 1.17 CATEGORIES= sysutils -MASTER_SITES= http://www.pogo.org.uk/~mark/xosview/releases/ +MASTER_SITES= GH 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_XORG= xpm +USE_GITHUB= yes +GH_ACCOUNT= hills + USES= gmake -MAKE_ENV+= PLATFORM=bsd MANDIR=${LOCALBASE}/man -ALL_TARGET= # empty +USE_XORG= xpm +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 + @${CAT} ${WRKSRC}/targets/freebsd | ${SED} -e \ + '/CXX/s|^|#| ; \ + s|/usr/local|${LOCALBASE}|' > ${WRKSRC}/.config post-install: - ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME} - @${CP} ${WRKSRC}/Xdefaults ${STAGEDIR}${PREFIX}/lib/X11/app-defaults/XOsview + (cd ${WRKSRC} && ${INSTALL_DATA} Xdefaults \ + ${STAGEDIR}${PREFIX}/lib/X11/app-defaults/XOsview) + @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/xosview .include diff -urN /usr/ports/sysutils/xosview/distinfo sysutils/xosview/distinfo --- /usr/ports/sysutils/xosview/distinfo 2015-08-24 04:07:25.375222000 +0900 +++ sysutils/xosview/distinfo 2015-11-11 00:00:00.000000000 +0900 @@ -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 -urN /usr/ports/sysutils/xosview/files/patch-bsd-kernel.cc sysutils/xosview/files/patch-bsd-kernel.cc --- /usr/ports/sysutils/xosview/files/patch-bsd-kernel.cc 2015-08-24 04:07:25.398886000 +0900 +++ sysutils/xosview/files/patch-bsd-kernel.cc 2015-11-11 00:00:00.000000000 +0900 @@ -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 #include @@ -8,15 +8,15 @@ #include #include #include -@@ -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 #include + #include #include - #include -@@ -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 -urN /usr/ports/sysutils/xosview/pkg-descr sysutils/xosview/pkg-descr --- /usr/ports/sysutils/xosview/pkg-descr 2015-08-24 04:07:25.386408000 +0900 +++ sysutils/xosview/pkg-descr 2015-11-11 00:00:00.000000000 +0900 @@ -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/