Import p5-Sys-MemInfo-0.99

Sys::MemInfo return the total amount of free and used physical memory
in bytes in totalmem and freemem variables.

From Henry Jensen, with hints from sthen@, and further fixes from me.

OK sthen@
This commit is contained in:
cwen 2019-10-18 21:09:03 +00:00
parent f971a4c311
commit 968c9dfaa1
5 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,15 @@
# $OpenBSD: Makefile,v 1.1.1.1 2019/10/18 21:09:03 cwen Exp $
COMMENT = return the total amount of free and used physical memory
DISTNAME = Sys-MemInfo-0.99
CATEGORIES = sysutils
# Perl
PERMIT_PACKAGE = Yes
WANTLIB += c perl
MODULES = cpan
.include <bsd.port.mk>

View File

@ -0,0 +1,2 @@
SHA256 (Sys-MemInfo-0.99.tar.gz) = B4YxnTo6i65dcnk5JEvxfhQLcU9Sc01en2JyA+TPPjs=
SIZE (Sys-MemInfo-0.99.tar.gz) = 13276

View File

@ -0,0 +1,20 @@
$OpenBSD: patch-Makefile_PL,v 1.1.1.1 2019/10/18 21:09:03 cwen Exp $
Fix totalmem computation, see
https://rt.cpan.org/Public/Bug/Display.html?id=130740
Index: Makefile.PL
--- Makefile.PL.orig
+++ Makefile.PL
@@ -38,9 +38,9 @@ for ($^O) {
}
} elsif (/bsd/) {
copy ('arch/bsd.xs', 'MemInfo.xs');
- if (/netbsd/) {
+ if (/netbsd/ or /openbsd/) {
$define = '-DNETBSD';
- print "Sys::MemInfo for NetBSD\n";
+ print "Sys::MemInfo for NetBSD and OpenBSD\n";
} else {
print "Sys::MemInfo for *BSD\n";
}

View File

@ -0,0 +1,2 @@
Sys::MemInfo return the total amount of free and used physical memory
in bytes in totalmem and freemem variables.

View File

@ -0,0 +1,9 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2019/10/18 21:09:03 cwen Exp $
${P5ARCH}/
${P5ARCH}/Sys/
${P5ARCH}/Sys/MemInfo.pm
${P5ARCH}/auto/
${P5ARCH}/auto/Sys/
${P5ARCH}/auto/Sys/MemInfo/
${P5ARCH}/auto/Sys/MemInfo/MemInfo.so
@man man/man3p/Sys::MemInfo.3p