summaryrefslogtreecommitdiff
path: root/sysutils/p5-Sys-Utmp
diff options
context:
space:
mode:
authorsno <sno@pkgsrc.org>2009-03-22 21:17:03 +0000
committersno <sno@pkgsrc.org>2009-03-22 21:17:03 +0000
commit65b45c1f8167a292237b8a95c209f749a9f98db9 (patch)
tree45399c79ba77567b869d1bd923cdd4b62543de1a /sysutils/p5-Sys-Utmp
parente4645e942e5378d2642527592787f2c58f33dd88 (diff)
downloadpkgsrc-65b45c1f8167a292237b8a95c209f749a9f98db9.tar.gz
Importing package for Sys::Utmp - an object(ish) interface to UTMP files.
Sys::Utmp provides a vaguely object oriented interface to the Unix user accounting file (sometimes /etc/utmp or /var/run/utmp). Whilst it would prefer to use the getutent() function from the systems C libraries it will attempt to provide its own if they are missing. Oked by joerg@
Diffstat (limited to 'sysutils/p5-Sys-Utmp')
-rw-r--r--sysutils/p5-Sys-Utmp/DESCR8
-rw-r--r--sysutils/p5-Sys-Utmp/Makefile19
-rw-r--r--sysutils/p5-Sys-Utmp/distinfo6
-rw-r--r--sysutils/p5-Sys-Utmp/patches/patch-aa68
4 files changed, 101 insertions, 0 deletions
diff --git a/sysutils/p5-Sys-Utmp/DESCR b/sysutils/p5-Sys-Utmp/DESCR
new file mode 100644
index 00000000000..30355942757
--- /dev/null
+++ b/sysutils/p5-Sys-Utmp/DESCR
@@ -0,0 +1,8 @@
+Sys::Utmp provides a vaguely object oriented interface to the Unix user
+accounting file (sometimes /etc/utmp or /var/run/utmp). Whilst it would
+prefer to use the getutent() function from the systems C libraries it will
+attempt to provide its own if they are missing.
+
+This may not be the module that you are looking for - there is a User::Utmp
+which provides a different procedural interface and may well be more
+complete for your purposes.
diff --git a/sysutils/p5-Sys-Utmp/Makefile b/sysutils/p5-Sys-Utmp/Makefile
new file mode 100644
index 00000000000..19ced35a8a0
--- /dev/null
+++ b/sysutils/p5-Sys-Utmp/Makefile
@@ -0,0 +1,19 @@
+# $NetBSD: Makefile,v 1.1.1.1 2009/03/22 21:17:03 sno Exp $
+
+DISTNAME= Sys-Utmp-1.6
+PKGNAME= p5-${DISTNAME}
+CATEGORIES= sysutils perl5
+MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=Sys/}
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= http://search.cpan.org/dist/Sys-Utmp
+COMMENT= Object(ish) Interface to UTMP files
+
+PKG_DESTDIR_SUPPORT= user-destdir
+
+PKG_INSTALLATION_TYPES= overwrite pkgviews
+
+PERL5_PACKLIST= auto/Sys/Utmp/.packlist
+
+.include "../../lang/perl5/module.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/sysutils/p5-Sys-Utmp/distinfo b/sysutils/p5-Sys-Utmp/distinfo
new file mode 100644
index 00000000000..77969a171c9
--- /dev/null
+++ b/sysutils/p5-Sys-Utmp/distinfo
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1.1.1 2009/03/22 21:17:03 sno Exp $
+
+SHA1 (Sys-Utmp-1.6.tar.gz) = 45548135e888d87f5c8f184b83048e04dadbfa5f
+RMD160 (Sys-Utmp-1.6.tar.gz) = fd3adb315ca2791e22054110127b85e3c54feacf
+Size (Sys-Utmp-1.6.tar.gz) = 8818 bytes
+SHA1 (patch-aa) = 47c20eac627a092f6eed64c0a3061df0a8da7a40
diff --git a/sysutils/p5-Sys-Utmp/patches/patch-aa b/sysutils/p5-Sys-Utmp/patches/patch-aa
new file mode 100644
index 00000000000..c06cc53833f
--- /dev/null
+++ b/sysutils/p5-Sys-Utmp/patches/patch-aa
@@ -0,0 +1,68 @@
+--- Utmp.xs.orig 2006-10-13 16:10:30.000000000 +0200
++++ Utmp.xs 2009-02-13 13:45:12.000000000 +0100
+@@ -4,8 +4,11 @@
+
+ #include <utmp.h>
+
+-#ifdef NOUTFUNCS
++#ifdef _AIX
++#define _HAVE_UT_HOST 1
++#endif
+
++#ifdef NOUTFUNCS
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <time.h>
+@@ -15,6 +18,7 @@
+ #include <sys/stat.h>
+ #include <fcntl.h>
+
++
+ #ifdef BSD
+ #define _NO_UT_ID
+ #define _NO_UT_TYPE
+@@ -42,23 +46,12 @@
+ #define ACCOUNTING 9
+ #endif
+
+-
+ /*
+ It is almost certain that if these are not defined the fields they are
+ for are not present or this is BSD :)
+ */
+
+
+-#ifndef UT_LINESIZE
+-# define UT_LINESIZE 32
+-#endif
+-#ifndef UT_NAMESIZE
+-# define UT_NAMESIZE 32
+-#endif
+-#ifndef UT_HOSTSIZE
+-# define UT_HOSTSIZE
+-#endif
+-
+ static int ut_fd = -1;
+
+ static char _ut_name[] = _PATH_UTMP;
+@@ -207,7 +200,7 @@
+ static SV *ut_ref;
+ static char *_ut_id;
+ static struct utmp *utent;
+- static char ut_host[UT_HOSTSIZE];
++ static char ut_host[sizeof(utent->ut_host)];
+
+ HV *self_hash;
+
+@@ -249,9 +242,9 @@
+ ut_tv = (IV)utent->ut_time;
+ #endif
+ #ifdef _HAVE_UT_HOST
+- strncpy(ut_host, utent->ut_host,UT_HOSTSIZE);
++ strncpy(ut_host, utent->ut_host,sizeof(utent->ut_host));
+ #else
+- strcpy(ut_host, "",1);
++ strncpy(ut_host, "",1);
+ #endif
+
+