aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvanilla <vanilla@FreeBSD.org>2004-03-21 10:13:34 +0800
committervanilla <vanilla@FreeBSD.org>2004-03-21 10:13:34 +0800
commitab01bc096184f7905d37974db2d6562657af351f (patch)
tree744ca38a04b3abbc9f27fc6b9c351610e1b86ba2
parentf5bb2f4c9648fa3f8ca3aa518cf33fc799a6a276 (diff)
downloadfreebsd-ports-gnome-ab01bc096184f7905d37974db2d6562657af351f.tar.gz
freebsd-ports-gnome-ab01bc096184f7905d37974db2d6562657af351f.tar.zst
freebsd-ports-gnome-ab01bc096184f7905d37974db2d6562657af351f.zip
Add p5-Filesys-Statvfs_Df 0.68, provides an interface between Perl and
the statvfs() system call. PR: ports/62980 Submitted by: Jim Pirzyk
-rw-r--r--devel/Makefile1
-rw-r--r--devel/p5-Filesys-Statvfs_Df/Makefile23
-rw-r--r--devel/p5-Filesys-Statvfs_Df/distinfo1
-rw-r--r--devel/p5-Filesys-Statvfs_Df/files/patch-Statvfs.xs90
-rw-r--r--devel/p5-Filesys-Statvfs_Df/pkg-descr13
-rw-r--r--devel/p5-Filesys-Statvfs_Df/pkg-plist5
6 files changed, 133 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index d8b6bd5631de..1ce94265a339 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -732,6 +732,7 @@
SUBDIR += p5-File-Temp
SUBDIR += p5-File-chdir
SUBDIR += p5-FileHandle-Unget
+ SUBDIR += p5-Filesys-Statvfs_Df
SUBDIR += p5-Filter
SUBDIR += p5-Filter-CBC
SUBDIR += p5-FreezeThaw
diff --git a/devel/p5-Filesys-Statvfs_Df/Makefile b/devel/p5-Filesys-Statvfs_Df/Makefile
new file mode 100644
index 000000000000..de12cac7a0a8
--- /dev/null
+++ b/devel/p5-Filesys-Statvfs_Df/Makefile
@@ -0,0 +1,23 @@
+# New ports collection makefile for: p5-Filesys-Statvfs_Df
+# Date created: Feb 17 2004
+# Whom: Jim Pirzyk
+#
+# $FreeBSD$
+#
+
+PORTNAME= Filesys-Statvfs_Df
+PORTVERSION= 0.68
+CATEGORIES= devel perl5
+MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
+MASTER_SITE_SUBDIR= Filesys
+PKGNAMEPREFIX= p5-
+
+MAINTAINER= pirzyk@freebsd.org
+COMMENT= Provides an interface between Perl and the statvfs() system call
+
+PERL_CONFIGURE= yes
+
+MAN3PREFIX= ${PREFIX}/lib/perl5/${PERL_VERSION}
+MAN3= Filesys::Df.3 Filesys::Statvfs.3
+
+.include <bsd.port.mk>
diff --git a/devel/p5-Filesys-Statvfs_Df/distinfo b/devel/p5-Filesys-Statvfs_Df/distinfo
new file mode 100644
index 000000000000..8fdc5e003b7f
--- /dev/null
+++ b/devel/p5-Filesys-Statvfs_Df/distinfo
@@ -0,0 +1 @@
+MD5 (Filesys-Statvfs_Df-0.68.tar.gz) = 8425476ff9de21513a0264faadca7d07
diff --git a/devel/p5-Filesys-Statvfs_Df/files/patch-Statvfs.xs b/devel/p5-Filesys-Statvfs_Df/files/patch-Statvfs.xs
new file mode 100644
index 000000000000..ae7b88187f74
--- /dev/null
+++ b/devel/p5-Filesys-Statvfs_Df/files/patch-Statvfs.xs
@@ -0,0 +1,90 @@
+--- Statvfs.xs.orig Wed Nov 22 09:57:31 2000
++++ Statvfs.xs Tue Feb 17 10:13:35 2004
+@@ -5,12 +5,21 @@
+ #include "perl.h"
+ #include "XSUB.h"
+ #include "config.h"
+-#include<sys/statvfs.h>
++#if defined(__APPLE__ ) || defined(__FreeBSD__)
++#include <sys/param.h>
++#include <sys/mount.h>
++#else
++#include <sys/statvfs.h>
++#endif
+ #ifdef __cplusplus
+ }
+ #endif
+
+-typedef struct statvfs Statvfs;
++#if defined(__APPLE__ ) || defined(__FreeBSD__)
++ typedef struct statfs Statvfs;
++#else
++ typedef struct statvfs Statvfs;
++#endif
+
+ MODULE = Filesys::Statvfs PACKAGE = Filesys::Statvfs
+
+@@ -20,34 +29,63 @@
+ PREINIT:
+ Statvfs st;
+ Statvfs *st_ptr;
++ long t;
+ PPCODE:
++#if defined(__APPLE__ ) || defined(__FreeBSD__)
++ if(statfs(dir, &st) == 0) {
++#else
+ if(statvfs(dir, &st) == 0) {
++#endif
+ st_ptr=&st;
+ EXTEND(sp, 15);
+ PUSHs(sv_2mortal(newSViv(st_ptr->f_bsize)));
++#if defined(__APPLE__ ) || defined(__FreeBSD__)
++ PUSHs(sv_2mortal(newSViv(0)));
++#else
+ PUSHs(sv_2mortal(newSViv(st_ptr->f_frsize)));
++#endif
+ PUSHs(sv_2mortal(newSViv(st_ptr->f_blocks)));
+ PUSHs(sv_2mortal(newSViv(st_ptr->f_bfree)));
+ PUSHs(sv_2mortal(newSViv(st_ptr->f_bavail)));
+ PUSHs(sv_2mortal(newSViv(st_ptr->f_files)));
+ PUSHs(sv_2mortal(newSViv(st_ptr->f_ffree)));
++#if defined(__APPLE__ ) || defined(__FreeBSD__)
++ PUSHs(sv_2mortal(newSViv(st_ptr->f_ffree)));
++#else
+ PUSHs(sv_2mortal(newSViv(st_ptr->f_favail)));
++#endif
+ #if defined(_AIX__) || defined(_LINUX__)
+ PUSHs(sv_2mortal(newSViv(0)));
+ #else
++#if defined(__APPLE__ ) || defined(__FreeBSD__)
++ memcpy (&t, &st_ptr->f_fsid, sizeof (long));
++ PUSHs(sv_2mortal(newSViv(t)));
++#else
+ PUSHs(sv_2mortal(newSViv(st_ptr->f_fsid)));
+ #endif
++#endif
+ #ifdef _LINUX__
+ PUSHs(sv_2mortal(newSVpv(NULL, 1)));
+ #else
++#if defined(__APPLE__ ) || defined(__FreeBSD__)
++ PUSHs(sv_2mortal(newSVpv(st_ptr->f_fstypename, 0)));
++#else
+ PUSHs(sv_2mortal(newSVpv(st_ptr->f_basetype, 0)));
+ #endif
++#endif
++#if defined(__APPLE__ ) || defined(__FreeBSD__)
++ PUSHs(sv_2mortal(newSViv(st_ptr->f_flags)));
++ PUSHs(sv_2mortal(newSVpv(st_ptr->f_mntonname, MNAMELEN)));
++#else
+ PUSHs(sv_2mortal(newSViv(st_ptr->f_flag)));
+ PUSHs(sv_2mortal(newSViv(st_ptr->f_namemax)));
++#endif
+ #if defined(_DEC__) || defined(_LINUX__)
+ PUSHs(sv_2mortal(newSVpv(NULL, 1)));
+ #else
++#if ! defined(__APPLE__ ) && ! defined(__FreeBSD__)
+ PUSHs(sv_2mortal(newSVpv(st_ptr->f_fstr, 0)));
++#endif
+ #endif
+ #ifdef _HPUX__
+ PUSHs(sv_2mortal(newSViv(st_ptr->f_size)));
diff --git a/devel/p5-Filesys-Statvfs_Df/pkg-descr b/devel/p5-Filesys-Statvfs_Df/pkg-descr
new file mode 100644
index 000000000000..a6b0da244df1
--- /dev/null
+++ b/devel/p5-Filesys-Statvfs_Df/pkg-descr
@@ -0,0 +1,13 @@
+Filesys::Statvfs provides an interface between
+Perl and the statvfs() system call.
+
+Filesys::Df uses Filesys::Statvfs to obtain
+filesystem statistics then creates additional
+filesystem information such as percent full,
+user and superuser differentials, etc.
+
+Filesys::Df will also let you specify the
+block size for the values you wish to see.
+The default block size output is 1024 bytes per
+block. So if you want to get the size in bytes
+just take the block size and * it by 1024.
diff --git a/devel/p5-Filesys-Statvfs_Df/pkg-plist b/devel/p5-Filesys-Statvfs_Df/pkg-plist
new file mode 100644
index 000000000000..5c8ea6610296
--- /dev/null
+++ b/devel/p5-Filesys-Statvfs_Df/pkg-plist
@@ -0,0 +1,5 @@
+%%SITE_PERL%%/%%PERL_ARCH%%/Filesys/Df.pm
+%%SITE_PERL%%/%%PERL_ARCH%%/Filesys/Statvfs.pm
+%%SITE_PERL%%/%%PERL_ARCH%%/auto/Filesys/Statvfs/.packlist
+@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/auto/Filesys 2>/dev/null || true
+@unexec rmdir %D/%%SITE_PERL%%/Filesys 2>/dev/null || true