From owner-svn-ports-branches@freebsd.org Mon Jul 1 06:21:53 2019 Return-Path: Delivered-To: svn-ports-branches@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5AF5015C7456; Mon, 1 Jul 2019 06:21:53 +0000 (UTC) (envelope-from koobs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F294D91F87; Mon, 1 Jul 2019 06:21:52 +0000 (UTC) (envelope-from koobs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A0EDE9156; Mon, 1 Jul 2019 06:21:52 +0000 (UTC) (envelope-from koobs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x616LqeH036311; Mon, 1 Jul 2019 06:21:52 GMT (envelope-from koobs@FreeBSD.org) Received: (from koobs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x616Lq6g036310; Mon, 1 Jul 2019 06:21:52 GMT (envelope-from koobs@FreeBSD.org) Message-Id: <201907010621.x616Lq6g036310@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: koobs set sender to koobs@FreeBSD.org using -f From: Kubilay Kocak Date: Mon, 1 Jul 2019 06:21:52 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r505540 - in branches/2019Q2/sysutils/asmem: . files X-SVN-Group: ports-branches X-SVN-Commit-Author: koobs X-SVN-Commit-Paths: in branches/2019Q2/sysutils/asmem: . files X-SVN-Commit-Revision: 505540 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F294D91F87 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.82 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.82)[-0.822,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-ports-branches@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the branches of the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jul 2019 06:21:53 -0000 Author: koobs Date: Mon Jul 1 06:21:52 2019 New Revision: 505540 URL: https://svnweb.freebsd.org/changeset/ports/505540 Log: MFH: r503234 sysutils/asmem: Remove BROKEN (fix build) for FreeBSD 12/13 PR: 238273 Submitted by: lealxe Approved by: portmgr (unmaintained port) Approved by: ports-secteam (blanket: build fix) Added: branches/2019Q2/sysutils/asmem/files/patch-read__mem.c - copied unchanged from r503234, head/sysutils/asmem/files/patch-read__mem.c Deleted: branches/2019Q2/sysutils/asmem/files/patch-read_mem.c Modified: branches/2019Q2/sysutils/asmem/Makefile Directory Properties: branches/2019Q2/ (props changed) Modified: branches/2019Q2/sysutils/asmem/Makefile ============================================================================== --- branches/2019Q2/sysutils/asmem/Makefile Mon Jul 1 06:19:57 2019 (r505539) +++ branches/2019Q2/sysutils/asmem/Makefile Mon Jul 1 06:21:52 2019 (r505540) @@ -5,17 +5,16 @@ PORTNAME= asmem PORTVERSION= 1.12 PORTREVISION= 1 CATEGORIES= sysutils afterstep -MASTER_SITES= http://tigr.net/afterstep/download/asmem/ +MASTER_SITES= https://tigr.net/afterstep/download/asmem/ MAINTAINER= ports@FreeBSD.org COMMENT= AfterStep look-n-feel memory utilization monitor LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/LICENSE -BROKEN_FreeBSD_12= fails to compile: read_mem.c: invalid use of undefined type 'struct vmmeter' -BROKEN_FreeBSD_13= fails to compile: read_mem.c: invalid use of undefined type 'struct vmmeter' +USE_XORG= x11 ice sm x11 xext xpm -USE_XORG= xpm GNU_CONFIGURE= yes CONFIGURE_ARGS= --with-xpm \ --with-xpm-includes=${LOCALBASE}/include \ @@ -25,9 +24,7 @@ post-build: @${LN} -sf asmem.man ${WRKSRC}/asmem.1 do-install: - (cd ${WRKSRC} && ${INSTALL_PROGRAM} asmem \ - ${STAGEDIR}${PREFIX}/bin) - (cd ${WRKSRC} && ${INSTALL_MAN} asmem.1 \ - ${STAGEDIR}${MANPREFIX}/man/man1) + ${INSTALL_PROGRAM} ${WRKSRC}/asmem ${STAGEDIR}${PREFIX}/bin + ${INSTALL_MAN} ${WRKSRC}/asmem.1 ${STAGEDIR}${MANPREFIX}/man/man1 .include Copied: branches/2019Q2/sysutils/asmem/files/patch-read__mem.c (from r503234, head/sysutils/asmem/files/patch-read__mem.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2019Q2/sysutils/asmem/files/patch-read__mem.c Mon Jul 1 06:21:52 2019 (r505540, copy of r503234, head/sysutils/asmem/files/patch-read__mem.c) @@ -0,0 +1,60 @@ +--- read_mem.c.orig 2007-04-12 20:38:40 UTC ++++ read_mem.c +@@ -56,6 +56,8 @@ char buf[BUFFER_LENGTH]; + // Machine dependent headers + // FreeBSD + #if defined(__FreeBSD__) ++#define _WANT_VMMETER ++#include + #include + #include + #include +@@ -336,6 +338,14 @@ void error_handle( int place, const char * message ) + int read_meminfo() { + int pagesize, pageshift; + #if __FreeBSD_version > 400000 ++ ++ /* setup pageshift */ ++ pagesize = getpagesize(); ++ pageshift = 0; ++ while (pagesize > 1) { ++ pageshift++; ++ pagesize >>= 1; ++ } + + struct kvm_swap kswap[SWAP_DEVICES]; + int i, swaps; +@@ -347,10 +357,6 @@ int read_meminfo() { + time_t current_time; + #define GETSWAP_DELAY 60 /* 1 min */ + +- /* get the info */ +- if (kvm_read(kd, cnt_offset, (int *)(&sum), sizeof(sum)) != sizeof(sum)) +- return (-1); +- + /* we obtain swap info every GETSWAP_DELAY seconds because of + * kvm_getswapinfo CPU load + */ +@@ -406,9 +412,19 @@ int read_meminfo() { + + #endif /* if __FreeBSD_version > 400000 */ + +- state.fresh.total = pagetok(sum.v_page_count); +- state.fresh.used = pagetok(sum.v_page_count-sum.v_free_count); +- state.fresh.free = pagetok(sum.v_free_count); ++ unsigned long physmem, freemem, inacmem; ++ size_t sz = sizeof(unsigned long); ++ ++ physmem = 0; ++ freemem = 0; ++ inacmem = 0; ++ sysctlbyname("hw.physmem", &physmem, &sz, NULL, 0); ++ sysctlbyname("vm.stats.vm.v_free_count", &freemem, &sz, NULL, 0); ++ sysctlbyname("vm.stats.vm.v_inactive_count", &inacmem, &sz, NULL, 0); ++ ++ state.fresh.total = physmem; ++ state.fresh.free = pagetok(freemem + inacmem); ++ state.fresh.used = physmem - pagetok(freemem + inacmem); + + state.fresh.shared = 0; /* dont know how to get these */ + state.fresh.buffers = 0;