summaryrefslogtreecommitdiff
path: root/sysutils/p5-Sys-Hostname-Long
diff options
context:
space:
mode:
authorheinz <heinz@pkgsrc.org>2004-03-07 01:23:28 +0000
committerheinz <heinz@pkgsrc.org>2004-03-07 01:23:28 +0000
commitf0059f6f9bf3a2d673db5970e92810a0bcca462b (patch)
tree12868d63df85ff0b783ebcc8128b187864d55573 /sysutils/p5-Sys-Hostname-Long
parent8cd23a0f10fa192c982fcef2cf37580a48c74cbe (diff)
downloadpkgsrc-f0059f6f9bf3a2d673db5970e92810a0bcca462b.tar.gz
Initial import of p5-Sys-Hostname-Long.
This Perl module tries to determine the full host name in a portable way on multiple operating systems (mac, windows, unix*). A patch is included which should make this module work on most *nix platforms, not just on Linux. Submitted to the author via rt.cpan.org.
Diffstat (limited to 'sysutils/p5-Sys-Hostname-Long')
-rw-r--r--sysutils/p5-Sys-Hostname-Long/DESCR2
-rw-r--r--sysutils/p5-Sys-Hostname-Long/Makefile22
-rw-r--r--sysutils/p5-Sys-Hostname-Long/PLIST1
-rw-r--r--sysutils/p5-Sys-Hostname-Long/distinfo5
-rw-r--r--sysutils/p5-Sys-Hostname-Long/patches/patch-aa16
5 files changed, 46 insertions, 0 deletions
diff --git a/sysutils/p5-Sys-Hostname-Long/DESCR b/sysutils/p5-Sys-Hostname-Long/DESCR
new file mode 100644
index 00000000000..cf5e8ee7dba
--- /dev/null
+++ b/sysutils/p5-Sys-Hostname-Long/DESCR
@@ -0,0 +1,2 @@
+This Perl module tries to determine the full host name in a portable way
+on multiple operating systems (mac, windows, unix*).
diff --git a/sysutils/p5-Sys-Hostname-Long/Makefile b/sysutils/p5-Sys-Hostname-Long/Makefile
new file mode 100644
index 00000000000..91125b10ca1
--- /dev/null
+++ b/sysutils/p5-Sys-Hostname-Long/Makefile
@@ -0,0 +1,22 @@
+# $NetBSD: Makefile,v 1.1.1.1 2004/03/07 01:23:28 heinz Exp $
+#
+
+DISTNAME= Sys-Hostname-Long-1.0
+PKGNAME= p5-${DISTNAME}
+CATEGORIES= sysutils perl5
+MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=Sys/}
+
+MAINTAINER= heinz@NetBSD.org
+HOMEPAGE= http://search.cpan.org/dist/Sys-Hostname-Long/
+COMMENT= Try to get the full hostname in Perl
+
+PKG_INSTALLATION_TYPES= overwrite pkgviews
+
+USE_BUILDLINK3= yes
+USE_LANGUAGES= # empty
+
+pre-configure:
+ @ ${RM} ${WRKSRC}/lib/Sys/Hostname/Long.pm.orig
+
+.include "../../lang/perl5/module.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/sysutils/p5-Sys-Hostname-Long/PLIST b/sysutils/p5-Sys-Hostname-Long/PLIST
new file mode 100644
index 00000000000..c0e537cbe71
--- /dev/null
+++ b/sysutils/p5-Sys-Hostname-Long/PLIST
@@ -0,0 +1 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2004/03/07 01:23:28 heinz Exp $
diff --git a/sysutils/p5-Sys-Hostname-Long/distinfo b/sysutils/p5-Sys-Hostname-Long/distinfo
new file mode 100644
index 00000000000..4fc50008174
--- /dev/null
+++ b/sysutils/p5-Sys-Hostname-Long/distinfo
@@ -0,0 +1,5 @@
+$NetBSD: distinfo,v 1.1.1.1 2004/03/07 01:23:28 heinz Exp $
+
+SHA1 (Sys-Hostname-Long-1.0.tar.gz) = 8e55d84e84dbc9a75bf90b17f968394f58177368
+Size (Sys-Hostname-Long-1.0.tar.gz) = 2286 bytes
+SHA1 (patch-aa) = 8ca0721838baac7b15dd2eaf4b49d106f06c041f
diff --git a/sysutils/p5-Sys-Hostname-Long/patches/patch-aa b/sysutils/p5-Sys-Hostname-Long/patches/patch-aa
new file mode 100644
index 00000000000..0e8dd2d2d53
--- /dev/null
+++ b/sysutils/p5-Sys-Hostname-Long/patches/patch-aa
@@ -0,0 +1,16 @@
+$NetBSD: patch-aa,v 1.1.1.1 2004/03/07 01:23:28 heinz Exp $
+
+--- lib/Sys/Hostname/Long.pm.orig Sat Sep 22 08:23:46 2001
++++ lib/Sys/Hostname/Long.pm
+@@ -35,8 +35,9 @@ sub hostname_long {
+ # . Linux
+ # . FreeBSD
+ # - MacOS X (Rhapsody/Darwin)
+- $hostlong = `hostname --fqdn`;
+- $hostlong =~ tr/\0\r\n//d;
++ # Emulate `hostname --fqdn` with Perl; more portable
++ $hostlong = Sys::Hostname::hostname();
++ ($hostlong) = gethostbyname($hostlong);
+ }
+
+ return $hostlong;